Tracking Wordpress Landing Pages With Prosper202
Posted on September 8th, 2008 in Uncategorized
If you're tired of refreshing this page every day like a d-bag, you should probably subscribe to the RSS feed.
It’s no secret that many people use wordpress for landing pages. It’s a very versatile CMS that’s easy for a novice to set up, has many templates, is free, etc. Realistically, you could have a decent landing page with content up and running in a couple hours with no problem if you’re using wordpress and not too worried about looking very professional. There’s no reason to go much further into this concept as Nickycakes already laid it out pretty well in his post, Affiliate Product Blogs. Great, so once you’ve set up your landing page, how do you set up tracking on it?
Nickycakes loves using Prosper202 for tracking any ppc campaigns because it simply does pretty much everything you could possibly ask for in terms of tracking, and it’s completely free. It doesn’t hurt that the guy who runs it makes himself available almost 24/7 for questions and troubleshooting either! It’s got great shiny ajax graphs and stuff that make it really visually pleasing to not only see how much cash you’re raking in and what kinda roi you’re getting for each keyword, but have it look goood. This isn’t going to be a tutorial on how to set up prosper202 on your own hosting, and you can use their hosted solution, tracking202, which is also free, but worries many because the people running it, if they wanted, could potentially steal all your successful campaign data.
Ok, so you have prosper202 set up properly and whatnot, and you want to make a ppc campaign with a wordpress landing page. Prosper202 makes it easy to use a landing page by simply asking you to paste some javascript code at the bottom of your page. Unfortunately, with wordpress, you can’t put the javascript in the footer of the page without editing the wordpress template, and even then, the javascript will then be put on ALL the pages on the wordpress page, which means you won’t be able to properly set up a different wordpress post for each of your landding pages in order to split test different copy, etc. Not ideal to say the least. Many people use 10 or more nearly identical landing pages on a wordpress site for split testing purposes, sending different traffic sources to different landing pages, etc. So how can you set up your wordpress with prosper202 to track this properly?
Well, it’s pretty easy with a little php and knowledge of wordpress functions. Basically what you want to do is tell wordpress to display a different javascript code in the footer of each of your individual wordpress posts. So after creating your wordpress landing page, you’ll need to know the post number. When you go to make your campaign in prosper202, you will want to set up your PPC Account, Affiliate Network, Affiliate Campaign, Landing Page (using the individual post url for the lp you just created in wordpress), and text ad. Then when you go to Get LP Code, p202 will give you a piece of javascript to put on the LP and some PHP code for the outgoing redirect.
To put the javascript on your landing page, you need to edit your wordpress template that you’re using (hopefully you know how to do that) and specifically edit the footer (probably something like footer.php). You’re going to be adding a line of code right before the closing body tag, </body>. It will look something like this:
<?php if(is_single(’10′)){echo “<script src=\”http://yourtracking.com/tracking202/static/landing.php?lpip=123\” type=\”text/javascript\”></script>”;} ?>
Please note that you need to change the is_single part to reflect the post number of your landing page. Also the exact javascript you’re using will have a different url in it, and you will need to put the backslashes before the quotation marks in the javascript code. Basically all this is doing is telling wordpress, “hey, if someone’s looking at post #10, display this javascript code before the closing body tag.
After you’ve done that, you’ll need to either point all the links to the offer on your landing page to the link that p202 gives you, OR create a php file that you will link to which will redirect the users to the offer. If you choose to go the php redirect route, which in Nickycakes’ opinion, looks a little better to the customer (not that much better as most customers willing to buy your affiliate products will be too stupid to know the difference), then you will need to create a file and paste the php code that p202 gives you inside. In order to keep track of things, make it the php file like 10.php if your post number is 10, paste the code inside, save it in the root of your wordpress page domain, and then your outgoing links from that landing page will be like http://www.yourlandingpage.com/10.php.
Once that’s all set up properly, you should be good to get your destination urls for your ads from p202 and turn on the traffic.
Hopefully this helps someone, as it took a little while for Nickycakes to figure this out and has proven invaluable for wordpress landing pages for a number of people, but doesn’t seem to be in any p202 documentation.
Note: To track the frontpage as its own landing page, switch the is_single() to is_front_page() in the code for wordpress.
Keep it real.




September 9th, 2008 at 12:28 am
You should be able to put it in the post as well individually if you’re making WP show only 1 LP on the homepage at a time
September 9th, 2008 at 12:41 am
I tried putting it in the post a few times and it never worked properly.
September 9th, 2008 at 12:43 am
I think your correct on the post problem, doesn’t work correctly sounds like other people are having the issue to. Just linked back from the prosper202 blog!
September 9th, 2008 at 3:11 am
Hi,
i use proper202 for my campaigns, but instead of posts i use pages for my landingpages. I just paste the javascript at the end of my page and it works just fine.
September 9th, 2008 at 9:27 am
I set up Prosper202 yesterday and decided not to run it. I don’t know. I still don’t trust it even if it is self hosted. It would be a trivial amount of code to send your information to another database along with your own. The Prosper202 files are encrypted so you can’t peek around under the hood to double check it. Why is free software encrypted? Why not open source it? There would be a lot more support for it. It seems a lot of effort is spent helping people set it up. That is a lot of time wasted supporting free software, time that would be better used playing the AM game and actually trying to make a little money. I’ll use it when the source is available. If it is free then why guard it like it’s a proprietary system?
I guess I am paranoid when it comes to these things though.
September 9th, 2008 at 12:44 pm
It doesn’t work if you use “simple landing page” javascript code.
However, if you use advanced landing page javascript code and put it in the post, it works just fine. That’s how I have it set up on all my landing pages.
Then I just put different javascript codes in different posts.
September 9th, 2008 at 1:58 pm
@nick: I have the unencrypted version. Nothing in there to worry about.
September 9th, 2008 at 3:29 pm
Great post.
Deserves some linkage.
September 9th, 2008 at 3:34 pm
@nick: I know the guys who make Prosper personally. Nothing to worry about, trust me. They’re straight A guys.
@wes: if people start using this method, perhaps a WP plugin for P202 is in need? Could automate the steps Nicky just posted.
September 9th, 2008 at 6:42 pm
Great post, as usual
September 10th, 2008 at 1:08 am
Cakes, this is a great post. I wanted to figure this out a loooong time ago and gave up. It will be great for noobs who don’t wanna pay for LP’s
Plus i just found a premium WP theme that is perfect for a campaign i’m gonna run and the tracking was my only setback. well done
September 10th, 2008 at 1:23 pm
Great post. Posts like these are why I follow your blog. You actually provide value!
September 10th, 2008 at 5:02 pm
I believe “is_front_page()” should be changed to “is_home()”. This may depend your version of WP, though.
September 10th, 2008 at 11:04 pm
Nice hack Nick. Helpful!
On a related note, did I get you my PPC plugin for WP? Lets you make minisites that can be more credible, without duplicating the “credibility pages” (e.g. about, contact, etc.) for every lander. If you’re not using it already, methinks you’ll like it. Hit me up and I’ll send it to you/any friends of yours. All I ask for is some feedback on any bugs you find.
September 11th, 2008 at 9:05 pm
Wish I read this earlier. I published the post hit view source copy paste to notepad. Added the javascript and put the file in my landingpage folder. Your was is much easier.
September 17th, 2008 at 5:22 am
One more note for those of you who may have a ton of posts/pages and can’t seem to find the IDs… they were removed in 2.5. There is a plugin that will bring them back.
Restore Wordpress ID
September 17th, 2008 at 10:47 am
I attempted to share the plugin URL to execute PHP code within posts or pages, but I received an error message on your blog here.
If anyone wants it, ping me.
@jessieupp (twitter)
September 17th, 2008 at 10:35 pm
great post thanks for the info.. if you were to add a lot of posts that you are tracking, do you just keep adding to the footer.php file? ie; keep adding javascript codes with diff post id’s?
cheers
September 20th, 2008 at 4:07 pm
Nice article, I use wordpress all the time for lp’s.
September 22nd, 2008 at 3:54 pm
Fantastic post!
But I also want to ask the same question as Kyle!
September 23rd, 2008 at 4:37 am
If you have more than page template or more than one post template - how will wordpress know which one to display?
Ie if you have the below scenario:
Post1.php with the relevant javascript
Post2.php with the relevant javascript
How will wordpress know which post template to pull? Post 1 or Post 2?
September 24th, 2008 at 2:07 pm
the “valid” url message is received if you don’t remove the “http://” from your url…. cats are most likely ctrl+v the url straight from prosper…
hollahollaholllahollaholla
September 27th, 2008 at 2:33 am
Was wondering how to do this exactly. Thanks Nicky!
October 23rd, 2008 at 2:03 am
I just use the given javascript at the end of my wp post/page & it works fine. Of course I have php-exec plugin turned on.
Only the advanced landing page code will work with wp. So if I have only 1 offer on a single landing page, I still use advanced landing page setting but with only 1 link out.
Prosper 202 is way better than XtremeConversions.
November 5th, 2008 at 2:08 pm
now that prosper202 is open source, we need the PHP gurus to code a Wordpress plugin for P202. I’ve been able to get a “hack” working…but a full blown plugin would put a smile on my face.
November 12th, 2008 at 11:04 pm
Thanks. I just used this on my site. I added a twist, where I’m using the category as an “advanced” landing page (multiple offers).
It’s pretty simple. I just used is_category() instead of is_single() and it works great. I also used the category slug instead of category id. That way my URL shows up as:
http://www.example.com/key-word
and the page shows offers relevant to the key word and Quality Score rocks so far. The call is then is_category(’key-word’).
I’m still confused as to how I track a certain keyword all the way through from the PPC engine through the site and the completed action on the offer, but I’ll get there. Now I can at least see what’s hitting my landers.
January 6th, 2009 at 2:54 am
Being the coding retard that I am, I couldn’t get this code to work for me on pages. So instead I did this:
As far as I know you can enter either the page name or number and it should enter. Always check your shit before going live though.
May 8th, 2009 at 6:52 pm
I just used is_page(10) and it worked just fine. using wordpress version 2.71
May 18th, 2009 at 8:01 am
hey thanks for this great post. only thing i don’t understand how url do i have to put as landing page in 202? if my wordpress url is http://www.xyz.com/post1
do i post this url there? and how do i pass keyword in wordpress LP?
thanks for help