Hi everyone,
I’m new to Piwik and couldn’t find the answer in the documentation. I’m trying to find the equivalent of : ga(‘send’, ‘pageview’, location.pathname); but for Piwik.
Thanks for your help,
Olivier
Hi everyone,
I’m new to Piwik and couldn’t find the answer in the documentation. I’m trying to find the equivalent of : ga(‘send’, ‘pageview’, location.pathname); but for Piwik.
Thanks for your help,
Olivier
Hi,
The quivalent should be
paq.push(['setCustomUrl', '/' + window.location]);
_paq.push(['setDocumentTitle', 'My New Title']);
_paq.push(['trackPageView']);
(from How to track single-page websites and web applications using Piwik Analytics - Analytics Platform - Piwik)
Keep in mind you only need it for single page applications.
Hi Lukas,
Thanks for the solution that’s great. Indeed I’m using PJAX on a WordPress. I use to have GA on it but I want to change for Piwik.