Home > Affiliate Marketing Forum >

Advanced Dynamic Landing Pages (15)


08-13-2011 04:16 PM #1 parthenon (Member)
Advanced Dynamic Landing Pages

This is from the latest post on my blog. I figured I'd post it up here too since nobody reads my blog anyway LOL. Anyway, it is LONG but if you do your own landing pages it's worth the read. It takes a long time to move posts like this over, so if it's helpful to you, please THANK me and rate the thread

Almost forgot: This works with PPV, PPC, You name it! If you can set your own link on a traffic source, you can use this.

So you've come up with a landing page that works on POF (or other traffic source). To boost your efficiency and test new demographics quicker, you've decided to make the landing page dynamic using variables that the advertiser has set up to pass things like age, gender, location, etc through to your page. Now you're pimping out your pages to new demos left and right, testing age groups and calling them out by location, the money is coming in.

But what if I told you that you're only hitting the tip of the iceberg here? This post is quite long but I hope you stick with me because this is really valuable information.

If you read my last blog post on dynamic landing pages with POF, you already know the basics of how this works. You take your &c1= from your prosper202 link and append POF's dynamic tags like {gender:default} or {age:default} to the target URL so they pass through to your lander. You save your pages in .php format instead of html and add this little tidbit to the top of your landing page code:
[PHP]
<?
$gender=@$_GET['c1'];
$age=@$_GET['c2'];
?>
[/PHP]
and then dynamically display the values in your page using <?=$age?> or <?=$gender?> etc. Once you've got that down and working, it's time to advance.

Taking Your Dynamic Landers To The Next Level

One of the great things about POF is it allows SO many ways to target your demographic. Instead of limiting yourself with the tags that POF provides you, you can really get fancy and start adding your own custom tokens to your landing page URLs and actually call out demographic information in your lander without having to change the lander itself.

Awhile back, I was able to take ONE proven lander with high CTR on broad traffic and, using dynamic tags, make it work for 13 different demographics.

Basically, I used that same landing page and set up 13 different campaigns. Each campaign was identical aside from 1 thing, RELIGION. I had the following PHP code at the top of my pages code:
[PHP]
<?
$religion=@$_GET['c1'];
?>
[/PHP]
For each campaign I simply changed the c1= variable to the name of the religion I was targeting in the link. So my click-thru URLs on pof looked like this:
http://trackingdomain.com/index.php?t202id=999&c1=Christian&t202kw=keywordhere
http://trackingdomain.com/index.php?t202id=999&c1=Catholic&t202kw=keywordhere
http://trackingdomain.com/index.php?t202id=999&c1=Lutheran&t202kw=keywordhere


Then on my page (in the header for instance), the code looks something like this: [PHP]Date A <h1><?=$c1?> Girl?</h1>[/PHP] and will of course display whatever variable I entered in the URL.
Here's a couple screenshots of it in action:



Now, don't think you have to use prosper202 for this to work, this works for any PHP page, and in my opinion (as far as tracking goes) works even better with CPVLab. In the code $variablenamehere=@$_GET['urltokenhere']; as long as you are calling the $variablenamehere part in your page and the urltokenhere matches the token you used to pass it through the URL, you can name these whatever the heck you want. If you target people that love bacon and you want to pass is through a token called "a" and assign it to the variable $favfood, your link can be http://trackingdomain.com/landingpage.php?a=bacon. Your php code at the top of the landing page will be [PHP]<? $favfood=@$_GET['a']; ?>[/PHP] and when you call it out on the page you'll use <?=$favfood?>. Hopefully this is making sense.

Still with me?

Good, because this is where the real fun starts. The beauty of dynamically inserting information with PHP variables is that it doesn't stop at simple text insertion. You can dynamically insert these values into ANYTHING. The title, links, javascript or jquery pop-up alerts, you name it.

You can even dynamically change the pictures that show up on the page. Don't believe me?

Check this page out: http://3dolla.com/dynexample/example...&state=Florida

Now, that is one ugly ugly page, but I just whipped it together to show you what can be done. Go up to the address bar and change the artist= variable to either Shakira or Kesha and hit enter and see what happens. You can also change the age= variable to any number you like, or the state= variable to any state you like. Pretty nifty huh?

The code found before the <html> tag in this example looks like this:

[PHP]<?
$artist=@$_GET['artist'];
$age=@$_GET['age'];
$state=@$_GET['state'];
?>[/PHP]

And the dynamic image swapping is accomplished by naming the pictures found on the page Eminem.jpg, Shakira.jpg, etc. The img code looks like this: [PHP]<img src="<?=$artist?>.jpg">[/PHP] so that the value stored in artist= is passed directly to the image source address and it shows the correct picture.

