Passing UTM parameters dynamically in Button URls

  • 10 February 2022
  • 1 reply
  • 373 views

I have a button on a landing page and ads coming to the page with UTM parameters source=paidsocial&medium=Facebook (these can change based on the channel to Google, Youtube, paidsearch, etc)

I’d like to add these UTM parameters dynamically to build a button URL on my page so that it can pass the parameters over to another page and we can not lose track of which channel a user came from. The button url feature doesn’t pass this info over and has to be hard coded and I don’t want to have to create multiple versions of a page for each channel.

I found this but it doesn’t really solve this. Can someone help with a simple script?[How to Add] Dynamic Click To Call Buttons


1 reply

Userlevel 1
Badge

Hopefully I’m not misunderstanding the question, but as long as you’re sending users to the page using URLs with UTM parameters then those can easily be passed through using the “Pass Through URL Parameters” checkbox in the Click Action section.

We do this frequently with zero issues and it automatically appends the same UTM parameters to your button URL so no custom coding is needed.

This guide shows this process in more detail: https://documentation.unbounce.com/hc/en-us/articles/360022533712-Passing-Incoming-URL-Parameters-to-Outgoing-Button-Links

Reply