Customized URL to be logged by piwik


#1

Hi,

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

Piwik is logging
http://localhost:xxxx/wps/myportal/Test/!ut/p/b1/hY5BDoIwEEXP4gHITBBBltAqrQpqwFi7MSQikmBLDNHo6a2EjQtxdpO8_98HCQKkyu9VmbeVVnn9-aV7TDYkYg7aC_Q3cwwib5xtGSJyxwAHA-CPC7DLkyhgjrdCnFJKkNPQdxN3gjjDPj8A_PEvOmDAbwT2LSZxCbLJ24tVqbMGwbO1KtJWNyCWSj_q4lQWIFJKrPjJ9LWAPcjv6ehM7c8yRj0_Nmq3BwbUSdfUXHfitQp9bgWjN_k73Jw!/dl4/d5/L2dBISEvZ0FBIS9nQSEh/
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?

thanks,
Himanshu


(Matthieu Aubry) #2

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


#3

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”) + “://xxx.xx.xx.xxx:xxxx/piwik/”;
_paq.push([“setTrackerUrl”, u+“piwik.php”]);
_paq.push([“setSiteId”, “2”]);

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

_paq.push(["trackPageView"]);


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.