URL parameter into iFrame

  • 24 September 2020
  • 2 replies
  • 35 views

Hi there!

I am currently trying to integrate an iframe from a partner of ours (who is driving traffic to our page). Our partner only uses the iframe for tracking purposes but is asking us to provide a unique ID for each lead. We would like to use our thank you page and a UTM field (previous page form field, hidden) to be posted back.

Knowing that the URL parameters would have to be inserted each time into the iframe - is there an easy way to script this? I have seen similar cases but not quite a working approach yet - I’m posting the iframe below as a reference.

Thank you so much in advance!!


2 replies

hm… haven’t tried this at all but, can’t you just drop an HTML element somewhere on your page? The html would have your iframe tags with the utm parameter ready to go.

About the postback part, sounds slightly outside my understanding. Sounds like you might want to look at getting integrations so the postback is kept track of automatically by some 3rd party link tracker software.

Userlevel 7
Badge +3

Hey @sanna,

The ability to pass information to an iFrame really depends on the actual iFrame and whether you can insert code to it.

Generally speaking, you’ll need to add 2 scripts - one to the main/parent page and one to the iFrame. The parent page would capture whatever you want to send and the iFrame script would “read” whatever the parent page sends.

Best,
Hristian

Reply