images

Your Dynamic Landing Pages Suck

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:

<?
$gender=@$_GET['c1'];
$age=@$_GET['c2'];
?>

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:

<?
$religion=@$_GET['c1'];
?>

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: Date A <h1><?=$c1?> Girl?</h1> and will of course display whatever variable I entered in the URL.
Here’s a few screenshots of it in action:

[nggallery id=dynreligion]

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 your 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 <? session_start(); $favfood=@$_GET['a']; ?>, 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.php?artist=Eminem&age=18&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:

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

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: <img src=”<?=$artist?>.jpg”> 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 <img src=”<?=$agerange?>_1.gif”> 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:

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

And the code that switches the content is:

<?
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;
}?>

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:

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

Content switching code:
<?
switch ($desiredvariablename)
{
case X:
echo “HTMLCODEHERE“;
break;

case Y:
echo”HTMLCODEHERE“;
}?>

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!