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 -> RN FAQ
Author Message
trunks
Worker
Worker


Joined: Oct 05, 2007
Posts: 152
Location: United Kingdom

PostPosted: Thu Aug 21, 2008 7:59 pm Reply with quote

The only way that i know of that it is possible to get this to work correctly, having been asked this myself and also had customers inform me of e-mails replied to by google is the following:

Use ONLY Legacy Tracking Code (urchin.js)

Select all and copy you code, which will look like this:

Code:


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

Of course your _uacct (account number) will be different for everyone.

Now you need to edit this so that it can be placed correctly in a php file, without getting white screen syntax errors.

So you need to make it look like this:

Code:


echo "<script src=\"http://www.google-analytics.com/urchin.js\" type=\"text/javascript\">\n";
echo "</script>\n";
echo "<script type=\"text/javascript\">\n";
echo "_uacct = \"AA-1234567-1\";\n";
echo "urchinTracker();\n";
echo "</script>\n\n";


Keeping each echo on a seperate line.

Now you need to open up your 'header.php' (back up first, without saying of course).

And find:

Code:


    //End of Dynamic Titles changes
    include_once('includes/meta.php');
    include_once('includes/javascript.php');
    include_once("includes/noright2.php");


On a new line add:

Code:


// Start Google Analytics Code
echo "<script src=\"http://www.google-analytics.com/urchin.js\" type=\"text/javascript\">\n";
echo "</script>\n";
echo "<script type=\"text/javascript\">\n";
echo "_uacct = \"AA-1234567-1\";\n";
echo "urchinTracker();\n";
echo "</script>\n\n";
// Finish Google Analytics Code


And re-upload.

You should not get any errors, please allow 24 hours from when you added this to your site for google to check for the update.

Hope this answers so many people's questions ive seen out there.

If you do get any problems, ide be happy to help you with doing this, as this tool is extremely useful.

e-mail: Only registered users can see links on this board! Get registered or login!

Trunks
 
View user's profile Send private message Visit poster's website MSN Messenger
jakec
Site Admin


Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Fri Aug 22, 2008 12:41 am Reply with quote

It is possible to use the new tracking code in phpNuke and I have it working on one of my sites. We had a discussion about it over at Guardians site: Only registered users can see links on this board! Get registered or login!

You can paste into the WYSIWYG editor under preferences, using the source option.

What version of RN are you using?
 
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9456
Location: Arizona

PostPosted: Fri Aug 22, 2008 5:53 am Reply with quote

You can also do as I, and create yourself an includes/custom_files/custom_footer.php script to place the code. All three of these will work.

One can have a custom_header.php, custom_footer.php, and/or custom_mainfile.php in that directory as ways to extend the capabilities of these.

Since this is applicable to all versions of RN, I will move this thread accordingly.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
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 -> RN FAQ

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 ©