MatteoGabriele / vue-gtag-next

Global Site Tag plugin for Vue 3 (gtag.js)
MIT License
44 stars 3 forks source link

How to pass anonymize_ip correctly? #11

Closed therealcoder1337 closed 3 years ago

therealcoder1337 commented 3 years ago

hi,

how do I pass the option to anonymize ip, to be compliant with eu regulations?

right now i am doing this upon opt-in:

const app = getCurrentInstance();

app.use(VueGtag, {
  isEnabled: true,
  property: {
    'id': 'UA-something',
    'anonymize_ip': true
  }
});

thank you!

ps: couldn't find anything about this in the docs.

therealcoder1337 commented 3 years ago

had to experiment a bit, but this seems to work for me now:

app.use(VueGtag, {
    isEnabled: true,
    property: {
        'id': 'UA-something',
        'params': {
            'anonymize_ip': true
        }
    }
});