PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
trunks
New Member
New Member


Joined: Oct 05, 2007
Posts: 4

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

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 to the forums!


Trunks
View user's profile Send private message
jakec
Moderator


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

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

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 to the forums!


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: 7452
Location: Arizona

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

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.
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum