Mapping dataLayer array to Data Elements
I have the following dataLayer array set in the <head> of my HTML page and I have the Adobe Launch script set after it. However when I try to pull the values via Data Element's JavaScript Variable it doesn't work. I tried putting both dataLayer[0].variable1 and dataLayer.variable1 into the "JavaScript variable name" field but both don't work. Does Launch not support dataLayers that are set as an array or is there something I'm missing in the Data Elements set up?
<head>
<script>
dataLayer = [{
'variable1': 'value-of-variable-1',
'variable2': 'value-of-variable-2',
'variable3': 'value-of-variable-3'
}];
</script>
<script src="<adobe launch.js" async></script>
</head>