Using Wordpress As Landingpage - Tracking Code in Permalink Doesn't work - please help!?

by 6 replies
7
Ok. I really need some help here, and I need it explained very simply.

Here goes:

Right now I'm using static html templates for my landing page.
Here i use code like this:

Code:
<?php
$key=$_GET['key'];
?>
At the top of the page. And then when I create links on my page I use this code for exmaple:

Code:
website.com/page.html?<?php echo $_GET['key']; ?>">
Now I can send traffic to my landing page WITH a tracking code for exmaple:

Code:
website.com/pag1.php?key=trackingkey
My question is how can this be done with wordpress !???
How in the world can I with this in wordpress?

THE PROBLEM....

Is of course that if I try and link in to my wordpress site with a permalink like:

Code:
website.com/pag1.php?key=trackingkey

Then of course wordpress just try and find this page that doesn't exist and gives me a 404 - error page...........

This is driving me crazy....

How in the world can I then track keywords for permalinks that I send traffic to into my wordpress site???

I don't expect to get answers from beginners in wordpress to this question, but hopefully there is someone here, that can tell me what to do.

MANY THANKS
#programming #code #landingpage #tracking #wordpress
  • I suggest you actually create a file (lets say redirect.php) and instead of opening ebsite.com/pag1.php?key=trackingkey send the traffic to website.com/redirect.php?key=trackingkey .... then you analyze the key inside of that file and you make a redirect from there...

    Alternatively you can make the same thing with .htaccess too.
  • I'm not sure you understood what I need to accomplish with this or not.

    The whole point is to pre populate the tracking code from the permalink,

    into an affiliate link on my webpage.

    So that it grabs tacking code from the url, for example website.com/pag1.php?key=trackingkey

    and insert this tracking code in my affiliate link like for exmaple this:

    affilatesite.com/affiliateid123?sub=trackingkey

    PPC Affiliate experts here know what I mean and need to accomplish with wordpress..

    Please please someone help me with a solution for this.

    There is probably a very simple solution for this also, only if you know about it that is...
  • Im not a big WP guy so I cant give a WP solution directly, however you could do this.

    1) Create a PHP file to send them to
    2) PHP reads the GET and then sets a SESSION (or even cookie)
    3) Redirect the the correct URL / No GET data, just the URL
    4) In you WP code you are adding, instead of reading the GET have it read the SESSION (or cookie)
  • You would have to create a plugin to catch all the GET parameters. Just override wordpress permalink function and you can add your own custom logic
    • [1] reply

Next Topics on Trending Feed