Get UTM_source in Sleeknote

I.e. like Sleeknopte provides “Map additional data fields” where I can send the IP og Signup page. but no additional field for UTM_source.

So: Any other way to get the utm_spurce data and map that in the integration?=

10:02

Peter

No worries. That is done in the integration step on the specific campaign and then via the want to map custom fields option. But just to make sure, is what you want to grab the UTM source that a given visitor has on the link when coming to the site and then send that to your AC list or are we talking adding a value to the lead so you know which campaign they came from?

10:05

Yes, I want to want to “grab the UTM source that a given visitor has on the link when coming to the site ” – so I can track (in AC) if the lead initially was generated from a LInkedIN campagin etc..

10:06

Peter

Alright. That is a bit more technical as you need a piece of custom code on the site that will grab it and send it to our SiteData feature from where we can then map it.

10:07

Oh, I see.. Do you have any plug’n’play code ready to use somewhere? 😀 😀

10:07

Peter

I should have something you can use yes. I did a similar solution for another customer recently. Let me just find it and modify it for you.

10:08

Sounds great!

10:09

Peter

Here we go

<script>
try {
window.sleeknoteSiteData || (window.sleeknoteSiteData = []);
var urlSearch = new URLSearchParams(window.location.search);
if(urlSearch.has("utm_source"))
    window.sleeknoteSiteData.push({'utm_source': urlSearch.get("utm_source")});
if(urlSearch.has("utm_medium"))
    window.sleeknoteSiteData.push({'utm_medium': urlSearch.get("utm_medium")});
if(urlSearch.has("utm_campaign"))
    window.sleeknoteSiteData.push({'utm_campaign': urlSearch.get("utm_campaign")});
if(urlSearch.has("utm_content"))
    window.sleeknoteSiteData.push({'utm_content': urlSearch.get("utm_content")});
}
catch(err){
}
</script>

10:12

Peter

When that is running on the site we can then map the values to AC if present

10:15

Nice! Thanks for your help – we’ll try this out 🙂  Have a nice day. (And happy new year soon too.)

Leave a Reply

Your email address will not be published. Required fields are marked *