Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

How to add This code to site

Asked Modified Viewed 2,803 times
D
DontLook
D
  • Junior Member, joined since
  • Contributed 24 posts on the community forums.
  • Started 8 threads in the forums
  • Started this discussions
asked
Junior Member

Ok basically its a program called Google Analytics. It tracks everything about your vistors. I need to add this After <body> but before </body> but I have no idea how to do this, what php file to open etc..

The instructions are as follows.....

Copy the following code block into every webpage you want to track.
Click in the box below to select all code. Copy and paste the code segment into the bottom of your content, immediately before the </body> tag of each page you are planning to track. If you use a common include or template, you can enter it there.

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-956254-1";
urchinTracker();
</script>


For obvious reasons I want it to track the visitors who hit the main page.

Please help:)
0 replies

8 posts

D
DigitalOutcast
D
  • Newbie, joined since
  • Contributed 8 posts on the community forums.
  • Started 4 threads in the forums
answered
Newbie

put it in the subheader.php after where it says
<body bgcolor='$body_bg' text='$body_text'>\n";
You may want to put it after the render_header function though.
0 replies
I
icarus1337
I
  • Junior Member, joined since
  • Contributed 45 posts on the community forums.
  • Started 18 threads in the forums
answered
Junior Member

I just recently did the exact same thing...you should do what digitaloutcast says and put the code in subheader.php however it should be at the very bottom, outside the php tags otherwise it will stuff up your site.
0 replies
D
DontLook
D
  • Junior Member, joined since
  • Contributed 24 posts on the community forums.
  • Started 8 threads in the forums
  • Started this discussions
answered
Junior Member

I tried both ways but i got errors when going to the website....

Wondering what to do now.
0 replies
D
DontLook
D
  • Junior Member, joined since
  • Contributed 24 posts on the community forums.
  • Started 8 threads in the forums
  • Started this discussions
answered
Junior Member

I just put it after the ?> and the site loaded up and when go2 the site i can see it in the view source. I think that might have done the trick. I think the error is because its a start of PHP code and that code isnt php?

I have to wait up to 24 hours to get results from the Goggle tracker. Will let you know if that did the trick.
0 replies
K
Ken
K
Ken 10
No Support by PM. Please use the forum.
  • Senior Member, joined since
  • Contributed 713 posts on the community forums.
  • Started 43 threads in the forums
answered
Senior Member

Did it work?

If it didn't work, find this:

<body bgcolor='$body_bg' text='$body_text'>\n";

and after add the following code:

echo "
<script src='http://www.google-analytics.com/urchin.js' type='text/javascript'>
</script>
<script type='text/javascript'>
_uacct = 'UA-[color=red]YOURNUMBERHERE[/color]-1';
urchinTracker();
</script>
";
0 replies
B
b1u3
B
b1u3 10
  • Junior Member, joined since
  • Contributed 10 posts on the community forums.
  • Started 1 thread in the forums
answered
Junior Member

Why don't you add this text to a new panel?
I think this is the easiest way...
0 replies
K
Ken
K
Ken 10
No Support by PM. Please use the forum.
  • Senior Member, joined since
  • Contributed 713 posts on the community forums.
  • Started 43 threads in the forums
answered
Senior Member

Quote

b1u3 wrote:
Why don't you add this text to a new panel?
I think this is the easiest way...

You will then get a empty panel I guess.
0 replies
B
bbene
B
bbene 10
Ben Benesh
Support Team Member
  • Member, joined since
  • Contributed 74 posts on the community forums.
  • Started 1 thread in the forums
answered
Member

You could also just put it in the site footer field under Site Settings.
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 8 posts
  • Votes 0 votes
  • Topic users 6 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet