Traffic and Site Access - Records data but not show stats

beegee
Posts: 5

Traffic and Site Access - Records data but not show stats

One more question please about this script: http://coursesweb.net/php-mysql/website-traffic-pages-access-data_s2
I have one central page that shows the stats for the site. There are pages that I want to log but not show the stats on.
In the former version I placed a script and it tracked that page but does not show the stats itself.
I see the same script on the test.php page but when I place it on a different page it does not track it.
So how do I log a page without showing all the stats?

Admin
Hello,
Just include the "siteaccess/siteaccess.js" in the html code of that page.

Code: Select all

<script src="siteaccess/siteaccess.js"></script>

In the "siteaccess.js" file put an absolute /full path to "siteaccess.php" (with "://"), for example:

Code: Select all

ob_ajax.open('POST', 'http://localhost/siteaccess.php', true);

- Or, if the "siteaccess.php" file is directly in root of your website, you can set the path with "/" at beginning:

Code: Select all

ob_ajax.open('POST', '/siteaccess.php', true);

- You can check in browser console (F12) to see if there is JS error.

Adv. Posts: 01

Similar Topics