Rich-text Reply

Dimensions set through API

aplewes 04-23-15
Accepted Solution

Dimensions set through API

[ Edited ]

I'm working through setting up some customer dimensions on my site, and I was wondering about some of the finer points of setting dimensions through the API: 

 

1. For a single dimension, are visitors assigned to a single value or multiple values? (For instance, say I have a clothing store servicing both men and women - if you visit the men's side, I want your dimension to be "Man" and the woman's side the dimension should be "Woman." If you visit both, are you set as both by default, or does the last one to set take precedence?) 

2. In the instance above where you only ever want people to be in one dimension based on the last action performed, is it considered a best practice to set the dimension value as null prior to setting it on the page? 

Level 2

aplewes 04-23-15
 

Re: Dimensions set through API

Also, are you limited to 10 total dimensions, or just 10 dimensions that you can segment by?
Level 2
tomfuertes 04-23-15
 

Re: Dimensions set through API

1. For a single dimension, are visitors assigned to a single value or multiple values? (For instance, say I have a clothing store servicing both men and women - if you visit the men's side, I want your dimension to be "Man" and the woman's side the dimension should be "Woman." If you visit both, are you set as both by default, or does the last one to set take precedence?)

 

The last one set takes precendence, but as optimizely is visitor based, the reporting works at "time of attribution" for the goal. So if you setDimension for someone, you'll see that visitor on any future goals, but not historic. For example, if someone views a Men page, fires the engagement goal, then views a women page and finally places an order; from some beta tests we did I believe you'll have:

 

> 1 men visitor w/ 1 engagement conversion and 0 orders

> 1 women visitor w/ 1 engagement conversion and 1 order

 

Which though a limitation is generally sufficient in results reporting if you tage "Men Pageviews" vs "Women Pageviews" to get that count and then do some excel pivots in your final results.

 

2. In the instance above where you only ever want people to be in one dimension based on the last action performed, is it considered a best practice to set the dimension value as null prior to setting it on the page?

 

We generally setup our dimensions to be proactive and not care about the null state and/or back into it with math instead of letting the UI filter for us. Take for example a "Logged in at Checkout" dimension. We set "logged-in" when they did log in and then use a calculation of "Overall - {logged-in}".

 

3. Also, are you limited to 10 total dimensions, or just 10 dimensions that you can segment by?

 

You're currently limited to 10 total dimensions. You can delete them to make room as you go but the data gets removed from reporting. Because you can pass values to them, we generally setup dim[A-C] and pass the experiment key/value in the key. So something like:

 

window['optimizely'].push(['setDimensionValue', 'dimA', 'exp8: logged-in']);

 

This lets us easily run up to 3 concurrent tests each using a dimension.

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


Experimentation Hero
tomfuertes 04-24-15
 

Re: Dimensions set through API

Hi Aplewes!

Checking in again to say we ran a demo experiment here to confirm. It looks like it's correct that things that happen after a value is set is attributed back to it's corresponding data.

**Reports**
* results: http://optimize.ly/~q5vPBB?token=644a8efc08815499b3dd#view=2
* explanation: http://goo.gl/FfguaJ

**Code**
* playground: http://rawgit.com/clearhead/playground/master/optimizely-dimensions/index.html
* source: https://github.com/clearhead/playground/tree/master/optimizely-dimensions

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


Experimentation Hero
aplewes 04-27-15
 

Re: Dimensions set through API

Tom,

Thanks so much for your help! You just saved me a ton of time!
Level 2