You can change as many pictures as you want at once. If you have a dating landing page that you are using to target a range of males of different of ages, you can have an image set of younger women that you display 20-35 year olds and a set of older images that you display to the 45+ demographic. For your younger demographic, just pass agerange=young and name all your images young_1.gif, young_2.gif, etc, and use the image tags [PHP]<img src="<?=$agerange?>_1.gif">[/PHP] and for your older demo pass agerange=mature and repeat the process. Get creative with this! You can use the same page to show all blonde chicks, all brunette chicks, tall guys, short guys, fat guys, skinny guys. The possibilities are endless.

More Advanced Techniques


I want to cover 1 last thing you can do using custom url tokens. You can actually switch the content of an ENTIRE page or just portions of a page by using switch.
This is useful if you want to display either an entirely different page based on the token that gets passed, or if you have a table or some other large chunk of html you want to switch dynamically.

I made a quick example of this which you can see here: http://3dolla.com/dynexample/lights.php?lights=off

Just follow the instructions on the page

The top code is:

[PHP]<?
$lights=@$_GET['lights'];
?>[/PHP]

And the code that switches the content is:

[PHP]<?
switch ($lights)
{
case off:
echo "<p>The Lights Are Off.</p>
<p><img src='moneyoff.jpg' width='500' height='374'><br>
You see something large ahead of you but you're not quite sure what it is.</br>
Go to the address bar and change lights=off to lights=on and hit enter (if you dare!) </p>";
break;

case on:
echo"<p>The Lights Were Off, But You Cleverly Turned Them On.</p>
<p><img src='moneyon.jpg' width='500' height='374'></p>
<p>You now see that you are standing in a room full of your own internet monies that you have made.<br />
In addition to US Currency you have taken your strategies international and also have a nice bundle of foreign cash.<br />
You now feel enlightened and have the uncontrollable urge to tell all your friends about 3dolla.com";
break;
}?>
[/PHP]

In this example, the variable we are using from the URL is lights= and it is storing in the $lights PHP variable. The switch code is saying SWITCH content based on the $lights variable, and the case portion is saying that if the value of $lights is off, show this code, but if the value of $lights is on, show this code instead. You can add as many "cases" as you want

A stripped down version for you below. Replace X and Y with whatever you are passing through the URL

Top code:

[PHP]<?
$desiredvariablename=@$_GET['desiredURLtoken'];
?>[/PHP]

Content switching code:
[PHP]<?
switch ($desiredvariablename)
{
case X:
echo "HTMLCODEHERE";
break;

case Y:
echo"HTMLCODEHERE";
}?>
[/PHP]
Please note that when you echo html code in PHP you need to change any quotation marks used in the HTML code to apostrophes instead or it will break the code.

There are more cool things you can do with PHP and if you guys like this I would be happy to do more posts like this in the future.

Please feel free to ask any questions below!


08-13-2011 04:26 PM #2 chris_m (Member)

Awesome post dude - I like to pull out features of my ads in PoF on my landers, and generally end up with multiple landing pages and links. Thanks to this I can start to fine tune my lander down to just a few pages and just change all those target points just using my link from the ad. Great post - Cheers buddy...


08-13-2011 04:31 PM #3 parthenon (Member)

Thanks Chris, Glad to know it's of help to you

Works like MAGIC with Mr. Green POF uploader when you're doing age ranges or uploading the same campaign several times for several different demographic options.


08-13-2011 04:45 PM #4 vidivo (Member)

Yep been doing this for quite a while.. but one thing I never understood is if I should change up the landing page and split test the entire design for better ROI? Like I would ofcoursee split test the headline, image, call to action but should I do the entire design? For something like that this php can't really be used for so how do most people split test?

Seems like the only option is to create 2 landing pages and test it with its own variables but its gets quite confusing if your using a rotator and redirects and what not lol


08-13-2011 04:52 PM #5 parthenon (Member)

Quote Originally Posted by vidivo View Post
Yep been doing this for quite a while.. but one thing I never understood is if I should change up the landing page and split test the entire design for better ROI? Like I would ofcoursee split test the headline, image, call to action but should I do the entire design? For something like that this php can't really be used for so how do most people split test?

Seems like the only option is to create 2 landing pages and test it with its own variables but its gets quite confusing if your using a rotator and redirects and what not lol
Unless you have a boatload of cash to throw away on testing you don't really want to test a whole bunch of variables at the same time. The exception would be if you have some way to break down conversion rate by each variable like POF does, but even then you're going to lose alot of time and money on the front end testing - and honestly, sometimes by the time you'd have enough data you'd need a fresh lander or ad anyway.

What's nice about using dynamic pages like this is that you it takes only seconds to copy the page, rename it accordingly, and change the variables in your link.


08-13-2011 10:08 PM #6 inversion (Member)

Awesome stuff! +1

Quick question. This is the first time I've seen the session_start(); in code like this. What advantage does it give? What happens if you don't have it? Thanks!!


08-13-2011 11:41 PM #7 diegoal (Member)

