Answered

UTM parameters for Embed SDK script


Userlevel 1

Hi there,

Hopefully this question makes sense. Currently I’m using Embed SDK to include Typeform in all pages on the website with this code: 

<script src="//embed.typeform.com/next/embed.js"></script>
<link rel="stylesheet" href="//embed.typeform.com/next/css/slider.css" />
<script>
const { open, close, toggle, refresh } = window.tf.createSlider('XXXXXXXX')
document.querySelectorAll("#button-leadform").forEach(btn => btn.onclick = toggle)
</script>

This is the only code I’m using.

But now we are missing some embed code that allows us to dynamically pass through UTM data. How would I go ahead in adding this line of code:

​​​​​​​data-tf-transitive-search-params=“utm_source, utm_medium, utm_campaign, utm_term, utm_content”

Thanks in advance!

icon

Best answer by Scot 29 July 2022, 19:58

View original

3 replies

Userlevel 7
Badge +5

Hey @maartin9! Welcome to our Community!

I've talked to our technical team and they told me to send you this video. Hope it helps! 😉

Userlevel 3
Badge +3

Hi @maartin9 ! I think that you need to add this as part of the options for createSlider. It might look like this:
 

window.tf.createSlider('XXXXXXXX', ​​​​​​​
{
transitiveSearchParams: ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content']
})

You can find some of this kind of info over at our Embed SDK library here. 🙂

Let me know if that helps!

Userlevel 7
Badge +5

Hey @maartin9! Were you able to add the correct code after all? Hoping you did! 

Reply