I ran into a silly issue today when dynamically modifying a landing page using TrafficVance.
The script I was using was a pretty straight forward:
<?php
if ($_GET[‘t202kw’]) {
$kw = strip_tags($_GET[‘t202kw’]);
}
if(strpos($kw,’jetinternetmarketing.co.uk’) !== false) {
$page = ‘<h1>Dont target JiM on traffic Vance</h1>’;
}
?>
The problem was that the url I was using in Traffic Vance was
http://www.jetinternetmarketing.co.uk/lander.php?t202kw={KeyWord}
my target for example was:
jetinternetmarketing.co.uk
The script wasnt working because Traffic Vance was capitalising the first letter of every word. So $kw = ‘Jetinternetmarketing.co.uk’ and I wasn’t getting the match.
In hindsight I am guessing that if I had set the page in trafficvance to t202kw={keyword} then it may send through the lowercase target. (This is an assumption and untested)
Anyway to solve the problem I just added a strtolower command in and it worked great. Here is the full working script.
<?php
if ($_GET[‘t202kw’]) {
$kw = strtolower(strip_tags($_GET[‘t202kw’]));
}
if(strpos($kw,’jetinternetmarketing.co.uk’) !== false) {
$page = ‘<h1>We Love TrafficVance… Most of the time</h1>’;
}
if(strpos($kw,’wrongwithme.com’) !== false) {
$page = ‘<h1>We Love WrongWithMe.com… All of the time</h1>’;
}
echo $page;
exit;
?>