Post Affiliate Pro Cookie Problem

Post Affiliate Pro Cookie Problem

Earlier this year I was doing a very involved project integrating Post Affiliate Pro and Modern Bill when I came across a problem…

Cookies were disappearing.

And if affiliates aren’t making sales… they’re going to move on to a competitor that has the services and the tracking systems in place to monetize that traffic.

Luckily, I’d come across this before when writing my own PHP apps. You see, if you don’t know what you’re doing when you’re setting a cookie, chances are that you’re not going to get your desired end result.

Unless you take necessary steps… most cookies will not work across these three kinds of urls:


Here’s a 6 minute video that explains this phenomenon and shows you a quick demonstration.

Post Affiliate Pro Cookie Problem movie

My client was using a subdomain for promotion and their root domain for taking the orders via Modern Bill.

I had to go into the Post Affiliate Pro code, find where the cookie was being set, and rewrite some of the code.

How I Solve This for My Own Post Affiliate Pro Installs

I like to keep things as easy and simple as possible. Hacking the internal code of Post Affiliate Pro has a major drawback in that updating a server with a newer version will overwrite the change… and then you’re back in the same spot, often without realizing what you’ve undone.

So what I like to do is to force the server to serve up only web pages with www in the url. This means I don’t have to tamper with the cookies… they’ll always be set for the correct domain… the only one that’s possible.

It’s very rare that one of my clients sets up their install on a subdomain. So this technique is really handy.

But it requires that your web hosting company run Linux on the server with mod_rewrite turned on. I’ve created a push button tool and step by step video in my members only section for folks that purchase Post Affiliate Pro through my affiliate link:

Affiliate Link for Bonuses

But let me go ahead and show you how to do this. Here’s what you need to add to your .htaccess file:

# force www.
RewriteEngine on
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^(.*)$$1 [R=301]

Just replace with your actual domain.

A word of warning… backup your site and your existing .htaccess file if you have one. Tinkering with .htaccess is a bit like doing brain surgery on your website. One little goof can have far reaching effects.

That’s A Lot More About Post Affiliate Pro

It seems like more and more I’m doing custom installs for clients that would rather pay me to do it “right” than give them 2 hours worth of information on how I do it.

But if you’re keeping costs down, here’s something you should see.

Post Affiliate Pro Bonuses

Click the picture graphic above and you’ll get a larger image of my Post Affiliate Pro members only section where I have over 2 hours of video, 8 downloads, and more.

If you decide to purchase Post Affiliate Pro, you should strongly consider buying through my link:

Use this link to get the bonuses

And then you can send your purchase information to me here:

Post Affiliate Pro Bonuses

After I verify the order you get an email from me with your own login for the members only section where you’ll find the movies tutorials and downloads.


#1 Angus on 06.22.08 at 10:16 pm


I found your website after I purchased Post Affiliate Pro.
Is it possible to join and have access to your help? If so is there a cost?


#2 Jack on 06.23.08 at 10:14 am

I’ll send you an email.

For others, I’ll get a link up soon.

#3 Jeremy on 07.28.08 at 1:00 pm

Another option is to setup the affiliate program on a subdomain and then redirect people to your sales/action pages from that source.

Then when you want to log the sale simply call back to the subdomain sales/credit script. This way it doesn’t matter if you use for link redirects:

1) yoursite.tld
2) http://www.yoursite.tld
3) sales.yoursite.tld
4) support.yoursite.tld


If one ever joins a program like ShareASale, CJ, ClixGalore, etc you simply get a sales tracking pixel and that is what you are doing. People get redirected through say ClixGalore get the tracking cookie then get pushed to your site.

If you run an affiliate program that points all traffic to one site you can even use mod_rewrite (iDevAffiliate supports this natively with SEO module) and pass all link power to say http://www.yoursite.tld even if your affiliate program runs at rewards.yoursite.tld since all cookies will be at rewards.yoursite.tld.

This method means you don’t have to update code or worry about updating.

Just my 2 cents.



#4 Syed on 10.27.08 at 2:47 pm


I have already bought Affiliate Post pro before seeing your website. I am have lot of issues with that. Is there any cost to buy your tutorials. Please let me know. I am having problems recording 2-tier commissions


#5 Jack on 10.27.08 at 3:55 pm

Here you go.

But the videos don’t specifically cover tier commissions.

#6 Bruce Lee on 10.28.08 at 1:11 am

Jack, I upgraded from Miva 4.23 to Miva 5.5 and am unable to get it to work with POST AFFILIATE PRO v 3.x

I installed Empress Toolkit v5 and still have had no luck.

Any experience setting up PAP Pro with MIVA 5.5?

Very interesting that the most widely used shopping cart software in the world has no integration instructions mentioned in the PAP Pro software manuals.

Second question is what is up with PAP giving credit to multiple affiliates for the same Unique Order Number Number? The folks at PAP Pro only tell you to turn on the fraud option to MASK this but it doesnt answer the question of why it is happening in the first place..

I am frustrated with PAP – do I stick with it and upgrade to version 4 or is now the time to find another afffiliate software pkg?

#7 Jack on 10.28.08 at 9:32 am

Back from the dead in time for Halloween?