session_start() is used if you want to pass variables from one page to another. Not sure why partheon is using it in his code above. As far as I can see you can safely remove it.


08-14-2011 01:13 AM #8 vidivo (Member)

Hey,

Got a quick question... I'm doing a redirect with this to split test a few other variations... however, I never had to do multiple variable tracking like the state, age, and kw before.. I know how to do just the kw with p202 with the code below, but how would I add another "get" variable in the redirect such as {state} for pof?

This is what I have:

= "http://domain.php?t202id=56456&t202kw=".stripslashes($_GE T['kw']);


How would I do this:

http://domain.php?t202id=56456&c1=POFDYNAMICSTATE&t202kw= ".stripslashes($_GET['kw']);


Thanks!


08-14-2011 01:35 AM #9 diegoal (Member)

Why are you redirecting them if you're sending them to LP?


08-14-2011 01:53 AM #10 vidivo (Member)

To split test several lp variations.


08-14-2011 02:03 AM #11 diegoal (Member)

Quote Originally Posted by vidivo View Post
To split test several lp variations.
Oh, Ok. I just realized that you're using a rotator.

ok. on POF, your destination URL should look like this: http://rotator.com/?t202kw={keyword}&c1={state}&c2={age}

And your rotator like this:

[PHP]<?php

// catch the variables
$c1 = $_GET['c1'];
$c2 = $_GET['c2'];
$t202kw = $_GET['t202kw'];

$url = 'http://domain.com/t202id=38474&t202kw='.$t202kw.'&c1='.$c1.'&c2='.$c 2;

header('location:'.$url);

?>[/PHP]


08-14-2011 02:09 AM #12 vidivo (Member)

Thanks! But not really using the rotator that besmir made.. just a standalone script here:

<meta http-equiv="refresh" content="0;
url=
<?php
$advert = array();

$advert[] = "http://domain.com/landingpage.php?t202id=56926&t202kw=".stripslashes ($_GET['kw']);
$advert[] = "http://domain.com/landingpage2.php?t202id=56926&t202kw=".stripslashe s($_GET['kw']);
$advert[] = "http://domain.com/landingpage3.php?t202id=56926&t202kw=".stripslashe s($_GET['kw']);

shuffle($advert);
echo $advert[0];
?>
" />

Any way to incorporate that into the php code that you made above? Thanks so much!!


08-14-2011 02:31 AM #13 diegoal (Member)

Quote Originally Posted by vidivo View Post
Thanks! But not really using the rotator that besmir made.. just a standalone script here:

<meta http-equiv="refresh" content="0;
url=
<?php
$advert = array();

$advert[] = "http://domain.com/landingpage.php?t202id=56926&t202kw=".stripslashes ($_GET['kw']);
$advert[] = "http://domain.com/landingpage2.php?t202id=56926&t202kw=".stripslashe s($_GET['kw']);
$advert[] = "http://domain.com/landingpage3.php?t202id=56926&t202kw=".stripslashe s($_GET['kw']);

shuffle($advert);
echo $advert[0];
?>
" />

Any way to incorporate that into the php code that you made above? Thanks so much!!
Took the freedom to enhance your script. Hope you don't mind

[PHP]<?php

// define your lps, add or remove as many as you want
$lp = array();
$lp[] = 'http://google.com/?t202id=1111&t202kw=';
$lp[] = 'http://bing.com/?t202id=1111&t202kw=';
$lp[] = 'http://yahoo.com/?t202id=1111&t202kw=';

// catch the variables
$c1 = @$_GET['c1'];
$c2 = @$_GET['c2'];
$t202kw = @$_GET['t202kw'];

shuffle($lp);

$url = $lp[0].$t202kw.'&c1='.$c1.'&c2='.$c2;

header('location:'.$url);
?>[/PHP]


08-14-2011 03:12 AM #14 parthenon (Member)

Quote Originally Posted by diegoal View Post
session_start() is used if you want to pass variables from one page to another. Not sure why partheon is using it in his code above. As far as I can see you can safely remove it.
That is correct. I build most of my landing pages based from templates I have developed over time that are preloaded with code I use a regular basis and one of those things I do on a regular basis involves passing variables to other pages so it's in there.

It won't hurt anything if you remove it


08-14-2011 10:57 PM #15 parthenon (Member)

Some updates based on questions I have received:

1. You can pass words with spaces, they just need to be encoded by using %20 in place of the space. So for instance artist=Britney%20Spears will show as Britney Spears on the page.

2. If you are using dynamic image insertion and your server is a linux box, filenames are case sensitive! You can use this code for each variable to capitalize the first letter in each word passed through the variable. Just make sure the case matches the way you are using it on the page when naming your image files. Place this before the ?> tag in the code at the top of the page. Change variablename in both places to whichever variable you want capitalized.

Code:
$variablename = ucwords(strtolower($variablename));


Home > Affiliate Marketing Forum >