Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   Using Wordpress As Landingpage - Tracking Code in Permalink Doesn't work - please help!? (https://www.warriorforum.com/programming/702933-using-wordpress-landingpage-tracking-code-permalink-doesnt-work-please-help.html)

trelog 28th October 2012 03:50 PM

Using Wordpress As Landingpage - Tracking Code in Permalink Doesn't work - please help!?
 
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 :D

WebThinker 28th October 2012 04:33 PM

Re: Using Wordpress As Landingpage - Tracking Code in Permalink Doesn't work - please help!?
 
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.

trelog 28th October 2012 05:04 PM

Re: Using Wordpress As Landingpage - Tracking Code in Permalink Doesn't work - please help!?
 
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...

FirstSocialApps 28th October 2012 06:32 PM

Re: Using Wordpress As Landingpage - Tracking Code in Permalink Doesn't work - please help!?
 
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)

phpg 28th October 2012 06:45 PM

Re: Using Wordpress As Landingpage - Tracking Code in Permalink Doesn't work - please help!?
 
If i understand you correctly (i'm not sure i do though), this might help:

Using custom URL parameters in Wordpress ~ Webopius - Web design | Project Management | SEO | Graphic Design | E-Commerce | Content Management

Dong Lee 29th October 2012 08:17 AM

Re: Using Wordpress As Landingpage - Tracking Code in Permalink Doesn't work - please help!?
 
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

viescripts 29th October 2012 09:18 AM

Re: Using Wordpress As Landingpage - Tracking Code in Permalink Doesn't work - please help!?
 
For wordpress - check in admin
Settings -> Permalinks

For Default permalinks setting affiliate id will look like
http://yourwebsite.com/?p=123&affiliateid=321

For all the others including the Post Name pemalinks settings affiliate id will look like
http://yourwebsite.com/sample-post/?affiliateid=321

All these work, no 404 error.

To capture and process the id via WP blog, you will have to create a small API.


All times are GMT -6. The time now is 11:30 PM.