Issue setting page URL in tracker

I’m trying to force the Piwik tracker to record a URL as what I set in the track script, so that it doesn’t record any of the session data or any other variables as they often change randomly.

I’ve tried putting piwikTracker.setCustomUrl(‘’); after var piwikTracker = Piwik.getTracker(pkBaseURL + “piwik.php”, 23); however the page is still recorded as

Any idea how I can force the URL to be recorded as just ?

Thanks for any help!

What is full code you used?

I’m using the basic tracking script but with the addition I mentioned above.

<!-- Piwik --> 
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "" : "");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 3);
} catch( err ) {}
</script><noscript><p><img src="" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Code -->

It should work, can you try in a simple HTML page, does it work in this simple use case ?

It seems to work fine in a HTML page. I’ll put my old code in again and see if it works.