Prepopulate coupon code from banner ad click?

Hi,

First time posting in this particular forum.

Is it possible to prepopulate a coupon code in a landing page forum directly from a click that comes from a display ad somewhere?

So someone sees a banner ad on, say, ZDNet.com. They click it and it goes to my landing page. I'd like to have a specific coupon code for that banner ad campaign already prepopulated in the Coupon field on the landing page.

Or open to anything that achieves the same goal but not necessarily using that workflow or tactic.

Thank you!
 


If you own the landing page and can control the URL of the banner ad, then you can do something like have the banner ad link to:

Code:
mywebsite.com/landing-page?coupon=foobar
Your form's coupon input field could then look like this:

Code:
<input type="text" value="<?php $PARAMS["coupon"] ?>" />
(pseudocode, I don't know PHP)

That will set the coupon field to the value of the `coupon` url parameter if one exists.

I think that's the simplest approach.

If you don't control the url of the banner ad or don't want to hard-code it into the url, and if you just care about where the user is coming from, you can examine the "referrer" header of the incoming request. If the banner ad actually is linking directly to your landing page, then you can usually tell that they clicked it because the referrer will originate from the url it was clicked from.