Skip to content

How to configure consent mode? #172

@42savage

Description

@42savage

Hi im configuring google tag manager and i want to implement consent mode.

Now im just using code like this but it looks like it send it to google as custom event, not as consent i think

  this.$gtm.push({
    event: 'cookie_consent_update',
    cookie_consent_status: 'custom',
    cookie_consent_analytics: this.consent.analytics ? 'granted' : 'denied',
    cookie_consent_advertising: this.consent.advertising ? 'granted' : 'denied',
    cookie_consent_functionality: this.consent.functionality ? 'granted' : 'denied',
    cookie_consent_personalization: this.consent.personalization ? 'granted' : 'denied'
  })

In google tag manager debug console im getting event like this

Image

but in docs it looks like this

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions