Rich-text Reply

Personalize by GA gender data

dboroi1 01-21-17

Personalize by GA gender data

Is it possible to do personalization referencing GA data on demographics - i.e. Gender. How would you achieve this specifically?
Level 2

Breana_Eads 01-24-17

Re: Personalize by GA gender data

The short answer is yes, however Optimizely itself does not have a gender specific demographic built in, it will be up to you to build it.  There are two ways to go about this.


One way is to use Optimizely's build an an audience based on visitor behavior on your site.  This option will look at pages, tags and events triggered in Optimizely that you have identified as gender specific behavior.  Once you have determined what combination of metrics and tags make up the visitor you want to identify you can then build that audience.  See this article on Behavior targeted audiences for more details on the steps to build this out.


The other way is to use a 3rd party audience program that can identify visitor attributes like gender for you. 

The third party program would need to be integrated using the custom attributes option, where you would utilize the third parties API to identify a visitor as having the desired attribute.  Then you would identify this visitor as having the attribute to Optimizely by pass the information using Optimizelys JavaScript API.  Below is a code block of what the push to Optimizely needs to look like.


  type: "user",
  attributes: {
    visitorGender: "female"

 The above code can be wrapped up any way you wish using code like an 'if' statement where the information is true then pass the attribute to Optimizely.

try {
    if(thirdParty.Gender == "female") {
           var visitorGender = "female";
               window['optimizely'] = window['optimizely'] || [];
                      "type": "user",
                       "attributes": {
} catch(err) {


Then the attribute can be used to create an audience condition, that can be used in a personalization campaign. 


Here are some articles from our knowledge base that go into greater depth about the different topics I covered above. 

Personalization concepts

Custom Attributes

Audience condition based on custom attributes



Breana Eads