Jump to content

Pixel Tracking + Cookies + IE6 = Problem


neoform

Recommended Posts

I have a 1x1 pixel that gets loaded on a different site (for tracking reasons). The pixel is loaded through php, which creates a cookie. The cookie gets created and works with FF1 and FF2, but does not get created in IE6.

 

$cookie_made = setcookie('tc', base64_encode($code), time() + (60 * 60 * 24 * 90), SITE_RELATIVE_PATH, $domain, false, false);

 

Any ideas as to why this cookie isn't being made in IE?

Link to comment
https://forums.phpfreaks.com/topic/96766-pixel-tracking-cookies-ie6-problem/
Share on other sites

It sounds like the sites are on different domains so the cookie you are trying to create is considered third party.  On most IE security settings it will reject third party cookies automatically.

 

To test if this is the case go into your IE -> Tools -> Internet Options -> Security -> Trusted Sites and click the Sites... button.  Add the domain of the site that is trying to add the cookie to the list of trusted sites and then see if the cookie is created.

 

If the cookie is created then that is the problem.  However you can't get all your users to do this so to get around it you must provide a P3P (Peer Privacy Policy).  A little bit of Google hunting and you should find more on what a P3P is and a free tool for creating one.

 

Then you use a call to header() so that the P3P is sent with every page request and you should be good to go.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.