Just Launched: Pass Incoming URL Parameters to Outgoing Button Links


#1

Hey everyone!

If you’re using a click-through page you might want to send your visitor along with the URL parameters they arrived with. This is super handy if you’re running any kind of PPC campaigns with Google Adwords, or the like!

Check out our new support article that’ll walk you through how to set this up!


#2

Hey, the support article is not very supportive. What I would really like to do is pass along my affiliate’s ID in the button url. Is that possible? Is there a tutorial on how this could work?


#3

Hey John - Sorry if those instructions weren’t too clear. To further clarify, if someone lands on your landing page with URL parameters then those existing parameters can be automatically appended to outgoing button links.

For example, if your landing page url is www.mylandingpage.com and someone comes on to the landing page with the following parameters:

www.mylandingpage.com/?affiliate_id=5…

Then ?affiliate_id=5555&source=facebook will automatically be appended to any button with the “Pass through URL parameters” box checked.

Does that make sense? Was that what you’re looking for? If not clarify a bit further as to what you’re trying to do and i’d step you through the best I can :slight_smile:


#4

If the button url already has parameters, will it just add it these new ones to the end?

For example this is my buy link: http://secure.saltrevolution.com/cgi-…

In your example, would it look like this?
http://secure.saltrevolution.com/cgi-…


#5

Hey John - In that case it will properly append the parameters to the end with a & sign like so.

http://secure.saltrevolution.com/cgi-…


#6

And, are there any down sides to this? Any way for customers to strip that information automatically?

This is a really big deal for me. By passing the affiliate ID on with the buy link, we are essentially reapplying the affiliate ID. So, even if the customer isn’t cookied, the sale will still be applied to the correct affiliate.

Any does and don’ts or best practices when it comes to URL parameters?


#7

Any way to do this with my exit pop as well?


#8

I wouldn’t think there would be major downsides. URL parameters are a widely used method to exchange information. Unless they stumble across the page organically without those parameters, the only way for them to strip out that information is to manually remove or modify those parameters on their own browser. In most cases you have control as to where customers are finding the links to your page, and doing so can ensure the proper parameters are applied.

Can you clarify what your ‘exit pop’ is?


#9

Yes, when a customer closes the window, a small window pops up offering a special deal. I have pasted in the javascript below. I just need to figure out how to pass along the URL parameters in it.


#10

Hey John

Sorry for the late reply here. That isn’t possible by default on our app, but i’m sure it can be done with a little custom code. I might be able to point you in the right direction. I’m going to start a support ticket so we can tackle this together. Lookout of my email!


#11

Hello,
I need to “pass through URL parameters” on text links as well as button links. Can this be done with dynamic incoming parameters?

Thank you!


#12

I did something similar with our UTM code but appended it to the form on our landing page.

<script>
<br /> $(document).ready(function() {
<br /><br />
/// _GET Params <br />
var params = window.location.search.replace(//g,'%20');
<br /><br />
/// Remove first ? <br />
params = params.substr(1); <br /><br />
/// explode the params by & <br />
var parts = params.split('&'); <br /><br />
for(var i in parts) { <br />
  var chunks = parts[i].split('='); <br />
  $('body form').append("<input type='hidden' name='" + chunks[0] + "' value='" + chunks[1] + "' />"); <br />
} <br /><br /> });
<br /> </script>   

#13

Hey Karen - Try the script below. It will append incoming parameters to all text links on your page

<br />
$(document).ready(function() {
<br />
  var params = window.location.search.replace(/ /g,'%20');
<br /><br />
  var textLink = $('.lp-pom-text a').each( function(i) {
<br />
    this.href = this.href + params;
<br />
  });
<br />
});
<br /> </script>```   
 
Hope this is what you were looking for!

#14

I can’t seem to access the “Properties” tab on my editor–just “Page Properties” and “Conversion Goals”. I can turn my campaign back on just as soon as I can pass through to the outgoing button…but I don’t know how to access the Properties tab on either of my pages!


#15

Found it…now if I can just figure out how to get a “Click Action” property with a second button I added…


#16

Hey Brad - the Properties Panel is contextual, meaning that it changes based on whatever you’ve got selected on your page. If you select that second button, you should see the panel change to that particular buttons properties where you can then update its Click Action.

Give that a shot but let me know how it goes.


#17

Hey Johnny-the-best-support-member,

Does this apply for GCLID as well?
For example, Adwords passes the gclid on all ad clicks. Then, when the user lands on the page (say sub.domain.com) and clicks on the text link over to another page of the same site (say domain.com), will the GCLID be carried over there by using the script you just pasted?

Thanks!


#18

Hey Mark-the-coolest-unbounce-user

It certainly does! It takes any and all parameters and passes them through to the page specified on your text link.


#19

Great. But just to clarify - this javascript code you put in there is important, right?


#20

Correct - Just paste that into your Unbounce page and it’ll work its magic :slight_smile: