Quantcast
Channel: Piwik Forums - Support & Bugs
Viewing all articles
Browse latest Browse all 4243

Tracks only visits to my localhost version of the website (no replies)

$
0
0
Thanks for the excellent product. However, it seems to track only visits to the localhost version of my website.

Here is what I did:
1. I installed piwik using the ftp method. I got an error regarding the first item in the optional part (in the 2nd screen of the installation process). The error said something about (Try whitelisting this URL from HTTP Authentication and disable mod_security.) However, since it was part of the "optional" area, I ignored the error, and continued. Every thing went very smooth afterwards.

2. I added several websites to piwik. Then, I copied the tracking JavaScript codes to the web pages on my local computer.

3. Then, I uploaded the new updated pages (having the JavaScript tracking code) to my shared hosting server.

Tracking worked for all of them. However, tracking seems to work only when I access the pages, which are on my localhost (my laptop computer), e.g. (localhost/web/site111). Moreover, accessing the pages, which are on the same webhost that piwik is installed on, also works. To clarify, piwik is installed on (site222.com.au/piwik/), accessing the pages on (site222.com.au) is tracked correctly.

Accessing the pages, which are on the webhost server, e.g.(site111.com.au), does not get reported by piwik. This is my problem.

FYI, my web pages have tracking code for Google Analytics as well. I tried removing that from my pages. This did not seem to fix the problem.

Moreover, I opened the html/php files, which are on the webhost, to double-check that they have the tracking code in them.

Following is one of the tracking codes used:
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//buildwebsitepro.com.au/piwik/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 3]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//buildwebsitepro.com.au/piwik/piwik.php?idsite=3" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->

Your help will be highly appreciated... :)

Viewing all articles
Browse latest Browse all 4243

Trending Articles