segmentio / consent-manager

Drop-in consent management plugin for analytics.js
https://segmentio.github.io/consent-manager/
MIT License
341 stars 144 forks source link

Google Tag Manager Category #290

Closed andrewmumblebee closed 1 year ago

andrewmumblebee commented 2 years ago

Hi,

I'm struggling with the customCategories option, if i use it it with the banner then i can't save the options.

So I've tried using the default categories which works fine. However, Google Tag Manager is listed until the "Advertising" category, this doesn't make sense to me, i'm trying to utilize the preferences from Segment to set consent on the tags loaded by Tag Manager.

But if someone disables the "Advertising" consent then our "Analytics" tracking will also fail to load fully. i.e. using tag manager for GA4 as Segment's implementation doesn't collect enhanced measurement.

Would be good to configure the category of specific destinations using the default categories, rather than needing to use the customCategories property which doesn't seem to work when pressing the "Accept All" button, just keeps reloading page.

Using this at the moment.

initialPreferences={{
    advertising: true,
    functional: true,
    marketingAndAnalytics: true
}}
customCategories={{
    marketingAndAnalytics: {
        integrations: [
            'Google Analytics',
            'HubSpot Analytics',
            'Google Analytics 4'
        ],
        purpose:
            'Provide statistical information on site usage, e.g., web analytics so we can improve this website over time.'
    },
    advertising: {
        integrations: ['Google Ads'],
        purpose:
            'To personalize and measure the effectiveness of advertising on our site and other websites.'
    },
    functional: {
        integrations: ['Google Tag Manager'],
        purpose:
            'To personalize and measure the effectiveness of advertising on our site and other websites.'
    }
}}
edsonjab commented 2 years ago

Hi @andrewmumblebee thank you for your report, we start looking into this.

edsonjab commented 1 year ago

Hi @andrewmumblebee we solved the issue on our new version 5.7.0, could you check if solves your problem, please?