Build Dynamic Landing Pages To Respond To Any Variable

Jun 2 By Aziz Kamara

With proper organization and structure, you can make any landing page dynamic without any heavy coding. All you need are some ways to associate certain variables with either your users’ clicks, profile information, or location and a means to place corresponding images or copy onto your landing page.

The Concept

The easiest way to do this is by passing through your desired variable(s) to your landing page via url then grabbing that variable (like the user’s age) and creating an action dependent on that variable. When properly executed, you could set your pages to show ‘image1’ to users ages 25-27 and ‘image1’ to users ages 28-30 and so on and so forth. The possibilities are almost endless.

Custom Variables

With our concept briefly illustrated, the question of “how” soon rises. Depending on the traffic network/source, you can pass through user profile information to your landing pages and on to the offer. For example, in POF you can grab the user’s age, gender, and state information using by placing their tokens in your tracking link using placeholders.

We can create additional placeholders for other variables like individual creatives. Take a look at the image below:

We can use the variable following the "adid=" placeholder where our tracking link provides each creative’s id in the URL by passing that creative id to the landing page. Then we might be able to create a landing page that would change depending on the creative that brought the user to our landing page.

Some Code You’ll Need

After you’ve generated and passed your variable from your tracking link to your landing page, you still need to grab it and place it onto your landing page.

The code below allows us to do just that:

$image = $_GET[‘adid’];
if($image == "000001"){
     echo("<img src="images/healthy.png" />");
     echo("<img src="images/loseweight.png" />");

Let’s explore our code to understand what’s going on.

Get Your Variable

First note the "$image = $_GET[‘adid’]" snippet. This allows us to pull any information provided in our url following the "adid=" variable.

We can use this same structure to then pull any variable from the url and continue on to create a response for said variable.

Creating A Response

Once the variable has been grabbed, an action needs to follow. That’s accomplished with an if-echo rule as seen in the code above.

The aforementioned code says that whenever the the "adid=" variable is followed by "000001", then image "healthy.png" will appear. Subsequently, that’s followed with another rule that says if that number doesn’t appear in the url, then a different image will appear.

Finally, we make sure that’s all encased within a PHP tag and we’re good to go.

Truly Dynamic Pages

YNow that I’ve bored you to sleep with all that boring code talk, it’s time to show you what the above code can do when in full action.

Click on each of the images below to see how everything comes together.

If you look closely at the url after clicking on one of the above images, you can see that each image leads to the same web page. The only difference is the variable that follows the "adid=" placeholder.

Initially, you’ll notice the image in the landing page changes depending on the image you click on. What you may not have noticed right away though was that I also changed the CTA text based on each ad. That means that not only can you change the images in your landing pages, but your copy as well. This helps us to create some fully dynamic landing pages

Get Started Now

Now that you’ve learned this new strategy, explore the different ways you can apply it to your landing pages and creatives. I’ve made sure to provide the landing page used in this post which you can download here.

Never miss a feature, product launch, or exclusive offer

One Comment

  • Leave a Reply

    Your email address will not be published.