Forum Discussion
Forward utm parameters from landing page
Hi team --
We are now adopting landing pages in order to drive paid media to a lead capture form but want to be able to forward the utm parameters of the affiliate link that drove there so it continues to get the attribution. For example google vs. facebook vs. tiktok
Is there a way you can think of for a Braze Landing Page to forward these utm parameters or capture them upon landing and pass them when a user subsequently gets redirected site? I can only think of doing it generic based on like utm_medium=affiliate but would prefer to give the right attribution to the right ad partner if that makes sense.
One solution could be using a different landing page for each paid media partner but with a limit of 5 landing pages that seems not scalable or reasonable.
Thanks friends :)
- Bhanu5150Collaborator
A scalable solution is to capture the UTM parameters in the URL upon landing and store them (e.g., in localStorage, sessionStorage, or a cookie). Then, when the user submits the lead capture form and gets redirected, the stored UTM parameters can be appended to the redirected URL.
Capture UTM Parameters – Use JavaScript to extract utm_source, utm_medium, utm_campaign, etc., from the URL and store them in localStorage or a hidden form field.
Persist UTM Data – If users navigate away, store the UTM parameters in sessionStorage/localStorage or pass them along via hidden fields in the form.
Append UTM Parameters on Redirect – When redirecting after form submission, append the stored UTM parameters to ensure attribution is maintained.
Optional: If Braze supports Liquid templating or custom scripting, use it to dynamically inject UTM parameters into the redirect URL.This method avoids the need for multiple landing pages and ensures each ad platform gets proper attribution.
- Manoj__Expert
Hello crowejustin
You can add 3 fields to your page and map them to attributes and then read the value (you can use JavaScript for that) from URL to populate them in field.
Check this sample LP here:
https://920c8423-f781-458b-90d6-dd33a7c4ecae.eu02.ldpgs.eu/bj7klt?is_preview=true&utm_source=ParnerTest&utm_medium=Affiloate&utm_campaign=ReferYou can use custom code block to write Javascript and CSS to hide these additional input boxes.
Once submitted you can use the JavaScript to pass values to next page.
Related Content
- 9 months ago
- 2 months ago
- 12 months ago