Overriding URLs and Traffic Sources

Nudge has the ability to accept an "override" URL and/or traffic source. This is useful for cases where the canonical URL is incorrect, the URL is incorrect, or the Nudge tracking JS is placed in an environment where it detects the incorrect code.

 

To work with this, we've made 3 extra flags available for the tracking JS. When you deploy the script

<script src="//cdn.ndg.io/your-tracking-code.js" async></script>

 You now have the 3 GET parameters available:

url: Override the URL with this.

ndg_source: Source of the traffic being driven to the content. e.g. Facebook Ads

ndg_label: Extra classifier that’s appended to the source tag. e.g.  Facebook Placement ID. You can use a tracking token here to keep track of the ad units or placements that were clicked through to reach the Content Landing Page(sponsored article page). 

Example, if the Nudge code is on the url http://test.com/a-url-you-wish-to-override -- but you wanted it to track the URL as http://test.com/sponsored/custom-url-you-wish-to-track-data-against - with traffic source "Nudge Analytics", you'd want to put a script on page that looks like:

<script src="//cdn.ndg.io/your-tracking-code.js?url=http://test.com/sponsored/custom-url-you-wish-to-track-data-against&ndg_source=Nudge%20Analytics" async></script> 

Please note: These are all fully optional and only required if you wish to override the existing URL the browser sees. Also ndg_label will only work in combination with ndg_source. 

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.