Rich-text Reply

Optimizely & Google Analytics Cookie

nermincanik 08-10-15
Accepted Solution

Optimizely & Google Analytics Cookie


Can Optimizely make a determination (or track) return visitors with Google Analytics cookies?

Thanks for answers!

Nermin Canik
Senior Digital Intelligence Analyst at SEM


Re: Optimizely & Google Analytics Cookie

Hi there,

Yes you can. You'll have to identify the cookie in Google Analytics and set the Audience condition to evaluate for this cookie. For more information on cookie audience conditions, see this KB article.

Amy Herbertson
Customer Success
tomfuertes 08-12-15

Re: Optimizely & Google Analytics Cookie

Hi Nermincanik!


We've done this a couple times before so wanted to leave some notes:


Cookie Names


Depending on if you're Universal Analytics or Classic Analytics you're looking for _ga or __utma-__utmz cookies. You can set that up like this:


First Pageview or More?


The GA cookies are also set AFTER the first pageview so you need a way to say "Still keep people in" or "Exclude those people".


For Example: The _ga cookie will be set *after* the first pageview so that person is technically not a new visit any more. The best way to combat this is to also add your experiment some way of identifying people who were already bucketed into your experiment by looking in the optimizely cookies! You can set that up by adding an OR condition to each of the 2x cookie conditions above:


First Session


We haven't ever done "first session" type targeting via GA cookies, but you could use an approach that was a combination of those above + writing a custom 30m cookie and check for it.


Hope that helps!

- Tom Fuertes | CTO @ CROmetrics / LinkedIn
"Most Impactful Use of Personalization" and "Experience of the Year" Optie award winner.
Experimentation Hero