You’re a pro. You know that the only way to fully evaluate the success of your lead gen marketing efforts is to append source information to the incoming traffic URL. You’ve also injected this information into your conversion forms so that when a prospective customer decides to give you their information, you can keep track of how they found you. But you might still have a gap.

Despite all your efforts to make your landing pages informative and friendly, some visitors are too shy to give you their information right off the bat. Maybe they need to investigate some of the other great content you’ve created, or perhaps it’s early in their research, and they just aren’t ready. When that visitor makes it back to your form, will you still be able to determine if their initial visit came from a paid search ad? Was it paid social? Something else?

Fortunately, there is a solution to your problem: bake cookies. (Unfortunately these won’t cut it)

As delicious as these cookies are, they won’t help you track your sales cycle. Photo via Pixabay.

By generating a cookie when a visitor first arrives, you can make a record of how they arrived on your site that will remain regardless of what other actions they take, including leaving your site. Each piece of information that you supply in the URL will ideally receive its own cookie, to provide you the most control and give the widest degree of compatibility. (Google Tag Manager, Marketo, and other systems will allow you to read the value directly from a first party cookie.)

Creating a cookie involves adding some javascript code to your landing pages. Additionally, you will need a second set of code to take the values back out of the cookie and apply them to the fields in your forms. The guide below will walk you through this process. For simplicity’s sake, we will focus on this single parameter:

Creating the Cookie

Place the below code on all landing pages and your home page, just after the <body> tag.

What’s Happening?

  1. You’re telling the browser to look at your URL for a parameter called “myparam”.
  2. If the browser finds that parameter, it creates a cookie called “myparamcookie” and assigns the parameter value as the cookie value.

Reading the Cookie

Now that the data about the visit is stored to a cookie, you’ll need to retrieve it.

In this case, you’re looking for a form field that has the ID “myParamField,” and inserting into it the value that we previously assigned to the cookie we created.

There are numerous further areas for sophistication here, such as retaining first touch information, or overriding certain marketing channels with others. If full sales cycle tracking is an area of interest for your business, please contact us to discuss additional solutions.