Customized URL to be logged by piwik



Is there a way i can customize the Entry page URL name under the Actions>Entry pages tab.

Piwik is logging
this as the url

but i only want
http://localhost:xxxx/wps/myportal/Test/ to be logged.
is there any way i can achieve the same?


(Matthieu Aubry) #2

Yes you can customise the URL in the Javascript tracker using “setCustomUrl” function.


Hi Matt,

I got to know about this function from the Api doc. But i dont see the changes reflecting on the piwik website. I am using
(function() {
var u=((“https:” == document.location.protocol) ? “https” : “http”) + “://”;
_paq.push([“setTrackerUrl”, u+“piwik.php”]);
_paq.push([“setSiteId”, “2”]);

// _paq.push([“setDocumentTitle”, document.title]);
_paq.push([“setCustomUrl”, “new/myTest/MYTEST”]);


var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);


I have commented the documentTitle as i thot this might be causing the issue. Could you please help me resolve the same as m not sure where am i falling short.