Know When to Use First-Party Cookies

As consumers become more sensitive to potential invasions of their privacy, many are moving to limit your access to information about them via the use of cookies. Here’s how to know when to use first-party cookies and what effect their use will have on your analysis.

There are two kinds of persistent cookies used in web measurement: first and third party [Hack #15] . The answer to the question “When should I use a first-party cookie?” is basically “Whenever possible.” In this era of increasing awareness about security and privacy, it is preferable to use first-party cookies over third-party cookies, period. It seems like rarely a week passes when we’re not hearing about some other privacy intrusion or black hat hack; you and I may know that these intrusions rarely have anything to do with cookies, but the majority of Internet users have no clue.

Given the popularity of anti-spyware applications and the simplicity with which third-party cookies can now be removed or blocked, it is no wonder that research is beginning to show that cross-visit accuracy for these types of cookies is slipping as low as 70 percent. Sure, 70 percent is a lot, but wouldn’t you prefer 100 percent accuracy from your web measurement solution?

Cookies are becoming increasingly easy to control, thanks to functionality built into the most popular browsers. Firefox has very simple tools for controlling what cookies are set, from where, and by whom (Figure 2-1) and Microsoft ...

Get Web Site Measurement Hacks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.