Need Some Help With Inserting JavaScript Into Page »  Show posts from    to     

Icy Phoenix


Old Support Topics - Need Some Help With Inserting JavaScript Into Page



darkasylum [ Mon 04 Apr, 2011 01:08 ]
Post subject: Need Some Help With Inserting JavaScript Into Page
Hi guys.

I wonder if anyone here could help me but I'm not sure how to do this.
I have some JavaScript that records the demographics of the user when hit the page.

E.g. IP address origin country browser operators system type. etc.

I'm unsure of where to insert this into icyphoenix .
I get it work on HTML very easily on my homepage

I wish nomatter where some the looks on the forum that this
script will be loaded every time.
What files do I have edit

If somebody could give me a clue where to look at sure I can figure out the rest

The code is pretty simple see below

with thanks




<head>
<body>
<script language="javascript" src="src/hits.js"></script>


Joshua203 [ Mon 04 Apr, 2011 08:07 ]
Post subject: Re: Need Some Help With Inserting JavaScript Into Page
Hi darkasylum,

Usually you would put something like that in the overal footer wich makes it autmatically sniff all pages

Greetings Joshua203


mort [ Mon 04 Apr, 2011 08:19 ]
Post subject: Re: Need Some Help With Inserting JavaScript Into Page
darkasylum wrote: [View Post]

<script language="javascript" src="src/hits.js"></script>


I would also change that string to:

<script type="text/javascript" src="{FULL_SITE_PATH}{T_COMMON_TPL_PATH}js/hits.js"></script>

And put the hits.js in templates/common/js/hits.js

As for the best place to put it - One would need the full application to see how it pans out the best.


spydie [ Mon 04 Apr, 2011 09:13 ]
Post subject: Re: Need Some Help With Inserting JavaScript Into Page
to me , it looks like this js api is hosted on a proper server




Powered by Icy Phoenix