Hiding Piwik server URL (Footprint) - Not working

Hi,

I’m trying to hide my footprint to track visitors to my different sites by hiding the PIWIK server URL as described here: http://piwik.org/faq/how-to/#faq_132.

However it is not working and I have no idea how to fix it. I have looked on the forum but couldn’t figure it out. I’m a newbie with Piwik and I don’t know much about javascripts, etc.

Before we start, here’s what I have done:
I have the latest Piwik server version
My hosting is with Bluehost and I have PHP 5.2.17 on the server.
I have downloaded the Bluehost php.ini file from here: http://www.bluehostforum.com/archive/index.php/t-1967.html and I added the “allow_url_fopen = On” line in the file. I then uploaded the php.ini file to all my folders using .php

I then followed all the instructions:

  1. Added website to Piwik.
  2. Created a user
  3. Assigned permissions
  4. Copy token in the .php file
  5. Copy server in the .php file
  6. Upload the file to the root folder of my site
  7. I then added the following code to my footer before the /body:

<!-- Piwik --> 
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://www.mysite.net/" : "http://www.mysite.net/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.php' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script>
<!-- End Piwik Tracking Code -->

However I don’t see any tracking of any activity in my dashboard.

Can anybody please tell me if I have done anything wrong and if so, how to fix it or debug it?

Thank you very much!

What’s a page with the code that does not work ? Try debugging with: http://piwik.org/docs/tracking-api/reference/#toc-debugging-the-tracking-api-requests

I’m having exactly the same problem!

I’m using Hostgator, PHP5, using a wordpress site.

Installed Piwik on one server site, and followed instructions over at:

http://piwik.org/faq/how-to/#faq_132

On the Hostgator c-panel, I went to php.ini quickedit, and set “allow_url_fopen = On”

I went through steps 1-6, just like jpdeanadams mentioned above.

Here’s the script I entered in my footer file:


<!-- Piwik -->
<script type="text/javascript">
		var pkBaseURL = (("https:" == document.location.protocol) ? "https://mysecretwebsite.org/" : "http://mysecretwebsite.org/");
		document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.php' type='text/javascript'%3E%3C/script%3E"));
		</script><script type="text/javascript">
		try {
		var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script>
<!-- End Piwik Tracking Code -->

The sites were I have uploaded the piwik folder and NOT used the modified javascript for hiding the footprint, are working perfectly.

Any help would be much appreciated

Matt:

Here’s an example page that doesn’t work:

hxxp://winfreeiphonenow.info/home

I’m a newbie, I’m not sure how this ‘debugging’ business works. On the link you gave, I followed step #1 and set the following as true on the piwik.php file in my piwik folder on my server site:

$GLOBALS[‘PIWIK_TRACKER_DEBUG’] = true;

But I didn’t understand step #2 about using Firebug Net Panel