Skip to content

Instantly share code, notes, and snippets.

@yalisassoon
Created January 20, 2016 19:11
Show Gist options
  • Save yalisassoon/cb9e37fd872e280ae75c to your computer and use it in GitHub Desktop.
Save yalisassoon/cb9e37fd872e280ae75c to your computer and use it in GitHub Desktop.
Example Optimizely data object (raw)
{
"audiences": {
"3528620749": {
"conditions": [
"and",
[
"or",
[
"not",
[
"or",
{
"dimension_id": 3523861056,
"value": "mobile"
}
]
]
]
],
"name": "Not mobile"
},
"3528999844": {
"conditions": [
"and",
[
"or",
[
"or",
{
"dimension_id": 3519295357,
"match": "exists"
}
]
]
],
"name": "Test_Cookie_QA"
},
"3702253575": {
"conditions": [
"and",
[
"or",
[
"or",
{
"dimension_id": 3701592179,
"value": "mobile"
},
{
"dimension_id": 3701592179,
"value": "iphone"
}
]
]
],
"name": "Mobile"
}
},
"experiments": {
"3623930456": {
"code": "",
"name": "PDP-Desktop-Rearrange colour size",
"conditional": false,
"manual": true,
"section_ids": [
],
"variation_ids": [
"3646160533",
"3668570916"
]
},
"3693260850": {
"code": "",
"name": "Global-Desktop-bag colour",
"conditional": false,
"manual": true,
"section_ids": [
],
"variation_ids": [
"3683621031",
"3716500430"
]
},
"3695812469": {
"code": "",
"name": "Bag-Desktop-CTA button-Checkout",
"conditional": false,
"manual": true,
"section_ids": [
],
"variation_ids": [
"3684620331",
"3716233277"
]
},
"3696742144": {
"code": "",
"name": "PDP-Mobile-Description above the fold",
"conditional": false,
"manual": true,
"section_ids": [
],
"variation_ids": [
"3698626865",
"3703142648"
]
},
"3700120271": {
"code": "",
"name": "Landing-Desktop-With Price",
"conditional": false,
"manual": true,
"section_ids": [
],
"variation_ids": [
"3715590202",
"3687990356"
]
},
"3739841143": {
"code": "",
"name": "PLP-All-Hide number of product",
"conditional": false,
"manual": true,
"section_ids": [
],
"variation_ids": [
"3713952423",
"3723063409"
]
},
"3794910188": {
"code": "",
"name": "Landing-All-Continue to the Finery",
"conditional": false,
"manual": false,
"section_ids": [
],
"variation_ids": [
"3790530250",
"3798870207"
]
}
},
"sections": {
},
"segments": {
"3372061017": {
"name": "Browser"
},
"3392861540": {
"name": "Campaign"
},
"3403121083": {
"name": "Mobile Visitors"
},
"3407870788": {
"name": "Source Type"
}
},
"state": {
"activeExperiments": [
],
"variationIdsMap": {
"3623930456": [
"3668570916"
],
"3693260850": [
"3683621031"
],
"3739841143": [
"3723063409"
]
},
"variationMap": {
"3623930456": 1,
"3693260850": 0,
"3739841143": 1
},
"variationNamesMap": {
"3623930456": "Variation #1",
"3693260850": "Original",
"3739841143": "Variation #1"
},
"enabled": true
},
"variations": {
"3646160533": {
"name": "Original",
"code": ""
},
"3668570916": {
"name": "Variation #1",
"code": "$(\".product__variants > li:eq(2)\").css({\"left\":\"0px\", \"position\":\"relative\", \"top\":\"0px\"});\nif ($('#option_type_7').length > 0) { \n $(\".product__variants > li:eq(2)\").detach().insertBefore(\"#option_type_7\");\n}\nelse if($('#option_type_6').length > 0){ \n $(\".product__variants > li:eq(2)\").detach().insertBefore(\"#option_type_6\");\n}\n\nelse if($('#option_type_5').length > 0){ \n $(\".product__variants > li:eq(2)\").detach().insertBefore(\"#option_type_5\");\n}"
},
"3683621031": {
"name": "Original",
"code": ""
},
"3684620331": {
"name": "Original",
"code": ""
},
"3687990356": {
"name": "Variation #1",
"code": "$(\"#promo-152 .promotion__title\").html(\"\\n Dresses from \u00a329\");\n$(\"#promo-158 .promotion__title\").html(\"\\n Shoes from \u00a359\");\n$(\"#promo-157 .promotion__title\").html(\"\\n Jackets &amp; Coats from \u00a359\");\n$(\"#promo-155 .promotion__title\").html(\"\\n Tops from \u00a319\");\n$(\".taxon-header__caption--with-description > p\").html(\"Influenced by our London heritage and a passion for contrast, discover our first Autumn Winter collection<br><br>Unique designs, priced for real-life&nbsp; \");\n$(\"#promo-154 .promotion__title\").html(\"\\n Skirts &amp; Trousers from \u00a335\");\n$(\"#promo-160 .promotion__title\").html(\"\\n Accessories from \u00a315\");"
},
"3698626865": {
"name": "Original",
"code": ""
},
"3703142648": {
"name": "Variation #1",
"code": "$(\".product__title-container--sticky\").detach().insertBefore(\".product-container\");"
},
"3713952423": {
"name": "Original",
"code": ""
},
"3715590202": {
"name": "Original",
"code": ""
},
"3716233277": {
"name": "Variation #1",
"code": "$(\".shopping-bag__submit\").html(\"\\n Checkout\\n\");"
},
"3716500430": {
"name": "Variation #1",
"code": "$('body').addClass('bag-red-test');"
},
"3723063409": {
"name": "Variation #1",
"code": "$(\".product-listing__results\").html(\"\");"
},
"3790530250": {
"name": "Original",
"code": ""
},
"3798870207": {
"name": "Variation #1",
"code": "$(\".landing-page__terms\").replaceWith(\"<p class=\\\"landing-page__terms\\\">By submitting this form you agree to receive your promo code<br>and future communications from Finery by email.\\n <\/p>\\n<p class=\\\"landing-page__terms\\\">\\n <a href=\\\"\/uk\/t\/the-full-collection\\\" style=\\\"color:white;font-size:15px\\\">Continue to the collection<\/a>\\n <\/p>\");"
}
},
"visitor": {
"browser": "Chrome",
"browserVersion": "46.0.2490.80",
"device": "unknown",
"deviceType": "desktop",
"platform": {
"id": "windows",
"version": "8.1"
},
"mobile": false,
"mobileId": "unknown",
"os": "windows",
"lists": {
},
"location": null,
"ip": null,
"matchingRules": null,
"params": {
"_empty_": ""
},
"referrer": "",
"segments": {
"3372061017": "gc",
"3392861540": "%E2%80%8Bd93584da6f",
"3403121083": "false",
"3407870788": "campaign"
},
"dimensions": {
},
"audiences": {
"3528620749": true,
"3528999844": false,
"3702253575": false
}
},
"thirdParty": {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment