Using Persistent Cookies To Improve Campaign Tracking
   

Campaign tracking relies on tying a conversion event back to a campaign or search engine keyword that generated the lead. The complication for web analytics tools is that the clickthrough and conversion often occur hours, days, or even weeks apart. Because the user's IP address and other data are almost sure to change across such a long period of time, a unique and persistent cookie is the only reliable method for tracking.

It cannot be overstated that good campaign data depends on setting a unique persistent cookie.

Configuring Persistent Cookies

Cookies are a part of the HTTP protocol and are exchanged between browser and server during the time the browser requests pages. They are then logged in the logfile. It's important to understand that ClickTracks cannot set any cookies. Only the website can do this. It's in the interest of the website owner to set and manage the cookies as this provides the best possible long-term solution. Even though writing website code to handle the cookies seems complex and time consuming, you should do it. It's too important to ignore.

The persistent cookie you use can have any name, and the contents are unimportant as long as they are unique and won't be changed later. To meet these requirements, you must:

1. Create a unique value for the cookie. The system time (epoch time) with a random number appended is good enough.
2. Set the cookie with an expiry many weeks or months in the future.
3. Never reset the value of the cookie (in other words, if it exists, don't replace it).

Setting the cookie will probably require some small custom development within the website. You'll then configure the ClickTracks Server to use this cookie name, and that's it. ClickTracks will take care of all the rest automatically.

Apache mod_usertrack

For users of Apache, there is a very convenient way to handle both session and persistent cookies without changing any code in the website. Install mod_usertrack, configure cookies to be logged within the logfile, and set up the ClickTracks Server to "Use Only Unnamed Cookies." (Cookies set by mod_usertracks are strange in that they have no name, only a value.)