nuxt-community / google-optimize-module

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

Use with google-tag-manager #16

Open wolganens opened 5 years ago

wolganens commented 5 years ago

Hi, congrats for the job with the module. I'm trying to use it with the google-tag-manager module also made by the nuxt-community. My google tag manager already has a tag for google optimize. In my nuxt.config.js the modules look like: ['@nuxtjs/google-tag-manager', { id: 'GTM-XXXXXX', layer: 'dataLayer' }], 'nuxt-google-optimize', And the google tag assinstant look like the image: google_optimize

With that configuration, I put a console.log in a component to see if I have access to the $exp object: if (this.$exp) { console.log(this.$exp) return this.$exp.$classes.join(" ") }

I have configured the experiment files too and created the experiment and so on... but it does not log the $exp object. Thank you again and sorry about the English thing (not my native language).

farzadso commented 5 years ago

@pi0 Could this somehow be related to https://github.com/nuxt-community/google-optimize/pull/13 ?

eljass commented 3 years ago

This #43 PR will add support to use GTM