Skip to content

Commit 4a6f64b

Browse files
authored
fix(cookies): keep special condition for google ads (#1562)
* fix(cookies): keep special condition for google ads * docs: add comment * docs: improve comment * chore: changeset
1 parent 67d4716 commit 4a6f64b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@scaleway/cookie-consent': patch
3+
---
4+
5+
keep special condition for google ads

packages/cookie-consent/src/CookieConsentProvider/useSegmentIntegrations.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ const transformSegmentIntegrationsToIntegrations = (
3737
segmentIntegrations: SegmentIntegrations,
3838
): Integrations =>
3939
[defaultSegmentIoIntegration, ...segmentIntegrations].map(
40-
({ category, name }) => ({
41-
name,
40+
({ category, creationName, name }) => ({
41+
// Segment requires the `creationName` for this destination.
42+
name: name === 'Google Ads (Gtag)' ? creationName : name,
4243
category: CATEGORY_MATCH[category] ?? 'marketing',
4344
}),
4445
)

0 commit comments

Comments
 (0)