Hey everybody (especially Besmir
)
Can you publish a simple script to insert keywords into ppv landingpages?
(Welcome "XXX.com" Visitor!)
I use Prosper202 for tracking....
Valentin
Yep it's pretty straightforward.
First , your lp should be a .php file.
If it's .html just rename it to .php .
Than at the top of your lp enter this :
[PHP]
<?php
$kw=@$_GET['t202kw'];
$kw=ucfirst($kw);
?>
[/PHP]
Now wherever on your lp you want to have the keyword displayed put this :
[PHP]
<?=$kw?>
[/PHP]
Let me know if you have trouble making it work.
Here is a script that will customize what is displayed for the keyword. eg: you pop on bmw.com, but instead of saying "Dear bmw.com Visitor", you can say "Dear BMW enthusiast!"
Not the most elegant code, and it can be a pain to set it up when you have hundreds of targets, but it works.
Put this into a separate js file and call it from the lp.
function gup( name )
{
//Enter target urls, followed by what you want displayed
var targets=new Array(
"saab.com","Saab",
"volvo.com","Volvo",
"bmw.com","BMW",
"ferrari.com", "Ferrari"
);
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
var len=targets.length;
for (i=0; i<len; i++)
{
if (results[1]==targets[i])
return targets[i+1];
else i++;
}
return results[1];
}
Put this in your lp, where you want it to be displayed:
<script language="JavaScript">document.write(gup( 'target' )) ;</script>