How to Capture and Cookie UTM's then pass them to an Iframes Source url
How to capture UTMs and pass them to an Iframe(frame Source)
Note: To do this setup you need access to both the website itself and the Iframe window.
In this post we will explore how to capture UTMs, store them in a cookie and save them for 30 days. Once that is complete we will look for any iframe windows loaded on the page and add the utms to the Iframe Source url. Doing it this way will make the UTMs present in the iframe window which will allow the iframe itself to capture them simply. Trim this code as needed to accomplish your goals.
Iframe Source Code: Use this code inside the Iframe to capture the UTMs from the source URL and apply them to the form.