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

Tracking Code - tracker url does not appear to be getting set (2 replies)

$
0
0
Hello,

I've just installed Piwik, but I am not getting page tracking data. I have copied the tracking code directly from my administration page.

From my browser's developer tools (both Firefox and Chrome), I see that the GET request is going to the same server as the loaded page, instead of the analytics server. It looks like the tracker URL is not being set.

Page to Track: webApp
Piwik Server: analyticsServer

Tracking Code on https://webapp

var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//analyticsServer/analytics/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 1]);
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);
})();

The net tab in developer tools shows:

https://webapp/?action_name=[...]

Which results in an error, because the tracking code should be going to:

https://analyticsServer/analytics/piwik.php?action_name=[...]

I've just upgraded from 2.9 to 2.10, both had this issue.

In the console when I check the Piwik object's tracking URL, it returns a blank (when I switch to js/piwik.js, the unminimized code). I'm not sure if this really indicates anything though:

> Piwik.getTracker().getTrackerUrl()
""
> Piwik.getAsyncTracker().getTrackerUrl()
""

Any ideas?

Viewing all articles
Browse latest Browse all 4243

Trending Articles