Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's RavenNuke(tm) v2.00.00 - v2.02.00 Distro
Author Message
mvillamizar
Regular
Regular


Joined: Nov 02, 2004
Posts: 54
Location: Colombia

PostPosted: Tue Jul 25, 2006 6:42 am Reply with quote

Hi,

I want to install google analytics in my website using the last version from raven, does anyone knows where to put it the javascript code that they give you?

Thanks.

_________________
Mario Villamizar
Web Developer 
View user's profile Send private message Visit poster's website
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

PostPosted: Tue Jul 25, 2006 6:47 am Reply with quote

what do they suggest in the install?
 
View user's profile Send private message
hitwalker
PostPosted: Tue Jul 25, 2006 6:55 am Reply with quote

i just read it...

Quote:
Copy and paste the code segment into the bottom of your content, immediately before the closing body tag of each page you are planning to track. If you use a common include or template, you can enter it there.


you could try putting in your custom footer...after php closing tag.
 
mvillamizar
PostPosted: Tue Jul 25, 2006 12:42 pm Reply with quote

you are talking about the foot.php file or in one of the theme files?
 
hitwalker
PostPosted: Tue Jul 25, 2006 12:44 pm Reply with quote

no...
this one...

includes/custom_files/custom_footer.php
 
crypto
Worker
Worker


Joined: Aug 02, 2004
Posts: 165

PostPosted: Wed Aug 23, 2006 8:39 am Reply with quote

Hmmm, where should I put the code? Could somebody send an example, thanx.
 
View user's profile Send private message
hitwalker
PostPosted: Wed Aug 23, 2006 8:41 am Reply with quote

what example ?
its easy ...not?
tell me what isnt clear...
 
crypto
PostPosted: Wed Aug 23, 2006 8:51 am Reply with quote

Hmmm, /includes/custom_files/ doesnt have any files which to edit.

Please send a full example code which to edit. Then I can edit the google analytics code as it should be.
 
hitwalker
PostPosted: Wed Aug 23, 2006 8:56 am Reply with quote

ok 1 time deal... Wink

create a php file named custom_footer.php
put that in your includes/custom_files/ folder

and put this in the php file..


Code:
<?php

if (stristr($_SERVER['SCRIPT_NAME'], "custom_footer.php")) {
    Header("Location: ../index.php");
    die();
}

?>
after closingtag HERE comes your code
 
crypto
PostPosted: Wed Aug 23, 2006 9:13 am Reply with quote

Thanx Hitwalker!

I appreciate your help!
 
hitwalker
PostPosted: Wed Aug 23, 2006 9:15 am Reply with quote

YW:)
 
Aikon
New Member
New Member


Joined: May 22, 2005
Posts: 6
Location: Oradea

PostPosted: Fri Aug 25, 2006 6:31 pm Reply with quote

...or you can just add this code into one of the three footer messages from admin->preferences [straight from phpMyAdmin in case it doesn't allow you from admin panel].
 
View user's profile Send private message Visit poster's website
hitwalker
PostPosted: Fri Aug 25, 2006 7:08 pm Reply with quote

thats not realy needed,and that could give problems to as the code is javascript.
 
Aikon
PostPosted: Sat Aug 26, 2006 3:37 am Reply with quote

It is javascript & it went smoothly for others.
 
hitwalker
PostPosted: Sat Aug 26, 2006 4:54 am Reply with quote

but i fail to see why you suggested it.
the custom footer is the best place to publish this,and not putting it in the footer lines from within admin.
 
Aikon
PostPosted: Sat Aug 26, 2006 7:43 am Reply with quote

Quote:
but i fail to see why you suggested it.

Rather than open a editor, create a new file, add the code, save it, login to ftp, upload the file, it seemed to me much easier to login into phpMyAdmin and add][copy/ paste] it from there. That's why I suggested it.
It's just another more comfortable solution!!!
I didn't say that yours isn't good or something. Just another solution.That's all.
 
hitwalker
PostPosted: Sat Aug 26, 2006 8:00 am Reply with quote

well there was a typical reason why i suggested it with the custom footer.
the install of the javascript part clear says to do it before the closing body tag.
fact is that the custom footer comes after the footer messages and therefor would be better,as google says so....
 
Aikon
PostPosted: Sat Aug 26, 2006 8:29 am Reply with quote

ok I understand.

Google Analytics have some sort of reporting system that allows users to see if they had added the code in the right way.
If you do as I said won't be any problem[no errors issued by this system] so I'm guessing that's ok!!!
 
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6383

PostPosted: Sat Aug 26, 2006 3:26 pm Reply with quote

Yes, but it won't know if your visitors click any of the links below it, which is why it's suggested to put in the footer as hitwalker suggested, just before the closing body tag.

_________________
I google, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
Aikon
PostPosted: Sat Aug 26, 2006 5:54 pm Reply with quote

You say something but I think you got it backwards.

Of course it will know:
1. If that link is toward a page from your site[which will contain the footer again, the javascript also] will be no problem with the tracking[hope you'll agree with me on this].
2. If it's about a outside link and you really what to track the clicks for that link you must edit a little bit that link.

Probably you won't believe me so let's see what have Google to Only registered users can see links on this board! Get registered or login! about this:
[bold text is most important]
Quote:
How do I track clicks on outbound links?

Google Analytics provides an easy way to track clicks on links that lead away from your site. Because these links do not lead to a page on your site containing the UTM JavaScript, you will need to tag the link itself with the urchinTracker JavaScript. This piece of JavaScript assigns a pageview to any click on a link - the pageview is attributed to the filename you specify.

For example, to log every click on a particular link to Only registered users can see links on this board! Get registered or login! as a pageview for "/outgoing/example_com" you would add the following attribute to the link's <a> tag:

<a href="http://www.example.com" onC lick="javascript:urchinTracker('/outgoing/example_com');">

It is a good idea to log all of your outbound links into a logical directory structure as shown in the example. This way, you will be able to easily identify what pages visitors clicked on to leave your site.

Important: if your pages include a call to urchinTracker(), utmLinker(), utmSetTrans(), or utmLinkPost(), your Analytics tracking code must be placed in your HTML code above any of these calls. In these cases the tracking code can be placed anywhere between the opening <body> tag and the JavaScript call.
 
kguske
PostPosted: Sat Aug 26, 2006 7:11 pm Reply with quote

These are different subjects. That's saying the tracking code needs to be placed above calls to the javascript, but doesn't address links that occur AFTER the javascript call. I think that's why Google recommends putting the javascript call right before the closing body tag.
 
Aikon
PostPosted: Sat Aug 26, 2006 8:02 pm Reply with quote

kguske, there can be 2 kind of links as I said before.
The first type is clear.
The problem lies with the outside links, you cannot track a outside link[clicks] even if you put hat code after de </bo dy> tag unless you are doing what they said.
Quote:
Because these links do not lead to a page on your site containing the UTM JavaScript


If it would be like you said, then the above recomendation made by Google would be absolutely useless, since all the links would be before the javascript, is it?
You can put the code wherever in the page as long the new page [following a link] have the javascript code[...and footer is in every page of your php-nuke site!], the tracking will be ok. You will still get the whole bunch of informations provided by Google Analytics[the referrers too].

Well, enough it's enough, let's end this looks like I can't convice you.
 
kguske
PostPosted: Sat Aug 26, 2006 8:45 pm Reply with quote

I see what you mean for the links where you add a specific javascript call.

My point was that you need to have the javascript Google recommends just before the closing BODY tag if you do NOT add a specific call on each link. I'd rather do that than to change all the links...
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's RavenNuke(tm) v2.00.00 - v2.02.00 Distro

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©