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

Re: Piwik 1.10 Page Overlay

$
0
0
Quote
Timo
In the upcoming release, the machanism will be changed. The troubleshooting section has already been updated for the new release, so the information about exactly matching URLs has been removed.

In the future, this one applies:

Quote

Page Overlay tries to load scripts and data from the URL you pass to the Piwik tracker. If you have a restrictive mod_proxy setup or there’s another reason why this doesn’t work, use the method setAPIUrl(apiUrl) of the Piwik tracker to let it know from which URL it should load the scripts and the data. The parameter apiUrl has to point to the root directory of piwik, e.g. http://piwik.example.org/ or https://example.org/piwik/.

Thanks for the info! On a related note, something along the lines of the following could also be added to the troubleshooting section:

If you use the "js/" tracking subdirectory of your Piwik installation instead of piwik.php/piwik.js, you would also need to use the setAPIUrl(apiUrl) of the Piwik tracker as described above.

E.g., I had to add that method to the following tracker I use (Piwik 1.12, after updating from 1.8.2):
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://www.piw.example.org/p/" : "http://www.piw.example.org/p/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "js/' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "js/", 1);
piwikTracker.setAPIUrl(pkBaseURL);     // <<==== Had to just insert this line to make the "Overlay" work
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script>

Lest "http://www.piw.example.org/p/js/" is considered the API base, with calls to "http://www.piw.example.org/p/js/plugins/Overlay/..." obviously failing. (Can be seen e.g. in the Firefox Web Console.)

Viewing all articles
Browse latest Browse all 13117

Trending Articles