Rich-text Reply

Enumerating dimensions of current project

andreasbalzer 05-09-16
Accepted Solution

Enumerating dimensions of current project

Hi,

is it possible to enumerate available dimensions of the current project via JavaScript? I would like to do something like "If dimension with Id X is available in the Optimizely project, set its dimension value to Y".

 

Thanks,

Andreas

Andreas
DavidS 05-11-16
 

Re: Enumerating dimensions of current project

Hi andreasbalzar,

 

Thanks for reaching out!

You would be able to access all the available dimensions in a project using our REST API. We have more information on how to get the dimensions here: List Dimensions in Project

 

This is not accessible on the page directly using our Javascript API however. You can however get the current's visitor dimension with 

window['optimizely'].data.visitor.dimensions

Does that answer your question? 

 

Best,
David

 

Optimizely