Passing on UTM values

There will be occasions when you need to pass on UTM information either within a site or out to third parties.

We show you how to do this, both per page and per site, in this video. The code snippet is available below the video.

The magic code:

var links = document.getElementsByTagName('a'); var utm = /(utm_source=.*)&(utm_medium=.*)&(utm_campaign=.*)/gi.exec(window.location.href); for(var i=0;i<links.length;i++){ console.log(links[i].href = links[i].href + "?" + utm[0]); }

Still need help? Contact Us Contact Us