Search code examples
shopifygoogle-datalayergoogle-optimizedata-layers

Google Optimize Audience Targeting on dataLayer variable - (actual value not found)


I have in my code a dataLayer.push for this variable

<script>
 window.dataLayer.push({
  'enterTest': 'enter'
});
</script>

and when I run the console.log on dataLayer it shows but in Google Optimize I have these settings: enter image description here

enter image description here

But when I debug in live mode, it says : Enter Test 2 equals enter (actual value not found)


Solution

  • I've had the same problem and found out that Google Optimize loads faster than Data Layer. To check this use Google Tag Assistant to check where in the firing schedule did Google Optimize load.