I have no experience with Miva. But Post Affiliate Pro has a generic catchall solution for tracking leads and sales that should work on any website, any cart.

Regarding the lack of instructions for MIVA, it’s not my software but (1) there’s the catchall solution (2) it’s very difficult for affiliate software vendors to keep up with several dozen popular carts especially when these carts are all upgrading at different times.

Having said that, MIVA is a major cart so yes I’d think it should be in the list.

re multiple affiliates credit for the same order number… I have never had that experience. And I suspect it comes down to how your programmer installed it. If you install it incorrectly then it will track incorrectly.

It may sound like I’m defending PAP but I’m not. I sell software in a different niche and it’s pretty common for clients to assume that the “software is broken” when it turns out to be an installation error.

Finally, if you’re frustrated with PAP then I would recommend giving someone else a try. Most have a free trial.

#8 Phil on 11.07.08 at 6:06 am

your training video for red.php is cut off… can you fix it? It is one of the most important ones!

#9 Jack on 11.07.08 at 5:06 pm

I got your email… just been slammed busy this week. Big launch of a service next week.

I will get to it mid next week.

But the video shows you what you need to do. The only thing missing are my ramblings and musings about the benefits of 301 redirect versus other methods. The critical stuff is there and in the comments of the file itself.

#10 Phil on 11.08.08 at 12:37 pm

Thanks Jack…
Unfortunately I am having problems with this red.php – my server is sending the file down as binary, so it is not working at all… I’ve had to resort to the default way of doing it.

#11 Bruce Lee on 11.13.08 at 1:53 pm

Jack, please contact me at 770-531-0073 or send me your phone as I would liek to hire you to do some work for me to re-install my affiliate software on my MIVA 5.5 system. thank you

#12 Bruce Lee on 11.18.08 at 12:34 am

Jack you still alive? Need help – Unable to find the THANK YOU page in MIVA 5.5 where I need to add the POST AFFILIATE PRO tracking code. What is your email so I can contact you

#13 Jack on 11.18.08 at 10:17 am

Hey Bruce,
Yes, I’m alive. Just very very busy with a full schedule of product and promotion roll outs.

I posted a reply to the other comment you made on another page of the site.

#14 james on 12.19.08 at 5:12 am


I found your website after I purchased Post Affiliate Pro.
Is it possible to join and have access to your help? If so is there a cost?

James Acobas

#15 Viktor Zeman on 03.27.09 at 2:14 pm

Hello Jack,

I see, that some users request your videos after they ordered it from us directly.

Maybe we should find any solution also for them. I could suggest following:
- we will allow our visitors to order videos on our site (using our payment processor)
- we should find a way how we will automatically assign access to your videos after order was processed
- each month we will pay you fixed commissions from each sale.

I just want to find a way how to access your videos also for users, which ordered it directly.
Also there is chance, that number of orders of your videos will grow rapidly

We have only requirement – we will be able to check every video from your library and every video will be recorded with latest version PAP4 and not PAP3

Please let me know what you think about it.

Thank you


#16 Jason on 05.18.10 at 2:53 pm

Hi there, we have a problem where some our merchants we have on PAN (post affiliate network) do not want to use click tracking script on the landing page, only the pixel to count sales on the confirmation of order.

Do you have a solution on how we can get a pixel that counts the clicks and the sale without to much hassle.

Another question is how is it possible get our system to count clicks for campaigns without having to place the click script on the landing page.


#17 Jack on 05.23.10 at 10:54 pm

I’m sorry, but I’m not familiar with PAN. Like you, I’ve never been a believer in having a click tracking script on every page of the site, which is why in my training videos I show how to use a passthru script to track the click once.

#18 Tara on 06.30.10 at 10:13 am

Hiya Jack I was wondering how I can get access to your post affiliate pro videos and at what price along with a list of what you cover, could you please email me.


#19 Jack on 06.30.10 at 1:12 pm

Tara, You can use this link:

#20 Tom on 11.20.10 at 8:43 am

what is the longest cookie duration you can use with idev 6 and can you change that setting if needed…sorry, but i am a newbie….

#21 Jack on 11.20.10 at 12:49 pm

You can set the cookie to last indefinitely, or you can set it to expire after a fixed number of days, whichever you prefer.

#22 John on 11.28.10 at 2:22 pm

Hi Jack,

This article sort of confirms my suspicion for a while now. In the past I promoted a gambling brand that used PAP and strangely the results were next to “zero” which eventually led me to believe that the merchant wasn’t credible one.

Now I promote a forex affiliate program which uses PAP and I notice 8 real sign ups but “zero” in deposits/transactions.

This merchant users to promote their affiliate program (hosting PAP) and the aff links are for

Is there any way to check if the discrepancy exists as an affiliate or is this something that only the affiliate program admin can check?

#23 Jack on 11.29.10 at 2:40 am

I’m not sure what you mean by discrepancy. If you’re wanting to know if your clicks are tracking, you can click the affiliate link and see if the click is tracked in your affiliate admin. Tracking the sale will require a sale of the product, but if it’s a mature affiliate program and the click is tracking then there’s a good chance the sale is tracking too. But there’s no way to test this as an affiliate unless you know a sale was made and you know that the client “belonged” to you.

Leave a Comment