Comdev - PHP Scripts For Your Website
Fast Website Development with PHP Components





Back To List Geo Traffic > Tutorials Showing 1 Of 5 Next

What is the code I need to use for Geo Traffic to track my web pages? Can I put the code in my html pages?


Modified on 2005-12-14

The basic code (tracker) for your Geo Traffic is:

However, to ensure the Geo Traffic works on all pages on your website, we recommend you to add the full Document Path (path from top level /oneadmin folder on web server) to the tracker.

To find your full Document Path, open the /oneadmin/config.php file with your text editor and jot down the path. Let's assume the path is '/home/sitename/public_html/oneadmin/'.

Now, the complete tracker should look like this:

< ?
     include_once("/home/sitename/public_html/oneadmin/config.php"); 
     include("/home/sitename/public_html/oneadmin/geotraffic/home.track.php");  
?>

Paste the above code to any php web pages that you want the tracker to appear in. Please note that the tracker must be insert to the first line of the php files, making sure there is nothing (no blanks, no spaces, no characters) neither before the <? tag at the beginning, otherwise an error message will prompt out, 'session..header already sent'.

The PHP Geo Traffic is not able to report counters of html pages, it only works on php files. However, if you have PHP installed on your online server, you can save the .html page to .php, your html web pages will still working.





Printer Friendly Version
Tell A Friend

Related FAQs In This Category

How can I reset my statistic?

How do I remove the Geo Traffic tracker from a webpage?