Rotate Header Based on Keywords

by 4 replies
5
Does anyone have a script that will allow me to rotate my landing page's heading based on the specific keywords that came to my site? For example, if someone clicks on one of my Google Ads, I will display the keywords in that respective ad so my landing page header is relevant to my users... Thanks.
#programming #based #header #keywords #rotate
  • This should do it. Just use the following format for your Google ad hyperlink...

    www.YourWebsite.com?k=

    Now just paste the following code into the very top of your landing page...

    <?php

    $k = $_GET["k"];


    if ($k == "")

    {$header = "";}

    elseif ($k == "")

    {$header = "";}

    elseif ($k == "")

    {$header = "";}

    else {$header = "";}


    ?>


    Then paste the following code where your header text should appear...

    <h1><?php echo $header; ?></h1>

    Don't forget to change the parts in red to your desired text, and give your landing page a .php extension (index.php). And if you need to add more keywords just add more 'elseif' statements to the php code.
    • [ 1 ] Thanks
    • [1] reply
    • I needed this as well! Thank you!

      How would do it from referred keywords? For instance, if I have a PPV source and I wanna use the domain I've bid on to deliver a custom message, how might that work?
      • [1] reply
  • Thanks for explaining that a bit more that really helped!

Next Topics on Trending Feed

  • 5

    Does anyone have a script that will allow me to rotate my landing page's heading based on the specific keywords that came to my site? For example, if someone clicks on one of my Google Ads, I will display the keywords in that respective ad so my landing page header is relevant to my users... Thanks.