Passing variables from click through page to form page


#1

I want to pass utm variables. Have an unbounce landing page that gets traffic from Google. No problems getting utm_term there but the page is just a click through page where people have a choice to learn more on 4 different topics.

The 4 learn more buttons then go to different unbounce lead pages with a hidden variable called kw where I would like to know what the original utm_term was on page 1.

On the first page, what I did was make my button link…
http://sales.cyberinvestigationservic…

Thinking that I was assigning the utm_term variable to kw. Didn’t work. When come from Google to page 1, pass through to page 2, then complete the form on page 2, simply get the value “utm_term” in kw.

How do I get the information that is in utm_term on page1 to page 2?


#2

Hey Chris - If you’re trying to pass URL parameters on a click through page you can use the following script:

<br /> $(document).ready(function() {
<br /> var params = window.location.search.replace(//g,'%20');
<br /> var button = $('a[href]').each( function(i) {
<br /> this.href = this.href + params;
<br /> });
<br /> });
<br /> </script>```   
 
This will append the URL parameters from your current page to your external links. Hope this is what you were looking for!

#3

Hi Johnny,

You said following script but not sure I see anything.

Thanks


#4

Ah sorry about that. It seems like it got cut off due to my lack of formatting. It should be showing up now.


#5

Cool, thanks. Since I am not much of a programmer, then is this how it would work? 1) Paste this script into an html input for page 1, I assume near the top. 2) then since utm_term is available on first page, it then becomes available on any click through pages and I can just stick utm_term in as a hidden field?


#6

Hey Chris - You’ll want to paste it into your “javascripts” box on the bottom left of the page builder. It’s pretty much a plug in play script.

To further clarify how it works, if you have a landing page with parameters such as www.mypage.com?utm_source=Adwords&utm…

Then every click through link on your page will be appended with the parameters “?utm_source=Adwords&utm_value=1”.

Hope that clarifies things!


#7

Awesome, thank you.


#8

Hey Chris!

Small update for you. We added the ability to pass incoming URL parameters to your click through button links. No need to include javascript, simply check off a box in your buttons properties. Check out the support article below for further details.

http://support.unbounce.com/entries/2…