nuxt-community / google-optimize-module

SSR friendly Google Optimize module for Nuxt.js
MIT License
215 stars 32 forks source link

Seems to require Google Tag Manager #20

Closed anthonygore closed 4 years ago

anthonygore commented 4 years ago

I struggled to get this working but eventually figured it out. I couldn't see this anywhere in the docs, but I had to add the container ID using Google Tag Manager. It's simple enough with the Nuxt module:

modules: [
   ['@nuxtjs/google-tag-manager', { id: 'your-container-id' }],
]

Without this, experiment data was not being sent back to Optimize.

I have not looked into this deeply, so maybe my case is a one-off, or maybe this belongs in the docs, I dunno.