Tracking code has bare IPv6 address
-
Hello,
We are using WP-Piwik on several WordPress sites, and recently noticed the stats had stopped completely.
Investigating, it turns out that after the last update (0.9.8), WP-Piwik now generates tracking code that has the host IPv6 address instead of the HOSTNAME. Piwik itself has no problem with this, it generates proper code. We found no way of fixing this in the settings.
The problem comes up likely because the host has both IPv4 and IPv6 addresses, but no IPv6 reverse (which likely would have hidden it). But it causes problems since it bypasses all VHost configuration now.
Problem tracking code:
<!– Piwik –>
<script type=”text/javascript”>
var pkBaseURL = ((“https:” == document.location.protocol) ? “https://2001:67c:2e8:xxxxxx/piwik/” : “https://2001:67c:2e8:xxxxxxxxx/piwik/”);
document.write(unescape(“%3Cscript src='” + pkBaseURL + “piwik.js’ type=’text/javascript’%3E%3C/script%3E”));
</script><script type=”text/javascript”>
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + “piwik.php”, 8);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src=”https://2001:67c:2e8:xxxxxxxx/piwik/piwik.php?idsite=8″ style=”border:0″ alt=”” /></p></noscript>
<!– End Piwik Tracking Code –>Please advise.
Thank you,
Mihnea
- The topic ‘Tracking code has bare IPv6 address’ is closed to new replies.