Skip to main content
Skip table of contents

How to collect the complete URL of a page?

Smarttag

The URLs of your pages are available in the "Event URL" property.

By default, this property is fed with the information transmitted in the request's header. This information is dependent on the browsers, and in particular on the Referrer-Policy in place. Based on the configurations, it is possible that only the global domain is transmitted, making the URLs available in the tool imprecise.

To get around the problem of browsers and Referrer-Policy, you can feed the page URL directly from the tag, via a much more reliable JavaScript method. Here is the procedure:

  • From Tag Composer, edit your site configuration to add the advanced options: "Querystring added to the property containing the URl of the page" AND "Automatic detection of a property containing the URL of the page".

  • Redeploy your tag (CDN or JavaScript file) so that the new options are taken into account. You should see in the hits a new "page_url" parameter with the full URL of your page.

2021-11-12_18h07_11.png

Note: these options are available from version 5.27 of Smarttag. If you do not see them, you will need to update the library first.

Piano Analytics SDK :

To collect the complete URL of a page with the querystring, you have to change the “addEventUrl” parameter of the SDK according to the following values :

image-20250820-095855.png

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.