diff --git a/.changeset/eighty-peaches-travel.md b/.changeset/eighty-peaches-travel.md new file mode 100644 index 000000000..326375dcc --- /dev/null +++ b/.changeset/eighty-peaches-travel.md @@ -0,0 +1,5 @@ +--- +'@scaleway/cookie-consent': patch +--- + +keep special condition for google ads diff --git a/packages/cookie-consent/src/CookieConsentProvider/useSegmentIntegrations.ts b/packages/cookie-consent/src/CookieConsentProvider/useSegmentIntegrations.ts index b853d06c3..64ceafc33 100644 --- a/packages/cookie-consent/src/CookieConsentProvider/useSegmentIntegrations.ts +++ b/packages/cookie-consent/src/CookieConsentProvider/useSegmentIntegrations.ts @@ -37,8 +37,9 @@ const transformSegmentIntegrationsToIntegrations = ( segmentIntegrations: SegmentIntegrations, ): Integrations => [defaultSegmentIoIntegration, ...segmentIntegrations].map( - ({ category, name }) => ({ - name, + ({ category, creationName, name }) => ({ + // Segment requires the `creationName` for this destination. + name: name === 'Google Ads (Gtag)' ? creationName : name, category: CATEGORY_MATCH[category] ?? 'marketing', }), )