From 6b9843688faae40d96148e8fedf4abbd534b1a16 Mon Sep 17 00:00:00 2001 From: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Date: Fri, 14 Jun 2024 16:11:21 +0530 Subject: [PATCH 01/68] feat: cm360 enhanced conversions (#1407) --- .../campaign_manager/db-config.json | 10 ++- .../destinations/campaign_manager/schema.json | 83 +++++++++++++++---- .../campaign_manager/ui-config.json | 26 +++++- .../destinations/campaign_manager.json | 2 + 4 files changed, 103 insertions(+), 18 deletions(-) diff --git a/src/configurations/destinations/campaign_manager/db-config.json b/src/configurations/destinations/campaign_manager/db-config.json index f9cfae128..30c826251 100644 --- a/src/configurations/destinations/campaign_manager/db-config.json +++ b/src/configurations/destinations/campaign_manager/db-config.json @@ -45,6 +45,8 @@ "treatmentForUnderage", "childDirectedTreatment", "nonPersonalizedAd", + "enableEnhancedConversions", + "isHashingRequired", "oneTrustCookieCategories" ], "android": ["connectionMode", "consentManagement"], @@ -60,7 +62,11 @@ "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": [], - "supportedMessageTypes": { "cloud": ["track"] } + "supportedMessageTypes": { + "cloud": ["track"] + } }, - "options": { "isBeta": true } + "options": { + "isBeta": true + } } diff --git a/src/configurations/destinations/campaign_manager/schema.json b/src/configurations/destinations/campaign_manager/schema.json index 758c3b479..53c8d5a80 100644 --- a/src/configurations/destinations/campaign_manager/schema.json +++ b/src/configurations/destinations/campaign_manager/schema.json @@ -8,10 +8,30 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,50})$" }, - "limitAdTracking": { "type": "boolean", "default": false }, - "childDirectedTreatment": { "type": "boolean", "default": false }, - "nonPersonalizedAd": { "type": "boolean", "default": false }, - "treatmentForUnderage": { "type": "boolean", "default": false }, + "limitAdTracking": { + "type": "boolean", + "default": false + }, + "childDirectedTreatment": { + "type": "boolean", + "default": false + }, + "nonPersonalizedAd": { + "type": "boolean", + "default": false + }, + "treatmentForUnderage": { + "type": "boolean", + "default": false + }, + "enableEnhancedConversions": { + "type": "boolean", + "default": false + }, + "isHashingRequired": { + "type": "boolean", + "default": true + }, "oneTrustCookieCategories": { "type": "array", "items": { @@ -27,17 +47,50 @@ "connectionMode": { "type": "object", "properties": { - "android": { "type": "string", "enum": ["cloud"] }, - "ios": { "type": "string", "enum": ["cloud"] }, - "web": { "type": "string", "enum": ["cloud"] }, - "unity": { "type": "string", "enum": ["cloud"] }, - "amp": { "type": "string", "enum": ["cloud"] }, - "reactnative": { "type": "string", "enum": ["cloud"] }, - "flutter": { "type": "string", "enum": ["cloud"] }, - "cordova": { "type": "string", "enum": ["cloud"] }, - "shopify": { "type": "string", "enum": ["cloud"] }, - "cloud": { "type": "string", "enum": ["cloud"] }, - "warehouse": { "type": "string", "enum": ["cloud"] } + "android": { + "type": "string", + "enum": ["cloud"] + }, + "ios": { + "type": "string", + "enum": ["cloud"] + }, + "web": { + "type": "string", + "enum": ["cloud"] + }, + "unity": { + "type": "string", + "enum": ["cloud"] + }, + "amp": { + "type": "string", + "enum": ["cloud"] + }, + "reactnative": { + "type": "string", + "enum": ["cloud"] + }, + "flutter": { + "type": "string", + "enum": ["cloud"] + }, + "cordova": { + "type": "string", + "enum": ["cloud"] + }, + "shopify": { + "type": "string", + "enum": ["cloud"] + }, + "cloud": { + "type": "string", + "enum": ["cloud"] + }, + "warehouse": { + "type": "string", + "enum": ["cloud"] + } } }, "consentManagement": { diff --git a/src/configurations/destinations/campaign_manager/ui-config.json b/src/configurations/destinations/campaign_manager/ui-config.json index c205a1a29..31cb9b5ac 100644 --- a/src/configurations/destinations/campaign_manager/ui-config.json +++ b/src/configurations/destinations/campaign_manager/ui-config.json @@ -7,7 +7,7 @@ "type": "textInput", "label": "Profile ID", "value": "profileId", - "regex": "^(.{1,50})$", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,50})$", "regexErrorMessage": "Length of Profile ID must be below 50 characters.", "required": true, "secret": false, @@ -45,6 +45,30 @@ "required": false, "default": false, "footerNote": "Whether this particular request may come from a user under the age of 16 (may differ by country), under compliance with the European Union's General Data Protection Regulation (GDPR)." + }, + { + "type": "checkbox", + "label": "Enhanced Conversions", + "value": "enableEnhancedConversions", + "required": false, + "default": false, + "footerNote": "Enable this toggle to enhanced the conversions." + }, + { + "type": "checkbox", + "label": "Hash user identifiers", + "value": "isHashingRequired", + "required": false, + "default": true, + "footerNote": "RudderStack will hash your user identifiers by default. Switch this off if you are already sending hashed data.", + "preRequisites": { + "fields": [ + { + "configKey": "enableEnhancedConversions", + "value": true + } + ] + } } ] }, diff --git a/test/data/validation/destinations/campaign_manager.json b/test/data/validation/destinations/campaign_manager.json index 508494964..bd16546bb 100644 --- a/test/data/validation/destinations/campaign_manager.json +++ b/test/data/validation/destinations/campaign_manager.json @@ -5,6 +5,8 @@ "rudderAccountId": "test-host", "profileId": "test-database", "limitedAdTracking": "test-user", + "enableEnhancedConversions": true, + "isHashingRequired": true, "consentManagement": { "web": [ { From 2d0e97aed5eb63ae6859416823cc0708578ebdb5 Mon Sep 17 00:00:00 2001 From: Ruchira Moitra <31311577+ruchiramoitra@users.noreply.github.com> Date: Tue, 18 Jun 2024 14:42:53 +0530 Subject: [PATCH 02/68] feat: added support for key pair authentication option for snowflake source (#1476) --- .../sources/snowflake/schema.json | 51 +++++++++++++++++- .../sources/snowflake/ui-config.json | 52 ++++++++++++++++++- 2 files changed, 100 insertions(+), 3 deletions(-) diff --git a/src/configurations/sources/snowflake/schema.json b/src/configurations/sources/snowflake/schema.json index fddffa4cc..31f76b001 100644 --- a/src/configurations/sources/snowflake/schema.json +++ b/src/configurations/sources/snowflake/schema.json @@ -1,3 +1,52 @@ { - "configSchema": null + "configSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "required": [], + "type": "object", + "properties": {}, + "allOf": [ + { + "if": { + "properties": { + "connectionMode": { + "const": "usePasswordAuth" + } + }, + "required": ["connectionMode"] + }, + "then": { + "properties": { + "password": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|.*" + } + }, + "required": ["password"] + } + }, + { + "if": { + "properties": { + "connectionMode": { + "const": "useKeyPairAuth" + } + }, + "required": ["connectionMode"] + }, + "then": { + "properties": { + "privateKey": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|.*" + }, + "privateKeyPassphrase": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|.*" + } + }, + "required": ["privateKey"] + } + } + ] + } } diff --git a/src/configurations/sources/snowflake/ui-config.json b/src/configurations/sources/snowflake/ui-config.json index 6f8605b0f..6f8c88876 100644 --- a/src/configurations/sources/snowflake/ui-config.json +++ b/src/configurations/sources/snowflake/ui-config.json @@ -2,7 +2,7 @@ "uiConfig": [ { "title": "Connection Credentials", - "secretFields": ["password"], + "secretFields": ["password", "privateKey", "privateKeyPassphrase"], "docLinks": { "grantPermissions": "https://docs.rudderstack.com/reverse-etl/snowflake/#granting-permissions", "verifyingCredentials": "https://docs.rudderstack.com/reverse-etl/snowflake/#what-do-the-three-validations-under-verifying-credentials-imply", @@ -11,6 +11,24 @@ }, "nameField": "account", "fields": [ + { + "type": "singleSelect", + "label": "Connection Mode", + "value": "connectionMode", + "options": [ + { + "name": "Key Pair Authentication", + "value": "useKeyPairAuth" + }, + { + "name": "Username Password Authentication", + "value": "usePasswordAuth" + } + ], + "defaultOption": { + "value": "usePasswordAuth" + } + }, { "type": "textInput", "label": "Account", @@ -66,7 +84,37 @@ "inputFieldType": "password", "regex": ".*", "required": true, - "secret": true + "secret": true, + "preRequisiteField": { + "name": "connectionMode", + "selectedValue": "usePasswordAuth" + } + }, + { + "type": "textInput", + "label": "Private Key", + "value": "privateKey", + "inputFieldType": "password", + "regex": ".*", + "required": true, + "secret": true, + "preRequisiteField": { + "name": "connectionMode", + "selectedValue": "useKeyPairAuth" + } + }, + { + "type": "textInput", + "label": "Private Key Passphrase", + "value": "privateKeyPassphrase", + "inputFieldType": "password", + "regex": ".*", + "required": false, + "secret": true, + "preRequisiteField": { + "name": "connectionMode", + "selectedValue": "useKeyPairAuth" + } } ] } From c913fb628f1f64f94977e0193b42ec8ad9ee52e1 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 16:23:04 +0530 Subject: [PATCH 03/68] feat: added GCM support for MoEngage destination (#1357) --- .../destinations/moengage/db-config.json | 25 ++--- .../destinations/moengage/ui-config.json | 93 ++++++++++++++++++- 2 files changed, 105 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/moengage/db-config.json b/src/configurations/destinations/moengage/db-config.json index dbaeefbe9..20ad60df4 100644 --- a/src/configurations/destinations/moengage/db-config.json +++ b/src/configurations/destinations/moengage/db-config.json @@ -11,7 +11,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -59,17 +60,17 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "debug", "connectionMode"], - "android": ["useNativeSDK", "connectionMode"], - "ios": ["useNativeSDK", "connectionMode"], - "reactnative": ["useNativeSDK", "connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "web": ["useNativeSDK", "debug", "connectionMode", "consentManagement"], + "android": ["useNativeSDK", "connectionMode", "consentManagement"], + "ios": ["useNativeSDK", "connectionMode", "consentManagement"], + "reactnative": ["useNativeSDK", "connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/moengage/ui-config.json b/src/configurations/destinations/moengage/ui-config.json index 6383c4411..eb9c92f18 100644 --- a/src/configurations/destinations/moengage/ui-config.json +++ b/src/configurations/destinations/moengage/ui-config.json @@ -131,7 +131,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } From cd115e41640db4314703a568bf8e3ae2062b8da1 Mon Sep 17 00:00:00 2001 From: Ruchira Moitra <31311577+ruchiramoitra@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:38:11 +0530 Subject: [PATCH 04/68] feat: make connection mode to auth type (#1478) --- .../sources/snowflake/schema.json | 12 +++++----- .../sources/snowflake/ui-config.json | 22 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/configurations/sources/snowflake/schema.json b/src/configurations/sources/snowflake/schema.json index 31f76b001..dba099fcd 100644 --- a/src/configurations/sources/snowflake/schema.json +++ b/src/configurations/sources/snowflake/schema.json @@ -8,11 +8,11 @@ { "if": { "properties": { - "connectionMode": { - "const": "usePasswordAuth" + "authenticationType": { + "const": "password" } }, - "required": ["connectionMode"] + "required": ["authenticationType"] }, "then": { "properties": { @@ -27,11 +27,11 @@ { "if": { "properties": { - "connectionMode": { - "const": "useKeyPairAuth" + "authenticationType": { + "const": "keyPair" } }, - "required": ["connectionMode"] + "required": ["authenticationType"] }, "then": { "properties": { diff --git a/src/configurations/sources/snowflake/ui-config.json b/src/configurations/sources/snowflake/ui-config.json index 6f8c88876..628ee2922 100644 --- a/src/configurations/sources/snowflake/ui-config.json +++ b/src/configurations/sources/snowflake/ui-config.json @@ -13,20 +13,20 @@ "fields": [ { "type": "singleSelect", - "label": "Connection Mode", - "value": "connectionMode", + "label": "Authentication Type", + "value": "authenticationType", "options": [ { "name": "Key Pair Authentication", - "value": "useKeyPairAuth" + "value": "keyPair" }, { "name": "Username Password Authentication", - "value": "usePasswordAuth" + "value": "password" } ], "defaultOption": { - "value": "usePasswordAuth" + "value": "password" } }, { @@ -86,8 +86,8 @@ "required": true, "secret": true, "preRequisiteField": { - "name": "connectionMode", - "selectedValue": "usePasswordAuth" + "name": "authenticationType", + "selectedValue": "password" } }, { @@ -99,8 +99,8 @@ "required": true, "secret": true, "preRequisiteField": { - "name": "connectionMode", - "selectedValue": "useKeyPairAuth" + "name": "authenticationType", + "selectedValue": "keyPair" } }, { @@ -112,8 +112,8 @@ "required": false, "secret": true, "preRequisiteField": { - "name": "connectionMode", - "selectedValue": "useKeyPairAuth" + "name": "authenticationType", + "selectedValue": "keyPair" } } ] From 08a8f5af1bb15ca7de1bcf6b22f021f96b70cdb6 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 20:02:16 +0530 Subject: [PATCH 05/68] feat: added GCM support for Indicative destination (#1360) --- CODEOWNERS | 2 +- .../destinations/indicative/db-config.json | 24 ++--- .../destinations/indicative/ui-config.json | 94 ++++++++++++++++++- 3 files changed, 106 insertions(+), 14 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index f48f24c9b..7006a69c4 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,3 +1,3 @@ -* @ItsSudip @shrouti1507 @sandeepdsvs @krishna2020 @RanjeetMishra @lvrach @bardisg +* @ItsSudip @shrouti1507 @sandeepdsvs @krishna2020 @RanjeetMishra @lvrach @saikumarrs /src/configurations/ @lvrach @cisse21 @debanjan97 @am6010 @ssbeefeater @AchuthaSourabhC @ruchiramoitra @ashishRudder @ItsSudip @shrouti1507 @sandeepdsvs @krishna2020 @desusai7 @1abhishekpandey @bardisg /test/ @lvrach @cisse21 @debanjan97 @am6010 @ssbeefeater @AchuthaSourabhC @ruchiramoitra @ashishRudder @ItsSudip @shrouti1507 @sandeepdsvs @krishna2020 @desusai7 @1abhishekpandey @bardisg diff --git a/src/configurations/destinations/indicative/db-config.json b/src/configurations/destinations/indicative/db-config.json index 067f96113..8aff35a35 100644 --- a/src/configurations/destinations/indicative/db-config.json +++ b/src/configurations/destinations/indicative/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -35,17 +35,17 @@ }, "destConfig": { "defaultConfig": ["apiKey", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/indicative/ui-config.json b/src/configurations/destinations/indicative/ui-config.json index 9d54a780e..33db1993c 100644 --- a/src/configurations/destinations/indicative/ui-config.json +++ b/src/configurations/destinations/indicative/ui-config.json @@ -32,7 +32,99 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } From 41feb431702e2ae56ae017e878fedb9581039764 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 20:07:39 +0530 Subject: [PATCH 06/68] feat: added GCM support for Airship destination (#1361) --- .../destinations/airship/db-config.json | 24 ++--- .../destinations/airship/ui-config.json | 93 ++++++++++++++++++- 2 files changed, 104 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/airship/db-config.json b/src/configurations/destinations/airship/db-config.json index 88761da51..dbfd089d8 100644 --- a/src/configurations/destinations/airship/db-config.json +++ b/src/configurations/destinations/airship/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -35,17 +35,17 @@ "supportedMessageTypes": { "cloud": ["identify", "track", "group"] }, "destConfig": { "defaultConfig": ["apiKey", "appKey", "dataCenter", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey", "appKey"] } diff --git a/src/configurations/destinations/airship/ui-config.json b/src/configurations/destinations/airship/ui-config.json index 57e7f7d61..82234f4c8 100644 --- a/src/configurations/destinations/airship/ui-config.json +++ b/src/configurations/destinations/airship/ui-config.json @@ -49,7 +49,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } From 16a70eda8cc0cc73a38e0d8ede9d2a510f76049e Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 20:09:23 +0530 Subject: [PATCH 07/68] feat: added GCM support for Algolia Insights destination (#1362) --- .../destinations/algolia/db-config.json | 24 ++--- .../destinations/algolia/ui-config.json | 93 ++++++++++++++++++- 2 files changed, 104 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/algolia/db-config.json b/src/configurations/destinations/algolia/db-config.json index f2067e970..179ce479e 100644 --- a/src/configurations/destinations/algolia/db-config.json +++ b/src/configurations/destinations/algolia/db-config.json @@ -5,7 +5,7 @@ "cdkV2Enabled": true, "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -36,17 +36,17 @@ }, "destConfig": { "defaultConfig": ["apiKey", "applicationId", "eventTypeSettings", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey", "applicationId"] } diff --git a/src/configurations/destinations/algolia/ui-config.json b/src/configurations/destinations/algolia/ui-config.json index 814d4f3a9..e28b23e98 100644 --- a/src/configurations/destinations/algolia/ui-config.json +++ b/src/configurations/destinations/algolia/ui-config.json @@ -69,7 +69,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } From cc08e849d80b61ba0642311d501437e82d8accee Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 20:11:57 +0530 Subject: [PATCH 08/68] feat: added GCM support for Amazon Kinesis destination (#1364) --- .../destinations/kinesis/db-config.json | 24 +- .../destinations/kinesis/schema.json | 434 ++++++++++++++++++ .../destinations/kinesis/ui-config.json | 93 +++- .../data/validation/destinations/kinesis.json | 129 ++++++ 4 files changed, 667 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/kinesis/db-config.json b/src/configurations/destinations/kinesis/db-config.json index f6281ba8c..196b4f4f5 100644 --- a/src/configurations/destinations/kinesis/db-config.json +++ b/src/configurations/destinations/kinesis/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -43,17 +43,17 @@ "useMessageId", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["accessKeyID", "accessKey"] } diff --git a/src/configurations/destinations/kinesis/schema.json b/src/configurations/destinations/kinesis/schema.json index 2a6dfe97a..a34a67c4f 100644 --- a/src/configurations/destinations/kinesis/schema.json +++ b/src/configurations/destinations/kinesis/schema.json @@ -41,6 +41,440 @@ "cloud": { "type": "string", "enum": ["cloud"] }, "warehouse": { "type": "string", "enum": ["cloud"] } } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } } }, "allOf": [ diff --git a/src/configurations/destinations/kinesis/ui-config.json b/src/configurations/destinations/kinesis/ui-config.json index 9a2a11ff0..ed8eac45d 100644 --- a/src/configurations/destinations/kinesis/ui-config.json +++ b/src/configurations/destinations/kinesis/ui-config.json @@ -97,7 +97,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/kinesis.json b/test/data/validation/destinations/kinesis.json index ee81a4e40..ee2ccfc6b 100644 --- a/test/data/validation/destinations/kinesis.json +++ b/test/data/validation/destinations/kinesis.json @@ -65,5 +65,134 @@ }, "result": false, "err": [" must have required property 'region'"] + }, + + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "region": "us-east-1", + "stream": "stream-os", + "useMessageId": true, + "iamRoleARN": "", + "accessKeyID": "ape3nfjwldnk", + "accessKey": "1wej94np9qnw6", + + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "region": "us-east-1", + "stream": "stream-os", + "useMessageId": true, + "iamRoleARN": "", + "accessKeyID": "ape3nfjwldnk", + "accessKey": "1wej94np9qnw6", + + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "region": "us-east-1", + "stream": "stream-os", + "useMessageId": true, + "iamRoleARN": "", + "accessKeyID": "ape3nfjwldnk", + "accessKey": "1wej94np9qnw6", + + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "region": "us-east-1", + "stream": "stream-os", + "useMessageId": true, + "iamRoleARN": "", + "accessKeyID": "ape3nfjwldnk", + "accessKey": "1wej94np9qnw6", + + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "region": "us-east-1", + "stream": "stream-os", + "useMessageId": true, + "iamRoleARN": "", + "accessKeyID": "ape3nfjwldnk", + "accessKey": "1wej94np9qnw6", + + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From aabaa44575ac25a29afae131e0125b7808a3167a Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 20:13:49 +0530 Subject: [PATCH 09/68] feat: added GCM support for Amazon Kinesis Firehose destination (#1366) --- .../destinations/firehose/db-config.json | 24 ++--- .../destinations/firehose/ui-config.json | 93 ++++++++++++++++++- 2 files changed, 104 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/firehose/db-config.json b/src/configurations/destinations/firehose/db-config.json index c013d951f..64b52159e 100644 --- a/src/configurations/destinations/firehose/db-config.json +++ b/src/configurations/destinations/firehose/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -42,17 +42,17 @@ "accessKey", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["accessKeyID", "accessKey"] } diff --git a/src/configurations/destinations/firehose/ui-config.json b/src/configurations/destinations/firehose/ui-config.json index 2448e6908..f7ce87b4e 100644 --- a/src/configurations/destinations/firehose/ui-config.json +++ b/src/configurations/destinations/firehose/ui-config.json @@ -98,7 +98,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } From 0a3ef1e3d09032d99611a2a476d8acf1cc9d7925 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 20:15:44 +0530 Subject: [PATCH 10/68] feat: added GCM support for App Center destination (#1375) --- .../destinations/appcenter/db-config.json | 13 +-- .../destinations/appcenter/ui-config.json | 93 ++++++++++++++++++- 2 files changed, 99 insertions(+), 7 deletions(-) diff --git a/src/configurations/destinations/appcenter/db-config.json b/src/configurations/destinations/appcenter/db-config.json index c6cc6540e..af05ff756 100644 --- a/src/configurations/destinations/appcenter/db-config.json +++ b/src/configurations/destinations/appcenter/db-config.json @@ -11,7 +11,8 @@ "blacklistedEvents", "whitelistedEvents", "eventFilteringOption", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["android", "ios", "reactnative", "cordova", "flutter"], @@ -46,11 +47,11 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "android": ["useNativeSDK", "connectionMode"], - "ios": ["useNativeSDK", "connectionMode"], - "reactnative": ["useNativeSDK", "connectionMode"], - "flutter": ["useNativeSDK", "connectionMode"], - "cordova": ["useNativeSDK", "connectionMode"] + "android": ["useNativeSDK", "connectionMode", "consentManagement"], + "ios": ["useNativeSDK", "connectionMode", "consentManagement"], + "reactnative": ["useNativeSDK", "connectionMode", "consentManagement"], + "flutter": ["useNativeSDK", "connectionMode", "consentManagement"], + "cordova": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": ["appSecret"] } diff --git a/src/configurations/destinations/appcenter/ui-config.json b/src/configurations/destinations/appcenter/ui-config.json index 5f2bf2090..96b66e816 100644 --- a/src/configurations/destinations/appcenter/ui-config.json +++ b/src/configurations/destinations/appcenter/ui-config.json @@ -133,7 +133,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } From 908382e14cc5ed120b1fe9e1e094ed6ca5fe63a3 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 20:17:45 +0530 Subject: [PATCH 11/68] feat: added GCM support for Attentive Tag destination (#1377) --- .../destinations/attentive_tag/db-config.json | 24 +- .../destinations/attentive_tag/schema.json | 511 ++++++++++++++++++ .../destinations/attentive_tag/ui-config.json | 93 +++- .../destinations/attentive_tag.json | 103 ++++ 4 files changed, 718 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/attentive_tag/db-config.json b/src/configurations/destinations/attentive_tag/db-config.json index 4a33392a6..4d1170a0d 100644 --- a/src/configurations/destinations/attentive_tag/db-config.json +++ b/src/configurations/destinations/attentive_tag/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -35,17 +35,17 @@ }, "destConfig": { "defaultConfig": ["apiKey", "signUpSourceId", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/attentive_tag/schema.json b/src/configurations/destinations/attentive_tag/schema.json index 74a1278a0..416f5c519 100644 --- a/src/configurations/destinations/attentive_tag/schema.json +++ b/src/configurations/destinations/attentive_tag/schema.json @@ -39,6 +39,517 @@ "cloud": { "type": "string", "enum": ["cloud"] }, "warehouse": { "type": "string", "enum": ["cloud"] } } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } } } } diff --git a/src/configurations/destinations/attentive_tag/ui-config.json b/src/configurations/destinations/attentive_tag/ui-config.json index bee87a674..8992f0788 100644 --- a/src/configurations/destinations/attentive_tag/ui-config.json +++ b/src/configurations/destinations/attentive_tag/ui-config.json @@ -44,7 +44,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/attentive_tag.json b/test/data/validation/destinations/attentive_tag.json index 0dbdd0ac0..0d75c11e2 100644 --- a/test/data/validation/destinations/attentive_tag.json +++ b/test/data/validation/destinations/attentive_tag.json @@ -23,5 +23,108 @@ "signUpSourceId": "123456" }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKey": "jkdhfkjdhfkjdhr38yhr3f3", + "signUpSourceId": "123456", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiKey": "jkdhfkjdhfkjdhr38yhr3f3", + "signUpSourceId": "123456", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKey": "jkdhfkjdhfkjdhr38yhr3f3", + "signUpSourceId": "123456", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiKey": "jkdhfkjdhfkjdhr38yhr3f3", + "signUpSourceId": "123456", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKey": "jkdhfkjdhfkjdhr38yhr3f3", + "signUpSourceId": "123456", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From dbf1b311c7127a9f0250c2299ad26141c214a859 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 20:20:10 +0530 Subject: [PATCH 12/68] feat: added GCM support for Attribution destination (#1381) --- .../destinations/attribution/db-config.json | 24 +- .../destinations/attribution/schema.json | 511 ++++++++++++++++++ .../destinations/attribution/ui-config.json | 93 +++- .../validation/destinations/attribution.json | 98 ++++ 4 files changed, 713 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/attribution/db-config.json b/src/configurations/destinations/attribution/db-config.json index ba04724ef..a85063afd 100644 --- a/src/configurations/destinations/attribution/db-config.json +++ b/src/configurations/destinations/attribution/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": false, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -35,17 +35,17 @@ }, "destConfig": { "defaultConfig": ["writeKey", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "warehouse": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["writeKey"] } diff --git a/src/configurations/destinations/attribution/schema.json b/src/configurations/destinations/attribution/schema.json index 00c851a14..e33db8b7f 100644 --- a/src/configurations/destinations/attribution/schema.json +++ b/src/configurations/destinations/attribution/schema.json @@ -35,6 +35,517 @@ "cloud": { "type": "string", "enum": ["cloud"] }, "warehouse": { "type": "string", "enum": ["cloud"] } } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } } } } diff --git a/src/configurations/destinations/attribution/ui-config.json b/src/configurations/destinations/attribution/ui-config.json index 0c3dd7056..82c3d8b69 100644 --- a/src/configurations/destinations/attribution/ui-config.json +++ b/src/configurations/destinations/attribution/ui-config.json @@ -31,7 +31,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/attribution.json b/test/data/validation/destinations/attribution.json index 9f19ed641..aca82233a 100644 --- a/test/data/validation/destinations/attribution.json +++ b/test/data/validation/destinations/attribution.json @@ -18,5 +18,103 @@ }, "result": false, "err": ["writeKey must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\""] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "writeKey": "AGzpXX9cBV", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "writeKey": "AGzpXX9cBV", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "writeKey": "AGzpXX9cBV", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "writeKey": "AGzpXX9cBV", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "writeKey": "AGzpXX9cBV", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From 3d2947b275a628ba193881a77ffb8777b7e6b872 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 20:22:22 +0530 Subject: [PATCH 13/68] feat: added GCM support for Autopilot destination (#1382) --- .../destinations/autopilot/db-config.json | 24 ++--- .../destinations/autopilot/ui-config.json | 93 ++++++++++++++++++- 2 files changed, 104 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/autopilot/db-config.json b/src/configurations/destinations/autopilot/db-config.json index d6ac795a6..5130f77fc 100644 --- a/src/configurations/destinations/autopilot/db-config.json +++ b/src/configurations/destinations/autopilot/db-config.json @@ -5,7 +5,7 @@ "transformAtV1": "processor", "cdkV2Enabled": true, "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -38,17 +38,17 @@ }, "destConfig": { "defaultConfig": ["apiKey", "triggerId", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/autopilot/ui-config.json b/src/configurations/destinations/autopilot/ui-config.json index cc7d1e1fd..72f392ce5 100644 --- a/src/configurations/destinations/autopilot/ui-config.json +++ b/src/configurations/destinations/autopilot/ui-config.json @@ -40,7 +40,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } From 6a8303560ee5be1f322843f537a6d8099b25d249 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 20:24:44 +0530 Subject: [PATCH 14/68] feat: added GCM support for AWS EventBridge destination (#1403) --- .../destinations/eventbridge/db-config.json | 24 ++--- .../destinations/eventbridge/ui-config.json | 93 ++++++++++++++++++- 2 files changed, 104 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/eventbridge/db-config.json b/src/configurations/destinations/eventbridge/db-config.json index 562387ea1..09154f7ec 100644 --- a/src/configurations/destinations/eventbridge/db-config.json +++ b/src/configurations/destinations/eventbridge/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedMessageTypes": { "cloud": ["identify", "page", "screen", "track", "alias", "group"] }, "supportedSourceTypes": [ @@ -45,17 +45,17 @@ "resourceID", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["accessKeyID", "accessKey"] } diff --git a/src/configurations/destinations/eventbridge/ui-config.json b/src/configurations/destinations/eventbridge/ui-config.json index a6befcd28..09066e759 100644 --- a/src/configurations/destinations/eventbridge/ui-config.json +++ b/src/configurations/destinations/eventbridge/ui-config.json @@ -125,7 +125,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } From f8f7f846b0be1c73065798fa4c221a350ccfdf89 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 20:26:27 +0530 Subject: [PATCH 15/68] feat: added GCM support for AWS Lambda destination (#1404) --- .../destinations/lambda/db-config.json | 24 +- .../destinations/lambda/schema.json | 511 ++++++++++++++++++ .../destinations/lambda/ui-config.json | 93 +++- test/data/validation/destinations/lambda.json | 118 ++++ 4 files changed, 733 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/lambda/db-config.json b/src/configurations/destinations/lambda/db-config.json index 9c5138b05..46f909bcc 100644 --- a/src/configurations/destinations/lambda/db-config.json +++ b/src/configurations/destinations/lambda/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "amp", @@ -46,17 +46,17 @@ "maxBatchSize", "oneTrustCookieCategories" ], - "amp": ["connectionMode"], - "android": ["connectionMode"], - "cordova": ["connectionMode"], - "cloud": ["connectionMode"], - "flutter": ["connectionMode"], - "ios": ["connectionMode"], - "reactnative": ["connectionMode"], - "unity": ["connectionMode"], - "warehouse": ["connectionMode"], - "web": ["connectionMode"], - "shopify": ["connectionMode"] + "amp": ["connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["accessKeyId", "accessKey"] } diff --git a/src/configurations/destinations/lambda/schema.json b/src/configurations/destinations/lambda/schema.json index 7e07d758f..3024ecacd 100644 --- a/src/configurations/destinations/lambda/schema.json +++ b/src/configurations/destinations/lambda/schema.json @@ -39,6 +39,517 @@ "cloud": { "type": "string", "enum": ["cloud"] }, "warehouse": { "type": "string", "enum": ["cloud"] } } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } } }, "allOf": [ diff --git a/src/configurations/destinations/lambda/ui-config.json b/src/configurations/destinations/lambda/ui-config.json index cb6aafc28..86126249b 100644 --- a/src/configurations/destinations/lambda/ui-config.json +++ b/src/configurations/destinations/lambda/ui-config.json @@ -120,7 +120,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/lambda.json b/test/data/validation/destinations/lambda.json index beecf8be3..231b7b012 100644 --- a/test/data/validation/destinations/lambda.json +++ b/test/data/validation/destinations/lambda.json @@ -53,5 +53,123 @@ "maxBatchSize must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^[1-9]\\d*$\"", " must match \"then\" schema" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "accessKeyId": "test-access-key-id", + "accessKey": "test-access-key", + "roleBasedAuth": false, + "region": "us-east-1", + "lambda": "myFunction", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "accessKeyId": "test-access-key-id", + "accessKey": "test-access-key", + "roleBasedAuth": false, + "region": "us-east-1", + "lambda": "myFunction", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "accessKeyId": "test-access-key-id", + "accessKey": "test-access-key", + "roleBasedAuth": false, + "region": "us-east-1", + "lambda": "myFunction", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "accessKeyId": "test-access-key-id", + "accessKey": "test-access-key", + "roleBasedAuth": false, + "region": "us-east-1", + "lambda": "myFunction", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "accessKeyId": "test-access-key-id", + "accessKey": "test-access-key", + "roleBasedAuth": false, + "region": "us-east-1", + "lambda": "myFunction", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From 37cfd439684d362da27f999186c3db9b9ce43605 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 20:28:34 +0530 Subject: [PATCH 16/68] feat: added GCM support for AWS Personalize destination (#1405) --- .../destinations/personalize/db-config.json | 24 +- .../destinations/personalize/schema.json | 511 ++++++++++++++++++ .../destinations/personalize/ui-config.json | 93 +++- .../validation/destinations/personalize.json | 168 ++++++ 4 files changed, 783 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/personalize/db-config.json b/src/configurations/destinations/personalize/db-config.json index 2a3c416ab..070fd6cf5 100644 --- a/src/configurations/destinations/personalize/db-config.json +++ b/src/configurations/destinations/personalize/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": false, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -46,17 +46,17 @@ "disableStringify", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["accessKeyId", "secretAccessKey"] } diff --git a/src/configurations/destinations/personalize/schema.json b/src/configurations/destinations/personalize/schema.json index 8aadef5d5..73bc05726 100644 --- a/src/configurations/destinations/personalize/schema.json +++ b/src/configurations/destinations/personalize/schema.json @@ -66,6 +66,517 @@ "cloud": { "type": "string", "enum": ["cloud"] }, "warehouse": { "type": "string", "enum": ["cloud"] } } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } } }, "allOf": [ diff --git a/src/configurations/destinations/personalize/ui-config.json b/src/configurations/destinations/personalize/ui-config.json index c016d5535..7dd70d2d4 100644 --- a/src/configurations/destinations/personalize/ui-config.json +++ b/src/configurations/destinations/personalize/ui-config.json @@ -155,7 +155,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/personalize.json b/test/data/validation/destinations/personalize.json index 449f0008f..b10271518 100644 --- a/test/data/validation/destinations/personalize.json +++ b/test/data/validation/destinations/personalize.json @@ -42,5 +42,173 @@ "err": [ "datasetARN must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|arn:([a-z/d-]+):personalize:.*:.*:.+\"" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "accessKeyId": "test-access-key-id", + "secretAccessKey": "test-secret-access-key-id", + "customMappings": [ + { + "from": "MOVIE_WATCHED", + "to": "movieWatched" + }, + { + "from": "NUMBER_OF_RATINGS", + "to": "numberOfRatings" + } + ], + "eventChoice": "PutEvents", + "region": "us-east-1", + "trackingId": "c60", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "accessKeyId": "test-access-key-id", + "secretAccessKey": "test-secret-access-key-id", + "customMappings": [ + { + "from": "MOVIE_WATCHED", + "to": "movieWatched" + }, + { + "from": "NUMBER_OF_RATINGS", + "to": "numberOfRatings" + } + ], + "eventChoice": "PutEvents", + "region": "us-east-1", + "trackingId": "c60", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "accessKeyId": "test-access-key-id", + "secretAccessKey": "test-secret-access-key-id", + "customMappings": [ + { + "from": "MOVIE_WATCHED", + "to": "movieWatched" + }, + { + "from": "NUMBER_OF_RATINGS", + "to": "numberOfRatings" + } + ], + "eventChoice": "PutEvents", + "region": "us-east-1", + "trackingId": "c60", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "accessKeyId": "test-access-key-id", + "secretAccessKey": "test-secret-access-key-id", + "customMappings": [ + { + "from": "MOVIE_WATCHED", + "to": "movieWatched" + }, + { + "from": "NUMBER_OF_RATINGS", + "to": "numberOfRatings" + } + ], + "eventChoice": "PutEvents", + "region": "us-east-1", + "trackingId": "c60", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "accessKeyId": "test-access-key-id", + "secretAccessKey": "test-secret-access-key-id", + "customMappings": [ + { + "from": "MOVIE_WATCHED", + "to": "movieWatched" + }, + { + "from": "NUMBER_OF_RATINGS", + "to": "numberOfRatings" + } + ], + "eventChoice": "PutEvents", + "region": "us-east-1", + "trackingId": "c60", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From fded3eb29233000834d206b8f464881baa0bb576 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 20:30:24 +0530 Subject: [PATCH 17/68] feat: added GCM support for Axeptio destination (#1406) --- .../destinations/axeptio/db-config.json | 5 +- .../destinations/axeptio/schema.json | 51 +++++++++ .../destinations/axeptio/ui-config.json | 93 ++++++++++++++- .../data/validation/destinations/axeptio.json | 108 ++++++++++++++++++ 4 files changed, 254 insertions(+), 3 deletions(-) diff --git a/src/configurations/destinations/axeptio/db-config.json b/src/configurations/destinations/axeptio/db-config.json index ca3fb1184..1f3d665f9 100644 --- a/src/configurations/destinations/axeptio/db-config.json +++ b/src/configurations/destinations/axeptio/db-config.json @@ -10,7 +10,8 @@ "blacklistedEvents", "whitelistedEvents", "eventFilteringOption", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -25,7 +26,7 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": ["clientId"] } diff --git a/src/configurations/destinations/axeptio/schema.json b/src/configurations/destinations/axeptio/schema.json index c4b3c93c3..6c8e6612f 100644 --- a/src/configurations/destinations/axeptio/schema.json +++ b/src/configurations/destinations/axeptio/schema.json @@ -54,6 +54,57 @@ "connectionMode": { "type": "object", "properties": { "web": { "type": "string", "enum": ["device"] } } + }, + "consentManagement": { + "type": "object", + "properties": { + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } } } } diff --git a/src/configurations/destinations/axeptio/ui-config.json b/src/configurations/destinations/axeptio/ui-config.json index 4653ec6a0..afc19df76 100644 --- a/src/configurations/destinations/axeptio/ui-config.json +++ b/src/configurations/destinations/axeptio/ui-config.json @@ -105,7 +105,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/axeptio.json b/test/data/validation/destinations/axeptio.json index 638c01f8b..02dffeef7 100644 --- a/test/data/validation/destinations/axeptio.json +++ b/test/data/validation/destinations/axeptio.json @@ -78,5 +78,113 @@ }, "result": false, "err": ["toggleToActivateCallback must be boolean"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "clientId": "dskh4ryfXXX47896ryfh", + "toggleToActivateCallback": true, + "eventFilteringOption": "disable", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "clientId": "dskh4ryfXXX47896ryfh", + "toggleToActivateCallback": true, + "eventFilteringOption": "disable", + "consentManagement": { + "web": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "clientId": "dskh4ryfXXX47896ryfh", + "toggleToActivateCallback": true, + "eventFilteringOption": "disable", + "consentManagement": { + "web": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0 must have required property 'resolutionStrategy'", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "clientId": "dskh4ryfXXX47896ryfh", + "toggleToActivateCallback": true, + "eventFilteringOption": "disable", + "consentManagement": { + "web": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "clientId": "dskh4ryfXXX47896ryfh", + "toggleToActivateCallback": true, + "eventFilteringOption": "disable", + "consentManagement": { + "web": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.web.0.provider must be equal to one of the allowed values"] } ] From 8913571469a3aec134aabc3204f3310b6dcf8c05 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 20:32:38 +0530 Subject: [PATCH 18/68] feat: added GCM support for Azure Blob Storage destination (#1408) --- .../destinations/azure_blob/db-config.json | 24 ++--- .../destinations/azure_blob/ui-config.json | 93 ++++++++++++++++++- 2 files changed, 104 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/azure_blob/db-config.json b/src/configurations/destinations/azure_blob/db-config.json index f4a47e33d..59062d793 100644 --- a/src/configurations/destinations/azure_blob/db-config.json +++ b/src/configurations/destinations/azure_blob/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "none", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -29,17 +29,17 @@ "sasToken", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["accountKey", "sasToken"], "supportedConnectionModes": { diff --git a/src/configurations/destinations/azure_blob/ui-config.json b/src/configurations/destinations/azure_blob/ui-config.json index 84b5152e0..f276ca60d 100644 --- a/src/configurations/destinations/azure_blob/ui-config.json +++ b/src/configurations/destinations/azure_blob/ui-config.json @@ -88,7 +88,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } From 3d6380e4a7c3780b61acfe3705c7e3bfd9dbab4f Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 20:46:27 +0530 Subject: [PATCH 19/68] feat: added GCM support for Azure Deltalake destination (#1409) --- .../azure_datalake/db-config.json | 24 +- .../destinations/azure_datalake/schema.json | 511 ++++++++++++++++++ .../azure_datalake/ui-config.json | 93 +++- .../destinations/azure_datalake.json | 133 +++++ 4 files changed, 748 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/azure_datalake/db-config.json b/src/configurations/destinations/azure_datalake/db-config.json index ccb9bcf68..c336a6c9b 100644 --- a/src/configurations/destinations/azure_datalake/db-config.json +++ b/src/configurations/destinations/azure_datalake/db-config.json @@ -5,7 +5,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -35,17 +35,17 @@ "syncStartAt", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "cloudSource": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "cloudSource": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["accountKey", "sasToken"], "supportedConnectionModes": { diff --git a/src/configurations/destinations/azure_datalake/schema.json b/src/configurations/destinations/azure_datalake/schema.json index 075fdec12..cdb402eb0 100644 --- a/src/configurations/destinations/azure_datalake/schema.json +++ b/src/configurations/destinations/azure_datalake/schema.json @@ -56,6 +56,517 @@ "cordova": { "type": "string", "enum": ["cloud"] }, "shopify": { "type": "string", "enum": ["cloud"] } } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cloudSource": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } } }, "allOf": [ diff --git a/src/configurations/destinations/azure_datalake/ui-config.json b/src/configurations/destinations/azure_datalake/ui-config.json index 23ca178ca..95dc5d4be 100644 --- a/src/configurations/destinations/azure_datalake/ui-config.json +++ b/src/configurations/destinations/azure_datalake/ui-config.json @@ -168,7 +168,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/azure_datalake.json b/test/data/validation/destinations/azure_datalake.json index e29290115..ac4c4f602 100644 --- a/test/data/validation/destinations/azure_datalake.json +++ b/test/data/validation/destinations/azure_datalake.json @@ -171,5 +171,138 @@ "err": [ "containerName must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(?=.{3,63}$)[a-z0-9]+(-[a-z0-9]+)*$\"" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "containerName": "test-container", + "prefix": "xyzxx", + "namespace": "eu_new3", + "accountName": "test-account-name", + "accountKey": "test-azure-account-key", + "sasToken": "test-azure-sas-token", + "useSASTokens": true, + "syncFrequency": "30", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "containerName": "test-container", + "prefix": "xyzxx", + "namespace": "eu_new3", + "accountName": "test-account-name", + "accountKey": "test-azure-account-key", + "sasToken": "test-azure-sas-token", + "useSASTokens": true, + "syncFrequency": "30", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "containerName": "test-container", + "prefix": "xyzxx", + "namespace": "eu_new3", + "accountName": "test-account-name", + "accountKey": "test-azure-account-key", + "sasToken": "test-azure-sas-token", + "useSASTokens": true, + "syncFrequency": "30", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "containerName": "test-container", + "prefix": "xyzxx", + "namespace": "eu_new3", + "accountName": "test-account-name", + "accountKey": "test-azure-account-key", + "sasToken": "test-azure-sas-token", + "useSASTokens": true, + "syncFrequency": "30", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "containerName": "test-container", + "prefix": "xyzxx", + "namespace": "eu_new3", + "accountName": "test-account-name", + "accountKey": "test-azure-account-key", + "sasToken": "test-azure-sas-token", + "useSASTokens": true, + "syncFrequency": "30", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From 46ea8e1637952e27d3f8ab9b4ebf0ead17cd7773 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 20:48:52 +0530 Subject: [PATCH 20/68] feat: added GCM support for Azure Event Hub destination (#1410) --- .../azure_event_hub/db-config.json | 24 ++--- .../azure_event_hub/ui-config.json | 93 ++++++++++++++++++- 2 files changed, 104 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/azure_event_hub/db-config.json b/src/configurations/destinations/azure_event_hub/db-config.json index b43fb28e5..24467ca62 100644 --- a/src/configurations/destinations/azure_event_hub/db-config.json +++ b/src/configurations/destinations/azure_event_hub/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -39,17 +39,17 @@ "eventHubsConnectionString", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": [] } diff --git a/src/configurations/destinations/azure_event_hub/ui-config.json b/src/configurations/destinations/azure_event_hub/ui-config.json index ff8fcc494..bfde342ab 100644 --- a/src/configurations/destinations/azure_event_hub/ui-config.json +++ b/src/configurations/destinations/azure_event_hub/ui-config.json @@ -49,7 +49,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } From fcb0dfd6a2b3c837b58c5251460742cba9f58b7e Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 20:52:32 +0530 Subject: [PATCH 21/68] feat: added GCM support for Azure Synapse destination (#1411) --- .../destinations/azure_synapse/db-config.json | 24 +- .../destinations/azure_synapse/schema.json | 511 ++++++++++++++++++ .../destinations/azure_synapse/ui-config.json | 93 +++- .../destinations/azure_synapse.json | 153 ++++++ 4 files changed, 768 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/azure_synapse/db-config.json b/src/configurations/destinations/azure_synapse/db-config.json index c99c3c8b0..80671f36d 100644 --- a/src/configurations/destinations/azure_synapse/db-config.json +++ b/src/configurations/destinations/azure_synapse/db-config.json @@ -5,7 +5,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -53,17 +53,17 @@ "skipUsersTable", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "cloudSource": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "cloudSource": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": [ "password", diff --git a/src/configurations/destinations/azure_synapse/schema.json b/src/configurations/destinations/azure_synapse/schema.json index 7aa31c38d..133f744b3 100644 --- a/src/configurations/destinations/azure_synapse/schema.json +++ b/src/configurations/destinations/azure_synapse/schema.json @@ -66,6 +66,517 @@ "cordova": { "type": "string", "enum": ["cloud"] }, "shopify": { "type": "string", "enum": ["cloud"] } } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cloudSource": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } } }, "allOf": [ diff --git a/src/configurations/destinations/azure_synapse/ui-config.json b/src/configurations/destinations/azure_synapse/ui-config.json index e0e53df65..6279a7f5d 100644 --- a/src/configurations/destinations/azure_synapse/ui-config.json +++ b/src/configurations/destinations/azure_synapse/ui-config.json @@ -586,7 +586,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/azure_synapse.json b/test/data/validation/destinations/azure_synapse.json index 50f229536..9ade48364 100644 --- a/test/data/validation/destinations/azure_synapse.json +++ b/test/data/validation/destinations/azure_synapse.json @@ -358,5 +358,158 @@ "bucketName must match pattern \"(^env[.].+)|^((?!^(\\d+(\\.|$)){4}$)[a-z0-9][a-z0-9-.]{1,61}[a-z0-9])$\"", " must match \"then\" schema" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "host": "test-host", + "database": "test-database", + "user": "test-user", + "password": "test-password", + "port": "0000", + "sslMode": "disable", + "bucketProvider": "S3", + "syncFrequency": "30", + "useRudderStorage": false, + "bucketName": "test-bucket", + "accessKeyID": "test-access-key-id", + "accessKey": "test-access-key", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "host": "test-host", + "database": "test-database", + "user": "test-user", + "password": "test-password", + "port": "0000", + "sslMode": "disable", + "bucketProvider": "S3", + "syncFrequency": "30", + "useRudderStorage": false, + "bucketName": "test-bucket", + "accessKeyID": "test-access-key-id", + "accessKey": "test-access-key", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "host": "test-host", + "database": "test-database", + "user": "test-user", + "password": "test-password", + "port": "0000", + "sslMode": "disable", + "bucketProvider": "S3", + "syncFrequency": "30", + "useRudderStorage": false, + "bucketName": "test-bucket", + "accessKeyID": "test-access-key-id", + "accessKey": "test-access-key", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "host": "test-host", + "database": "test-database", + "user": "test-user", + "password": "test-password", + "port": "0000", + "sslMode": "disable", + "bucketProvider": "S3", + "syncFrequency": "30", + "useRudderStorage": false, + "bucketName": "test-bucket", + "accessKeyID": "test-access-key-id", + "accessKey": "test-access-key", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "host": "test-host", + "database": "test-database", + "user": "test-user", + "password": "test-password", + "port": "0000", + "sslMode": "disable", + "bucketProvider": "S3", + "syncFrequency": "30", + "useRudderStorage": false, + "bucketName": "test-bucket", + "accessKeyID": "test-access-key-id", + "accessKey": "test-access-key", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From 818b7db99fcd0053493354a03b9f711aa8e619df Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 18 Jun 2024 20:54:08 +0530 Subject: [PATCH 22/68] feat: added GCM support for Bigquery destination (#1412) --- .../destinations/bq/db-config.json | 24 +- .../destinations/bq/schema.json | 511 ++++++++++++++++++ .../destinations/bq/ui-config.json | 93 +++- test/data/validation/destinations/bq.json | 138 +++++ 4 files changed, 753 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/bq/db-config.json b/src/configurations/destinations/bq/db-config.json index 3d4e321f7..f420d1edd 100644 --- a/src/configurations/destinations/bq/db-config.json +++ b/src/configurations/destinations/bq/db-config.json @@ -5,7 +5,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -36,17 +36,17 @@ "jsonPaths", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "cloudSource": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "cloudSource": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["credentials"], "supportedConnectionModes": { diff --git a/src/configurations/destinations/bq/schema.json b/src/configurations/destinations/bq/schema.json index 5f76b6a43..0e8a1fa0d 100644 --- a/src/configurations/destinations/bq/schema.json +++ b/src/configurations/destinations/bq/schema.json @@ -57,6 +57,517 @@ "cordova": { "type": "string", "enum": ["cloud"] }, "shopify": { "type": "string", "enum": ["cloud"] } } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cloudSource": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } } }, "additionalProperties": true diff --git a/src/configurations/destinations/bq/ui-config.json b/src/configurations/destinations/bq/ui-config.json index 3986906d7..53f01e2a7 100644 --- a/src/configurations/destinations/bq/ui-config.json +++ b/src/configurations/destinations/bq/ui-config.json @@ -183,7 +183,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/bq.json b/test/data/validation/destinations/bq.json index 6bb6e7f36..f08b759a0 100644 --- a/test/data/validation/destinations/bq.json +++ b/test/data/validation/destinations/bq.json @@ -145,5 +145,143 @@ "err": [ "bucketName must match pattern \"(^env[.].+)|^((?!goog)(?!.*google.*)(?!^(\\d+(\\.|$)){4}$)(?!.*\\.\\..*)[a-z0-9][a-z0-9-._]{1,61}[a-z0-9])$\"" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "project": "test-gcs-project", + "location": "", + "bucketName": "test-bucket", + "prefix": "xyzxx", + "namespace": "eu_new3", + "credentials": "{}", + "syncFrequency": "30", + "testConnection": false, + "testConnectionTS": 1621402528550, + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "project": "test-gcs-project", + "location": "", + "bucketName": "test-bucket", + "prefix": "xyzxx", + "namespace": "eu_new3", + "credentials": "{}", + "syncFrequency": "30", + "testConnection": false, + "testConnectionTS": 1621402528550, + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "project": "test-gcs-project", + "location": "", + "bucketName": "test-bucket", + "prefix": "xyzxx", + "namespace": "eu_new3", + "credentials": "{}", + "syncFrequency": "30", + "testConnection": false, + "testConnectionTS": 1621402528550, + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "project": "test-gcs-project", + "location": "", + "bucketName": "test-bucket", + "prefix": "xyzxx", + "namespace": "eu_new3", + "credentials": "{}", + "syncFrequency": "30", + "testConnection": false, + "testConnectionTS": 1621402528550, + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "project": "test-gcs-project", + "location": "", + "bucketName": "test-bucket", + "prefix": "xyzxx", + "namespace": "eu_new3", + "credentials": "{}", + "syncFrequency": "30", + "testConnection": false, + "testConnectionTS": 1621402528550, + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From 7bd419668882bc9390c14fa9612335807cae9154 Mon Sep 17 00:00:00 2001 From: Utsab Chowdhury Date: Wed, 19 Jun 2024 10:48:57 +0530 Subject: [PATCH 23/68] chore: update deployToDB script to add defaults to UI config JSON for GA4 (#1303) --- .eslintignore | 1 + README.md | 7 + package-lock.json | 15 +- package.json | 6 +- scripts/preProcess.js | 59 + .../destinations/ga4/schema.json | 11 +- .../destinations/ga4_v2/db-config.json | 113 + .../destinations/ga4_v2/schema.json | 612 ++++++ .../destinations/ga4_v2/ui-config.json | 1951 +++++++++++++++++ .../destinations/ga4_v2/ui-config.jt | 625 ++++++ .../destinations/ga4_v2/ui-default.json | 1177 ++++++++++ .../destinations/db-config-schema.json | 42 +- test/data/validation/destinations/ga4_v2.json | 477 ++++ 13 files changed, 5083 insertions(+), 13 deletions(-) create mode 100644 scripts/preProcess.js create mode 100644 src/configurations/destinations/ga4_v2/db-config.json create mode 100644 src/configurations/destinations/ga4_v2/schema.json create mode 100644 src/configurations/destinations/ga4_v2/ui-config.json create mode 100644 src/configurations/destinations/ga4_v2/ui-config.jt create mode 100644 src/configurations/destinations/ga4_v2/ui-default.json create mode 100644 test/data/validation/destinations/ga4_v2.json diff --git a/.eslintignore b/.eslintignore index 5f8e362b4..3d1151a86 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,3 +4,4 @@ node_modules/ reports/ *.md *.d.ts +*.jt diff --git a/README.md b/README.md index 4a6d276e1..830b93bdd 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,13 @@ And then, setup the project dependencies by running below command: `npm run setup` +### Generated UI Configs For Destinations Supporting Custom Mappings + +As there are significant default values for ui-config.json for destinations supporting custom mappings, we use templating mechanism to manage it. Make sure to run `npm run pre-process` to make sure you have the updated `generated ui-config.json` for such destinations the default values for these are maintained in `ui-default.json` under same dir. + +`ui-config.jt` is the template file used to produce the `ui-config.json` we use the [rudder-json-template-engine +](https://github.com/rudderlabs/rudder-json-template-engine) for it. + The below command deploys integration definitions to the specified control-plane database: ``` diff --git a/package-lock.json b/package-lock.json index 92b29af98..15e55cfd6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,7 @@ "@babel/preset-env": "^7.20.2", "@commitlint/config-conventional": "^17.4.4", "@digitalroute/cz-conventional-changelog-for-jira": "^8.0.0", + "@rudderstack/json-template-engine": "^0.13.3", "@swc/core": "^1.3.42", "@swc/jest": "^0.2.24", "@types/express": "^4.17.17", @@ -3439,6 +3440,12 @@ "node": ">= 8" } }, + "node_modules/@rudderstack/json-template-engine": { + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/@rudderstack/json-template-engine/-/json-template-engine-0.13.3.tgz", + "integrity": "sha512-ycoA0o+mE2GCRZC5XfVtpXnwR9lpLkTvLIV1oK4TLAp8IitYpvwtqjXCcdSnbtn+cewHDj/ot1m4wL1RIj8DCQ==", + "dev": true + }, "node_modules/@sinclair/typebox": { "version": "0.25.24", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.24.tgz", @@ -8989,13 +8996,13 @@ "dev": true }, "node_modules/handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", "dev": true, "dependencies": { "minimist": "^1.2.5", - "neo-async": "^2.6.0", + "neo-async": "^2.6.2", "source-map": "^0.6.1", "wordwrap": "^1.0.0" }, diff --git a/package.json b/package.json index f065fe436..ee0a1ae1f 100755 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "lint:fix": "eslint \"src/**/*.*\" --fix", "lint": "npm run format && npm run lint:fix", "prepare": "husky install", - "pre-commit": "npm run test && npx lint-staged", + "pre-commit": "npm run pre-process && npm run test && npx lint-staged", "commit-msg": "commitlint --edit", "release:github": "DEBUG=conventional-github-releaser npx conventional-github-releaser -p angular --config github-release.config.js", "check:schema:source:all": "python3 scripts/schemaGenerator.py source -all", @@ -37,7 +37,8 @@ "check:schema:destination:all": "python3 scripts/schemaGenerator.py destination -all", "check:schema:destination": "python3 scripts/schemaGenerator.py destination -name ", "update:schema:destination": "python3 scripts/schemaGenerator.py destination -update -name ", - "deploy:db:local": "python3 scripts/deployToDB.py http://localhost:5050" + "deploy:db:local": "npm run pre-process && python3 scripts/deployToDB.py http://localhost:5050", + "pre-process": "node scripts/preProcess.js" }, "devDependencies": { "@babel/core": "^7.21.3", @@ -48,6 +49,7 @@ "@babel/preset-env": "^7.20.2", "@commitlint/config-conventional": "^17.4.4", "@digitalroute/cz-conventional-changelog-for-jira": "^8.0.0", + "@rudderstack/json-template-engine": "^0.13.3", "@swc/core": "^1.3.42", "@swc/jest": "^0.2.24", "@types/express": "^4.17.17", diff --git a/scripts/preProcess.js b/scripts/preProcess.js new file mode 100644 index 000000000..5339962e7 --- /dev/null +++ b/scripts/preProcess.js @@ -0,0 +1,59 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +const { JsonTemplateEngine } = require('@rudderstack/json-template-engine'); +const fs = require('fs/promises'); +const path = require('path'); + +const srcPath = path.resolve(__dirname, '../src'); + +async function getUiConfigTemplate(destinationName) { + const uiConfig = await fs.readFile( + `${srcPath}/configurations/destinations/${destinationName}/ui-config.jt`, + 'utf8', + ); + return uiConfig; +} + +async function getUiDefaultData(destinationName) { + try { + const defaults = await fs.readFile( + `${srcPath}/configurations/destinations/${destinationName}/ui-default.json`, + 'utf8', + ); + return JSON.parse(defaults); + } catch (error) { + // skip the destination if ui-default.json is not present + console.log(`ui-default.json not found for ${destinationName}`); + return undefined; + } +} + +async function getDestinationNames() { + const destinationFolders = await fs.readdir(`${srcPath}/configurations/destinations`); + return destinationFolders; +} + +async function main() { + const destinationFolders = await getDestinationNames(); + + destinationFolders.forEach(async (destinationName) => { + if (destinationName === 'ga4_v2') { + console.log('Skipping GA4_v2'); + } + const uiDefaults = await getUiDefaultData(destinationName); + if (!uiDefaults) { + return; + } + + const uiConfigTemplate = await getUiConfigTemplate(destinationName); + const result = await JsonTemplateEngine.create(uiConfigTemplate).evaluate(uiDefaults); + + await fs.writeFile( + `${srcPath}/configurations/destinations/${destinationName}/ui-config.json`, + JSON.stringify(result, null, 2), + ); + }); +} + +main().catch((error) => { + console.error(error); +}); diff --git a/src/configurations/destinations/ga4/schema.json b/src/configurations/destinations/ga4/schema.json index e5c99ba41..76dbb9882 100644 --- a/src/configurations/destinations/ga4/schema.json +++ b/src/configurations/destinations/ga4/schema.json @@ -8,8 +8,15 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, - "typesOfClient": { "type": "string", "enum": ["gtag", "firebase"], "default": "gtag" }, - "debugMode": { "type": "boolean", "default": false }, + "typesOfClient": { + "type": "string", + "enum": ["gtag", "firebase"], + "default": "gtag" + }, + "debugMode": { + "type": "boolean", + "default": false + }, "eventFilteringOption": { "type": "string", "enum": ["disable", "whitelistedEvents", "blacklistedEvents"], diff --git a/src/configurations/destinations/ga4_v2/db-config.json b/src/configurations/destinations/ga4_v2/db-config.json new file mode 100644 index 000000000..0d5c74274 --- /dev/null +++ b/src/configurations/destinations/ga4_v2/db-config.json @@ -0,0 +1,113 @@ +{ + "name": "GA4_V2", + "displayName": "Google Analytics 4 (GA4) V2", + "config": { + "transformAtV1": "processor", + "saveDestinationResponse": false, + "auth": { + "type": "OAuth", + "role": "google_analytics_4", + "rudderScopes": ["delivery"] + }, + "includeKeys": [ + "debugView", + "measurementId", + "connectionMode", + "capturePageView", + "whitelistedEvents", + "blacklistedEvents", + "eventFilteringOption", + "extendPageViewParams", + "piiPropertiesToIgnore", + "overrideClientAndSessionId", + "oneTrustCookieCategories", + "ketchConsentPurposes", + "consentManagement", + "sdkBaseUrl" + ], + "excludeKeys": [], + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative", + "flutter", + "cordova", + "warehouse", + "shopify" + ], + "supportedMessageTypes": { + "cloud": ["track", "group", "page"], + "device": { + "web": ["identify", "track", "page", "group"], + "android": ["identify", "track", "screen"], + "ios": ["identify", "track", "screen"] + } + }, + "supportedConnectionModes": { + "android": ["cloud"], + "web": ["cloud", "hybrid"], + "ios": ["cloud"], + "unity": ["cloud"], + "amp": ["cloud"], + "reactnative": ["cloud"], + "flutter": ["cloud"], + "cordova": ["cloud"], + "shopify": ["cloud"], + "cloud": ["cloud"], + "warehouse": ["cloud"] + }, + "hybridModeCloudEventsFilter": { "web": { "messageType": ["track", "group"] } }, + "destConfig": { + "defaultConfig": [ + "rudderAccountId", + "apiSecret", + "debugMode", + "typesOfClient", + "measurementId", + "propertyId", + "firebaseAppId", + "whitelistedEvents", + "blacklistedEvents", + "eventFilteringOption", + "piiPropertiesToIgnore", + "oneTrustCookieCategories", + "ketchConsentPurposes", + "eventsMapping", + "sdkBaseUrl" + ], + "web": [ + "debugView", + "useNativeSDK", + "connectionMode", + "capturePageView", + "useNativeSDKToSend", + "extendPageViewParams", + "overrideClientAndSessionId", + "consentManagement" + ], + "android": ["useNativeSDK", "connectionMode", "consentManagement"], + "ios": ["useNativeSDK", "connectionMode", "consentManagement"], + "unity": ["consentManagement", "connectionMode"], + "amp": ["consentManagement", "connectionMode"], + "cloud": ["consentManagement", "connectionMode"], + "reactnative": ["consentManagement", "connectionMode"], + "flutter": ["consentManagement", "connectionMode"], + "cordova": ["consentManagement", "connectionMode"], + "shopify": ["consentManagement", "connectionMode"], + "warehouse": ["consentManagement", "connectionMode"] + }, + "secretKeys": ["apiSecret"] + }, + "options": { + "isBeta": false, + "supportsCustomMappings": true, + "hidden": { + "featureFlagName": "AMP_ga4_v2", + "featureFlagValue": false + } + } +} diff --git a/src/configurations/destinations/ga4_v2/schema.json b/src/configurations/destinations/ga4_v2/schema.json new file mode 100644 index 000000000..4940d1531 --- /dev/null +++ b/src/configurations/destinations/ga4_v2/schema.json @@ -0,0 +1,612 @@ +{ + "configSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "required": ["apiSecret", "typesOfClient", "propertyId"], + "type": "object", + "properties": { + "apiSecret": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "propertyId": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$|^$" + }, + "typesOfClient": { + "type": "string", + "enum": ["gtag", "firebase"], + "default": "gtag" + }, + "debugMode": { + "type": "boolean", + "default": false + }, + "eventFilteringOption": { + "type": "string", + "enum": ["disable", "whitelistedEvents", "blacklistedEvents"], + "default": "disable" + }, + "piiPropertiesToIgnore": { + "type": "array", + "items": { + "type": "object", + "properties": { + "piiProperty": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "whitelistedEvents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "eventName": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "blacklistedEvents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "eventName": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "oneTrustCookieCategories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "ketchConsentPurposes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "provider": { "const": "custom" } }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { "type": "string", "enum": ["and", "or"] } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, + "capturePageView": { + "type": "object", + "properties": { "web": { "type": "string", "enum": ["rs", "gtag"], "default": "rs" } } + }, + "debugView": { "type": "object", "properties": { "web": { "type": "boolean" } } }, + "extendPageViewParams": { "type": "object", "properties": { "web": { "type": "boolean" } } }, + "overrideClientAndSessionId": { + "type": "object", + "properties": { "web": { "type": "boolean" } } + }, + "useNativeSDK": { + "type": "object", + "properties": { + "android": { "type": "boolean" }, + "ios": { "type": "boolean" }, + "web": { "type": "boolean" } + } + }, + "connectionMode": { + "type": "object", + "properties": { + "android": { "type": "string", "enum": ["cloud", "device"] }, + "web": { "type": "string", "enum": ["cloud", "device", "hybrid"] }, + "ios": { "type": "string", "enum": ["cloud", "device"] }, + "unity": { "type": "string", "enum": ["cloud"] }, + "amp": { "type": "string", "enum": ["cloud"] }, + "reactnative": { "type": "string", "enum": ["cloud"] }, + "flutter": { "type": "string", "enum": ["cloud"] }, + "cordova": { "type": "string", "enum": ["cloud"] }, + "shopify": { "type": "string", "enum": ["cloud"] }, + "cloud": { "type": "string", "enum": ["cloud"] }, + "warehouse": { "type": "string", "enum": ["cloud"] } + } + } + }, + "allOf": [ + { + "if": { + "properties": { "typesOfClient": { "const": "gtag" } }, + "required": ["typesOfClient"] + }, + "then": { + "properties": { + "measurementId": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(G-.{1,100})$|^$" + } + }, + "required": ["measurementId"], + "allOf": [ + { + "if": { + "properties": { + "connectionMode": { + "type": "object", + "properties": { "web": { "type": "string", "enum": ["device"] } } + } + }, + "required": ["connectionMode"] + }, + "then": { + "properties": { + "sdkBaseUrl": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|(?!.*\\.ngrok\\.io)^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]*|^$" + } + } + } + } + ] + } + }, + { + "if": { + "properties": { "typesOfClient": { "const": "firebase" } }, + "required": ["typesOfClient"] + }, + "then": { + "properties": { + "firebaseAppId": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + } + }, + "required": ["firebaseAppId"] + } + } + ] + } +} diff --git a/src/configurations/destinations/ga4_v2/ui-config.json b/src/configurations/destinations/ga4_v2/ui-config.json new file mode 100644 index 000000000..8ef055d71 --- /dev/null +++ b/src/configurations/destinations/ga4_v2/ui-config.json @@ -0,0 +1,1951 @@ +{ + "description": "GENERATED CODE DO NOT EDIT", + "uiConfig": { + "baseTemplate": [ + { + "title": "Initial setup", + "note": "Review how this destination is set up", + "sections": [ + { + "groups": [ + { + "title": "Connection settings", + "note": "Update your connection settings here", + "icon": "settings", + "fields": [ + { + "type": "textInput", + "label": "API Secret", + "note": "Enter the API secret associated with your GA4 data stream. Create this in your GA UI under Admin > Data Streams > choose your stream > Measurement Protocol API Secrets > Create", + "configKey": "apiSecret", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "regexErrorMessage": "Invalid API Secret", + "placeholder": "e.g: QuIUHRj7XXXXX7eZDZiPQU", + "secret": true + }, + { + "type": "singleSelect", + "label": "Client Type", + "configKey": "typesOfClient", + "options": [ + { + "label": "gtag.js", + "value": "gtag" + }, + { + "label": "Firebase", + "value": "firebase" + } + ], + "default": "gtag" + }, + { + "type": "textInput", + "preRequisites": { + "fields": [ + { + "configKey": "typesOfClient", + "value": "gtag" + }, + { + "configKey": "connectionMode.web", + "value": "device" + } + ] + }, + "label": "SDK Base URL", + "configKey": "sdkBaseUrl", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|(?!.*\\.ngrok\\.io)^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]*|^$", + "regexErrorMessage": "Please input a valid URL.", + "note": "Enter your GA4 SDK base URL, https://{SDK Base URL}/gtag/js. By default, it is https://www.googletagmanager.com.", + "placeholder": "e.g: https://www.example.com", + "default": "https://www.googletagmanager.com", + "secret": false + }, + { + "type": "textInput", + "preRequisites": { + "fields": [ + { + "configKey": "typesOfClient", + "value": "gtag" + } + ] + }, + "label": "Measurement Id", + "configKey": "measurementId", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(G-.{1,100})$|^$", + "regexErrorMessage": "Invalid Measurement Id", + "note": "Enter the ID associated with your stream. Find this under Admin > Data Streams > choose your stream > Measurement ID", + "placeholder": "e.g: G-AB1CD2E34F", + "secret": false + }, + { + "type": "textInput", + "label": "Property Id", + "configKey": "propertyId", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$|^$", + "regexErrorMessage": "Invalid Measurement Id", + "note": "Property is a numeric Google Analytics GA4 Property identifier. It is a unique identifier for a GA4 property. You can find this in the GA4 UI under Admin > Property > Property Details > Property ID", + "placeholder": "e.g: 341372335", + "secret": false + }, + { + "type": "textInput", + "preRequisites": { + "fields": [ + { + "configKey": "typesOfClient", + "value": "firebase" + } + ] + }, + "label": "Firebase App Id", + "configKey": "firebaseAppId", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid Firebase App Id", + "note": "Enter the ID associated with your stream. Find this under Admin > Data Streams > choose your stream > Firebase App ID", + "placeholder": "e.g: 2:637XX8496727:web:a4284b4cXXe329d5", + "secret": false + } + ] + } + ] + }, + { + "groups": [ + { + "title": "Connection mode", + "note": [ + "Update how you want to route events from your source to destination. ", + { + "text": "Get help deciding", + "link": "https://www.rudderstack.com/docs/destinations/rudderstack-connection-modes/" + } + ], + "icon": "sliders", + "fields": [] + } + ] + } + ] + }, + { + "note": "Map source events to destination events and properties", + "title": "Event and property mappings", + "hideEditIcon": true, + "sections": [ + { + "groups": [ + { + "icon": "rightToLine", + "title": "Custom GA4 property mappings", + "fields": [ + { + "type": "redirect", + "redirectGroupKey": "advancedMapping" + } + ], + "note": "Confirm dimensions and metrics to link them to the event properties before sending events to Google Analytics 4", + "callout": { + "message": "Mappings take precedence over any transformations for the destination.", + "type": "info" + } + } + ] + } + ] + }, + { + "title": "Configuration settings", + "note": "Manage the settings for your destination", + "sections": [ + { + "title": "Destination settings", + "note": "Configure advanced destination-specific settings here", + "icon": "settings", + "groups": [ + { + "title": "GA4 IT", + "fields": [ + { + "type": "checkbox", + "label": "Debug via Validation Server", + "note": [ + "Enabling this sends events to GA4's validation server. This allows you to check validation responses in Live Events, but note that ", + { + "text": "these events will not show up in reports.", + "link": "https://developers.google.com/analytics/devguides/collection/protocol/ga4/validating-events?client_type=gtag" + }, + "For hybrid mode, these would be your track and group calls" + ], + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + }, + "configKey": "debugMode", + "default": false + }, + { + "type": "tagInput", + "label": "Filter user traits", + "note": "Use this field to filter sensitive PII fields like email, phone number, credit card number, etc. from your events and prevent them from being sent to GA4", + "configKey": "piiPropertiesToIgnore", + "tagKey": "piiProperty", + "default": [ + { + "piiProperty": "" + } + ] + } + ] + } + ] + }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [ + { + "title": "OneTrust consent settings", + "note": [ + "Enter your OneTrust consent category IDs if you have them configured. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + { + "text": "Learn more ", + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/consent-manager/onetrust/" + }, + "about RudderStack's OneTrust Consent Management feature." + ], + "fields": [ + { + "type": "tagInput", + "label": "Consent categories", + "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry.", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: C0001", + "default": [ + { + "oneTrustCookieCategory": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "title": "Ketch consent purpose settings", + "note": [ + "Enter your Ketch purpose Id if you have them configured. ", + { + "text": "Learn more ", + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/consent-manager/ketch/" + }, + "about RudderStack and Ketch Consent Manager integration." + ], + "fields": [ + { + "type": "tagInput", + "label": "Purpose ID", + "note": "Input your Ketch purpose Id by pressing 'Enter' after each entry", + "configKey": "ketchConsentPurposes", + "tagKey": "purpose", + "placeholder": "e.g: Marketing", + "default": [ + { + "purpose": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + } + ] + }, + { + "title": "Other settings", + "note": "Configure advanced RudderStack features here", + "icon": "otherSettings", + "groups": [ + { + "title": "Client-side event filtering", + "note": "Decide what events are allowed (allowlisting) and blocked (denylisting)", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.webDevice", + "value": true + }, + { + "configKey": "connectionModes.mobileDevice", + "value": true + } + ], + "condition": "or" + }, + "fields": [ + { + "type": "singleSelect", + "label": "Choose if you want to turn on events filtering:", + "configKey": "eventFilteringOption", + "note": "You must select either allowlist or denylist to enable events filtering", + "options": [ + { + "label": "No events filtering", + "value": "disable" + }, + { + "label": "Filter via allowlist", + "value": "whitelistedEvents" + }, + { + "label": "Filter via denylist", + "value": "blacklistedEvents" + } + ], + "default": "disable" + }, + { + "type": "tagInput", + "label": "Allowlisted events", + "note": "Input separate events by pressing 'Enter'.nInput the events you want to allowlist.", + "configKey": "whitelistedEvents", + "tagKey": "eventName", + "placeholder": "e.g: Anonymous page visit", + "default": [ + { + "eventName": "" + } + ], + "preRequisites": { + "fields": [ + { + "configKey": "eventFilteringOption", + "value": "whitelistedEvents" + } + ] + } + }, + { + "type": "tagInput", + "label": "Denylisted events", + "note": "Input separate events by pressing 'Enter'.nInput the events you want to denylist. ", + "configKey": "blacklistedEvents", + "tagKey": "eventName", + "placeholder": "e.g: Anonymous page visit", + "default": [ + { + "eventName": "" + } + ], + "preRequisites": { + "fields": [ + { + "configKey": "eventFilteringOption", + "value": "blacklistedEvents" + } + ] + } + } + ] + } + ] + } + ] + } + ], + "sdkTemplate": { + "title": "Web SDK settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "singleSelect", + "label": "Choose how to capture pageviews", + "configKey": "capturePageView", + "note": [ + "Choose whether you want to send page view events through the RudderStack JS SDK, or through automatic collection on each page load using GA4 Enhanced Measurement (gtag).", + { + "text": "Learn more here ", + "link": "https://developers.google.com/analytics/devguides/collection/ga4/views?client_type=gtag" + }, + "about how GA4 measures pages and screens" + ], + "options": [ + { + "label": "RudderStack JS SDK", + "value": "rs" + }, + { + "label": "gtag Automated Capture", + "value": "gtag" + } + ], + "default": "rs" + }, + { + "type": "checkbox", + "label": "Debug via DebugView", + "configKey": "debugView", + "default": true, + "note": [ + "Enabling this allows you to monitor your device mode events in ", + { + "text": "DebugView.", + "link": "https://support.google.com/analytics/answer/7201382" + }, + "For hybrid mode, these would be only your page calls" + ] + }, + { + "type": "checkbox", + "label": "Include URL and Search as Page View properties", + "configKey": "extendPageViewParams", + "note": "Enabling this extends the set of properties automatically collected to include 'URL' and 'search'. Note that GA4 has a limit on the number of unique properties per event name", + "default": false + }, + { + "preRequisites": { + "fields": [ + { + "configKey": "connectionMode.web", + "value": "hybrid" + } + ] + }, + "type": "checkbox", + "label": "Override gtag client ID & session ID", + "configKey": "overrideClientAndSessionId", + "note": [ + "Override the gtag clientID & sessionID with RudderStack's to ensure attribution is properly unified across page and track events. We recommend turning on the override function. Otherwise, instrument your RudderStack SDK based on instructions ", + { + "text": "here", + "link": "https://www.rudderstack.com/docs/destinations/streaming-destinations/google-analytics-4/setting-up-google-analytics-4-in-rudderstack/#hybrid-mode" + } + ], + "default": true + } + ] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] + }, + "redirectGroups": { + "advancedMapping": { + "tabs": [ + { + "name": "Dimension and Metrics Mappings", + "fields": [ + { + "type": "mapping", + "label": "Map RudderStack properties to GA4 dimenstions and metrics (Note: These can be overriden per event level mapping)", + "configKey": "commonMapping", + "hideViewModeControl": true, + "columns": [ + { + "type": "textInput", + "key": "from", + "label": "RudderStack Property", + "placeholder": "properties.price" + }, + { + "type": "dynamicDataSelect", + "label": "GA4 parameter", + "key": "to", + "placeholder": "value" + } + ] + } + ] + }, + { + "name": "Event Level Mappings", + "isDefault": true, + "fields": [ + { + "type": "dynamicCustomForm", + "label": "Map RudderStack event name to GA4 events", + "configKey": "eventsMapping", + "default": [ + { + "rsEventName": "Products Searched", + "destEventName": "search", + "eventProperties": [ + { + "from": "$.properties.query", + "to": "$.events[0].params.search_term", + "required": true + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Product List Viewed", + "destEventName": "view_item_list", + "eventProperties": [ + { + "from": "$.properties.list_id", + "to": "$.events[0].params.item_list_id" + }, + { + "from": "$.properties.category", + "to": "$.events[0].params.item_list_name" + }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Product Clicked", + "destEventName": "select_item", + "eventProperties": [ + { + "from": "$.properties.list_id", + "to": "$.events[0].params.item_list_id" + }, + { + "from": "$.properties.category", + "to": "$.events[0].params.item_list_name" + }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Promotion Viewed", + "destEventName": "view_promotion", + "eventProperties": [ + { + "from": "$.properties.creative_name", + "to": "$.events[0].params.creative_name" + }, + { + "from": "$.properties.creative_slot", + "to": "$.events[0].params.creative_slot" + }, + { + "from": "$.properties.promotion_name", + "to": "$.events[0].params.promotion_name" + }, + { + "from": "$.properties.promotion_id", + "to": "$.events[0].params.promotion_id" + }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Promotion Clicked", + "destEventName": "select_promotion", + "eventProperties": [ + { + "from": "$.properties.creative_name", + "to": "$.events[0].params.creative_name" + }, + { + "from": "$.properties.creative_slot", + "to": "$.events[0].params.creative_slot" + }, + { + "from": "$.properties.promotion_name", + "to": "$.events[0].params.promotion_name" + }, + { + "from": "$.properties.promotion_id", + "to": "$.events[0].params.promotion_id" + }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Product Viewed", + "destEventName": "view_item", + "eventProperties": [ + { + "from": "$.properties.currency", + "to": "$.events[0].params.currency", + "required": true + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value", + "required": true + }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Product Added", + "destEventName": "add_to_cart", + "eventProperties": [ + { + "from": "$.properties.currency", + "to": "$.events[0].params.currency", + "required": true + }, + { + "from": "$.properties.revenue", + "to": "$.events[0].params.value", + "required": true + }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Product Removed", + "destEventName": "remove_from_cart", + "eventProperties": [ + { + "from": "$.properties.revenue", + "to": "$.events[0].params.value", + "required": true + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value", + "required": true + }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Cart Viewed", + "destEventName": "view_cart", + "eventProperties": [ + { + "from": "$.properties.currency", + "to": "$.events[0].params.currency", + "required": true + }, + { + "from": "$.properties.revenue", + "to": "$.events[0].params.value", + "required": true + }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Product Added to Wishlist", + "destEventName": "add_to_wishlist", + "eventProperties": [ + { + "from": "$.properties.currency", + "to": "$.events[0].params.currency", + "required": true + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value", + "required": true + }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Checkout Started", + "destEventName": "begin_checkout", + "eventProperties": [ + { + "from": "$.properties.currency", + "to": "$.events[0].params.currency", + "required": true + }, + { + "from": "$.properties.revenue", + "to": "$.events[0].params.value", + "required": true + }, + { + "from": "$.properties.coupon", + "to": "$.events[0].params.coupon" + }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Order Completed", + "destEventName": "purchase", + "eventProperties": [ + { + "from": "$.properties.currency", + "to": "$.events[0].params.currency", + "required": true + }, + { + "from": "$.properties.revenue", + "to": "$.events[0].params.value", + "required": true + }, + { + "from": "$.properties.transaction_id", + "to": "$.events[0].params.transaction_id", + "required": true + }, + { + "from": "$.properties.coupon", + "to": "$.events[0].params.coupon" + }, + { + "from": "$.properties.shipping", + "to": "$.events[0].params.shipping" + }, + { + "from": "$.properties.tax", + "to": "$.events[0].params.tax" + }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Order Refunded", + "destEventName": "refund", + "eventProperties": [ + { + "from": "$.properties.currency", + "to": "$.events[0].params.currency", + "required": true + }, + { + "from": "$.properties.transaction_id", + "to": "$.events[0].params.transaction_id", + "required": true + }, + { + "from": "$.properties.revenue", + "to": "$.events[0].params.value", + "required": true + }, + { + "from": "$.properties.coupon", + "to": "$.events[0].params.coupon" + }, + { + "from": "$.properties.shipping", + "to": "$.events[0].params.shipping" + }, + { + "from": "$.properties.tax", + "to": "$.events[0].params.tax" + }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Product Shared", + "destEventName": "share", + "eventProperties": [ + { + "from": "$.properties.product_id", + "to": "$.events[0].params.item_id" + }, + { + "from": "$.properties.share_via", + "to": "$.events[0].params.method" + }, + { + "from": "$.properties.content_type", + "to": "$.events[0].params.content_type" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Cart Shared", + "destEventName": "share", + "eventProperties": [ + { + "from": "$.properties.share_via", + "to": "$.events[0].params.method" + }, + { + "from": "$.properties.content_type", + "to": "$.events[0].params.content_type" + }, + { + "from": "$.properties.cart_id", + "to": "$.events[0].params.item_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Payment Info Entered", + "destEventName": "add_payment_info", + "eventProperties": [ + { + "from": "$.properties.currency", + "to": "$.events[0].params.currency", + "required": true + }, + { + "from": "$.properties.revenue", + "to": "$.events[0].params.value", + "required": true + }, + { + "from": "$.properties.coupon", + "to": "$.events[0].params.coupon" + }, + { + "from": "$.properties.payment_method", + "to": "$.events[0].params.payment_type" + }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Checkout Step Completed", + "destEventName": "add_shipping_info", + "eventProperties": [ + { + "from": "$.properties.currency", + "to": "$.events[0].params.currency", + "required": true + }, + { + "from": "$.properties.revenue", + "to": "$.events[0].params.value", + "required": true + }, + { + "from": "$.properties.coupon", + "to": "$.events[0].params.coupon" + }, + { + "from": "$.properties.shipping_method", + "to": "$.events[0].params.shipping_tier" + }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + } + ], + "rowFields": [ + { + "type": "mappingRow", + "columns": [ + { + "type": "textInput", + "label": "RudderStack Event Name", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "configKey": "rsEventName", + "placeholder": "e.g Products Searched", + "regexErrorMessage": "Event name is required" + }, + { + "type": "textInput", + "label": "Ga4 Event Name", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "configKey": "destEventName", + "placeholder": "e.g Search", + "regexErrorMessage": "Event name is required" + } + ] + }, + { + "type": "mapping", + "label": "Map your Event Property", + "columns": [ + { + "key": "from", + "type": "textInput", + "label": "RudderStack Property Name", + "placeholder": "e.g $.properties.revenue" + }, + { + "type": "dynamicDataSelect", + "label": "GA4 parameter", + "key": "to", + "placeholder": "$.event[0].params.value", + "apiName": "getGA4DimensionsAndMetrics" + } + ], + "configKey": "eventProperties" + } + ], + "hideViewModeControl": true + } + ] + } + ] + } + } + } +} diff --git a/src/configurations/destinations/ga4_v2/ui-config.jt b/src/configurations/destinations/ga4_v2/ui-config.jt new file mode 100644 index 000000000..29cf2886a --- /dev/null +++ b/src/configurations/destinations/ga4_v2/ui-config.jt @@ -0,0 +1,625 @@ +{ + "description": "GENERATED CODE DO NOT EDIT", + "uiConfig": { + "baseTemplate": [ + { + "title": "Initial setup", + "note": "Review how this destination is set up", + "sections": [ + { + "groups": [ + { + "title": "Connection settings", + "note": "Update your connection settings here", + "icon": "settings", + "fields": [ + { + "type": "textInput", + "label": "API Secret", + "note": "Enter the API secret associated with your GA4 data stream. Create this in your GA UI under Admin > Data Streams > choose your stream > Measurement Protocol API Secrets > Create", + "configKey": "apiSecret", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "regexErrorMessage": "Invalid API Secret", + "placeholder": "e.g: QuIUHRj7XXXXX7eZDZiPQU", + "secret": true + }, + { + "type": "singleSelect", + "label": "Client Type", + "configKey": "typesOfClient", + "options": [ + { + "label": "gtag.js", + "value": "gtag" + }, + { + "label": "Firebase", + "value": "firebase" + } + ], + "default": "gtag" + }, + { + "type": "textInput", + "preRequisites": { + "fields": [ + { + "configKey": "typesOfClient", + "value": "gtag" + }, + { + "configKey": "connectionMode.web", + "value": "device" + } + ] + }, + "label": "SDK Base URL", + "configKey": "sdkBaseUrl", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|(?!.*\\.ngrok\\.io)^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]*|^$", + "regexErrorMessage": "Please input a valid URL.", + "note": "Enter your GA4 SDK base URL, https://{SDK Base URL}/gtag/js. By default, it is https://www.googletagmanager.com.", + "placeholder": "e.g: https://www.example.com", + "default": "https://www.googletagmanager.com", + "secret": false + }, + { + "type": "textInput", + "preRequisites": { + "fields": [ + { + "configKey": "typesOfClient", + "value": "gtag" + } + ] + }, + "label": "Measurement Id", + "configKey": "measurementId", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(G-.{1,100})$|^$", + "regexErrorMessage": "Invalid Measurement Id", + "note": "Enter the ID associated with your stream. Find this under Admin > Data Streams > choose your stream > Measurement ID", + "placeholder": "e.g: G-AB1CD2E34F", + "secret": false + }, + { + "type": "textInput", + "label": "Property Id", + "configKey": "propertyId", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$|^$", + "regexErrorMessage": "Invalid Measurement Id", + "note": "Property is a numeric Google Analytics GA4 Property identifier. It is a unique identifier for a GA4 property. You can find this in the GA4 UI under Admin > Property > Property Details > Property ID", + "placeholder": "e.g: 341372335", + "secret": false + }, + { + "type": "textInput", + "preRequisites": { + "fields": [ + { + "configKey": "typesOfClient", + "value": "firebase" + } + ] + }, + "label": "Firebase App Id", + "configKey": "firebaseAppId", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid Firebase App Id", + "note": "Enter the ID associated with your stream. Find this under Admin > Data Streams > choose your stream > Firebase App ID", + "placeholder": "e.g: 2:637XX8496727:web:a4284b4cXXe329d5", + "secret": false + } + ] + } + ] + }, + { + "groups": [ + { + "title": "Connection mode", + "note": [ + "Update how you want to route events from your source to destination. ", + { + "text": "Get help deciding", + "link": "https://www.rudderstack.com/docs/destinations/rudderstack-connection-modes/" + } + ], + "icon": "sliders", + "fields": [] + } + ] + } + ] + }, + { + "note": "Map source events to destination events and properties", + "title": "Event and property mappings", + "hideEditIcon": true, + "sections": [ + { + "groups": [ + { + "icon": "rightToLine", + "title": "Custom GA4 property mappings", + "fields": [ + { + "type": "redirect", + "redirectGroupKey": "advancedMapping" + } + ], + "note": "Confirm dimensions and metrics to link them to the event properties before sending events to Google Analytics 4", + "callout": { + "message": "Mappings take precedence over any transformations for the destination.", + "type": "info" + } + } + ] + } + ] + }, + { + "title": "Configuration settings", + "note": "Manage the settings for your destination", + "sections": [ + { + "title": "Destination settings", + "note": "Configure advanced destination-specific settings here", + "icon": "settings", + "groups": [ + { + "title": "GA4 IT", + "fields": [ + { + "type": "checkbox", + "label": "Debug via Validation Server", + "note": [ + "Enabling this sends events to GA4's validation server. This allows you to check validation responses in Live Events, but note that ", + { + "text": "these events will not show up in reports.", + "link": "https://developers.google.com/analytics/devguides/collection/protocol/ga4/validating-events?client_type=gtag" + }, + "For hybrid mode, these would be your track and group calls" + ], + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + }, + "configKey": "debugMode", + "default": false + }, + { + "type": "tagInput", + "label": "Filter user traits", + "note": "Use this field to filter sensitive PII fields like email, phone number, credit card number, etc. from your events and prevent them from being sent to GA4", + "configKey": "piiPropertiesToIgnore", + "tagKey": "piiProperty", + "default": [ + { + "piiProperty": "" + } + ] + } + ] + } + ] + }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [ + { + "title": "OneTrust consent settings", + "note": [ + "Enter your OneTrust consent category IDs if you have them configured. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + { + "text": "Learn more ", + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/consent-manager/onetrust/" + }, + "about RudderStack's OneTrust Consent Management feature." + ], + "fields": [ + { + "type": "tagInput", + "label": "Consent categories", + "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry.", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: C0001", + "default": [ + { + "oneTrustCookieCategory": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "title": "Ketch consent purpose settings", + "note": [ + "Enter your Ketch purpose Id if you have them configured. ", + { + "text": "Learn more ", + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/consent-manager/ketch/" + }, + "about RudderStack and Ketch Consent Manager integration." + ], + "fields": [ + { + "type": "tagInput", + "label": "Purpose ID", + "note": "Input your Ketch purpose Id by pressing 'Enter' after each entry", + "configKey": "ketchConsentPurposes", + "tagKey": "purpose", + "placeholder": "e.g: Marketing", + "default": [ + { + "purpose": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + } + ] + }, + { + "title": "Other settings", + "note": "Configure advanced RudderStack features here", + "icon": "otherSettings", + "groups": [ + { + "title": "Client-side event filtering", + "note": "Decide what events are allowed (allowlisting) and blocked (denylisting)", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.webDevice", + "value": true + }, + { + "configKey": "connectionModes.mobileDevice", + "value": true + } + ], + "condition": "or" + }, + "fields": [ + { + "type": "singleSelect", + "label": "Choose if you want to turn on events filtering:", + "configKey": "eventFilteringOption", + "note": "You must select either allowlist or denylist to enable events filtering", + "options": [ + { + "label": "No events filtering", + "value": "disable" + }, + { + "label": "Filter via allowlist", + "value": "whitelistedEvents" + }, + { + "label": "Filter via denylist", + "value": "blacklistedEvents" + } + ], + "default": "disable" + }, + { + "type": "tagInput", + "label": "Allowlisted events", + "note": "Input separate events by pressing 'Enter'.\nInput the events you want to allowlist.", + "configKey": "whitelistedEvents", + "tagKey": "eventName", + "placeholder": "e.g: Anonymous page visit", + "default": [ + { + "eventName": "" + } + ], + "preRequisites": { + "fields": [ + { + "configKey": "eventFilteringOption", + "value": "whitelistedEvents" + } + ] + } + }, + { + "type": "tagInput", + "label": "Denylisted events", + "note": "Input separate events by pressing 'Enter'.\nInput the events you want to denylist. ", + "configKey": "blacklistedEvents", + "tagKey": "eventName", + "placeholder": "e.g: Anonymous page visit", + "default": [ + { + "eventName": "" + } + ], + "preRequisites": { + "fields": [ + { + "configKey": "eventFilteringOption", + "value": "blacklistedEvents" + } + ] + } + } + ] + } + ] + } + ] + } + ], + "sdkTemplate": { + "title": "Web SDK settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "singleSelect", + "label": "Choose how to capture pageviews", + "configKey": "capturePageView", + "note": [ + "Choose whether you want to send page view events through the RudderStack JS SDK, or through automatic collection on each page load using GA4 Enhanced Measurement (gtag).", + { + "text": "Learn more here ", + "link": "https://developers.google.com/analytics/devguides/collection/ga4/views?client_type=gtag" + }, + "about how GA4 measures pages and screens" + ], + "options": [ + { + "label": "RudderStack JS SDK", + "value": "rs" + }, + { + "label": "gtag Automated Capture", + "value": "gtag" + } + ], + "default": "rs" + }, + { + "type": "checkbox", + "label": "Debug via DebugView", + "configKey": "debugView", + "default": true, + "note": [ + "Enabling this allows you to monitor your device mode events in ", + { + "text": "DebugView.", + "link": "https://support.google.com/analytics/answer/7201382" + }, + "For hybrid mode, these would be only your page calls" + ] + }, + { + "type": "checkbox", + "label": "Include URL and Search as Page View properties", + "configKey": "extendPageViewParams", + "note": "Enabling this extends the set of properties automatically collected to include 'URL' and 'search'. Note that GA4 has a limit on the number of unique properties per event name", + "default": false + }, + { + "preRequisites": { + "fields": [ + { + "configKey": "connectionMode.web", + "value": "hybrid" + } + ] + }, + "type": "checkbox", + "label": "Override gtag client ID & session ID", + "configKey": "overrideClientAndSessionId", + "note": [ + "Override the gtag clientID & sessionID with RudderStack's to ensure attribution is properly unified across page and track events. We recommend turning on the override function. Otherwise, instrument your RudderStack SDK based on instructions ", + { + "text": "here", + "link": "https://www.rudderstack.com/docs/destinations/streaming-destinations/google-analytics-4/setting-up-google-analytics-4-in-rudderstack/#hybrid-mode" + } + ], + "default": true + } + ] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] + }, + "redirectGroups": { + "advancedMapping": { + "tabs": [ + { + "name": "Dimension and Metrics Mappings", + "fields": [ + { + "type": "mapping", + "label": "Map RudderStack properties to GA4 dimenstions and metrics (Note: These can be overriden per event level mapping)", + "configKey": "commonMapping", + "hideViewModeControl": true, + "columns": [ + { + "type": "textInput", + "key": "from", + "label": "RudderStack Property", + "placeholder": "properties.price" + }, + { + "type": "dynamicDataSelect", + "label": "GA4 parameter", + "key": "to", + "placeholder": "value" + } + ] + } + ] + }, + { + "name": "Event Level Mappings", + "isDefault": true, + "fields": [ + { + "type": "dynamicCustomForm", + "label": "Map RudderStack event name to GA4 events", + "configKey": "eventsMapping", + "default": ^.eventsMapping, + "rowFields": [ + { + "type": "mappingRow", + "columns": [ + { + "type": "textInput", + "label": "RudderStack Event Name", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "configKey": "rsEventName", + "placeholder": "e.g Products Searched", + "regexErrorMessage": "Event name is required" + }, + { + "type": "textInput", + "label": "Ga4 Event Name", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "configKey": "destEventName", + "placeholder": "e.g Search", + "regexErrorMessage": "Event name is required" + } + ] + }, + { + "type": "mapping", + "label": "Map your Event Property", + "columns": [ + { + "key": "from", + "type": "textInput", + "label": "RudderStack Property Name", + "placeholder": "e.g $.properties.revenue" + }, + { + "type": "dynamicDataSelect", + "label": "GA4 parameter", + "key": "to", + "placeholder": "$.event[0].params.value", + "apiName": "getGA4DimensionsAndMetrics" + } + ], + "configKey": "eventProperties" + } + ], + "hideViewModeControl": true + } + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/src/configurations/destinations/ga4_v2/ui-default.json b/src/configurations/destinations/ga4_v2/ui-default.json new file mode 100644 index 000000000..2e9b453ad --- /dev/null +++ b/src/configurations/destinations/ga4_v2/ui-default.json @@ -0,0 +1,1177 @@ +{ + "eventsMapping": [ + { + "rsEventName": "Products Searched", + "destEventName": "search", + "eventProperties": [ + { + "from": "$.properties.query", + "to": "$.events[0].params.search_term", + "required": true + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Product List Viewed", + "destEventName": "view_item_list", + "eventProperties": [ + { "from": "$.properties.list_id", "to": "$.events[0].params.item_list_id" }, + { "from": "$.properties.category", "to": "$.events[0].params.item_list_name" }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Product Clicked", + "destEventName": "select_item", + "eventProperties": [ + { "from": "$.properties.list_id", "to": "$.events[0].params.item_list_id" }, + { "from": "$.properties.category", "to": "$.events[0].params.item_list_name" }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Promotion Viewed", + "destEventName": "view_promotion", + "eventProperties": [ + { "from": "$.properties.creative_name", "to": "$.events[0].params.creative_name" }, + { "from": "$.properties.creative_slot", "to": "$.events[0].params.creative_slot" }, + { "from": "$.properties.promotion_name", "to": "$.events[0].params.promotion_name" }, + { "from": "$.properties.promotion_id", "to": "$.events[0].params.promotion_id" }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Promotion Clicked", + "destEventName": "select_promotion", + "eventProperties": [ + { "from": "$.properties.creative_name", "to": "$.events[0].params.creative_name" }, + { "from": "$.properties.creative_slot", "to": "$.events[0].params.creative_slot" }, + { "from": "$.properties.promotion_name", "to": "$.events[0].params.promotion_name" }, + { "from": "$.properties.promotion_id", "to": "$.events[0].params.promotion_id" }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Product Viewed", + "destEventName": "view_item", + "eventProperties": [ + { "from": "$.properties.currency", "to": "$.events[0].params.currency", "required": true }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value", + "required": true + }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Product Added", + "destEventName": "add_to_cart", + "eventProperties": [ + { "from": "$.properties.currency", "to": "$.events[0].params.currency", "required": true }, + { "from": "$.properties.revenue", "to": "$.events[0].params.value", "required": true }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Product Removed", + "destEventName": "remove_from_cart", + "eventProperties": [ + { "from": "$.properties.revenue", "to": "$.events[0].params.value", "required": true }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value", + "required": true + }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Cart Viewed", + "destEventName": "view_cart", + "eventProperties": [ + { "from": "$.properties.currency", "to": "$.events[0].params.currency", "required": true }, + { "from": "$.properties.revenue", "to": "$.events[0].params.value", "required": true }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Product Added to Wishlist", + "destEventName": "add_to_wishlist", + "eventProperties": [ + { "from": "$.properties.currency", "to": "$.events[0].params.currency", "required": true }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value", + "required": true + }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Checkout Started", + "destEventName": "begin_checkout", + "eventProperties": [ + { "from": "$.properties.currency", "to": "$.events[0].params.currency", "required": true }, + { "from": "$.properties.revenue", "to": "$.events[0].params.value", "required": true }, + { "from": "$.properties.coupon", "to": "$.events[0].params.coupon" }, + + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Order Completed", + "destEventName": "purchase", + "eventProperties": [ + { "from": "$.properties.currency", "to": "$.events[0].params.currency", "required": true }, + { "from": "$.properties.revenue", "to": "$.events[0].params.value", "required": true }, + { + "from": "$.properties.transaction_id", + "to": "$.events[0].params.transaction_id", + "required": true + }, + { "from": "$.properties.coupon", "to": "$.events[0].params.coupon" }, + { "from": "$.properties.shipping", "to": "$.events[0].params.shipping" }, + { "from": "$.properties.tax", "to": "$.events[0].params.tax" }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Order Refunded", + "destEventName": "refund", + "eventProperties": [ + { "from": "$.properties.currency", "to": "$.events[0].params.currency", "required": true }, + { + "from": "$.properties.transaction_id", + "to": "$.events[0].params.transaction_id", + "required": true + }, + { "from": "$.properties.revenue", "to": "$.events[0].params.value", "required": true }, + { "from": "$.properties.coupon", "to": "$.events[0].params.coupon" }, + { "from": "$.properties.shipping", "to": "$.events[0].params.shipping" }, + { "from": "$.properties.tax", "to": "$.events[0].params.tax" }, + + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Product Shared", + "destEventName": "share", + "eventProperties": [ + { "from": "$.properties.product_id", "to": "$.events[0].params.item_id" }, + { "from": "$.properties.share_via", "to": "$.events[0].params.method" }, + { "from": "$.properties.content_type", "to": "$.events[0].params.content_type" }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Cart Shared", + "destEventName": "share", + "eventProperties": [ + { "from": "$.properties.share_via", "to": "$.events[0].params.method" }, + { "from": "$.properties.content_type", "to": "$.events[0].params.content_type" }, + { "from": "$.properties.cart_id", "to": "$.events[0].params.item_id" }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Payment Info Entered", + "destEventName": "add_payment_info", + "eventProperties": [ + { "from": "$.properties.currency", "to": "$.events[0].params.currency", "required": true }, + { "from": "$.properties.revenue", "to": "$.events[0].params.value", "required": true }, + { "from": "$.properties.coupon", "to": "$.events[0].params.coupon" }, + { "from": "$.properties.payment_method", "to": "$.events[0].params.payment_type" }, + + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "$.properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + }, + { + "rsEventName": "Checkout Step Completed", + "destEventName": "add_shipping_info", + "eventProperties": [ + { "from": "$.properties.currency", "to": "$.events[0].params.currency", "required": true }, + { "from": "$.properties.revenue", "to": "$.events[0].params.value", "required": true }, + { "from": "$.properties.coupon", "to": "$.events[0].params.coupon" }, + { "from": "$.properties.shipping_method", "to": "$.events[0].params.shipping_tier" }, + { + "from": "$.properties.products[*].product_id", + "to": "$.events[0].params.items[*].item_id", + "required": true + }, + { + "from": "$.properties.products[*].name", + "to": "$.events[0].params.items[*].item_name", + "required": true + }, + { + "from": "$.properties.products[*].coupon", + "to": "$.events[0].params.items[*].coupon" + }, + { + "from": "$.properties.products[*].price", + "to": "$.events[0].params.items[*].price" + }, + { + "from": "$.properties.products[*].position", + "to": "$.events[0].params.items[*].position" + }, + { + "from": "$.properties.products[*].quantity", + "to": "$.events[0].params.items[*].quantity" + }, + { + "from": "properties.products[*].affiliation", + "to": "$.events[0].params.items[*].affiliation" + }, + { + "from": "$.properties.products[*].currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, + { + "from": "$.properties.products[*].item_category2", + "to": "$.events[0].params.items[*].item_category2" + }, + { + "from": "$.properties.products[*].item_category3", + "to": "$.events[0].params.items[*].item_category3" + }, + { + "from": "$.properties.products[*].item_category4", + "to": "$.events[0].params.items[*].item_category4" + }, + { + "from": "$.properties.products[*].item_category5", + "to": "$.events[0].params.items[*].item_category5" + }, + { + "from": "$.properties.products[*].item_list_id", + "to": "$.events[0].params.items[*].item_list_id" + }, + { + "from": "$.properties.products[*].item_list_name", + "to": "$.events[0].params.items[*].item_list_name" + }, + { + "from": "$.properties.products[*].location_id", + "to": "$.events[0].params.items[*].location_id" + }, + { + "from": "$.context.traits.*", + "to": "$.user_properties.*.value" + } + ] + } + ] +} diff --git a/src/schemas/destinations/db-config-schema.json b/src/schemas/destinations/db-config-schema.json index 979536b04..6cff7fa4f 100644 --- a/src/schemas/destinations/db-config-schema.json +++ b/src/schemas/destinations/db-config-schema.json @@ -489,12 +489,37 @@ "default": false }, "hidden": { - "type": "boolean", - "title": "Hidden", - "description": "Whether the destination is hidden.", - "$comment": "This is used to hide the destination from the UI.", - "default": false + "anyOf": [ + { + "type": "boolean", + "title": "Hidden", + "description": "Whether the destination is hidden.", + "$comment": "This is used to hide the destination from the UI.", + "default": false + }, + { + "type": "object", + "title": "Hidden", + "description": "Whether the destination is hidden.", + "$comment": "This is used to hide the destination from the UI.", + "properties": { + "featureFlagName": { + "type": "string", + "title": "Feature Flag Name", + "description": "The feature flag name to hide the destination.", + "$comment": "This is used to hide the destination from the UI based on the feature flag." + }, + "featureFlagValue": { + "type": "boolean", + "title": "Feature Flag Value", + "description": "The feature flag value to hide the destination.", + "$comment": "This is used to hide the destination from the UI based on the feature flag value." + } + } + } + ] }, + "deprecated": { "type": "boolean", "title": "Deprecated", @@ -544,6 +569,13 @@ } } } + }, + "supportsCustomMappings": { + "type": "boolean", + "title": "Supports Custom Mappings", + "description": "Whether the destination supports custom mappings.", + "$comment": "This is used to display the 'Custom Mappings' tab in the UI.", + "default": false } } }, diff --git a/test/data/validation/destinations/ga4_v2.json b/test/data/validation/destinations/ga4_v2.json new file mode 100644 index 000000000..9508aeeb9 --- /dev/null +++ b/test/data/validation/destinations/ga4_v2.json @@ -0,0 +1,477 @@ +[ + { + "config": { + "apiSecret": "QyWIGHjXXXX2L4ePAPiXCA", + "typesOfClient": "gtag", + "measurementId": "G-T40XXXKET4", + "propertyId": "123344", + "firebaseAppId": "", + "capturePageView": { + "web": "rs" + }, + "extendPageViewParams": { + "web": true + }, + "debugView": { + "web": false + }, + "connectionMode": { + "web": "cloud" + }, + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "useNativeSDK": { + "web": false + }, + "debugMode": false, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "Marketing" + } + ] + }, + "result": true + }, + { + "config": { + "apiSecret": "QyWIGHjXXXX2L4ePAPiXCA", + "typesOfClient": "gtag", + "measurementId": "F40RN6STS2", + "propertyId": "123344", + "sdkBaseUrl": "https://www.example.com", + "firebaseAppId": "", + "capturePageView": { + "web": "rs" + }, + "extendPageViewParams": { + "web": true + }, + "debugView": { + "web": true + }, + "connectionMode": { + "web": "device" + }, + "piiPropertiesToIgnore": [ + { + "piiProperty": "" + } + ], + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "useNativeSDK": { + "web": true + }, + "debugMode": false, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "Marketing" + } + ] + }, + "result": false, + "err": [ + "measurementId must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(G-.{1,100})$|^$\"", + " must match \"then\" schema" + ] + }, + { + "config": { + "apiSecret": "QyWIGHjXXXX2L4ePAPiXCA", + "typesOfClient": "firebase", + "measurementId": "G-T40XXXKET4", + "propertyId": "123344", + "firebaseAppId": "2:637900006727:web:a428XXXXX9e329d5", + "capturePageView": { + "web": "rs" + }, + "extendPageViewParams": { + "web": true + }, + "debugView": { + "web": false + }, + "connectionMode": { + "web": "cloud" + }, + "piiPropertiesToIgnore": [ + { + "piiProperty": "" + } + ], + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "useNativeSDK": { + "web": false + }, + "debugMode": false, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "Marketing" + } + ] + }, + "result": true + }, + { + "config": { + "apiSecret": "QyWIGHjXXXX2L4ePAPiXCA", + "measurementId": "G-T40XXXKET4", + "propertyId": "123344", + "typesOfClient": "firebase", + "firebaseAppId": "2:637900006727:web:a428XXXXX9e329d5", + "capturePageView": { + "web": "rs" + }, + "extendPageViewParams": { + "web": true + }, + "debugView": { + "web": false + }, + "connectionMode": { + "web": "device" + }, + "piiPropertiesToIgnore": [ + { + "piiProperty": "" + } + ], + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "useNativeSDK": { + "web": true + }, + "debugMode": true, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "Marketing" + } + ] + }, + "result": true + }, + { + "config": { + "apiSecret": "QyWIGHjXXXX2L4ePAPiXCA", + "typesOfClient": "firebase", + "firebaseAppId": "2:637900006727:web:a428XXXXX9e329d5", + "measurementId": "G-T40XXXKET4", + "propertyId": "123344", + "capturePageView": { + "web": "rs" + }, + "extendPageViewParams": { + "web": true + }, + "debugView": { + "web": false + }, + "connectionMode": { + "web": "cloud" + }, + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "piiPropertiesToIgnore": [ + { + "piiProperty": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "useNativeSDK": { + "web": false + }, + "debugMode": false, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "Marketing" + } + ] + }, + "result": true + }, + { + "config": { + "apiSecret": "QyWIGHjXXXX2L4ePAPiXCA", + "measurementId": "G-T40XXXKET4", + "typesOfClient": "firebase", + "firebaseAppId": "2:637900006727:web:a428XXXXX9e329d5", + "propertyId": "123344", + "capturePageView": { + "web": "rs" + }, + "extendPageViewParams": { + "web": true + }, + "debugView": { + "web": false + }, + "connectionMode": { + "android": "cloud", + "web": "cloud" + }, + "piiPropertiesToIgnore": [ + { + "piiProperty": "" + } + ], + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "useNativeSDK": { + "android": false, + "web": false + }, + "debugMode": false, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "Marketing" + } + ] + }, + "result": true + }, + { + "config": { + "apiSecret": "JjWUIHj4XXX2L7eZDZiXCA", + "propertyId": "123344", + "typesOfClient": "gtag", + "capturePageView": { + "web": "rs" + }, + "extendPageViewParams": { + "web": true + }, + "debugView": { + "web": true + }, + "overrideClientAndSessionId": { + "web": true + }, + "connectionMode": { + "web": "hybrid" + }, + "piiPropertiesToIgnore": [ + { + "piiProperty": "" + } + ], + "eventFilteringOption": "disable", + "measurementId": "G-F40RN6STS2", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "firebaseAppId": "", + "useNativeSDK": { + "web": true + }, + "debugMode": false, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "Marketing" + } + ] + }, + "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiSecret": "QyWIGHjXXXX2L4ePAPiXCA", + "propertyId": "123344", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiSecret": "QyWIGHjXXXX2L4ePAPiXCA", + "propertyId": "123344", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiSecret": "QyWIGHjXXXX2L4ePAPiXCA", + "propertyId": "123344", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiSecret": "QyWIGHjXXXX2L4ePAPiXCA", + "propertyId": "123344", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiSecret": "QyWIGHjXXXX2L4ePAPiXCA", + "propertyId": "123344", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] + }, + { + "config": { + "apiSecret": "QyWIGHjXXXX2L4ePAPiXCA", + "debugMode": false, + "typesOfClient": "gtag", + "measurementId": "G-adfg", + "propertyId": "123344", + "firebaseAppId": "", + "whitelistedEvents": [{ "eventName": "" }], + "blacklistedEvents": [{ "eventName": "" }], + "eventFilteringOption": "disable", + "piiPropertiesToIgnore": [{ "piiProperty": "" }], + "oneTrustCookieCategories": [{ "oneTrustCookieCategory": "" }], + "ketchConsentPurposes": [{ "purpose": "" }], + "consentManagement": { + "web": [ + { + "provider": "custom", + "resolutionStrategy": "or", + "consents": [{ "consent": "vjvh" }, { "consent": "hkvhkv" }, { "consent": "jhvjh" }] + }, + { + "provider": "oneTrust", + "resolutionStrategy": "and", + "consents": [{ "consent": "mvhvjv" }, { "consent": "jvjvjv" }] + } + ] + }, + "debugView": { "web": true }, + "useNativeSDK": { "web": false }, + "connectionMode": { "web": "cloud" }, + "capturePageView": { "web": "rs" }, + "useNativeSDKToSend": { "web": false }, + "extendPageViewParams": { "web": false }, + "overrideClientAndSessionId": { "web": true } + }, + "result": true + } +] From 5697d35958da9755332b3061fd7f4ddeef7bc0b0 Mon Sep 17 00:00:00 2001 From: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Date: Wed, 19 Jun 2024 14:49:43 +0530 Subject: [PATCH 24/68] feat: counting method support for dcm floodlight (#1424) --- .../dcm_floodlight/db-config.json | 6 +- .../destinations/dcm_floodlight/schema.json | 101 +++++++++++++++--- .../dcm_floodlight/ui-config.json | 18 ++++ .../destinations/dcm_floodlight.json | 2 + 4 files changed, 110 insertions(+), 17 deletions(-) diff --git a/src/configurations/destinations/dcm_floodlight/db-config.json b/src/configurations/destinations/dcm_floodlight/db-config.json index 9ba378573..636223d89 100644 --- a/src/configurations/destinations/dcm_floodlight/db-config.json +++ b/src/configurations/destinations/dcm_floodlight/db-config.json @@ -9,6 +9,7 @@ "advertiserId", "activityTag", "groupTag", + "countingMethod", "conversionEvents", "conversionLinker", "allowAdPersonalizationSignals", @@ -37,7 +38,9 @@ ], "supportedMessageTypes": { "cloud": ["track", "page"], - "device": { "web": ["identify", "track", "page"] } + "device": { + "web": ["identify", "track", "page"] + } }, "supportedConnectionModes": { "web": ["cloud", "device"], @@ -57,6 +60,7 @@ "advertiserId", "activityTag", "groupTag", + "countingMethod", "conversionEvents", "eventFilteringOption", "whitelistedEvents", diff --git a/src/configurations/destinations/dcm_floodlight/schema.json b/src/configurations/destinations/dcm_floodlight/schema.json index f8df508d9..dcd8a9948 100644 --- a/src/configurations/destinations/dcm_floodlight/schema.json +++ b/src/configurations/destinations/dcm_floodlight/schema.json @@ -16,6 +16,10 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, + "countingMethod": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, "conversionEvents": { "type": "array", "items": { @@ -33,7 +37,14 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, - "salesTag": { "type": "boolean", "default": false }, + "floodlightCountingMethod": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "salesTag": { + "type": "boolean", + "default": false + }, "customVariables": { "type": "array", "items": { @@ -53,7 +64,14 @@ } } }, - "useNativeSDK": { "type": "object", "properties": { "web": { "type": "boolean" } } }, + "useNativeSDK": { + "type": "object", + "properties": { + "web": { + "type": "boolean" + } + } + }, "tagFormat": { "type": "object", "properties": { @@ -64,12 +82,30 @@ } } }, - "conversionLinker": { "type": "object", "properties": { "web": { "type": "boolean" } } }, + "conversionLinker": { + "type": "object", + "properties": { + "web": { + "type": "boolean" + } + } + }, "allowAdPersonalizationSignals": { "type": "object", - "properties": { "web": { "type": "boolean" } } + "properties": { + "web": { + "type": "boolean" + } + } + }, + "doubleclickId": { + "type": "object", + "properties": { + "web": { + "type": "boolean" + } + } }, - "doubleclickId": { "type": "object", "properties": { "web": { "type": "boolean" } } }, "googleNetworkId": { "type": "object", "properties": { @@ -634,17 +670,50 @@ "connectionMode": { "type": "object", "properties": { - "web": { "type": "string", "enum": ["cloud", "device"] }, - "android": { "type": "string", "enum": ["cloud"] }, - "ios": { "type": "string", "enum": ["cloud"] }, - "unity": { "type": "string", "enum": ["cloud"] }, - "amp": { "type": "string", "enum": ["cloud"] }, - "reactnative": { "type": "string", "enum": ["cloud"] }, - "flutter": { "type": "string", "enum": ["cloud"] }, - "cordova": { "type": "string", "enum": ["cloud"] }, - "shopify": { "type": "string", "enum": ["cloud"] }, - "cloud": { "type": "string", "enum": ["cloud"] }, - "warehouse": { "type": "string", "enum": ["cloud"] } + "web": { + "type": "string", + "enum": ["cloud", "device"] + }, + "android": { + "type": "string", + "enum": ["cloud"] + }, + "ios": { + "type": "string", + "enum": ["cloud"] + }, + "unity": { + "type": "string", + "enum": ["cloud"] + }, + "amp": { + "type": "string", + "enum": ["cloud"] + }, + "reactnative": { + "type": "string", + "enum": ["cloud"] + }, + "flutter": { + "type": "string", + "enum": ["cloud"] + }, + "cordova": { + "type": "string", + "enum": ["cloud"] + }, + "shopify": { + "type": "string", + "enum": ["cloud"] + }, + "cloud": { + "type": "string", + "enum": ["cloud"] + }, + "warehouse": { + "type": "string", + "enum": ["cloud"] + } } } } diff --git a/src/configurations/destinations/dcm_floodlight/ui-config.json b/src/configurations/destinations/dcm_floodlight/ui-config.json index eceac86f1..8edb6f391 100644 --- a/src/configurations/destinations/dcm_floodlight/ui-config.json +++ b/src/configurations/destinations/dcm_floodlight/ui-config.json @@ -33,6 +33,16 @@ "secret": false, "footerNote": "Use this setting to define the same parameter value across all the conversion events. Alternatively, you can define this value for each conversion event in the Floodlight Group Tag field below." }, + { + "type": "textInput", + "label": "Counting Method", + "value": "countingMethod", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false, + "placeholder": "e.g. standard", + "secret": false, + "footerNote": "Use this setting to define the same parameter value across all the conversion events. Alternatively, you can define this value for each conversion event in the Floodlight Counting Method field below." + }, { "type": "dynamicCustomForm", "label": "Conversion events", @@ -62,6 +72,14 @@ "placeholder": "e.g: conv01", "footerNote": "This should be the (type) of your tag string. If left blank, RudderStack will pick the value defined in the Group Tag field above." }, + { + "type": "textInput", + "label": "Floodlight Counting Method", + "value": "floodlightCountingMethod", + "required": false, + "placeholder": "e.g: standard", + "footerNote": "Enter the counting method for this conversion event, RudderStack will use this as a fallback value if 'properties.countingMethod' is empty" + }, { "type": "checkbox", "label": "Fire as Sales Tag", diff --git a/test/data/validation/destinations/dcm_floodlight.json b/test/data/validation/destinations/dcm_floodlight.json index 9d23fea2d..d7e4c64c9 100644 --- a/test/data/validation/destinations/dcm_floodlight.json +++ b/test/data/validation/destinations/dcm_floodlight.json @@ -9,6 +9,7 @@ "eventName": "Product viewed", "floodlightActivityTag": "signu01", "floodlightGroupTag": "conv01", + "floodlightCountingMethod": "standard", "salesTag": false, "customVariables": [ { @@ -25,6 +26,7 @@ "eventName": "Order Complete", "floodlightActivityTag": "signu01", "floodlightGroupTag": "conv02", + "floodlightCountingMethod": "unique", "salesTag": false, "customVariables": [ { From bc0e54317c0743ae31639c9b6b6e6474cb0a6ac6 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Thu, 20 Jun 2024 15:15:00 +0530 Subject: [PATCH 25/68] feat: added GCM support for BingAds Audience destination (#1413) --- .../bingads_audience/db-config.json | 8 +- .../destinations/bingads_audience/schema.json | 143 ++++++++++++++++++ .../bingads_audience/ui-config.json | 93 +++++++++++- .../destinations/bingads_audience.json | 113 ++++++++++++++ 4 files changed, 352 insertions(+), 5 deletions(-) diff --git a/src/configurations/destinations/bingads_audience/db-config.json b/src/configurations/destinations/bingads_audience/db-config.json index a0738c7a2..de15671d1 100644 --- a/src/configurations/destinations/bingads_audience/db-config.json +++ b/src/configurations/destinations/bingads_audience/db-config.json @@ -7,7 +7,7 @@ "auth": { "type": "OAuth" }, "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": ["cloud", "warehouse", "shopify"], "supportedMessageTypes": { "cloud": ["audiencelist"] }, @@ -28,9 +28,9 @@ "hashEmail", "oneTrustCookieCategories" ], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] } }, "options": { "isBeta": true } diff --git a/src/configurations/destinations/bingads_audience/schema.json b/src/configurations/destinations/bingads_audience/schema.json index 339fc50c1..614a4d1a1 100644 --- a/src/configurations/destinations/bingads_audience/schema.json +++ b/src/configurations/destinations/bingads_audience/schema.json @@ -36,6 +36,149 @@ "cloud": { "type": "string", "enum": ["cloud"] }, "warehouse": { "type": "string", "enum": ["cloud"] } } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } } } } diff --git a/src/configurations/destinations/bingads_audience/ui-config.json b/src/configurations/destinations/bingads_audience/ui-config.json index 8465cfac8..6a6c7bd48 100644 --- a/src/configurations/destinations/bingads_audience/ui-config.json +++ b/src/configurations/destinations/bingads_audience/ui-config.json @@ -62,7 +62,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/bingads_audience.json b/test/data/validation/destinations/bingads_audience.json index d8cca1608..3107b34e9 100644 --- a/test/data/validation/destinations/bingads_audience.json +++ b/test/data/validation/destinations/bingads_audience.json @@ -76,5 +76,118 @@ }, "result": false, "err": ["oneTrustCookieCategories must be array"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "customerAccountId": "434000324", + "customerId": "447000473", + "audienceId": "130003", + "hashEmail": true, + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "customerAccountId": "434000324", + "customerId": "447000473", + "audienceId": "130003", + "hashEmail": true, + "consentManagement": { + "shopify": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.shopify.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.shopify.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "customerAccountId": "434000324", + "customerId": "447000473", + "audienceId": "130003", + "hashEmail": true, + "consentManagement": { + "shopify": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.shopify.0 must have required property 'resolutionStrategy'", + "consentManagement.shopify.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "customerAccountId": "434000324", + "customerId": "447000473", + "audienceId": "130003", + "hashEmail": true, + "consentManagement": { + "shopify": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "customerAccountId": "434000324", + "customerId": "447000473", + "audienceId": "130003", + "hashEmail": true, + "consentManagement": { + "shopify": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.shopify.0.provider must be equal to one of the allowed values"] } ] From 605f312962bcf044d3570e2ac9fad5abe0107691 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Thu, 20 Jun 2024 15:17:05 +0530 Subject: [PATCH 26/68] feat: added GCM support for bloomreach destination (#1414) --- .../destinations/bloomreach/db-config.json | 20 +- .../destinations/bloomreach/schema.json | 465 ++++++++++++++++++ .../destinations/bloomreach/ui-config.json | 101 +++- .../validation/destinations/bloomreach.json | 123 +++++ 4 files changed, 695 insertions(+), 14 deletions(-) diff --git a/src/configurations/destinations/bloomreach/db-config.json b/src/configurations/destinations/bloomreach/db-config.json index 086b6578a..9121b8ef4 100644 --- a/src/configurations/destinations/bloomreach/db-config.json +++ b/src/configurations/destinations/bloomreach/db-config.json @@ -42,16 +42,16 @@ "projectToken", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey", "apiSecret"] }, diff --git a/src/configurations/destinations/bloomreach/schema.json b/src/configurations/destinations/bloomreach/schema.json index e61a8a1e3..2eebc22e8 100644 --- a/src/configurations/destinations/bloomreach/schema.json +++ b/src/configurations/destinations/bloomreach/schema.json @@ -84,6 +84,471 @@ "enum": ["cloud"] } } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } } } } diff --git a/src/configurations/destinations/bloomreach/ui-config.json b/src/configurations/destinations/bloomreach/ui-config.json index c20bad1a4..1c2566841 100644 --- a/src/configurations/destinations/bloomreach/ui-config.json +++ b/src/configurations/destinations/bloomreach/ui-config.json @@ -101,9 +101,10 @@ "note": "Manage the settings for your destination", "sections": [ { - "title": "Other settings", - "note": "Configure advanced RudderStack features here", - "icon": "otherSettings", + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", "groups": [ { "title": "OneTrust cookie consent settings", @@ -129,7 +130,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -140,6 +153,86 @@ "title": "SDK settings", "note": "not visible in the ui", "fields": [] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/test/data/validation/destinations/bloomreach.json b/test/data/validation/destinations/bloomreach.json index f96eaa987..392595d0c 100644 --- a/test/data/validation/destinations/bloomreach.json +++ b/test/data/validation/destinations/bloomreach.json @@ -29,5 +29,128 @@ }, "result": false, "err": [" must have required property 'apiBaseUrl'", " must have required property 'hardID'"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiBaseUrl": "https://api.test.com/", + "apiKey": "test-apiKey", + "apiSecret": "test-apiSecret", + "projectToken": "test-projectToken", + "hardID": "registered", + "softID": "cookie", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiBaseUrl": "https://api.test.com/", + "apiKey": "test-apiKey", + "apiSecret": "test-apiSecret", + "projectToken": "test-projectToken", + "hardID": "registered", + "softID": "cookie", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiBaseUrl": "https://api.test.com/", + "apiKey": "test-apiKey", + "apiSecret": "test-apiSecret", + "projectToken": "test-projectToken", + "hardID": "registered", + "softID": "cookie", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiBaseUrl": "https://api.test.com/", + "apiKey": "test-apiKey", + "apiSecret": "test-apiSecret", + "projectToken": "test-projectToken", + "hardID": "registered", + "softID": "cookie", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiBaseUrl": "https://api.test.com/", + "apiKey": "test-apiKey", + "apiSecret": "test-apiSecret", + "projectToken": "test-projectToken", + "hardID": "registered", + "softID": "cookie", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From 43734876ad67c538b7a83654693ea2ce99320cbc Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Thu, 20 Jun 2024 15:18:52 +0530 Subject: [PATCH 27/68] feat: added GCM support for Bluecore destination (#1415) --- .../destinations/bluecore/db-config.json | 22 +- .../destinations/bluecore/schema.json | 511 ++++++++++++++++++ .../destinations/bluecore/ui-config.json | 101 +++- .../validation/destinations/bluecore.json | 98 ++++ 4 files changed, 717 insertions(+), 15 deletions(-) diff --git a/src/configurations/destinations/bluecore/db-config.json b/src/configurations/destinations/bluecore/db-config.json index 6e93e748a..5d04d716a 100644 --- a/src/configurations/destinations/bluecore/db-config.json +++ b/src/configurations/destinations/bluecore/db-config.json @@ -37,17 +37,17 @@ }, "destConfig": { "defaultConfig": ["bluecoreNamespace", "eventsMapping", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "web": ["connectionMode"], - "cloud": ["connectionMode"], - "shopify": ["connectionMode"], - "warehouse": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"] }, "secretKeys": ["bluecoreNamespace"] }, diff --git a/src/configurations/destinations/bluecore/schema.json b/src/configurations/destinations/bluecore/schema.json index c1977d209..32f1f1847 100644 --- a/src/configurations/destinations/bluecore/schema.json +++ b/src/configurations/destinations/bluecore/schema.json @@ -92,6 +92,517 @@ "enum": ["cloud"] } } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } } } } diff --git a/src/configurations/destinations/bluecore/ui-config.json b/src/configurations/destinations/bluecore/ui-config.json index 6e6ef1982..6a5a136ac 100644 --- a/src/configurations/destinations/bluecore/ui-config.json +++ b/src/configurations/destinations/bluecore/ui-config.json @@ -49,9 +49,10 @@ "note": "Manage the settings for your destination", "sections": [ { - "title": "Other settings", - "note": "Configure advanced RudderStack features here", - "icon": "otherSettings", + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", "groups": [ { "title": "OneTrust cookie consent settings", @@ -77,7 +78,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -160,6 +173,86 @@ "title": "Web SDK settings", "note": "not visible in the ui", "fields": [] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/test/data/validation/destinations/bluecore.json b/test/data/validation/destinations/bluecore.json index e58b0c846..4db3b561a 100644 --- a/test/data/validation/destinations/bluecore.json +++ b/test/data/validation/destinations/bluecore.json @@ -135,5 +135,103 @@ }, "result": false, "err": ["eventsMapping.0.to must be equal to one of the allowed values"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "bluecoreNamespace": "qwerty1XX4qwerty", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "bluecoreNamespace": "qwerty1XX4qwerty", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "bluecoreNamespace": "qwerty1XX4qwerty", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "bluecoreNamespace": "qwerty1XX4qwerty", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "bluecoreNamespace": "qwerty1XX4qwerty", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From b46838af31db012f1d7cac935e385dddcab7a425 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Thu, 20 Jun 2024 15:21:02 +0530 Subject: [PATCH 28/68] feat: added GCM support for Blueshift destination (#1416) --- .../destinations/blueshift/db-config.json | 24 ++--- .../destinations/blueshift/ui-config.json | 93 ++++++++++++++++++- 2 files changed, 104 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/blueshift/db-config.json b/src/configurations/destinations/blueshift/db-config.json index 9cc785e80..52aa13652 100644 --- a/src/configurations/destinations/blueshift/db-config.json +++ b/src/configurations/destinations/blueshift/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -35,17 +35,17 @@ "supportedMessageTypes": { "cloud": ["identify", "track", "group"] }, "destConfig": { "defaultConfig": ["eventApiKey", "usersApiKey", "dataCenter", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "web": ["connectionMode"], - "cloud": ["connectionMode"], - "shopify": ["connectionMode"], - "warehouse": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"] }, "secretKeys": ["eventApiKey", "usersApiKey"] } diff --git a/src/configurations/destinations/blueshift/ui-config.json b/src/configurations/destinations/blueshift/ui-config.json index dd060e393..eb80772b4 100644 --- a/src/configurations/destinations/blueshift/ui-config.json +++ b/src/configurations/destinations/blueshift/ui-config.json @@ -63,7 +63,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } From b28b0fece79bc6048391c4fce1a6415a3e066718 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Thu, 20 Jun 2024 15:23:39 +0530 Subject: [PATCH 29/68] feat: added GCM support for Branch Metrics destination (#1417) --- .../destinations/branch/db-config.json | 25 ++--- .../destinations/branch/ui-config.json | 93 ++++++++++++++++++- 2 files changed, 105 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/branch/db-config.json b/src/configurations/destinations/branch/db-config.json index 0ad04bdca..fd1e5851d 100644 --- a/src/configurations/destinations/branch/db-config.json +++ b/src/configurations/destinations/branch/db-config.json @@ -9,7 +9,8 @@ "blacklistedEvents", "whitelistedEvents", "eventFilteringOption", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -51,17 +52,17 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "android": ["useNativeSDK", "connectionMode"], - "ios": ["useNativeSDK", "connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["useNativeSDK", "connectionMode", "consentManagement"], + "ios": ["useNativeSDK", "connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": [] } diff --git a/src/configurations/destinations/branch/ui-config.json b/src/configurations/destinations/branch/ui-config.json index adc0b7838..b526542da 100644 --- a/src/configurations/destinations/branch/ui-config.json +++ b/src/configurations/destinations/branch/ui-config.json @@ -216,7 +216,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } From 434008474677c0e7ea6335cf3fa00df2b550f1c3 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Thu, 20 Jun 2024 15:25:17 +0530 Subject: [PATCH 30/68] feat: added GCM support for 5 destinations - Batch 10 (#1480) --- .../destinations/intercom/db-config.json | 25 +- .../destinations/intercom/schema.json | 511 ++++++++++++++++++ .../destinations/intercom/ui-config.json | 104 +++- .../destinations/june/db-config.json | 25 +- .../destinations/june/schema.json | 511 ++++++++++++++++++ .../destinations/june/ui-config.json | 93 +++- .../destinations/keen/db-config.json | 25 +- .../destinations/keen/ui-config.json | 93 +++- .../destinations/kissmetrics/db-config.json | 25 +- .../destinations/kissmetrics/ui-config.json | 93 +++- .../destinations/wootric/db-config.json | 30 +- .../destinations/wootric/schema.json | 511 ++++++++++++++++++ .../destinations/wootric/ui-config.json | 93 +++- .../validation/destinations/intercom.json | 113 ++++ test/data/validation/destinations/june.json | 100 ++++ .../data/validation/destinations/wootric.json | 108 ++++ 16 files changed, 2394 insertions(+), 66 deletions(-) create mode 100644 test/data/validation/destinations/june.json diff --git a/src/configurations/destinations/intercom/db-config.json b/src/configurations/destinations/intercom/db-config.json index 4de37b78a..4c1dd3938 100644 --- a/src/configurations/destinations/intercom/db-config.json +++ b/src/configurations/destinations/intercom/db-config.json @@ -14,7 +14,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -64,17 +65,17 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "android": ["useNativeSDK", "connectionMode", "mobileApiKeyAndroid"], - "ios": ["useNativeSDK", "connectionMode", "mobileApiKeyIOS"], - "web": ["useNativeSDK", "connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["useNativeSDK", "connectionMode", "mobileApiKeyAndroid", "consentManagement"], + "ios": ["useNativeSDK", "connectionMode", "mobileApiKeyIOS", "consentManagement"], + "web": ["useNativeSDK", "connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/intercom/schema.json b/src/configurations/destinations/intercom/schema.json index 32906e186..0db381925 100644 --- a/src/configurations/destinations/intercom/schema.json +++ b/src/configurations/destinations/intercom/schema.json @@ -75,6 +75,517 @@ "web": { "type": "boolean" } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/intercom/ui-config.json b/src/configurations/destinations/intercom/ui-config.json index 2237511e4..44252c0d9 100644 --- a/src/configurations/destinations/intercom/ui-config.json +++ b/src/configurations/destinations/intercom/ui-config.json @@ -274,7 +274,15 @@ } } ] - }, + } + ] + }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [ { "title": "OneTrust cookie consent settings", "note": [ @@ -299,7 +307,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -343,6 +363,86 @@ } } ] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/june/db-config.json b/src/configurations/destinations/june/db-config.json index e7a3172e0..06c1a7e42 100644 --- a/src/configurations/destinations/june/db-config.json +++ b/src/configurations/destinations/june/db-config.json @@ -9,7 +9,8 @@ "whitelistedEvents", "blacklistedEvents", "eventFilteringOption", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -50,17 +51,17 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/june/schema.json b/src/configurations/destinations/june/schema.json index 92653df47..91f3eb58c 100644 --- a/src/configurations/destinations/june/schema.json +++ b/src/configurations/destinations/june/schema.json @@ -50,6 +50,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/june/ui-config.json b/src/configurations/destinations/june/ui-config.json index 4f6643c5c..e321fd1b8 100644 --- a/src/configurations/destinations/june/ui-config.json +++ b/src/configurations/destinations/june/ui-config.json @@ -101,7 +101,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/keen/db-config.json b/src/configurations/destinations/keen/db-config.json index 5e6c8db77..90b2282fc 100644 --- a/src/configurations/destinations/keen/db-config.json +++ b/src/configurations/destinations/keen/db-config.json @@ -14,7 +14,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -62,17 +63,17 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"] }, "secretKeys": [] } diff --git a/src/configurations/destinations/keen/ui-config.json b/src/configurations/destinations/keen/ui-config.json index 5b5313ffc..b53805a38 100644 --- a/src/configurations/destinations/keen/ui-config.json +++ b/src/configurations/destinations/keen/ui-config.json @@ -134,7 +134,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/kissmetrics/db-config.json b/src/configurations/destinations/kissmetrics/db-config.json index 440f3ffeb..0e1acb02e 100644 --- a/src/configurations/destinations/kissmetrics/db-config.json +++ b/src/configurations/destinations/kissmetrics/db-config.json @@ -10,7 +10,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -52,17 +53,17 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/kissmetrics/ui-config.json b/src/configurations/destinations/kissmetrics/ui-config.json index 269731bd7..eb7c1615c 100644 --- a/src/configurations/destinations/kissmetrics/ui-config.json +++ b/src/configurations/destinations/kissmetrics/ui-config.json @@ -108,7 +108,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/wootric/db-config.json b/src/configurations/destinations/wootric/db-config.json index a9262c2ac..70aac8f74 100644 --- a/src/configurations/destinations/wootric/db-config.json +++ b/src/configurations/destinations/wootric/db-config.json @@ -4,7 +4,13 @@ "config": { "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["username", "password", "accountToken", "oneTrustCookieCategories"], + "includeKeys": [ + "username", + "password", + "accountToken", + "oneTrustCookieCategories", + "consentManagement" + ], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -35,17 +41,17 @@ }, "destConfig": { "defaultConfig": ["username", "password", "accountToken", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["password", "accountToken"] } diff --git a/src/configurations/destinations/wootric/schema.json b/src/configurations/destinations/wootric/schema.json index 390600ade..fafadfb29 100644 --- a/src/configurations/destinations/wootric/schema.json +++ b/src/configurations/destinations/wootric/schema.json @@ -25,6 +25,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/wootric/ui-config.json b/src/configurations/destinations/wootric/ui-config.json index 9ee91d4ad..89465645c 100644 --- a/src/configurations/destinations/wootric/ui-config.json +++ b/src/configurations/destinations/wootric/ui-config.json @@ -51,7 +51,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/intercom.json b/test/data/validation/destinations/intercom.json index a79efea4e..c7cff3b4b 100644 --- a/test/data/validation/destinations/intercom.json +++ b/test/data/validation/destinations/intercom.json @@ -132,5 +132,118 @@ ] }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKey": "dfvgtbhXXXrefdbfgtXXXfghtgrfdv", + "appId": "bhjjknlmnbhjnklm", + "apiServer": "standard", + "apiVersion": "v2", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiKey": "dfvgtbhXXXrefdbfgtXXXfghtgrfdv", + "appId": "bhjjknlmnbhjnklm", + "apiServer": "standard", + "apiVersion": "v2", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKey": "dfvgtbhXXXrefdbfgtXXXfghtgrfdv", + "appId": "bhjjknlmnbhjnklm", + "apiServer": "standard", + "apiVersion": "v2", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiKey": "dfvgtbhXXXrefdbfgtXXXfghtgrfdv", + "appId": "bhjjknlmnbhjnklm", + "apiServer": "standard", + "apiVersion": "v2", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKey": "dfvgtbhXXXrefdbfgtXXXfghtgrfdv", + "appId": "bhjjknlmnbhjnklm", + "apiServer": "standard", + "apiVersion": "v2", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/june.json b/test/data/validation/destinations/june.json new file mode 100644 index 000000000..228d742f0 --- /dev/null +++ b/test/data/validation/destinations/june.json @@ -0,0 +1,100 @@ +[ + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKey": "test-host", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiKey": "test-host", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKey": "test-host", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiKey": "test-host", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKey": "test-host", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] + } +] diff --git a/test/data/validation/destinations/wootric.json b/test/data/validation/destinations/wootric.json index c296ffbab..bb7e808a9 100644 --- a/test/data/validation/destinations/wootric.json +++ b/test/data/validation/destinations/wootric.json @@ -33,5 +33,113 @@ }, "result": false, "err": ["accountToken must be string"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "username": "testUser@example.com", + "password": "Hn7zeXXX9FNYz$!J", + "accountToken": "NPS-8f8XX341", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "username": "testUser@example.com", + "password": "Hn7zeXXX9FNYz$!J", + "accountToken": "NPS-8f8XX341", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "username": "testUser@example.com", + "password": "Hn7zeXXX9FNYz$!J", + "accountToken": "NPS-8f8XX341", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "username": "testUser@example.com", + "password": "Hn7zeXXX9FNYz$!J", + "accountToken": "NPS-8f8XX341", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "username": "testUser@example.com", + "password": "Hn7zeXXX9FNYz$!J", + "accountToken": "NPS-8f8XX341", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From 7b1e8e1ff133f638f9cd0a90f262ede2ae7a8841 Mon Sep 17 00:00:00 2001 From: Alexandros Milaios Date: Thu, 20 Jun 2024 12:55:41 +0300 Subject: [PATCH 31/68] chore: deprecate klaviyo v1 (#1473) --- src/configurations/sources/singer_klaviyo/db-config.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/configurations/sources/singer_klaviyo/db-config.json b/src/configurations/sources/singer_klaviyo/db-config.json index dc41df265..c39925fb0 100644 --- a/src/configurations/sources/singer_klaviyo/db-config.json +++ b/src/configurations/sources/singer_klaviyo/db-config.json @@ -3,7 +3,9 @@ "category": "singer-protocol", "displayName": "Klaviyo", "options": { - "image": "rudderstack/source-klaviyo:v7.1.1-alpha.ea2e0337e7" + "image": "rudderstack/source-klaviyo:v7.1.1-alpha.ea2e0337e7", + "deprecated": true, + "deprecationLabel": "Klaviyo API v1 is deprecated and will be retired on June 30, 2024 . Please use Klaviyo v2 source instead." }, "type": "cloudSource" } From 53fee906a954fb95851beb0d202c2a84d68e6a02 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Thu, 20 Jun 2024 15:28:38 +0530 Subject: [PATCH 32/68] feat: added GCM support for 5 destinations - Batch 11 (#1483) --- .../destinations/klaviyo/db-config.json | 31 +- .../destinations/klaviyo/schema.json | 511 ++++++++++++++++++ .../destinations/klaviyo/ui-config.json | 104 +++- .../destinations/koala/db-config.json | 22 +- .../destinations/koala/schema.json | 511 ++++++++++++++++++ .../destinations/koala/ui-config.json | 101 +++- .../destinations/kochava/db-config.json | 37 +- .../destinations/kochava/ui-config.json | 93 +++- .../destinations/kustomer/db-config.json | 24 +- .../destinations/kustomer/ui-config.json | 93 +++- .../destinations/launchdarkly/db-config.json | 5 +- .../destinations/launchdarkly/ui-config.json | 93 +++- .../data/validation/destinations/klaviyo.json | 103 ++++ test/data/validation/destinations/koala.json | 98 ++++ 14 files changed, 1768 insertions(+), 58 deletions(-) diff --git a/src/configurations/destinations/klaviyo/db-config.json b/src/configurations/destinations/klaviyo/db-config.json index 10be2cc91..0c232d1c2 100644 --- a/src/configurations/destinations/klaviyo/db-config.json +++ b/src/configurations/destinations/klaviyo/db-config.json @@ -14,7 +14,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -60,17 +61,23 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode", "sendPageAsTrack", "additionalPageInfo"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "web": [ + "useNativeSDK", + "connectionMode", + "sendPageAsTrack", + "additionalPageInfo", + "consentManagement" + ], + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["privateApiKey"] } diff --git a/src/configurations/destinations/klaviyo/schema.json b/src/configurations/destinations/klaviyo/schema.json index 5abf2c9bf..49a9dd770 100644 --- a/src/configurations/destinations/klaviyo/schema.json +++ b/src/configurations/destinations/klaviyo/schema.json @@ -67,6 +67,517 @@ "sendPageAsTrack": { "type": "object", "properties": { "web": { "type": "boolean" } } }, "additionalPageInfo": { "type": "object", "properties": { "web": { "type": "boolean" } } }, "useNativeSDK": { "type": "object", "properties": { "web": { "type": "boolean" } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/klaviyo/ui-config.json b/src/configurations/destinations/klaviyo/ui-config.json index e2cf0127c..8d9f6cca8 100644 --- a/src/configurations/destinations/klaviyo/ui-config.json +++ b/src/configurations/destinations/klaviyo/ui-config.json @@ -190,7 +190,15 @@ } } ] - }, + } + ] + }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [ { "title": "OneTrust consent settings", "note": [ @@ -215,7 +223,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -241,6 +261,86 @@ "note": ["Add additional properties for the page events by enabling this field"] } ] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/koala/db-config.json b/src/configurations/destinations/koala/db-config.json index 220448b10..5df25d2d5 100644 --- a/src/configurations/destinations/koala/db-config.json +++ b/src/configurations/destinations/koala/db-config.json @@ -34,17 +34,17 @@ }, "destConfig": { "defaultConfig": ["publicKey", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] } }, "options": { "isBeta": true } diff --git a/src/configurations/destinations/koala/schema.json b/src/configurations/destinations/koala/schema.json index cb79d2d80..54a50aa94 100644 --- a/src/configurations/destinations/koala/schema.json +++ b/src/configurations/destinations/koala/schema.json @@ -20,6 +20,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/koala/ui-config.json b/src/configurations/destinations/koala/ui-config.json index c8cd1ba23..59b29038a 100644 --- a/src/configurations/destinations/koala/ui-config.json +++ b/src/configurations/destinations/koala/ui-config.json @@ -48,9 +48,10 @@ "note": "Manage the settings for your destination", "sections": [ { - "title": "Other settings", - "note": "Configure advanced RudderStack features here", - "icon": "otherSettings", + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", "groups": [ { "title": "OneTrust cookie consent settings", @@ -76,7 +77,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -87,6 +100,86 @@ "title": "SDK settings", "note": "not visible in the ui", "fields": [] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/kochava/db-config.json b/src/configurations/destinations/kochava/db-config.json index 04bca8e2a..38434ad3e 100644 --- a/src/configurations/destinations/kochava/db-config.json +++ b/src/configurations/destinations/kochava/db-config.json @@ -12,7 +12,8 @@ "blacklistedEvents", "whitelistedEvents", "eventFilteringOption", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -53,17 +54,29 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "android": ["useNativeSDK", "connectionMode"], - "flutter": ["useNativeSDK", "appTrackingTransparency", "skAdNetwork", "connectionMode"], - "ios": ["useNativeSDK", "appTrackingTransparency", "skAdNetwork", "connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["useNativeSDK", "connectionMode", "consentManagement"], + "flutter": [ + "useNativeSDK", + "appTrackingTransparency", + "skAdNetwork", + "connectionMode", + "consentManagement" + ], + "ios": [ + "useNativeSDK", + "appTrackingTransparency", + "skAdNetwork", + "connectionMode", + "consentManagement" + ], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/kochava/ui-config.json b/src/configurations/destinations/kochava/ui-config.json index 6fa7ac5a4..65529f7c0 100644 --- a/src/configurations/destinations/kochava/ui-config.json +++ b/src/configurations/destinations/kochava/ui-config.json @@ -113,7 +113,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/kustomer/db-config.json b/src/configurations/destinations/kustomer/db-config.json index 4ee7f5a53..c412532a6 100644 --- a/src/configurations/destinations/kustomer/db-config.json +++ b/src/configurations/destinations/kustomer/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -44,17 +44,17 @@ "genericScreen", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/kustomer/ui-config.json b/src/configurations/destinations/kustomer/ui-config.json index 4e447fc31..c0fe84908 100644 --- a/src/configurations/destinations/kustomer/ui-config.json +++ b/src/configurations/destinations/kustomer/ui-config.json @@ -88,7 +88,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/launchdarkly/db-config.json b/src/configurations/destinations/launchdarkly/db-config.json index e007ea1d3..d0e05c079 100644 --- a/src/configurations/destinations/launchdarkly/db-config.json +++ b/src/configurations/destinations/launchdarkly/db-config.json @@ -9,7 +9,8 @@ "whitelistedEvents", "oneTrustCookieCategories", "eventFilteringOption", - "anonymousUsersSharedKey" + "anonymousUsersSharedKey", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -24,7 +25,7 @@ "anonymousUsersSharedKey", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] } } } diff --git a/src/configurations/destinations/launchdarkly/ui-config.json b/src/configurations/destinations/launchdarkly/ui-config.json index 161f768d7..7de08ddcb 100644 --- a/src/configurations/destinations/launchdarkly/ui-config.json +++ b/src/configurations/destinations/launchdarkly/ui-config.json @@ -95,7 +95,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] }, diff --git a/test/data/validation/destinations/klaviyo.json b/test/data/validation/destinations/klaviyo.json index 14d2b3fc4..2cd785ea9 100644 --- a/test/data/validation/destinations/klaviyo.json +++ b/test/data/validation/destinations/klaviyo.json @@ -154,5 +154,108 @@ ] }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "publicApiKey": "WfO9f1", + "privateApiKey": "WfO9dsffsf1", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "publicApiKey": "WfO9f1", + "privateApiKey": "WfO9dsffsf1", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "publicApiKey": "WfO9f1", + "privateApiKey": "WfO9dsffsf1", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "publicApiKey": "WfO9f1", + "privateApiKey": "WfO9dsffsf1", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "publicApiKey": "WfO9f1", + "privateApiKey": "WfO9dsffsf1", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/koala.json b/test/data/validation/destinations/koala.json index fecf3f0b0..65d41d9c5 100644 --- a/test/data/validation/destinations/koala.json +++ b/test/data/validation/destinations/koala.json @@ -20,5 +20,103 @@ }, "result": false, "err": [" must have required property 'publicKey'"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "publicKey": "test-accessKey", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "publicKey": "test-accessKey", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "publicKey": "test-accessKey", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "publicKey": "test-accessKey", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "publicKey": "test-accessKey", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From 55af8c7f66fdfb26b3bc436d2122916ae42729dc Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Thu, 20 Jun 2024 15:36:28 +0530 Subject: [PATCH 33/68] feat: added GCM support for 5 destinations - Batch 12 (#1487) --- .../launchdarkly_audience/db-config.json | 4 +- .../launchdarkly_audience/schema.json | 97 ++++ .../launchdarkly_audience/ui-config.json | 101 +++- .../destinations/leanplum/db-config.json | 25 +- .../destinations/leanplum/schema.json | 511 ++++++++++++++++++ .../destinations/leanplum/ui-config.json | 104 +++- .../destinations/lemnisk/db-config.json | 25 +- .../destinations/lemnisk/schema.json | 511 ++++++++++++++++++ .../destinations/lemnisk/ui-config.json | 93 +++- .../destinations/livechat/db-config.json | 5 +- .../destinations/livechat/schema.json | 51 ++ .../destinations/livechat/ui-config.json | 93 +++- .../destinations/lotame/db-config.json | 7 +- .../destinations/lotame/ui-config.json | 93 +++- .../validation/destinations/leanplum.json | 108 ++++ .../data/validation/destinations/lemnisk.json | 133 +++++ .../validation/destinations/livechat.json | 108 ++++ 17 files changed, 2029 insertions(+), 40 deletions(-) diff --git a/src/configurations/destinations/launchdarkly_audience/db-config.json b/src/configurations/destinations/launchdarkly_audience/db-config.json index 427de6115..ed95d2d86 100644 --- a/src/configurations/destinations/launchdarkly_audience/db-config.json +++ b/src/configurations/destinations/launchdarkly_audience/db-config.json @@ -21,8 +21,8 @@ "audienceType", "oneTrustCookieCategories" ], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"] + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"] }, "secretKeys": ["accessToken"] }, diff --git a/src/configurations/destinations/launchdarkly_audience/schema.json b/src/configurations/destinations/launchdarkly_audience/schema.json index 754f6bd48..c920230d6 100644 --- a/src/configurations/destinations/launchdarkly_audience/schema.json +++ b/src/configurations/destinations/launchdarkly_audience/schema.json @@ -60,6 +60,103 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/launchdarkly_audience/ui-config.json b/src/configurations/destinations/launchdarkly_audience/ui-config.json index 56f2f006b..1da1b037b 100644 --- a/src/configurations/destinations/launchdarkly_audience/ui-config.json +++ b/src/configurations/destinations/launchdarkly_audience/ui-config.json @@ -111,9 +111,10 @@ ] }, { - "title": "Other settings", - "note": "Configure advanced RudderStack features here", - "icon": "otherSettings", + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", "groups": [ { "title": "OneTrust consent settings", @@ -139,7 +140,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -150,6 +163,86 @@ "title": "SDK settings", "note": "not visible in the ui", "fields": [] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/leanplum/db-config.json b/src/configurations/destinations/leanplum/db-config.json index 9deb04cb3..9caad5553 100644 --- a/src/configurations/destinations/leanplum/db-config.json +++ b/src/configurations/destinations/leanplum/db-config.json @@ -13,7 +13,8 @@ "whitelistedEvents", "eventFilteringOption", "oneTrustCookieCategories", - "connectionMode" + "connectionMode", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -71,17 +72,17 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "android": ["useNativeSDK", "useNativeSDKToSend", "connectionMode"], - "ios": ["useNativeSDK", "useNativeSDKToSend", "connectionMode"], - "flutter": ["useNativeSDK", "useNativeSDKToSend", "connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "reactnative": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"] + "android": ["useNativeSDK", "useNativeSDKToSend", "connectionMode", "consentManagement"], + "ios": ["useNativeSDK", "useNativeSDKToSend", "connectionMode", "consentManagement"], + "flutter": ["useNativeSDK", "useNativeSDKToSend", "connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"] }, "secretKeys": ["clientKey"] } diff --git a/src/configurations/destinations/leanplum/schema.json b/src/configurations/destinations/leanplum/schema.json index 84a970acd..a937821f5 100644 --- a/src/configurations/destinations/leanplum/schema.json +++ b/src/configurations/destinations/leanplum/schema.json @@ -71,6 +71,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/leanplum/ui-config.json b/src/configurations/destinations/leanplum/ui-config.json index 2eec2be1d..e378344c1 100644 --- a/src/configurations/destinations/leanplum/ui-config.json +++ b/src/configurations/destinations/leanplum/ui-config.json @@ -145,7 +145,15 @@ } } ] - }, + } + ] + }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [ { "title": "OneTrust consent settings", "note": [ @@ -170,7 +178,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -181,6 +201,86 @@ "title": "SDK settings", "note": "not visible in the ui", "fields": [] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/lemnisk/db-config.json b/src/configurations/destinations/lemnisk/db-config.json index b5c373063..fa9f14315 100644 --- a/src/configurations/destinations/lemnisk/db-config.json +++ b/src/configurations/destinations/lemnisk/db-config.json @@ -10,7 +10,8 @@ "whitelistedEvents", "blacklistedEvents", "eventFilteringOption", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -58,17 +59,17 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "sdkWriteKey", "accountId", "connectionMode"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "web": ["useNativeSDK", "sdkWriteKey", "accountId", "connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey", "passKey", "plWriteKey", "diapiWriteKey", "sdkWriteKey"] } diff --git a/src/configurations/destinations/lemnisk/schema.json b/src/configurations/destinations/lemnisk/schema.json index 3afe2b58f..bd2277ac7 100644 --- a/src/configurations/destinations/lemnisk/schema.json +++ b/src/configurations/destinations/lemnisk/schema.json @@ -65,6 +65,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/lemnisk/ui-config.json b/src/configurations/destinations/lemnisk/ui-config.json index c375943a6..9c9c83998 100644 --- a/src/configurations/destinations/lemnisk/ui-config.json +++ b/src/configurations/destinations/lemnisk/ui-config.json @@ -245,7 +245,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/livechat/db-config.json b/src/configurations/destinations/livechat/db-config.json index dedd159da..97e371bb3 100644 --- a/src/configurations/destinations/livechat/db-config.json +++ b/src/configurations/destinations/livechat/db-config.json @@ -13,7 +13,8 @@ "eventFilteringOption", "blacklistedEvents", "whitelistedEvents", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -31,7 +32,7 @@ "whitelistedEvents", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": ["licenseId"] } diff --git a/src/configurations/destinations/livechat/schema.json b/src/configurations/destinations/livechat/schema.json index 7725769ad..69e195b81 100644 --- a/src/configurations/destinations/livechat/schema.json +++ b/src/configurations/destinations/livechat/schema.json @@ -51,6 +51,57 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { "web": { "type": "string", "enum": ["device"] } } diff --git a/src/configurations/destinations/livechat/ui-config.json b/src/configurations/destinations/livechat/ui-config.json index 444cbca5b..9cf8951ce 100644 --- a/src/configurations/destinations/livechat/ui-config.json +++ b/src/configurations/destinations/livechat/ui-config.json @@ -244,7 +244,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/lotame/db-config.json b/src/configurations/destinations/lotame/db-config.json index d5fcde326..29ca49988 100644 --- a/src/configurations/destinations/lotame/db-config.json +++ b/src/configurations/destinations/lotame/db-config.json @@ -13,7 +13,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web", "amp"], @@ -33,8 +34,8 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"], - "amp": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"], + "amp": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": [] } diff --git a/src/configurations/destinations/lotame/ui-config.json b/src/configurations/destinations/lotame/ui-config.json index a137b4e1b..a9914b15e 100644 --- a/src/configurations/destinations/lotame/ui-config.json +++ b/src/configurations/destinations/lotame/ui-config.json @@ -168,7 +168,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/leanplum.json b/test/data/validation/destinations/leanplum.json index 60cd8ae18..ceeb027b3 100644 --- a/test/data/validation/destinations/leanplum.json +++ b/test/data/validation/destinations/leanplum.json @@ -244,5 +244,113 @@ }, "result": false, "err": ["oneTrustCookieCategories must be array"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "applicationId": "FDXXXAAF", + "clientKey": "ioXXv5j", + "isDevelop": true, + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "applicationId": "FDXXXAAF", + "clientKey": "ioXXv5j", + "isDevelop": true, + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "applicationId": "FDXXXAAF", + "clientKey": "ioXXv5j", + "isDevelop": true, + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "applicationId": "FDXXXAAF", + "clientKey": "ioXXv5j", + "isDevelop": true, + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "applicationId": "FDXXXAAF", + "clientKey": "ioXXv5j", + "isDevelop": true, + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/lemnisk.json b/test/data/validation/destinations/lemnisk.json index ed886136e..49b9fc7a2 100644 --- a/test/data/validation/destinations/lemnisk.json +++ b/test/data/validation/destinations/lemnisk.json @@ -53,5 +53,138 @@ "srcId": "" }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKey": "123ew", + "passKey": "3r2ewfq", + "cloudMode": "server", + "diapi": "https://mu-diapi.lemnisk.co/v3/data", + "pl": "", + "diapiWriteKey": "1324trfweqdw", + "plWriteKey": "", + "srcId": "", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiKey": "123ew", + "passKey": "3r2ewfq", + "cloudMode": "server", + "diapi": "https://mu-diapi.lemnisk.co/v3/data", + "pl": "", + "diapiWriteKey": "1324trfweqdw", + "plWriteKey": "", + "srcId": "", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKey": "123ew", + "passKey": "3r2ewfq", + "cloudMode": "server", + "diapi": "https://mu-diapi.lemnisk.co/v3/data", + "pl": "", + "diapiWriteKey": "1324trfweqdw", + "plWriteKey": "", + "srcId": "", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiKey": "123ew", + "passKey": "3r2ewfq", + "cloudMode": "server", + "diapi": "https://mu-diapi.lemnisk.co/v3/data", + "pl": "", + "diapiWriteKey": "1324trfweqdw", + "plWriteKey": "", + "srcId": "", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKey": "123ew", + "passKey": "3r2ewfq", + "cloudMode": "server", + "diapi": "https://mu-diapi.lemnisk.co/v3/data", + "pl": "", + "diapiWriteKey": "1324trfweqdw", + "plWriteKey": "", + "srcId": "", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/livechat.json b/test/data/validation/destinations/livechat.json index 86ed71815..f05c16227 100644 --- a/test/data/validation/destinations/livechat.json +++ b/test/data/validation/destinations/livechat.json @@ -59,5 +59,113 @@ "err": [ "licenseId must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\"" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "licenseId": "11XX4", + "recordLiveChatEvents": true, + "updateEventNames": true, + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "licenseId": "11XX4", + "recordLiveChatEvents": true, + "updateEventNames": true, + "consentManagement": { + "web": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "licenseId": "11XX4", + "recordLiveChatEvents": true, + "updateEventNames": true, + "consentManagement": { + "web": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0 must have required property 'resolutionStrategy'", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "licenseId": "11XX4", + "recordLiveChatEvents": true, + "updateEventNames": true, + "consentManagement": { + "web": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "licenseId": "11XX4", + "recordLiveChatEvents": true, + "updateEventNames": true, + "consentManagement": { + "web": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.web.0.provider must be equal to one of the allowed values"] } ] From af7909f7f7f5a40beaf04104d74eca930d143d42 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Thu, 20 Jun 2024 15:58:55 +0530 Subject: [PATCH 34/68] feat: added GCM support for 5 destinations - Batch 13 (#1488) --- .../destinations/lotame_mobile/db-config.json | 7 +- .../destinations/lotame_mobile/ui-config.json | 93 +++- .../destinations/lytics/db-config.json | 32 +- .../destinations/lytics/ui-config.json | 93 +++- .../destinations/mailchimp/db-config.json | 24 +- .../destinations/mailchimp/schema.json | 511 ++++++++++++++++++ .../destinations/mailchimp/ui-config.json | 93 +++- .../destinations/mailjet/db-config.json | 25 +- .../destinations/mailjet/schema.json | 511 ++++++++++++++++++ .../destinations/mailjet/ui-config.json | 93 +++- .../destinations/mailmodo/db-config.json | 24 +- .../destinations/mailmodo/schema.json | 511 ++++++++++++++++++ .../destinations/mailmodo/ui-config.json | 93 +++- .../validation/destinations/mailchimp.json | 108 ++++ .../data/validation/destinations/mailjet.json | 108 ++++ .../validation/destinations/mailmodo.json | 105 ++++ 16 files changed, 2375 insertions(+), 56 deletions(-) create mode 100644 test/data/validation/destinations/mailmodo.json diff --git a/src/configurations/destinations/lotame_mobile/db-config.json b/src/configurations/destinations/lotame_mobile/db-config.json index 196538306..8f9dca059 100644 --- a/src/configurations/destinations/lotame_mobile/db-config.json +++ b/src/configurations/destinations/lotame_mobile/db-config.json @@ -11,7 +11,8 @@ "blacklistedEvents", "whitelistedEvents", "eventFilteringOption", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["android", "ios"], @@ -29,8 +30,8 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "android": ["useNativeSDK", "connectionMode"], - "ios": ["useNativeSDK", "connectionMode"] + "android": ["useNativeSDK", "connectionMode", "consentManagement"], + "ios": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": [] } diff --git a/src/configurations/destinations/lotame_mobile/ui-config.json b/src/configurations/destinations/lotame_mobile/ui-config.json index 03a30dd5d..e79db06e9 100644 --- a/src/configurations/destinations/lotame_mobile/ui-config.json +++ b/src/configurations/destinations/lotame_mobile/ui-config.json @@ -138,7 +138,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/lytics/db-config.json b/src/configurations/destinations/lytics/db-config.json index f8e5bccc1..48e2185d2 100644 --- a/src/configurations/destinations/lytics/db-config.json +++ b/src/configurations/destinations/lytics/db-config.json @@ -13,7 +13,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -55,17 +56,24 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "accountId", "blockload", "loadid", "connectionMode"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "web": [ + "useNativeSDK", + "accountId", + "blockload", + "loadid", + "connectionMode", + "consentManagement" + ], + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/lytics/ui-config.json b/src/configurations/destinations/lytics/ui-config.json index 885d209fc..0207626f0 100644 --- a/src/configurations/destinations/lytics/ui-config.json +++ b/src/configurations/destinations/lytics/ui-config.json @@ -131,7 +131,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/mailchimp/db-config.json b/src/configurations/destinations/mailchimp/db-config.json index 785ee425d..62f0a4d02 100644 --- a/src/configurations/destinations/mailchimp/db-config.json +++ b/src/configurations/destinations/mailchimp/db-config.json @@ -6,7 +6,7 @@ "supportsVisualMapper": true, "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -43,17 +43,17 @@ "enableMergeFields", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/mailchimp/schema.json b/src/configurations/destinations/mailchimp/schema.json index d1d055eed..5e8cff4b8 100644 --- a/src/configurations/destinations/mailchimp/schema.json +++ b/src/configurations/destinations/mailchimp/schema.json @@ -29,6 +29,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/mailchimp/ui-config.json b/src/configurations/destinations/mailchimp/ui-config.json index f0b331c3f..7440dd1a0 100644 --- a/src/configurations/destinations/mailchimp/ui-config.json +++ b/src/configurations/destinations/mailchimp/ui-config.json @@ -61,7 +61,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/mailjet/db-config.json b/src/configurations/destinations/mailjet/db-config.json index c0817e0e5..bae4db75d 100644 --- a/src/configurations/destinations/mailjet/db-config.json +++ b/src/configurations/destinations/mailjet/db-config.json @@ -9,7 +9,8 @@ "apiSecret", "listId", "contactPropertiesMapping", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -47,17 +48,17 @@ "contactPropertiesMapping", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiSecret"] } diff --git a/src/configurations/destinations/mailjet/schema.json b/src/configurations/destinations/mailjet/schema.json index 5f6658e51..fa4427f1a 100644 --- a/src/configurations/destinations/mailjet/schema.json +++ b/src/configurations/destinations/mailjet/schema.json @@ -44,6 +44,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/mailjet/ui-config.json b/src/configurations/destinations/mailjet/ui-config.json index 314cec23a..b199ce6f5 100644 --- a/src/configurations/destinations/mailjet/ui-config.json +++ b/src/configurations/destinations/mailjet/ui-config.json @@ -67,7 +67,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/mailmodo/db-config.json b/src/configurations/destinations/mailmodo/db-config.json index 127a6e386..251afc70d 100644 --- a/src/configurations/destinations/mailmodo/db-config.json +++ b/src/configurations/destinations/mailmodo/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["apiKey", "listName", "oneTrustCookieCategories"], + "includeKeys": ["apiKey", "listName", "oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -35,17 +35,17 @@ }, "destConfig": { "defaultConfig": ["apiKey", "listName", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/mailmodo/schema.json b/src/configurations/destinations/mailmodo/schema.json index 3d5ac7977..bdaaa3ae6 100644 --- a/src/configurations/destinations/mailmodo/schema.json +++ b/src/configurations/destinations/mailmodo/schema.json @@ -24,6 +24,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/mailmodo/ui-config.json b/src/configurations/destinations/mailmodo/ui-config.json index faf818205..60fc1619a 100644 --- a/src/configurations/destinations/mailmodo/ui-config.json +++ b/src/configurations/destinations/mailmodo/ui-config.json @@ -43,7 +43,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/mailchimp.json b/test/data/validation/destinations/mailchimp.json index 08b43e963..87ea7ca3a 100644 --- a/test/data/validation/destinations/mailchimp.json +++ b/test/data/validation/destinations/mailchimp.json @@ -25,5 +25,113 @@ "enableMergeFields": false }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKey": "vewiunf4XXXXXwncewneowcncdonc-us20", + "audienceId": "dk2XXX0dn6", + "datacenterId": "us20", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiKey": "vewiunf4XXXXXwncewneowcncdonc-us20", + "audienceId": "dk2XXX0dn6", + "datacenterId": "us20", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKey": "vewiunf4XXXXXwncewneowcncdonc-us20", + "audienceId": "dk2XXX0dn6", + "datacenterId": "us20", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiKey": "vewiunf4XXXXXwncewneowcncdonc-us20", + "audienceId": "dk2XXX0dn6", + "datacenterId": "us20", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKey": "vewiunf4XXXXXwncewneowcncdonc-us20", + "audienceId": "dk2XXX0dn6", + "datacenterId": "us20", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/mailjet.json b/test/data/validation/destinations/mailjet.json index 2de69109c..4ee326084 100644 --- a/test/data/validation/destinations/mailjet.json +++ b/test/data/validation/destinations/mailjet.json @@ -34,5 +34,113 @@ "listId": "58345" }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKey": "a8df6629b0be0cf6xxa2XXXXX20e929_811168a9", + "apiSecret": "jw38478843bviubXXXXXew8iurf387847389574", + "listId": "58345", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiKey": "a8df6629b0be0cf6xxa2XXXXX20e929_811168a9", + "apiSecret": "jw38478843bviubXXXXXew8iurf387847389574", + "listId": "58345", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKey": "a8df6629b0be0cf6xxa2XXXXX20e929_811168a9", + "apiSecret": "jw38478843bviubXXXXXew8iurf387847389574", + "listId": "58345", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiKey": "a8df6629b0be0cf6xxa2XXXXX20e929_811168a9", + "apiSecret": "jw38478843bviubXXXXXew8iurf387847389574", + "listId": "58345", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKey": "a8df6629b0be0cf6xxa2XXXXX20e929_811168a9", + "apiSecret": "jw38478843bviubXXXXXew8iurf387847389574", + "listId": "58345", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/mailmodo.json b/test/data/validation/destinations/mailmodo.json new file mode 100644 index 000000000..ae217546c --- /dev/null +++ b/test/data/validation/destinations/mailmodo.json @@ -0,0 +1,105 @@ +[ + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKey": "test-host", + "listName": "test-database", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiKey": "test-host", + "listName": "test-database", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKey": "test-host", + "listName": "test-database", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiKey": "test-host", + "listName": "test-database", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKey": "test-host", + "listName": "test-database", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] + } +] From 944564c03d3ddc2e731abaf7cc678b01584e2748 Mon Sep 17 00:00:00 2001 From: Utsab Chowdhury Date: Fri, 21 Jun 2024 12:31:08 +0530 Subject: [PATCH 35/68] chore: fix ga4 defaults --- .../destinations/ga4_v2/ui-default.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/configurations/destinations/ga4_v2/ui-default.json b/src/configurations/destinations/ga4_v2/ui-default.json index 2e9b453ad..ad33c5d29 100644 --- a/src/configurations/destinations/ga4_v2/ui-default.json +++ b/src/configurations/destinations/ga4_v2/ui-default.json @@ -337,8 +337,8 @@ "eventProperties": [ { "from": "$.properties.currency", "to": "$.events[0].params.currency", "required": true }, { - "from": "$.context.traits.*", - "to": "$.user_properties.*.value", + "from": "$.properties.revenue", + "to": "$.events[0].params.value", "required": true }, { @@ -497,8 +497,8 @@ "eventProperties": [ { "from": "$.properties.revenue", "to": "$.events[0].params.value", "required": true }, { - "from": "$.context.traits.*", - "to": "$.user_properties.*.value", + "from": "$.properties.currency", + "to": "$.events[0].params.currency", "required": true }, { @@ -657,8 +657,8 @@ "eventProperties": [ { "from": "$.properties.currency", "to": "$.events[0].params.currency", "required": true }, { - "from": "$.context.traits.*", - "to": "$.user_properties.*.value", + "from": "$.properties.revenue", + "to": "$.events[0].params.value", "required": true }, { From d8d02c6a6adee382874c69e186b2f995fcb32a11 Mon Sep 17 00:00:00 2001 From: Utsab Chowdhury Date: Fri, 21 Jun 2024 12:32:18 +0530 Subject: [PATCH 36/68] chore: update ui-config --- .../destinations/ga4_v2/ui-config.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/configurations/destinations/ga4_v2/ui-config.json b/src/configurations/destinations/ga4_v2/ui-config.json index 8ef055d71..8eae0eba4 100644 --- a/src/configurations/destinations/ga4_v2/ui-config.json +++ b/src/configurations/destinations/ga4_v2/ui-config.json @@ -948,8 +948,8 @@ "required": true }, { - "from": "$.context.traits.*", - "to": "$.user_properties.*.value", + "from": "$.properties.revenue", + "to": "$.events[0].params.value", "required": true }, { @@ -1120,8 +1120,8 @@ "required": true }, { - "from": "$.context.traits.*", - "to": "$.user_properties.*.value", + "from": "$.properties.currency", + "to": "$.events[0].params.currency", "required": true }, { @@ -1292,8 +1292,8 @@ "required": true }, { - "from": "$.context.traits.*", - "to": "$.user_properties.*.value", + "from": "$.properties.revenue", + "to": "$.events[0].params.value", "required": true }, { From 70439133cf813cec51cf9377ecfd2f3607f96ef4 Mon Sep 17 00:00:00 2001 From: shrouti1507 <60211312+shrouti1507@users.noreply.github.com> Date: Fri, 21 Jun 2024 12:46:03 +0530 Subject: [PATCH 37/68] feat: onboarding clicksend (#1464) --- .../destinations/clicksend/db-config.json | 70 ++++++++ .../destinations/clicksend/schema.json | 95 ++++++++++ .../destinations/clicksend/ui-config.json | 170 ++++++++++++++++++ .../validation/destinations/clicksend.json | 35 ++++ 4 files changed, 370 insertions(+) create mode 100644 src/configurations/destinations/clicksend/db-config.json create mode 100644 src/configurations/destinations/clicksend/schema.json create mode 100644 src/configurations/destinations/clicksend/ui-config.json create mode 100644 test/data/validation/destinations/clicksend.json diff --git a/src/configurations/destinations/clicksend/db-config.json b/src/configurations/destinations/clicksend/db-config.json new file mode 100644 index 000000000..f9f2b8a5d --- /dev/null +++ b/src/configurations/destinations/clicksend/db-config.json @@ -0,0 +1,70 @@ +{ + "name": "CLICKSEND", + "displayName": "Clicksend", + "config": { + "cdkV2Enabled": true, + "transformAtV1": "router", + "saveDestinationResponse": true, + "excludeKeys": [], + "supportedSourceTypes": [ + "android", + "ios", + "unity", + "amp", + "reactnative", + "flutter", + "cordova", + "web", + "cloud", + "shopify", + "warehouse" + ], + "supportedConnectionModes": { + "android": ["cloud"], + "ios": ["cloud"], + "web": ["cloud"], + "unity": ["cloud"], + "amp": ["cloud"], + "reactnative": ["cloud"], + "flutter": ["cloud"], + "cordova": ["cloud"], + "shopify": ["cloud"], + "cloud": ["cloud"], + "warehouse": ["cloud"] + }, + "supportedMessageTypes": { + "cloud": ["track", "identify"] + }, + "destConfig": { + "defaultConfig": [ + "clicksendUsername", + "clicksendPassword", + "defaultCampaignScheduleUnit", + "defaultCampaignSchedule", + "defaultSource", + "defaultSenderId", + "oneTrustCookieCategories" + ], + "android": ["connectionMode"], + "ios": ["connectionMode"], + "unity": ["connectionMode"], + "amp": ["connectionMode"], + "reactnative": ["connectionMode"], + "flutter": ["connectionMode"], + "cordova": ["connectionMode"], + "web": ["connectionMode"], + "cloud": ["connectionMode"], + "shopify": ["connectionMode"], + "warehouse": ["connectionMode"] + }, + "secretKeys": [ + "clicksendUsername", + "clicksendPassword", + "defaultSenderId", + "defaultSenderPhoneNumber" + ] + }, + "options": { + "isBeta": true + } +} diff --git a/src/configurations/destinations/clicksend/schema.json b/src/configurations/destinations/clicksend/schema.json new file mode 100644 index 000000000..853b6e056 --- /dev/null +++ b/src/configurations/destinations/clicksend/schema.json @@ -0,0 +1,95 @@ +{ + "configSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "required": ["clicksendUsername", "clicksendPassword"], + "type": "object", + "properties": { + "clicksendUsername": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + }, + "clicksendPassword": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + }, + "defaultCampaignSchedule": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "defaultCampaignScheduleUnit": { + "type": "string", + "enum": ["day", "minute"], + "default": "minute" + }, + "defaultSource": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "defaultSenderId": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "oneTrustCookieCategories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "connectionMode": { + "type": "object", + "properties": { + "android": { + "type": "string", + "enum": ["cloud"] + }, + "ios": { + "type": "string", + "enum": ["cloud"] + }, + "web": { + "type": "string", + "enum": ["cloud"] + }, + "unity": { + "type": "string", + "enum": ["cloud"] + }, + "amp": { + "type": "string", + "enum": ["cloud"] + }, + "reactnative": { + "type": "string", + "enum": ["cloud"] + }, + "flutter": { + "type": "string", + "enum": ["cloud"] + }, + "cordova": { + "type": "string", + "enum": ["cloud"] + }, + "shopify": { + "type": "string", + "enum": ["cloud"] + }, + "cloud": { + "type": "string", + "enum": ["cloud"] + }, + "warehouse": { + "type": "string", + "enum": ["cloud"] + } + } + } + } + } +} diff --git a/src/configurations/destinations/clicksend/ui-config.json b/src/configurations/destinations/clicksend/ui-config.json new file mode 100644 index 000000000..84a84027b --- /dev/null +++ b/src/configurations/destinations/clicksend/ui-config.json @@ -0,0 +1,170 @@ +{ + "uiConfig": { + "baseTemplate": [ + { + "title": "Initial setup", + "note": "Review how this destination is set up", + "sections": [ + { + "groups": [ + { + "title": "Connection Settings", + "note": "Update your connection settings here", + "icon": "settings", + "fields": [ + { + "type": "textInput", + "label": "Clicksend API Username", + "configKey": "clicksendUsername", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "secret": true, + "regexErrorMessage": "Invalid Username", + "placeholder": "e.g. dummy_username" + }, + { + "type": "textInput", + "label": "Clicksend API key", + "configKey": "clicksendPassword", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "secret": true, + "regexErrorMessage": "Invalid User Secret", + "placeholder": "e.g. dummy_userSecret" + } + ] + } + ] + }, + { + "groups": [ + { + "title": "Connection mode", + "note": [ + "Update how you want to route events from your source to destination. ", + { + "text": "Get help deciding.", + "link": "https://www.rudderstack.com/docs/destinations/rudderstack-connection-modes/" + } + ], + "icon": "sliders", + "fields": [] + } + ] + } + ] + }, + { + "title": "Configuration settings", + "note": "Manage the settings for your destination", + "sections": [ + { + "title": "Destination settings", + "note": "Configure advanced destination-specific settings here", + "icon": "settings", + "groups": [ + { + "title": "SMS Schedule Settings", + "fields": [ + { + "type": "singleSelect", + "label": "Scheduling Unit", + "value": "defaultCampaignScheduleUnit", + "options": [ + { + "name": "day(s)", + "value": "day" + }, + { + "name": "minute(s)", + "value": "minute" + } + ], + "defaultOption": { + "name": "minute(s)", + "value": "minute" + }, + "required": true + }, + { + "type": "textInput", + "label": "Default scheduling tenure", + "configKey": "defaultCampaignSchedule", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "secret": true, + "regexErrorMessage": "Invalid scheduling tenure", + "placeholder": "e.g. 0" + } + ] + }, + { + "title": "Default Source Setting", + "fields": [ + { + "type": "textInput", + "label": "Default source", + "configKey": "defaultSource", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "secret": true, + "regexErrorMessage": "Invalid source", + "placeholder": "e.g. php" + } + ] + }, + { + "title": "Optional configuration settings", + "fields": [ + { + "type": "textInput", + "label": "Default Sender ID", + "configKey": "defaultSenderId", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "secret": true, + "regexErrorMessage": "Invalid sender Email", + "placeholder": "e.g. abc@gmail.com" + } + ] + } + ] + }, + { + "title": "Other settings", + "note": "Configure advanced RudderStack features here", + "icon": "otherSettings", + "groups": [ + { + "title": "OneTrust consent settings", + "note": [ + "Enter your OneTrust consent category IDs if you have them configured. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + { + "text": "Learn more ", + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/consent-manager/onetrust/" + }, + "about RudderStack's OneTrust Consent Management feature." + ], + "fields": [ + { + "type": "tagInput", + "label": "Consent categories", + "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry.", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: C0001", + "default": [ + { + "oneTrustCookieCategory": "" + } + ] + } + ] + } + ] + } + ] + } + ], + "sdkTemplate": { + "title": "Web SDK settings", + "note": "not visible in the ui", + "fields": [] + } + } +} diff --git a/test/data/validation/destinations/clicksend.json b/test/data/validation/destinations/clicksend.json new file mode 100644 index 000000000..eb0c08b22 --- /dev/null +++ b/test/data/validation/destinations/clicksend.json @@ -0,0 +1,35 @@ +[ + { + "config": { + "clicksendUsername": "dummy", + "clicksendPassword": "dummy", + "defaultCampaignScheduleUnit": "day", + "defaultCampaignSchedule": "2", + "defaultSource": "php", + "defaultSenderId": "abc@gmail.com", + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "Marketing" + } + ] + }, + "result": true + }, + { + "config": { + "clicksendUsername": "dummy", + "clicksendPassword": "dummy", + "defaultCampaignScheduleUnit": "abc", + "defaultCampaignSchedule": "2", + "defaultSource": "php", + "defaultSenderId": "abc@gmail.com", + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "Marketing" + } + ] + }, + "result": false, + "err": ["defaultCampaignScheduleUnit must be equal to one of the allowed values"] + } +] From 78680d8b230d7d8d2f4f0722a1deaef1720f0567 Mon Sep 17 00:00:00 2001 From: Utsab Chowdhury Date: Fri, 21 Jun 2024 15:05:39 +0530 Subject: [PATCH 38/68] chore: update ui-config --- .../destinations/ga4_v2/ui-config.json | 168 ++++++++---------- .../destinations/ga4_v2/ui-default.json | 168 ++++++++---------- 2 files changed, 152 insertions(+), 184 deletions(-) diff --git a/src/configurations/destinations/ga4_v2/ui-config.json b/src/configurations/destinations/ga4_v2/ui-config.json index 8eae0eba4..623ce6912 100644 --- a/src/configurations/destinations/ga4_v2/ui-config.json +++ b/src/configurations/destinations/ga4_v2/ui-config.json @@ -683,69 +683,69 @@ "to": "$.events[0].params.item_list_name" }, { - "from": "$.properties.products[*].product_id", + "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", "required": true }, { - "from": "$.properties.products[*].name", + "from": "$.properties.name", "to": "$.events[0].params.items[*].item_name", "required": true }, { - "from": "$.properties.products[*].coupon", + "from": "$.properties.coupon", "to": "$.events[0].params.items[*].coupon" }, { - "from": "$.properties.products[*].price", + "from": "$.properties.price", "to": "$.events[0].params.items[*].price" }, { - "from": "$.properties.products[*].position", + "from": "$.properties.position", "to": "$.events[0].params.items[*].position" }, { - "from": "$.properties.products[*].quantity", + "from": "$.properties.quantity", "to": "$.events[0].params.items[*].quantity" }, { - "from": "$.properties.products[*].affiliation", + "from": "$.properties.affiliation", "to": "$.events[0].params.items[*].affiliation" }, { - "from": "$.properties.products[*].currency", + "from": "$.properties.currency", "to": "$.events[0].params.items[*].currency" }, { - "from": "$.properties.products[*].discount", + "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, { - "from": "$.properties.products[*].item_category2", + "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" }, { - "from": "$.properties.products[*].item_category3", + "from": "$.properties.item_category3", "to": "$.events[0].params.items[*].item_category3" }, { - "from": "$.properties.products[*].item_category4", + "from": "$.properties.item_category4", "to": "$.events[0].params.items[*].item_category4" }, { - "from": "$.properties.products[*].item_category5", + "from": "$.properties.item_category5", "to": "$.events[0].params.items[*].item_category5" }, { - "from": "$.properties.products[*].item_list_id", + "from": "$.properties.item_list_id", "to": "$.events[0].params.items[*].item_list_id" }, { - "from": "$.properties.products[*].item_list_name", + "from": "$.properties.item_list_name", "to": "$.events[0].params.items[*].item_list_name" }, { - "from": "$.properties.products[*].location_id", + "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, { @@ -953,69 +953,65 @@ "required": true }, { - "from": "$.properties.products[*].product_id", + "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", "required": true }, { - "from": "$.properties.products[*].name", + "from": "$.properties.name", "to": "$.events[0].params.items[*].item_name", "required": true }, { - "from": "$.properties.products[*].coupon", + "from": "$.properties.coupon", "to": "$.events[0].params.items[*].coupon" }, { - "from": "$.properties.products[*].price", + "from": "$.properties.price", "to": "$.events[0].params.items[*].price" }, { - "from": "$.properties.products[*].position", + "from": "$.properties.position", "to": "$.events[0].params.items[*].position" }, { - "from": "$.properties.products[*].quantity", + "from": "$.properties.quantity", "to": "$.events[0].params.items[*].quantity" }, { - "from": "$.properties.products[*].affiliation", + "from": "$.properties.affiliation", "to": "$.events[0].params.items[*].affiliation" }, { - "from": "$.properties.products[*].currency", - "to": "$.events[0].params.items[*].currency" - }, - { - "from": "$.properties.products[*].discount", + "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, { - "from": "$.properties.products[*].item_category2", + "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" }, { - "from": "$.properties.products[*].item_category3", + "from": "$.properties.item_category3", "to": "$.events[0].params.items[*].item_category3" }, { - "from": "$.properties.products[*].item_category4", + "from": "$.properties.item_category4", "to": "$.events[0].params.items[*].item_category4" }, { - "from": "$.properties.products[*].item_category5", + "from": "$.properties.item_category5", "to": "$.events[0].params.items[*].item_category5" }, { - "from": "$.properties.products[*].item_list_id", + "from": "$.properties.item_list_id", "to": "$.events[0].params.items[*].item_list_id" }, { - "from": "$.properties.products[*].item_list_name", + "from": "$.properties.item_list_name", "to": "$.events[0].params.items[*].item_list_name" }, { - "from": "$.properties.products[*].location_id", + "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, { @@ -1039,69 +1035,65 @@ "required": true }, { - "from": "$.properties.products[*].product_id", + "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", "required": true }, { - "from": "$.properties.products[*].name", + "from": "$.properties.name", "to": "$.events[0].params.items[*].item_name", "required": true }, { - "from": "$.properties.products[*].coupon", + "from": "$.properties.coupon", "to": "$.events[0].params.items[*].coupon" }, { - "from": "$.properties.products[*].price", + "from": "$.properties.price", "to": "$.events[0].params.items[*].price" }, { - "from": "$.properties.products[*].position", + "from": "$.properties.position", "to": "$.events[0].params.items[*].position" }, { - "from": "$.properties.products[*].quantity", + "from": "$.properties.quantity", "to": "$.events[0].params.items[*].quantity" }, { - "from": "$.properties.products[*].affiliation", + "from": "$.properties.affiliation", "to": "$.events[0].params.items[*].affiliation" }, { - "from": "$.properties.products[*].currency", - "to": "$.events[0].params.items[*].currency" - }, - { - "from": "$.properties.products[*].discount", + "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, { - "from": "$.properties.products[*].item_category2", + "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" }, { - "from": "$.properties.products[*].item_category3", + "from": "$.properties.item_category3", "to": "$.events[0].params.items[*].item_category3" }, { - "from": "$.properties.products[*].item_category4", + "from": "$.properties.item_category4", "to": "$.events[0].params.items[*].item_category4" }, { - "from": "$.properties.products[*].item_category5", + "from": "$.properties.item_category5", "to": "$.events[0].params.items[*].item_category5" }, { - "from": "$.properties.products[*].item_list_id", + "from": "$.properties.item_list_id", "to": "$.events[0].params.items[*].item_list_id" }, { - "from": "properties.products[*].item_list_name", + "from": "properties.item_list_name", "to": "$.events[0].params.items[*].item_list_name" }, { - "from": "$.properties.products[*].location_id", + "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, { @@ -1125,69 +1117,65 @@ "required": true }, { - "from": "$.properties.products[*].product_id", + "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", "required": true }, { - "from": "$.properties.products[*].name", + "from": "$.properties.name", "to": "$.events[0].params.items[*].item_name", "required": true }, { - "from": "$.properties.products[*].coupon", + "from": "$.properties.coupon", "to": "$.events[0].params.items[*].coupon" }, { - "from": "$.properties.products[*].price", + "from": "$.properties.price", "to": "$.events[0].params.items[*].price" }, { - "from": "$.properties.products[*].position", + "from": "$.properties.position", "to": "$.events[0].params.items[*].position" }, { - "from": "$.properties.products[*].quantity", + "from": "$.properties.quantity", "to": "$.events[0].params.items[*].quantity" }, { - "from": "$.properties.products[*].affiliation", + "from": "$.properties.affiliation", "to": "$.events[0].params.items[*].affiliation" }, { - "from": "$.properties.products[*].currency", - "to": "$.events[0].params.items[*].currency" - }, - { - "from": "$.properties.products[*].discount", + "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, { - "from": "$.properties.products[*].item_category2", + "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" }, { - "from": "$.properties.products[*].item_category3", + "from": "$.properties.item_category3", "to": "$.events[0].params.items[*].item_category3" }, { - "from": "$.properties.products[*].item_category4", + "from": "$.properties.item_category4", "to": "$.events[0].params.items[*].item_category4" }, { - "from": "$.properties.products[*].item_category5", + "from": "$.properties.item_category5", "to": "$.events[0].params.items[*].item_category5" }, { - "from": "$.properties.products[*].item_list_id", + "from": "$.properties.item_list_id", "to": "$.events[0].params.items[*].item_list_id" }, { - "from": "properties.products[*].item_list_name", + "from": "properties.item_list_name", "to": "$.events[0].params.items[*].item_list_name" }, { - "from": "$.properties.products[*].location_id", + "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, { @@ -1297,69 +1285,65 @@ "required": true }, { - "from": "$.properties.products[*].product_id", + "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", "required": true }, { - "from": "$.properties.products[*].name", + "from": "$.properties.name", "to": "$.events[0].params.items[*].item_name", "required": true }, { - "from": "$.properties.products[*].coupon", + "from": "$.properties.coupon", "to": "$.events[0].params.items[*].coupon" }, { - "from": "$.properties.products[*].price", + "from": "$.properties.price", "to": "$.events[0].params.items[*].price" }, { - "from": "$.properties.products[*].position", + "from": "$.properties.position", "to": "$.events[0].params.items[*].position" }, { - "from": "$.properties.products[*].quantity", + "from": "$.properties.quantity", "to": "$.events[0].params.items[*].quantity" }, { - "from": "$.properties.products[*].affiliation", + "from": "$.properties.affiliation", "to": "$.events[0].params.items[*].affiliation" }, { - "from": "$.properties.products[*].currency", - "to": "$.events[0].params.items[*].currency" - }, - { - "from": "$.properties.products[*].discount", + "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, { - "from": "$.properties.products[*].item_category2", + "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" }, { - "from": "$.properties.products[*].item_category3", + "from": "$.properties.item_category3", "to": "$.events[0].params.items[*].item_category3" }, { - "from": "$.properties.products[*].item_category4", + "from": "$.properties.item_category4", "to": "$.events[0].params.items[*].item_category4" }, { - "from": "$.properties.products[*].item_category5", + "from": "$.properties.item_category5", "to": "$.events[0].params.items[*].item_category5" }, { - "from": "$.properties.products[*].item_list_id", + "from": "$.properties.item_list_id", "to": "$.events[0].params.items[*].item_list_id" }, { - "from": "properties.products[*].item_list_name", + "from": "properties.item_list_name", "to": "$.events[0].params.items[*].item_list_name" }, { - "from": "$.properties.products[*].location_id", + "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, { diff --git a/src/configurations/destinations/ga4_v2/ui-default.json b/src/configurations/destinations/ga4_v2/ui-default.json index ad33c5d29..c341844ab 100644 --- a/src/configurations/destinations/ga4_v2/ui-default.json +++ b/src/configurations/destinations/ga4_v2/ui-default.json @@ -100,69 +100,69 @@ { "from": "$.properties.list_id", "to": "$.events[0].params.item_list_id" }, { "from": "$.properties.category", "to": "$.events[0].params.item_list_name" }, { - "from": "$.properties.products[*].product_id", + "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", "required": true }, { - "from": "$.properties.products[*].name", + "from": "$.properties.name", "to": "$.events[0].params.items[*].item_name", "required": true }, { - "from": "$.properties.products[*].coupon", + "from": "$.properties.coupon", "to": "$.events[0].params.items[*].coupon" }, { - "from": "$.properties.products[*].price", + "from": "$.properties.price", "to": "$.events[0].params.items[*].price" }, { - "from": "$.properties.products[*].position", + "from": "$.properties.position", "to": "$.events[0].params.items[*].position" }, { - "from": "$.properties.products[*].quantity", + "from": "$.properties.quantity", "to": "$.events[0].params.items[*].quantity" }, { - "from": "$.properties.products[*].affiliation", + "from": "$.properties.affiliation", "to": "$.events[0].params.items[*].affiliation" }, { - "from": "$.properties.products[*].currency", + "from": "$.properties.currency", "to": "$.events[0].params.items[*].currency" }, { - "from": "$.properties.products[*].discount", + "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, { - "from": "$.properties.products[*].item_category2", + "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" }, { - "from": "$.properties.products[*].item_category3", + "from": "$.properties.item_category3", "to": "$.events[0].params.items[*].item_category3" }, { - "from": "$.properties.products[*].item_category4", + "from": "$.properties.item_category4", "to": "$.events[0].params.items[*].item_category4" }, { - "from": "$.properties.products[*].item_category5", + "from": "$.properties.item_category5", "to": "$.events[0].params.items[*].item_category5" }, { - "from": "$.properties.products[*].item_list_id", + "from": "$.properties.item_list_id", "to": "$.events[0].params.items[*].item_list_id" }, { - "from": "$.properties.products[*].item_list_name", + "from": "$.properties.item_list_name", "to": "$.events[0].params.items[*].item_list_name" }, { - "from": "$.properties.products[*].location_id", + "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, { @@ -342,69 +342,65 @@ "required": true }, { - "from": "$.properties.products[*].product_id", + "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", "required": true }, { - "from": "$.properties.products[*].name", + "from": "$.properties.name", "to": "$.events[0].params.items[*].item_name", "required": true }, { - "from": "$.properties.products[*].coupon", + "from": "$.properties.coupon", "to": "$.events[0].params.items[*].coupon" }, { - "from": "$.properties.products[*].price", + "from": "$.properties.price", "to": "$.events[0].params.items[*].price" }, { - "from": "$.properties.products[*].position", + "from": "$.properties.position", "to": "$.events[0].params.items[*].position" }, { - "from": "$.properties.products[*].quantity", + "from": "$.properties.quantity", "to": "$.events[0].params.items[*].quantity" }, { - "from": "$.properties.products[*].affiliation", + "from": "$.properties.affiliation", "to": "$.events[0].params.items[*].affiliation" }, { - "from": "$.properties.products[*].currency", - "to": "$.events[0].params.items[*].currency" - }, - { - "from": "$.properties.products[*].discount", + "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, { - "from": "$.properties.products[*].item_category2", + "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" }, { - "from": "$.properties.products[*].item_category3", + "from": "$.properties.item_category3", "to": "$.events[0].params.items[*].item_category3" }, { - "from": "$.properties.products[*].item_category4", + "from": "$.properties.item_category4", "to": "$.events[0].params.items[*].item_category4" }, { - "from": "$.properties.products[*].item_category5", + "from": "$.properties.item_category5", "to": "$.events[0].params.items[*].item_category5" }, { - "from": "$.properties.products[*].item_list_id", + "from": "$.properties.item_list_id", "to": "$.events[0].params.items[*].item_list_id" }, { - "from": "$.properties.products[*].item_list_name", + "from": "$.properties.item_list_name", "to": "$.events[0].params.items[*].item_list_name" }, { - "from": "$.properties.products[*].location_id", + "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, { @@ -420,69 +416,65 @@ { "from": "$.properties.currency", "to": "$.events[0].params.currency", "required": true }, { "from": "$.properties.revenue", "to": "$.events[0].params.value", "required": true }, { - "from": "$.properties.products[*].product_id", + "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", "required": true }, { - "from": "$.properties.products[*].name", + "from": "$.properties.name", "to": "$.events[0].params.items[*].item_name", "required": true }, { - "from": "$.properties.products[*].coupon", + "from": "$.properties.coupon", "to": "$.events[0].params.items[*].coupon" }, { - "from": "$.properties.products[*].price", + "from": "$.properties.price", "to": "$.events[0].params.items[*].price" }, { - "from": "$.properties.products[*].position", + "from": "$.properties.position", "to": "$.events[0].params.items[*].position" }, { - "from": "$.properties.products[*].quantity", + "from": "$.properties.quantity", "to": "$.events[0].params.items[*].quantity" }, { - "from": "$.properties.products[*].affiliation", + "from": "$.properties.affiliation", "to": "$.events[0].params.items[*].affiliation" }, { - "from": "$.properties.products[*].currency", - "to": "$.events[0].params.items[*].currency" - }, - { - "from": "$.properties.products[*].discount", + "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, { - "from": "$.properties.products[*].item_category2", + "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" }, { - "from": "$.properties.products[*].item_category3", + "from": "$.properties.item_category3", "to": "$.events[0].params.items[*].item_category3" }, { - "from": "$.properties.products[*].item_category4", + "from": "$.properties.item_category4", "to": "$.events[0].params.items[*].item_category4" }, { - "from": "$.properties.products[*].item_category5", + "from": "$.properties.item_category5", "to": "$.events[0].params.items[*].item_category5" }, { - "from": "$.properties.products[*].item_list_id", + "from": "$.properties.item_list_id", "to": "$.events[0].params.items[*].item_list_id" }, { - "from": "properties.products[*].item_list_name", + "from": "properties.item_list_name", "to": "$.events[0].params.items[*].item_list_name" }, { - "from": "$.properties.products[*].location_id", + "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, { @@ -502,69 +494,65 @@ "required": true }, { - "from": "$.properties.products[*].product_id", + "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", "required": true }, { - "from": "$.properties.products[*].name", + "from": "$.properties.name", "to": "$.events[0].params.items[*].item_name", "required": true }, { - "from": "$.properties.products[*].coupon", + "from": "$.properties.coupon", "to": "$.events[0].params.items[*].coupon" }, { - "from": "$.properties.products[*].price", + "from": "$.properties.price", "to": "$.events[0].params.items[*].price" }, { - "from": "$.properties.products[*].position", + "from": "$.properties.position", "to": "$.events[0].params.items[*].position" }, { - "from": "$.properties.products[*].quantity", + "from": "$.properties.quantity", "to": "$.events[0].params.items[*].quantity" }, { - "from": "$.properties.products[*].affiliation", + "from": "$.properties.affiliation", "to": "$.events[0].params.items[*].affiliation" }, { - "from": "$.properties.products[*].currency", - "to": "$.events[0].params.items[*].currency" - }, - { - "from": "$.properties.products[*].discount", + "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, { - "from": "$.properties.products[*].item_category2", + "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" }, { - "from": "$.properties.products[*].item_category3", + "from": "$.properties.item_category3", "to": "$.events[0].params.items[*].item_category3" }, { - "from": "$.properties.products[*].item_category4", + "from": "$.properties.item_category4", "to": "$.events[0].params.items[*].item_category4" }, { - "from": "$.properties.products[*].item_category5", + "from": "$.properties.item_category5", "to": "$.events[0].params.items[*].item_category5" }, { - "from": "$.properties.products[*].item_list_id", + "from": "$.properties.item_list_id", "to": "$.events[0].params.items[*].item_list_id" }, { - "from": "properties.products[*].item_list_name", + "from": "properties.item_list_name", "to": "$.events[0].params.items[*].item_list_name" }, { - "from": "$.properties.products[*].location_id", + "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, { @@ -662,69 +650,65 @@ "required": true }, { - "from": "$.properties.products[*].product_id", + "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", "required": true }, { - "from": "$.properties.products[*].name", + "from": "$.properties.name", "to": "$.events[0].params.items[*].item_name", "required": true }, { - "from": "$.properties.products[*].coupon", + "from": "$.properties.coupon", "to": "$.events[0].params.items[*].coupon" }, { - "from": "$.properties.products[*].price", + "from": "$.properties.price", "to": "$.events[0].params.items[*].price" }, { - "from": "$.properties.products[*].position", + "from": "$.properties.position", "to": "$.events[0].params.items[*].position" }, { - "from": "$.properties.products[*].quantity", + "from": "$.properties.quantity", "to": "$.events[0].params.items[*].quantity" }, { - "from": "$.properties.products[*].affiliation", + "from": "$.properties.affiliation", "to": "$.events[0].params.items[*].affiliation" }, { - "from": "$.properties.products[*].currency", - "to": "$.events[0].params.items[*].currency" - }, - { - "from": "$.properties.products[*].discount", + "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, { - "from": "$.properties.products[*].item_category2", + "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" }, { - "from": "$.properties.products[*].item_category3", + "from": "$.properties.item_category3", "to": "$.events[0].params.items[*].item_category3" }, { - "from": "$.properties.products[*].item_category4", + "from": "$.properties.item_category4", "to": "$.events[0].params.items[*].item_category4" }, { - "from": "$.properties.products[*].item_category5", + "from": "$.properties.item_category5", "to": "$.events[0].params.items[*].item_category5" }, { - "from": "$.properties.products[*].item_list_id", + "from": "$.properties.item_list_id", "to": "$.events[0].params.items[*].item_list_id" }, { - "from": "properties.products[*].item_list_name", + "from": "properties.item_list_name", "to": "$.events[0].params.items[*].item_list_name" }, { - "from": "$.properties.products[*].location_id", + "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, { From 3fc0efab3187452daa1d7c2295c5cb56001e62aa Mon Sep 17 00:00:00 2001 From: Utsab Chowdhury Date: Fri, 21 Jun 2024 17:43:42 +0530 Subject: [PATCH 39/68] chore: update ui-config ga4_v2 --- .../destinations/ga4_v2/ui-config.json | 246 +++++++++++++++++- .../destinations/ga4_v2/ui-default.json | 246 +++++++++++++++++- 2 files changed, 486 insertions(+), 6 deletions(-) diff --git a/src/configurations/destinations/ga4_v2/ui-config.json b/src/configurations/destinations/ga4_v2/ui-config.json index 623ce6912..da26c673b 100644 --- a/src/configurations/destinations/ga4_v2/ui-config.json +++ b/src/configurations/destinations/ga4_v2/ui-config.json @@ -628,13 +628,25 @@ "from": "$.properties.products[*].affiliation", "to": "$.events[0].params.items[*].affiliation" }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, { "from": "$.properties.products[*].currency", "to": "$.events[0].params.items[*].currency" }, { - "from": "$.properties.products[*].discount", - "to": "$.events[0].params.items[*].discount" + "from": "$.properties.products[*].brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.products[*].variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.products[*].item_category", + "to": "$.events[0].params.items[*].item_category" }, { "from": "$.properties.products[*].item_category2", @@ -664,6 +676,10 @@ "from": "$.properties.products[*].location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.products[*].engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -720,6 +736,18 @@ "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -748,6 +776,10 @@ "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -812,6 +844,18 @@ "from": "$.properties.products[*].discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.products[*].brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.products[*].variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.products[*].item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.products[*].item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -840,6 +884,10 @@ "from": "properties.products[*].location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.products[*].engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -904,6 +952,18 @@ "from": "$.properties.products[*].discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.products[*].brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.products[*].variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.products[*].item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.products[*].item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -932,6 +992,10 @@ "from": "$.properties.products[*].location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.products[*].engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -986,6 +1050,22 @@ "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -1014,6 +1094,10 @@ "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -1068,6 +1152,22 @@ "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -1096,6 +1196,10 @@ "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -1150,6 +1254,22 @@ "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -1178,6 +1298,10 @@ "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -1236,6 +1360,18 @@ "from": "$.properties.products[*].discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.products[*].brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.products[*].variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.products[*].item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.products[*].item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -1264,6 +1400,10 @@ "from": "$.properties.products[*].location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.products[*].engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -1318,6 +1458,22 @@ "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -1339,13 +1495,17 @@ "to": "$.events[0].params.items[*].item_list_id" }, { - "from": "properties.item_list_name", + "from": "$.properties.item_list_name", "to": "$.events[0].params.items[*].item_list_name" }, { "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -1408,6 +1568,18 @@ "from": "$.properties.products[*].discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.products[*].brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.products[*].variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.products[*].item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.products[*].item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -1436,6 +1608,10 @@ "from": "$.properties.products[*].location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.products[*].engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -1511,6 +1687,18 @@ "from": "$.properties.products[*].discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.products[*].brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.products[*].variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.products[*].item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.products[*].item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -1539,6 +1727,10 @@ "from": "$.properties.products[*].location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.products[*].engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -1614,6 +1806,18 @@ "from": "$.properties.products[*].discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.products[*].brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.products[*].variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.products[*].item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.products[*].item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -1642,6 +1846,10 @@ "from": "$.properties.products[*].location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.products[*].engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -1752,6 +1960,18 @@ "from": "$.properties.products[*].discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.products[*].brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.products[*].variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.products[*].item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.products[*].item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -1780,6 +2000,10 @@ "from": "$.properties.products[*].location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.products[*].engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -1846,6 +2070,18 @@ "from": "$.properties.products[*].discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.products[*].brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.products[*].variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.products[*].item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.products[*].item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -1874,6 +2110,10 @@ "from": "$.properties.products[*].location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.products[*].engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" diff --git a/src/configurations/destinations/ga4_v2/ui-default.json b/src/configurations/destinations/ga4_v2/ui-default.json index c341844ab..382a83196 100644 --- a/src/configurations/destinations/ga4_v2/ui-default.json +++ b/src/configurations/destinations/ga4_v2/ui-default.json @@ -51,13 +51,25 @@ "from": "$.properties.products[*].affiliation", "to": "$.events[0].params.items[*].affiliation" }, + { + "from": "$.properties.products[*].discount", + "to": "$.events[0].params.items[*].discount" + }, { "from": "$.properties.products[*].currency", "to": "$.events[0].params.items[*].currency" }, { - "from": "$.properties.products[*].discount", - "to": "$.events[0].params.items[*].discount" + "from": "$.properties.products[*].brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.products[*].variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.products[*].item_category", + "to": "$.events[0].params.items[*].item_category" }, { "from": "$.properties.products[*].item_category2", @@ -87,6 +99,10 @@ "from": "$.properties.products[*].location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.products[*].engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -137,6 +153,18 @@ "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -165,6 +193,10 @@ "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -217,6 +249,18 @@ "from": "$.properties.products[*].discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.products[*].brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.products[*].variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.products[*].item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.products[*].item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -245,6 +289,10 @@ "from": "properties.products[*].location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.products[*].engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -297,6 +345,18 @@ "from": "$.properties.products[*].discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.products[*].brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.products[*].variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.products[*].item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.products[*].item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -325,6 +385,10 @@ "from": "$.properties.products[*].location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.products[*].engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -375,6 +439,22 @@ "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -403,6 +483,10 @@ "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -449,6 +533,22 @@ "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -477,6 +577,10 @@ "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -527,6 +631,22 @@ "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -555,6 +675,10 @@ "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -605,6 +729,18 @@ "from": "$.properties.products[*].discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.products[*].brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.products[*].variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.products[*].item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.products[*].item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -633,6 +769,10 @@ "from": "$.properties.products[*].location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.products[*].engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -683,6 +823,22 @@ "from": "$.properties.discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.currency", + "to": "$.events[0].params.items[*].currency" + }, + { + "from": "$.properties.brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -704,13 +860,17 @@ "to": "$.events[0].params.items[*].item_list_id" }, { - "from": "properties.item_list_name", + "from": "$.properties.item_list_name", "to": "$.events[0].params.items[*].item_list_name" }, { "from": "$.properties.location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -763,6 +923,18 @@ "from": "$.properties.products[*].discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.products[*].brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.products[*].variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.products[*].item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.products[*].item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -791,6 +963,10 @@ "from": "$.properties.products[*].location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.products[*].engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -849,6 +1025,18 @@ "from": "$.properties.products[*].discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.products[*].brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.products[*].variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.products[*].item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.products[*].item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -877,6 +1065,10 @@ "from": "$.properties.products[*].location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.products[*].engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -936,6 +1128,18 @@ "from": "$.properties.products[*].discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.products[*].brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.products[*].variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.products[*].item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.products[*].item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -964,6 +1168,10 @@ "from": "$.properties.products[*].location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.products[*].engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -1043,6 +1251,18 @@ "from": "$.properties.products[*].discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.products[*].brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.products[*].variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.products[*].item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.products[*].item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -1071,6 +1291,10 @@ "from": "$.properties.products[*].location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.products[*].engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -1123,6 +1347,18 @@ "from": "$.properties.products[*].discount", "to": "$.events[0].params.items[*].discount" }, + { + "from": "$.properties.products[*].brand", + "to": "$.events[0].params.items[*].item_brand" + }, + { + "from": "$.properties.products[*].variant", + "to": "$.events[0].params.items[*].item_variant" + }, + { + "from": "$.properties.products[*].item_category", + "to": "$.events[0].params.items[*].item_category" + }, { "from": "$.properties.products[*].item_category2", "to": "$.events[0].params.items[*].item_category2" @@ -1151,6 +1387,10 @@ "from": "$.properties.products[*].location_id", "to": "$.events[0].params.items[*].location_id" }, + { + "from": "$.properties.products[*].engagement_time_msec", + "to": "$.events[0].params.items[*].engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" From ae45d1b96414142aedbbd6044710b065f088a863 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Fri, 21 Jun 2024 18:30:54 +0530 Subject: [PATCH 40/68] feat: added GCM support for 5 destinations - Batch 14 (#1489) --- .../destinations/marketo/db-config.json | 24 +- .../destinations/marketo/schema.json | 511 ++++++++++++++++++ .../destinations/marketo/ui-config.json | 104 +++- .../marketo_bulk_upload/db-config.json | 24 +- .../marketo_bulk_upload/ui-config.json | 93 +++- .../marketo_static_list/db-config.json | 9 +- .../marketo_static_list/schema.json | 143 +++++ .../marketo_static_list/ui-config.json | 93 +++- .../destinations/mautic/db-config.json | 25 +- .../destinations/mautic/schema.json | 511 ++++++++++++++++++ .../destinations/mautic/ui-config.json | 93 +++- .../microsoft_clarity/db-config.json | 5 +- .../microsoft_clarity/schema.json | 51 ++ .../microsoft_clarity/ui-config.json | 93 +++- .../data/validation/destinations/marketo.json | 118 ++++ .../destinations/marketo_static_list.json | 113 ++++ test/data/validation/destinations/mautic.json | 123 +++++ .../destinations/microsoft_clarity.json | 98 ++++ 18 files changed, 2183 insertions(+), 48 deletions(-) diff --git a/src/configurations/destinations/marketo/db-config.json b/src/configurations/destinations/marketo/db-config.json index e287bce80..b49a08359 100644 --- a/src/configurations/destinations/marketo/db-config.json +++ b/src/configurations/destinations/marketo/db-config.json @@ -7,7 +7,7 @@ "transformAtV1": "router", "saveDestinationResponse": true, "throttlingCost": { "eventType": { "identify": 3, "track": 3 } }, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -48,17 +48,17 @@ "leadTraitMapping", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["clientSecret"] }, diff --git a/src/configurations/destinations/marketo/schema.json b/src/configurations/destinations/marketo/schema.json index 0d5212907..d093e511c 100644 --- a/src/configurations/destinations/marketo/schema.json +++ b/src/configurations/destinations/marketo/schema.json @@ -56,6 +56,517 @@ } }, "useNativeSDK": { "type": "boolean" }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/marketo/ui-config.json b/src/configurations/destinations/marketo/ui-config.json index 8dd8fac75..8a11ce52f 100644 --- a/src/configurations/destinations/marketo/ui-config.json +++ b/src/configurations/destinations/marketo/ui-config.json @@ -90,7 +90,15 @@ "note": "If turned on, we will create a new lead if the user is not present" } ] - }, + } + ] + }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [ { "title": "OneTrust consent settings", "note": [ @@ -110,7 +118,19 @@ "tagKey": "oneTrustCookieCategory", "placeholder": "e.g: Credit card visit" } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -235,6 +255,86 @@ } ] } + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/marketo_bulk_upload/db-config.json b/src/configurations/destinations/marketo_bulk_upload/db-config.json index 218d6a900..dc0362eaa 100644 --- a/src/configurations/destinations/marketo_bulk_upload/db-config.json +++ b/src/configurations/destinations/marketo_bulk_upload/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -43,17 +43,17 @@ "uploadInterval", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["clientId", "clientSecret"] }, diff --git a/src/configurations/destinations/marketo_bulk_upload/ui-config.json b/src/configurations/destinations/marketo_bulk_upload/ui-config.json index e99e2e92e..8b7425826 100644 --- a/src/configurations/destinations/marketo_bulk_upload/ui-config.json +++ b/src/configurations/destinations/marketo_bulk_upload/ui-config.json @@ -102,7 +102,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/marketo_static_list/db-config.json b/src/configurations/destinations/marketo_static_list/db-config.json index 7e093ac27..d63d5c381 100644 --- a/src/configurations/destinations/marketo_static_list/db-config.json +++ b/src/configurations/destinations/marketo_static_list/db-config.json @@ -10,7 +10,8 @@ "clientSecret", "accountId", "staticListId", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["cloud", "warehouse", "shopify"], @@ -31,9 +32,9 @@ "staticListId", "oneTrustCookieCategories" ], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["clientId", "clientSecret", "accountId"] }, diff --git a/src/configurations/destinations/marketo_static_list/schema.json b/src/configurations/destinations/marketo_static_list/schema.json index 504e2da9d..cc6c8951e 100644 --- a/src/configurations/destinations/marketo_static_list/schema.json +++ b/src/configurations/destinations/marketo_static_list/schema.json @@ -32,6 +32,149 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/marketo_static_list/ui-config.json b/src/configurations/destinations/marketo_static_list/ui-config.json index c0ab0ba1d..dbb8a159b 100644 --- a/src/configurations/destinations/marketo_static_list/ui-config.json +++ b/src/configurations/destinations/marketo_static_list/ui-config.json @@ -66,7 +66,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/mautic/db-config.json b/src/configurations/destinations/mautic/db-config.json index b2eb64dff..adea9a78c 100644 --- a/src/configurations/destinations/mautic/db-config.json +++ b/src/configurations/destinations/mautic/db-config.json @@ -11,7 +11,8 @@ "lookUpField", "domainName", "domainMethod", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -51,17 +52,17 @@ "domainMethod", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["password"] } diff --git a/src/configurations/destinations/mautic/schema.json b/src/configurations/destinations/mautic/schema.json index fb57756d7..8f5db1341 100644 --- a/src/configurations/destinations/mautic/schema.json +++ b/src/configurations/destinations/mautic/schema.json @@ -30,6 +30,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/mautic/ui-config.json b/src/configurations/destinations/mautic/ui-config.json index a489909dc..ab3f9f303 100644 --- a/src/configurations/destinations/mautic/ui-config.json +++ b/src/configurations/destinations/mautic/ui-config.json @@ -101,7 +101,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/microsoft_clarity/db-config.json b/src/configurations/destinations/microsoft_clarity/db-config.json index d1eb530dd..108779533 100644 --- a/src/configurations/destinations/microsoft_clarity/db-config.json +++ b/src/configurations/destinations/microsoft_clarity/db-config.json @@ -10,7 +10,8 @@ "blacklistedEvents", "whitelistedEvents", "eventFilteringOption", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -25,7 +26,7 @@ "blacklistedEvents", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] } } } diff --git a/src/configurations/destinations/microsoft_clarity/schema.json b/src/configurations/destinations/microsoft_clarity/schema.json index 09a45c211..4488f2119 100644 --- a/src/configurations/destinations/microsoft_clarity/schema.json +++ b/src/configurations/destinations/microsoft_clarity/schema.json @@ -51,6 +51,57 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { "web": { "type": "string", "enum": ["device"] } } diff --git a/src/configurations/destinations/microsoft_clarity/ui-config.json b/src/configurations/destinations/microsoft_clarity/ui-config.json index e234665f4..46f279c7f 100644 --- a/src/configurations/destinations/microsoft_clarity/ui-config.json +++ b/src/configurations/destinations/microsoft_clarity/ui-config.json @@ -103,7 +103,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/marketo.json b/test/data/validation/destinations/marketo.json index 9ccea570f..4f3db92b8 100644 --- a/test/data/validation/destinations/marketo.json +++ b/test/data/validation/destinations/marketo.json @@ -113,5 +113,123 @@ ] }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "accountId": "testACCID", + "clientId": "testCLIENTID", + "clientSecret": "******", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "accountId": "testACCID", + "clientId": "testCLIENTID", + "clientSecret": "******", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "accountId": "testACCID", + "clientId": "testCLIENTID", + "clientSecret": "******", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "accountId": "testACCID", + "clientId": "testCLIENTID", + "clientSecret": "******", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "accountId": "testACCID", + "clientId": "testCLIENTID", + "clientSecret": "******", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/marketo_static_list.json b/test/data/validation/destinations/marketo_static_list.json index b53aa97d1..d2214eed8 100644 --- a/test/data/validation/destinations/marketo_static_list.json +++ b/test/data/validation/destinations/marketo_static_list.json @@ -28,5 +28,118 @@ "err": [ "accountId must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\"" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "clientId": "323XX124", + "clientSecret": "11XX42", + "accountId": "aaa", + "staticListId": "9031", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "clientId": "323XX124", + "clientSecret": "11XX42", + "accountId": "aaa", + "staticListId": "9031", + "consentManagement": { + "shopify": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.shopify.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.shopify.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "clientId": "323XX124", + "clientSecret": "11XX42", + "accountId": "aaa", + "staticListId": "9031", + "consentManagement": { + "shopify": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.shopify.0 must have required property 'resolutionStrategy'", + "consentManagement.shopify.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "clientId": "323XX124", + "clientSecret": "11XX42", + "accountId": "aaa", + "staticListId": "9031", + "consentManagement": { + "shopify": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "clientId": "323XX124", + "clientSecret": "11XX42", + "accountId": "aaa", + "staticListId": "9031", + "consentManagement": { + "shopify": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.shopify.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/mautic.json b/test/data/validation/destinations/mautic.json index 4a98ef465..28cc21e13 100644 --- a/test/data/validation/destinations/mautic.json +++ b/test/data/validation/destinations/mautic.json @@ -78,5 +78,128 @@ }, "result": false, "err": ["userName must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\""] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "userName": "abc@work.com", + "password": "1234yui", + "subDomainName": "work", + "lookUpField": "email", + "domainMethod": "subDomainNameOption", + "domainName": "", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "userName": "abc@work.com", + "password": "1234yui", + "subDomainName": "work", + "lookUpField": "email", + "domainMethod": "subDomainNameOption", + "domainName": "", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "userName": "abc@work.com", + "password": "1234yui", + "subDomainName": "work", + "lookUpField": "email", + "domainMethod": "subDomainNameOption", + "domainName": "", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "userName": "abc@work.com", + "password": "1234yui", + "subDomainName": "work", + "lookUpField": "email", + "domainMethod": "subDomainNameOption", + "domainName": "", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "userName": "abc@work.com", + "password": "1234yui", + "subDomainName": "work", + "lookUpField": "email", + "domainMethod": "subDomainNameOption", + "domainName": "", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/microsoft_clarity.json b/test/data/validation/destinations/microsoft_clarity.json index fbb0fca99..2b993ef55 100644 --- a/test/data/validation/destinations/microsoft_clarity.json +++ b/test/data/validation/destinations/microsoft_clarity.json @@ -56,5 +56,103 @@ }, "result": false, "err": ["cookieConsent must be boolean"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "projectId": "ejXXXXgqfc", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "projectId": "ejXXXXgqfc", + "consentManagement": { + "web": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "projectId": "ejXXXXgqfc", + "consentManagement": { + "web": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0 must have required property 'resolutionStrategy'", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "projectId": "ejXXXXgqfc", + "consentManagement": { + "web": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "projectId": "ejXXXXgqfc", + "consentManagement": { + "web": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.web.0.provider must be equal to one of the allowed values"] } ] From 5871961add908033a53436459cb2f63e56bc1072 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Fri, 21 Jun 2024 18:32:54 +0530 Subject: [PATCH 41/68] feat: added GCM support for 5 destinations - Batch 15 (#1490) --- .../destinations/minio/db-config.json | 24 +- .../destinations/minio/ui-config.json | 93 +++- .../destinations/monday/db-config.json | 24 +- .../destinations/monday/schema.json | 511 ++++++++++++++++++ .../destinations/monday/ui-config.json | 93 +++- .../destinations/monetate/db-config.json | 24 +- .../destinations/monetate/ui-config.json | 93 +++- .../destinations/mouseflow/db-config.json | 5 +- .../destinations/mouseflow/schema.json | 51 ++ .../destinations/mouseflow/ui-config.json | 93 +++- .../destinations/mssql/db-config.json | 24 +- .../destinations/mssql/schema.json | 511 ++++++++++++++++++ .../destinations/mssql/ui-config.json | 93 +++- test/data/validation/destinations/monday.json | 108 ++++ .../validation/destinations/mouseflow.json | 98 ++++ test/data/validation/destinations/mssql.json | 153 ++++++ 16 files changed, 1943 insertions(+), 55 deletions(-) diff --git a/src/configurations/destinations/minio/db-config.json b/src/configurations/destinations/minio/db-config.json index 4177a019a..7ea0c7f78 100644 --- a/src/configurations/destinations/minio/db-config.json +++ b/src/configurations/destinations/minio/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "none", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -42,17 +42,17 @@ "useSSL", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["accessKeyID", "secretAccessKey"] } diff --git a/src/configurations/destinations/minio/ui-config.json b/src/configurations/destinations/minio/ui-config.json index 955337835..481823729 100644 --- a/src/configurations/destinations/minio/ui-config.json +++ b/src/configurations/destinations/minio/ui-config.json @@ -75,7 +75,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/monday/db-config.json b/src/configurations/destinations/monday/db-config.json index 117347954..4e3fa678d 100644 --- a/src/configurations/destinations/monday/db-config.json +++ b/src/configurations/destinations/monday/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -42,17 +42,17 @@ "whitelistedEvents", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiToken"] } diff --git a/src/configurations/destinations/monday/schema.json b/src/configurations/destinations/monday/schema.json index ecff97b12..071b9a2d3 100644 --- a/src/configurations/destinations/monday/schema.json +++ b/src/configurations/destinations/monday/schema.json @@ -56,6 +56,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/monday/ui-config.json b/src/configurations/destinations/monday/ui-config.json index c3f182a9d..d21861a40 100644 --- a/src/configurations/destinations/monday/ui-config.json +++ b/src/configurations/destinations/monday/ui-config.json @@ -95,7 +95,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/monetate/db-config.json b/src/configurations/destinations/monetate/db-config.json index fc6e13f67..02025f658 100644 --- a/src/configurations/destinations/monetate/db-config.json +++ b/src/configurations/destinations/monetate/db-config.json @@ -33,19 +33,19 @@ }, "destConfig": { "defaultConfig": ["monetateChannel", "retailerShortName", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": [], - "includeKeys": ["oneTrustCookieCategories"] + "includeKeys": ["oneTrustCookieCategories", "consentManagement"] } } diff --git a/src/configurations/destinations/monetate/ui-config.json b/src/configurations/destinations/monetate/ui-config.json index f67ecbdc3..0e912b9a9 100644 --- a/src/configurations/destinations/monetate/ui-config.json +++ b/src/configurations/destinations/monetate/ui-config.json @@ -38,7 +38,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/mouseflow/db-config.json b/src/configurations/destinations/mouseflow/db-config.json index 48155e336..e2cda2e60 100644 --- a/src/configurations/destinations/mouseflow/db-config.json +++ b/src/configurations/destinations/mouseflow/db-config.json @@ -21,9 +21,10 @@ "blacklistedEvents", "whitelistedEvents", "eventFilteringOption", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": ["websiteId"] } diff --git a/src/configurations/destinations/mouseflow/schema.json b/src/configurations/destinations/mouseflow/schema.json index d46ecebcb..5990b5cd3 100644 --- a/src/configurations/destinations/mouseflow/schema.json +++ b/src/configurations/destinations/mouseflow/schema.json @@ -50,6 +50,57 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { "web": { "type": "string", "enum": ["device"] } } diff --git a/src/configurations/destinations/mouseflow/ui-config.json b/src/configurations/destinations/mouseflow/ui-config.json index a6b9e4ac4..387d7dec8 100644 --- a/src/configurations/destinations/mouseflow/ui-config.json +++ b/src/configurations/destinations/mouseflow/ui-config.json @@ -99,7 +99,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/mssql/db-config.json b/src/configurations/destinations/mssql/db-config.json index ae92e6f25..107c9e543 100644 --- a/src/configurations/destinations/mssql/db-config.json +++ b/src/configurations/destinations/mssql/db-config.json @@ -5,7 +5,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -66,17 +66,17 @@ "useRudderStorage", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "cloudSource": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "cloudSource": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": [ "password", diff --git a/src/configurations/destinations/mssql/schema.json b/src/configurations/destinations/mssql/schema.json index 718219db7..34050f583 100644 --- a/src/configurations/destinations/mssql/schema.json +++ b/src/configurations/destinations/mssql/schema.json @@ -56,6 +56,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cloudSource": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/mssql/ui-config.json b/src/configurations/destinations/mssql/ui-config.json index 7c7c0d9dc..57cafe11d 100644 --- a/src/configurations/destinations/mssql/ui-config.json +++ b/src/configurations/destinations/mssql/ui-config.json @@ -586,7 +586,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/monday.json b/test/data/validation/destinations/monday.json index 24bd1097d..19071e4a8 100644 --- a/test/data/validation/destinations/monday.json +++ b/test/data/validation/destinations/monday.json @@ -83,5 +83,113 @@ ] }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiToken": "eywwakzdjiksjhrihXXXSFsjhnskdojsXXXXXns.sSRSSREWdnfnsjshfjXXXXhfiskskdS__Fskilhih", + "boardId": "32XXX6323", + "groupTitle": "Active deals", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiToken": "eywwakzdjiksjhrihXXXSFsjhnskdojsXXXXXns.sSRSSREWdnfnsjshfjXXXXhfiskskdS__Fskilhih", + "boardId": "32XXX6323", + "groupTitle": "Active deals", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiToken": "eywwakzdjiksjhrihXXXSFsjhnskdojsXXXXXns.sSRSSREWdnfnsjshfjXXXXhfiskskdS__Fskilhih", + "boardId": "32XXX6323", + "groupTitle": "Active deals", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiToken": "eywwakzdjiksjhrihXXXSFsjhnskdojsXXXXXns.sSRSSREWdnfnsjshfjXXXXhfiskskdS__Fskilhih", + "boardId": "32XXX6323", + "groupTitle": "Active deals", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiToken": "eywwakzdjiksjhrihXXXSFsjhnskdojsXXXXXns.sSRSSREWdnfnsjshfjXXXXhfiskskdS__Fskilhih", + "boardId": "32XXX6323", + "groupTitle": "Active deals", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/mouseflow.json b/test/data/validation/destinations/mouseflow.json index 7cbec0cf1..3b96ef340 100644 --- a/test/data/validation/destinations/mouseflow.json +++ b/test/data/validation/destinations/mouseflow.json @@ -13,5 +13,103 @@ "websiteId": "adhs123-XXXXXX-XXXXX-adhs123" }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "websiteId": "adhs123-XXXXXX-XXXXX-adhs123", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "websiteId": "adhs123-XXXXXX-XXXXX-adhs123", + "consentManagement": { + "web": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "websiteId": "adhs123-XXXXXX-XXXXX-adhs123", + "consentManagement": { + "web": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0 must have required property 'resolutionStrategy'", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "websiteId": "adhs123-XXXXXX-XXXXX-adhs123", + "consentManagement": { + "web": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "websiteId": "adhs123-XXXXXX-XXXXX-adhs123", + "consentManagement": { + "web": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.web.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/mssql.json b/test/data/validation/destinations/mssql.json index b5bc836bc..f484dcad1 100644 --- a/test/data/validation/destinations/mssql.json +++ b/test/data/validation/destinations/mssql.json @@ -378,5 +378,158 @@ "bucketName must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^((?!^(\\d+(\\.|$)){4}$)[a-z0-9][a-z0-9-.]{1,61}[a-z0-9])$\"", " must match \"then\" schema" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "host": "test-host", + "database": "test-database", + "user": "test-user", + "password": "test-password", + "port": "0000", + "sslMode": "disable", + "bucketProvider": "S3", + "syncFrequency": "30", + "useRudderStorage": false, + "bucketName": "test-bucket", + "accessKeyID": "test-access-key-id", + "accessKey": "test-access-key", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "host": "test-host", + "database": "test-database", + "user": "test-user", + "password": "test-password", + "port": "0000", + "sslMode": "disable", + "bucketProvider": "S3", + "syncFrequency": "30", + "useRudderStorage": false, + "bucketName": "test-bucket", + "accessKeyID": "test-access-key-id", + "accessKey": "test-access-key", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "host": "test-host", + "database": "test-database", + "user": "test-user", + "password": "test-password", + "port": "0000", + "sslMode": "disable", + "bucketProvider": "S3", + "syncFrequency": "30", + "useRudderStorage": false, + "bucketName": "test-bucket", + "accessKeyID": "test-access-key-id", + "accessKey": "test-access-key", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "host": "test-host", + "database": "test-database", + "user": "test-user", + "password": "test-password", + "port": "0000", + "sslMode": "disable", + "bucketProvider": "S3", + "syncFrequency": "30", + "useRudderStorage": false, + "bucketName": "test-bucket", + "accessKeyID": "test-access-key-id", + "accessKey": "test-access-key", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "host": "test-host", + "database": "test-database", + "user": "test-user", + "password": "test-password", + "port": "0000", + "sslMode": "disable", + "bucketProvider": "S3", + "syncFrequency": "30", + "useRudderStorage": false, + "bucketName": "test-bucket", + "accessKeyID": "test-access-key-id", + "accessKey": "test-access-key", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From a538556b7ba6042eb979b1ddd6356c066732e1e5 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Fri, 21 Jun 2024 18:34:54 +0530 Subject: [PATCH 42/68] feat: added GCM support for 5 destinations - Batch 16 (#1492) --- .../destinations/movable_ink/db-config.json | 22 +- .../destinations/movable_ink/schema.json | 511 ++++++++++++++++++ .../destinations/movable_ink/ui-config.json | 101 +++- .../destinations/new_relic/db-config.json | 25 +- .../destinations/new_relic/schema.json | 511 ++++++++++++++++++ .../destinations/new_relic/ui-config.json | 93 +++- .../destinations/ninetailed/db-config.json | 25 +- .../destinations/ninetailed/schema.json | 511 ++++++++++++++++++ .../destinations/ninetailed/ui-config.json | 104 +++- .../destinations/olark/db-config.json | 5 +- .../destinations/olark/schema.json | 51 ++ .../destinations/olark/ui-config.json | 93 +++- .../destinations/ometria/db-config.json | 24 +- .../destinations/ometria/ui-config.json | 93 +++- .../validation/destinations/movable_ink.json | 108 ++++ .../validation/destinations/new_relic.json | 123 +++++ .../validation/destinations/ninetailed.json | 103 ++++ test/data/validation/destinations/olark.json | 100 ++++ 18 files changed, 2545 insertions(+), 58 deletions(-) create mode 100644 test/data/validation/destinations/olark.json diff --git a/src/configurations/destinations/movable_ink/db-config.json b/src/configurations/destinations/movable_ink/db-config.json index 09fbb1fd2..c8828b17f 100644 --- a/src/configurations/destinations/movable_ink/db-config.json +++ b/src/configurations/destinations/movable_ink/db-config.json @@ -34,17 +34,17 @@ }, "destConfig": { "defaultConfig": ["endpoint", "accessKey", "accessSecret", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["accessKey", "accessSecret"] }, diff --git a/src/configurations/destinations/movable_ink/schema.json b/src/configurations/destinations/movable_ink/schema.json index 0b1410f2f..242897fa0 100644 --- a/src/configurations/destinations/movable_ink/schema.json +++ b/src/configurations/destinations/movable_ink/schema.json @@ -28,6 +28,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/movable_ink/ui-config.json b/src/configurations/destinations/movable_ink/ui-config.json index de9512f0b..d77eb6aee 100644 --- a/src/configurations/destinations/movable_ink/ui-config.json +++ b/src/configurations/destinations/movable_ink/ui-config.json @@ -68,9 +68,10 @@ "note": "Manage the settings for your destination", "sections": [ { - "title": "Other settings", - "note": "Configure advanced RudderStack features here", - "icon": "otherSettings", + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", "groups": [ { "title": "OneTrust cookie consent settings", @@ -96,7 +97,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -107,6 +120,86 @@ "title": "SDK settings", "note": "not visible in the ui", "fields": [] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/new_relic/db-config.json b/src/configurations/destinations/new_relic/db-config.json index 549111f06..029570727 100644 --- a/src/configurations/destinations/new_relic/db-config.json +++ b/src/configurations/destinations/new_relic/db-config.json @@ -12,7 +12,8 @@ "customEventType", "sendDeviceContext", "sendUserIdanonymousId", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -52,17 +53,17 @@ "sendUserIdanonymousId", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["accountId", "insertKey"] } diff --git a/src/configurations/destinations/new_relic/schema.json b/src/configurations/destinations/new_relic/schema.json index dda04b0c1..d6cf776c9 100644 --- a/src/configurations/destinations/new_relic/schema.json +++ b/src/configurations/destinations/new_relic/schema.json @@ -31,6 +31,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/new_relic/ui-config.json b/src/configurations/destinations/new_relic/ui-config.json index c0124521d..9157b8373 100644 --- a/src/configurations/destinations/new_relic/ui-config.json +++ b/src/configurations/destinations/new_relic/ui-config.json @@ -87,7 +87,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/ninetailed/db-config.json b/src/configurations/destinations/ninetailed/db-config.json index aa94fdaba..eb61b3113 100644 --- a/src/configurations/destinations/ninetailed/db-config.json +++ b/src/configurations/destinations/ninetailed/db-config.json @@ -10,7 +10,8 @@ "blacklistedEvents", "whitelistedEvents", "eventFilteringOption", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -52,17 +53,17 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "sendPageInDevice", "connectionMode"], - "ios": ["connectionMode"], - "android": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "web": ["useNativeSDK", "sendPageInDevice", "connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["organisationId"] }, diff --git a/src/configurations/destinations/ninetailed/schema.json b/src/configurations/destinations/ninetailed/schema.json index ab93c10d5..34cdd46ee 100644 --- a/src/configurations/destinations/ninetailed/schema.json +++ b/src/configurations/destinations/ninetailed/schema.json @@ -48,6 +48,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/ninetailed/ui-config.json b/src/configurations/destinations/ninetailed/ui-config.json index 3a27bcc4b..2912329de 100644 --- a/src/configurations/destinations/ninetailed/ui-config.json +++ b/src/configurations/destinations/ninetailed/ui-config.json @@ -159,7 +159,15 @@ } } ] - }, + } + ] + }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [ { "title": "OneTrust cookie consent settings", "note": [ @@ -184,7 +192,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -203,6 +223,86 @@ "note": "If enabled, Rudderstack will send page calls in device mode." } ] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/olark/db-config.json b/src/configurations/destinations/olark/db-config.json index 42da633f2..fe60f5674 100644 --- a/src/configurations/destinations/olark/db-config.json +++ b/src/configurations/destinations/olark/db-config.json @@ -13,7 +13,8 @@ "eventFilteringOption", "blacklistedEvents", "whitelistedEvents", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -31,7 +32,7 @@ "whitelistedEvents", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] } } } diff --git a/src/configurations/destinations/olark/schema.json b/src/configurations/destinations/olark/schema.json index ad5c93ffd..fce481936 100644 --- a/src/configurations/destinations/olark/schema.json +++ b/src/configurations/destinations/olark/schema.json @@ -55,6 +55,57 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { "web": { "type": "string", "enum": ["device"] } } diff --git a/src/configurations/destinations/olark/ui-config.json b/src/configurations/destinations/olark/ui-config.json index dc142b8f4..fdaa359d4 100644 --- a/src/configurations/destinations/olark/ui-config.json +++ b/src/configurations/destinations/olark/ui-config.json @@ -168,7 +168,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/ometria/db-config.json b/src/configurations/destinations/ometria/db-config.json index cddd3c021..7f64c36b8 100644 --- a/src/configurations/destinations/ometria/db-config.json +++ b/src/configurations/destinations/ometria/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -41,17 +41,17 @@ "allowTransactional", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/ometria/ui-config.json b/src/configurations/destinations/ometria/ui-config.json index 9683f859b..ede98b40c 100644 --- a/src/configurations/destinations/ometria/ui-config.json +++ b/src/configurations/destinations/ometria/ui-config.json @@ -78,7 +78,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/movable_ink.json b/test/data/validation/destinations/movable_ink.json index 2c416514c..ac2d882f6 100644 --- a/test/data/validation/destinations/movable_ink.json +++ b/test/data/validation/destinations/movable_ink.json @@ -40,5 +40,113 @@ }, "result": false, "err": [" must have required property 'accessKey'"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "endpoint": "https://collector.movableink-dmz.com/behavioral/12***", + "accessKey": "test-accessKey", + "accessSecret": "test-accessSecret", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "endpoint": "https://collector.movableink-dmz.com/behavioral/12***", + "accessKey": "test-accessKey", + "accessSecret": "test-accessSecret", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "endpoint": "https://collector.movableink-dmz.com/behavioral/12***", + "accessKey": "test-accessKey", + "accessSecret": "test-accessSecret", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "endpoint": "https://collector.movableink-dmz.com/behavioral/12***", + "accessKey": "test-accessKey", + "accessSecret": "test-accessSecret", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "endpoint": "https://collector.movableink-dmz.com/behavioral/12***", + "accessKey": "test-accessKey", + "accessSecret": "test-accessSecret", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/new_relic.json b/test/data/validation/destinations/new_relic.json index d2d5dd76e..58e00e7e8 100644 --- a/test/data/validation/destinations/new_relic.json +++ b/test/data/validation/destinations/new_relic.json @@ -70,5 +70,128 @@ "sendUserIdanonymousId": true }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "accountId": "123456789", + "insertKey": "95bd133XXXX976i0ff9b", + "dataCenter": "us", + "customEventType": "", + "sendDeviceContext": false, + "sendUserIdanonymousId": false, + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "accountId": "123456789", + "insertKey": "95bd133XXXX976i0ff9b", + "dataCenter": "us", + "customEventType": "", + "sendDeviceContext": false, + "sendUserIdanonymousId": false, + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "accountId": "123456789", + "insertKey": "95bd133XXXX976i0ff9b", + "dataCenter": "us", + "customEventType": "", + "sendDeviceContext": false, + "sendUserIdanonymousId": false, + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "accountId": "123456789", + "insertKey": "95bd133XXXX976i0ff9b", + "dataCenter": "us", + "customEventType": "", + "sendDeviceContext": false, + "sendUserIdanonymousId": false, + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "accountId": "123456789", + "insertKey": "95bd133XXXX976i0ff9b", + "dataCenter": "us", + "customEventType": "", + "sendDeviceContext": false, + "sendUserIdanonymousId": false, + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/ninetailed.json b/test/data/validation/destinations/ninetailed.json index ff47e7a43..96104b3db 100644 --- a/test/data/validation/destinations/ninetailed.json +++ b/test/data/validation/destinations/ninetailed.json @@ -185,5 +185,108 @@ } }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "organisationId": "testorgid", + "environment": "main", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "organisationId": "testorgid", + "environment": "main", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "organisationId": "testorgid", + "environment": "main", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "organisationId": "testorgid", + "environment": "main", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "organisationId": "testorgid", + "environment": "main", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/olark.json b/test/data/validation/destinations/olark.json new file mode 100644 index 000000000..a9ae02ee3 --- /dev/null +++ b/test/data/validation/destinations/olark.json @@ -0,0 +1,100 @@ +[ + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "siteId": "test-host", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "siteId": "test-host", + "consentManagement": { + "web": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "siteId": "test-host", + "consentManagement": { + "web": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0 must have required property 'resolutionStrategy'", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "siteId": "test-host", + "consentManagement": { + "web": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "siteId": "test-host", + "consentManagement": { + "web": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.web.0.provider must be equal to one of the allowed values"] + } +] From 05fdb019575a0911c9da1bee203e2cc207d0f238 Mon Sep 17 00:00:00 2001 From: Manish Kumar <144022547+manish339k@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:02:38 +0530 Subject: [PATCH 43/68] feat: onboard source closeCRM (#1479) --- src/configurations/sources/close_crm/db-config.json | 9 +++++++++ src/configurations/sources/close_crm/schema.json | 3 +++ src/configurations/sources/close_crm/ui-config.json | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 src/configurations/sources/close_crm/db-config.json create mode 100644 src/configurations/sources/close_crm/schema.json create mode 100644 src/configurations/sources/close_crm/ui-config.json diff --git a/src/configurations/sources/close_crm/db-config.json b/src/configurations/sources/close_crm/db-config.json new file mode 100644 index 000000000..c4a98032f --- /dev/null +++ b/src/configurations/sources/close_crm/db-config.json @@ -0,0 +1,9 @@ +{ + "name": "close_crm", + "category": "webhook", + "displayName": "Close CRM", + "options": { + "isBeta": true + }, + "type": "cloud" +} diff --git a/src/configurations/sources/close_crm/schema.json b/src/configurations/sources/close_crm/schema.json new file mode 100644 index 000000000..fddffa4cc --- /dev/null +++ b/src/configurations/sources/close_crm/schema.json @@ -0,0 +1,3 @@ +{ + "configSchema": null +} diff --git a/src/configurations/sources/close_crm/ui-config.json b/src/configurations/sources/close_crm/ui-config.json new file mode 100644 index 000000000..a64a05b7e --- /dev/null +++ b/src/configurations/sources/close_crm/ui-config.json @@ -0,0 +1,3 @@ +{ + "uiConfig": null +} From fbad3a0eb3f7019880b7ee874d7f89b9a7d39502 Mon Sep 17 00:00:00 2001 From: Utsab Chowdhury Date: Mon, 24 Jun 2024 15:50:20 +0530 Subject: [PATCH 44/68] fix: update default for config (#1505) --- .../destinations/ga4_v2/ui-config.json | 30 +++++++++---------- .../destinations/ga4_v2/ui-default.json | 30 +++++++++---------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/configurations/destinations/ga4_v2/ui-config.json b/src/configurations/destinations/ga4_v2/ui-config.json index da26c673b..e9584bb03 100644 --- a/src/configurations/destinations/ga4_v2/ui-config.json +++ b/src/configurations/destinations/ga4_v2/ui-config.json @@ -645,7 +645,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.products[*].item_category", + "from": "$.properties.products[*].category", "to": "$.events[0].params.items[*].item_category" }, { @@ -745,7 +745,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.item_category", + "from": "$.properties.category", "to": "$.events[0].params.items[*].item_category" }, { @@ -853,7 +853,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.products[*].item_category", + "from": "$.properties.products[*].category", "to": "$.events[0].params.items[*].item_category" }, { @@ -961,7 +961,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.products[*].item_category", + "from": "$.properties.products[*].category", "to": "$.events[0].params.items[*].item_category" }, { @@ -1063,7 +1063,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.item_category", + "from": "$.properties.category", "to": "$.events[0].params.items[*].item_category" }, { @@ -1165,7 +1165,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.item_category", + "from": "$.properties.category", "to": "$.events[0].params.items[*].item_category" }, { @@ -1267,7 +1267,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.item_category", + "from": "$.properties.category", "to": "$.events[0].params.items[*].item_category" }, { @@ -1369,7 +1369,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.products[*].item_category", + "from": "$.properties.products[*].category", "to": "$.events[0].params.items[*].item_category" }, { @@ -1471,7 +1471,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.item_category", + "from": "$.properties.category", "to": "$.events[0].params.items[*].item_category" }, { @@ -1577,7 +1577,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.products[*].item_category", + "from": "$.properties.products[*].category", "to": "$.events[0].params.items[*].item_category" }, { @@ -1696,7 +1696,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.products[*].item_category", + "from": "$.properties.products[*].category", "to": "$.events[0].params.items[*].item_category" }, { @@ -1815,7 +1815,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.products[*].item_category", + "from": "$.properties.products[*].category", "to": "$.events[0].params.items[*].item_category" }, { @@ -1827,7 +1827,7 @@ "to": "$.events[0].params.items[*].item_category3" }, { - "from": "properties.products[*].item_category4", + "from": "$.properties.products[*].item_category4", "to": "$.events[0].params.items[*].item_category4" }, { @@ -1969,7 +1969,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.products[*].item_category", + "from": "$.properties.products[*].category", "to": "$.events[0].params.items[*].item_category" }, { @@ -2079,7 +2079,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.products[*].item_category", + "from": "$.properties.products[*].category", "to": "$.events[0].params.items[*].item_category" }, { diff --git a/src/configurations/destinations/ga4_v2/ui-default.json b/src/configurations/destinations/ga4_v2/ui-default.json index 382a83196..93e803d8d 100644 --- a/src/configurations/destinations/ga4_v2/ui-default.json +++ b/src/configurations/destinations/ga4_v2/ui-default.json @@ -68,7 +68,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.products[*].item_category", + "from": "$.properties.products[*].category", "to": "$.events[0].params.items[*].item_category" }, { @@ -162,7 +162,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.item_category", + "from": "$.properties.category", "to": "$.events[0].params.items[*].item_category" }, { @@ -258,7 +258,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.products[*].item_category", + "from": "$.properties.products[*].category", "to": "$.events[0].params.items[*].item_category" }, { @@ -354,7 +354,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.products[*].item_category", + "from": "$.properties.products[*].category", "to": "$.events[0].params.items[*].item_category" }, { @@ -452,7 +452,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.item_category", + "from": "$.properties.category", "to": "$.events[0].params.items[*].item_category" }, { @@ -546,7 +546,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.item_category", + "from": "$.properties.category", "to": "$.events[0].params.items[*].item_category" }, { @@ -644,7 +644,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.item_category", + "from": "$.properties.category", "to": "$.events[0].params.items[*].item_category" }, { @@ -738,7 +738,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.products[*].item_category", + "from": "$.properties.products[*].category", "to": "$.events[0].params.items[*].item_category" }, { @@ -836,7 +836,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.item_category", + "from": "$.properties.category", "to": "$.events[0].params.items[*].item_category" }, { @@ -932,7 +932,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.products[*].item_category", + "from": "$.properties.products[*].category", "to": "$.events[0].params.items[*].item_category" }, { @@ -1034,7 +1034,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.products[*].item_category", + "from": "$.properties.products[*].category", "to": "$.events[0].params.items[*].item_category" }, { @@ -1137,7 +1137,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.products[*].item_category", + "from": "$.properties.products[*].category", "to": "$.events[0].params.items[*].item_category" }, { @@ -1149,7 +1149,7 @@ "to": "$.events[0].params.items[*].item_category3" }, { - "from": "properties.products[*].item_category4", + "from": "$.properties.products[*].item_category4", "to": "$.events[0].params.items[*].item_category4" }, { @@ -1260,7 +1260,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.products[*].item_category", + "from": "$.properties.products[*].category", "to": "$.events[0].params.items[*].item_category" }, { @@ -1356,7 +1356,7 @@ "to": "$.events[0].params.items[*].item_variant" }, { - "from": "$.properties.products[*].item_category", + "from": "$.properties.products[*].category", "to": "$.events[0].params.items[*].item_category" }, { From 6f20dea9cc4d2c7b70d728761c57ce44f449c79d Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 25 Jun 2024 09:52:23 +0530 Subject: [PATCH 45/68] feat: added GCM support for 5 destinations - Batch 17 (#1494) --- .../destinations/one_signal/db-config.json | 24 +- .../destinations/one_signal/schema.json | 511 ++++++++++++++++++ .../destinations/one_signal/ui-config.json | 93 +++- .../destinations/optimizely/db-config.json | 5 +- .../destinations/optimizely/ui-config.json | 93 +++- .../optimizely_fullstack/db-config.json | 31 +- .../optimizely_fullstack/schema.json | 511 ++++++++++++++++++ .../optimizely_fullstack/ui-config.json | 104 +++- .../destinations/ortto/db-config.json | 22 +- .../destinations/ortto/schema.json | 511 ++++++++++++++++++ .../destinations/ortto/ui-config.json | 101 +++- .../destinations/pagerduty/db-config.json | 29 +- .../destinations/pagerduty/schema.json | 511 ++++++++++++++++++ .../destinations/pagerduty/ui-config.json | 93 +++- .../validation/destinations/one_signal.json | 113 ++++ .../destinations/optimizely_fullstack.json | 153 ++++++ test/data/validation/destinations/ortto.json | 103 ++++ .../validation/destinations/pagerduty.json | 98 ++++ 18 files changed, 3048 insertions(+), 58 deletions(-) diff --git a/src/configurations/destinations/one_signal/db-config.json b/src/configurations/destinations/one_signal/db-config.json index ee24f831f..60d1b4300 100644 --- a/src/configurations/destinations/one_signal/db-config.json +++ b/src/configurations/destinations/one_signal/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -44,17 +44,17 @@ "allowedProperties", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"] }, "secretKeys": ["appId"] } diff --git a/src/configurations/destinations/one_signal/schema.json b/src/configurations/destinations/one_signal/schema.json index 26fbc30b2..81f01fd91 100644 --- a/src/configurations/destinations/one_signal/schema.json +++ b/src/configurations/destinations/one_signal/schema.json @@ -44,6 +44,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/one_signal/ui-config.json b/src/configurations/destinations/one_signal/ui-config.json index 914380bc4..58b21768b 100644 --- a/src/configurations/destinations/one_signal/ui-config.json +++ b/src/configurations/destinations/one_signal/ui-config.json @@ -73,7 +73,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/optimizely/db-config.json b/src/configurations/destinations/optimizely/db-config.json index 7905a1772..732ca5708 100644 --- a/src/configurations/destinations/optimizely/db-config.json +++ b/src/configurations/destinations/optimizely/db-config.json @@ -15,7 +15,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -35,7 +36,7 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": [] } diff --git a/src/configurations/destinations/optimizely/ui-config.json b/src/configurations/destinations/optimizely/ui-config.json index ecffdf7e2..bc8e30dcc 100644 --- a/src/configurations/destinations/optimizely/ui-config.json +++ b/src/configurations/destinations/optimizely/ui-config.json @@ -160,7 +160,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/optimizely_fullstack/db-config.json b/src/configurations/destinations/optimizely_fullstack/db-config.json index f6d43175b..f485a1778 100644 --- a/src/configurations/destinations/optimizely_fullstack/db-config.json +++ b/src/configurations/destinations/optimizely_fullstack/db-config.json @@ -14,7 +14,8 @@ "blacklistedEvents", "whitelistedEvents", "eventFilteringOption", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -69,17 +70,23 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "android": ["useNativeSDK", "connectionMode", "listen", "nonInteraction"], - "ios": ["useNativeSDK", "connectionMode", "listen", "nonInteraction"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "android": [ + "useNativeSDK", + "connectionMode", + "listen", + "nonInteraction", + "consentManagement" + ], + "ios": ["useNativeSDK", "connectionMode", "listen", "nonInteraction", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] } } } diff --git a/src/configurations/destinations/optimizely_fullstack/schema.json b/src/configurations/destinations/optimizely_fullstack/schema.json index e56ac3ff1..57b46ed8d 100644 --- a/src/configurations/destinations/optimizely_fullstack/schema.json +++ b/src/configurations/destinations/optimizely_fullstack/schema.json @@ -131,6 +131,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/optimizely_fullstack/ui-config.json b/src/configurations/destinations/optimizely_fullstack/ui-config.json index 142c038b2..f54b6bbe7 100644 --- a/src/configurations/destinations/optimizely_fullstack/ui-config.json +++ b/src/configurations/destinations/optimizely_fullstack/ui-config.json @@ -311,7 +311,15 @@ } } ] - }, + } + ] + }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [ { "title": "OneTrust consent settings", "note": [ @@ -336,7 +344,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -411,6 +431,86 @@ } ] }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] + }, "redirectGroups": { "customEventMapping": { "tabs": [ diff --git a/src/configurations/destinations/ortto/db-config.json b/src/configurations/destinations/ortto/db-config.json index 148521f2d..3f01466e0 100644 --- a/src/configurations/destinations/ortto/db-config.json +++ b/src/configurations/destinations/ortto/db-config.json @@ -41,17 +41,17 @@ "eventProperties", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["privateApiKey"] }, diff --git a/src/configurations/destinations/ortto/schema.json b/src/configurations/destinations/ortto/schema.json index 856729467..3522623de 100644 --- a/src/configurations/destinations/ortto/schema.json +++ b/src/configurations/destinations/ortto/schema.json @@ -22,6 +22,517 @@ } }, "useNativeSDK": { "type": "boolean" }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/ortto/ui-config.json b/src/configurations/destinations/ortto/ui-config.json index 61008e5fe..5ec22f42e 100644 --- a/src/configurations/destinations/ortto/ui-config.json +++ b/src/configurations/destinations/ortto/ui-config.json @@ -72,9 +72,10 @@ "note": "Manage the settings for your destination", "sections": [ { - "title": "Destination settings", - "note": "Configure advanced RudderStack features here", - "icon": "otherSettings", + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", "groups": [ { "title": "OneTrust consent settings", @@ -100,7 +101,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -140,6 +153,86 @@ "note": "not visible in the ui", "fields": [] }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] + }, "redirectGroups": { "eventAndPropertyMapping": { "fields": [ diff --git a/src/configurations/destinations/pagerduty/db-config.json b/src/configurations/destinations/pagerduty/db-config.json index 23eb2f922..be44a9955 100644 --- a/src/configurations/destinations/pagerduty/db-config.json +++ b/src/configurations/destinations/pagerduty/db-config.json @@ -4,7 +4,12 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["routingKey", "dedupKeyFieldIdentifier", "oneTrustCookieCategories"], + "includeKeys": [ + "routingKey", + "dedupKeyFieldIdentifier", + "oneTrustCookieCategories", + "consentManagement" + ], "excludeKeys": [], "supportedSourceTypes": [ "web", @@ -35,17 +40,17 @@ }, "destConfig": { "defaultConfig": ["routingKey", "dedupKeyFieldIdentifier", "oneTrustCookieCategories"], - "web": ["connectionMode"], - "cloud": ["connectionMode"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "web": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["routingKey"] } diff --git a/src/configurations/destinations/pagerduty/schema.json b/src/configurations/destinations/pagerduty/schema.json index e36829dbe..b13418890 100644 --- a/src/configurations/destinations/pagerduty/schema.json +++ b/src/configurations/destinations/pagerduty/schema.json @@ -21,6 +21,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/pagerduty/ui-config.json b/src/configurations/destinations/pagerduty/ui-config.json index 977a82a35..9f8bdee7f 100644 --- a/src/configurations/destinations/pagerduty/ui-config.json +++ b/src/configurations/destinations/pagerduty/ui-config.json @@ -44,7 +44,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/one_signal.json b/test/data/validation/destinations/one_signal.json index 2a2398e13..f013ea912 100644 --- a/test/data/validation/destinations/one_signal.json +++ b/test/data/validation/destinations/one_signal.json @@ -42,5 +42,118 @@ }, "result": false, "err": ["emailDeviceType must be boolean"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "appId": "7acc2c99-XXXX-XXXX-XXXX-6cd8a994da65", + "emailDeviceType": false, + "smsDeviceType": false, + "eventAsTags": false, + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "appId": "7acc2c99-XXXX-XXXX-XXXX-6cd8a994da65", + "emailDeviceType": false, + "smsDeviceType": false, + "eventAsTags": false, + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "appId": "7acc2c99-XXXX-XXXX-XXXX-6cd8a994da65", + "emailDeviceType": false, + "smsDeviceType": false, + "eventAsTags": false, + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "appId": "7acc2c99-XXXX-XXXX-XXXX-6cd8a994da65", + "emailDeviceType": false, + "smsDeviceType": false, + "eventAsTags": false, + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "appId": "7acc2c99-XXXX-XXXX-XXXX-6cd8a994da65", + "emailDeviceType": false, + "smsDeviceType": false, + "eventAsTags": false, + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/optimizely_fullstack.json b/test/data/validation/destinations/optimizely_fullstack.json index 319eef253..937d82156 100644 --- a/test/data/validation/destinations/optimizely_fullstack.json +++ b/test/data/validation/destinations/optimizely_fullstack.json @@ -185,5 +185,158 @@ "err": [ "accountId must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^([0-9]{0,100})$\"" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "dataFileUrl": "https://cdn.optimizely.com/json/abc.json", + "accountId": "123", + "projectId": "", + "trackKnownUsers": true, + "trackCategorizedPages": false, + "trackNamedPages": false, + "anonymizeIp": false, + "enrichDecisions": true, + "campaignId": "123", + "experimentId": "123", + "eventMapping": [], + "attributeMapping": [], + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "dataFileUrl": "https://cdn.optimizely.com/json/abc.json", + "accountId": "123", + "projectId": "", + "trackKnownUsers": true, + "trackCategorizedPages": false, + "trackNamedPages": false, + "anonymizeIp": false, + "enrichDecisions": true, + "campaignId": "123", + "experimentId": "123", + "eventMapping": [], + "attributeMapping": [], + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "dataFileUrl": "https://cdn.optimizely.com/json/abc.json", + "accountId": "123", + "projectId": "", + "trackKnownUsers": true, + "trackCategorizedPages": false, + "trackNamedPages": false, + "anonymizeIp": false, + "enrichDecisions": true, + "campaignId": "123", + "experimentId": "123", + "eventMapping": [], + "attributeMapping": [], + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "dataFileUrl": "https://cdn.optimizely.com/json/abc.json", + "accountId": "123", + "projectId": "", + "trackKnownUsers": true, + "trackCategorizedPages": false, + "trackNamedPages": false, + "anonymizeIp": false, + "enrichDecisions": true, + "campaignId": "123", + "experimentId": "123", + "eventMapping": [], + "attributeMapping": [], + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "dataFileUrl": "https://cdn.optimizely.com/json/abc.json", + "accountId": "123", + "projectId": "", + "trackKnownUsers": true, + "trackCategorizedPages": false, + "trackNamedPages": false, + "anonymizeIp": false, + "enrichDecisions": true, + "campaignId": "123", + "experimentId": "123", + "eventMapping": [], + "attributeMapping": [], + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/ortto.json b/test/data/validation/destinations/ortto.json index 8048635cd..323bad42a 100644 --- a/test/data/validation/destinations/ortto.json +++ b/test/data/validation/destinations/ortto.json @@ -107,5 +107,108 @@ "err": [ "privateApiKey must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,300})$\"" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "privateApiKey": "fsdfssdfsdf", + "instanceRegion": "other", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "privateApiKey": "fsdfssdfsdf", + "instanceRegion": "other", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "privateApiKey": "fsdfssdfsdf", + "instanceRegion": "other", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "privateApiKey": "fsdfssdfsdf", + "instanceRegion": "other", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "privateApiKey": "fsdfssdfsdf", + "instanceRegion": "other", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/pagerduty.json b/test/data/validation/destinations/pagerduty.json index eda7adcd5..69eb9f093 100644 --- a/test/data/validation/destinations/pagerduty.json +++ b/test/data/validation/destinations/pagerduty.json @@ -28,5 +28,103 @@ "routingKey": "e95facc04764XXXX8bfb002540d5d1a6" }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "routingKey": "e95facc04764XXXX8bfb002540d5d1a6", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "routingKey": "e95facc04764XXXX8bfb002540d5d1a6", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "routingKey": "e95facc04764XXXX8bfb002540d5d1a6", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "routingKey": "e95facc04764XXXX8bfb002540d5d1a6", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "routingKey": "e95facc04764XXXX8bfb002540d5d1a6", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From 2bd407f2ec6f01b8c521b233a297b1047b46b035 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 25 Jun 2024 09:53:57 +0530 Subject: [PATCH 46/68] feat: added GCM support for 5 destinations - Batch 18 (#1495) --- .../destinations/pardot/db-config.json | 24 +- .../destinations/pardot/ui-config.json | 93 +++- .../destinations/pendo/db-config.json | 5 +- .../destinations/pendo/ui-config.json | 93 +++- .../destinations/persistiq/db-config.json | 24 +- .../destinations/persistiq/schema.json | 511 ++++++++++++++++++ .../destinations/persistiq/ui-config.json | 93 +++- .../destinations/pinterest_tag/db-config.json | 25 +- .../destinations/pinterest_tag/schema.json | 511 ++++++++++++++++++ .../destinations/pinterest_tag/ui-config.json | 93 +++- .../destinations/pipedream/db-config.json | 24 +- .../destinations/pipedream/schema.json | 511 ++++++++++++++++++ .../destinations/pipedream/ui-config.json | 93 +++- .../validation/destinations/persistIq.json | 98 ++++ .../destinations/pinterest_tag.json | 133 +++++ .../validation/destinations/pipedream.json | 103 ++++ 16 files changed, 2379 insertions(+), 55 deletions(-) diff --git a/src/configurations/destinations/pardot/db-config.json b/src/configurations/destinations/pardot/db-config.json index 179e2405d..c804c1e19 100644 --- a/src/configurations/destinations/pardot/db-config.json +++ b/src/configurations/destinations/pardot/db-config.json @@ -5,7 +5,7 @@ "auth": { "type": "OAuth", "role": "pardot", "rudderScopes": ["delivery"] }, "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -41,17 +41,17 @@ "campaignId", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["businessUnitId"] }, diff --git a/src/configurations/destinations/pardot/ui-config.json b/src/configurations/destinations/pardot/ui-config.json index b42874bc7..6d6a209b3 100644 --- a/src/configurations/destinations/pardot/ui-config.json +++ b/src/configurations/destinations/pardot/ui-config.json @@ -39,7 +39,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/pendo/db-config.json b/src/configurations/destinations/pendo/db-config.json index 926d8d747..b3729b6ba 100644 --- a/src/configurations/destinations/pendo/db-config.json +++ b/src/configurations/destinations/pendo/db-config.json @@ -9,7 +9,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -23,7 +24,7 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/pendo/ui-config.json b/src/configurations/destinations/pendo/ui-config.json index 8df395b72..e38556b72 100644 --- a/src/configurations/destinations/pendo/ui-config.json +++ b/src/configurations/destinations/pendo/ui-config.json @@ -98,7 +98,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/persistiq/db-config.json b/src/configurations/destinations/persistiq/db-config.json index f9031e732..8883f065c 100644 --- a/src/configurations/destinations/persistiq/db-config.json +++ b/src/configurations/destinations/persistiq/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["apiKey", "oneTrustCookieCategories"], + "includeKeys": ["apiKey", "oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "web", @@ -35,17 +35,17 @@ }, "destConfig": { "defaultConfig": ["apiKey", "persistIqAttributesMapping", "oneTrustCookieCategories"], - "web": ["connectionMode"], - "cloud": ["connectionMode"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "web": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/persistiq/schema.json b/src/configurations/destinations/persistiq/schema.json index 59635e41b..990864e80 100644 --- a/src/configurations/destinations/persistiq/schema.json +++ b/src/configurations/destinations/persistiq/schema.json @@ -36,6 +36,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/persistiq/ui-config.json b/src/configurations/destinations/persistiq/ui-config.json index 19751f389..c0cad2712 100644 --- a/src/configurations/destinations/persistiq/ui-config.json +++ b/src/configurations/destinations/persistiq/ui-config.json @@ -49,7 +49,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/pinterest_tag/db-config.json b/src/configurations/destinations/pinterest_tag/db-config.json index c08f2c52c..906590226 100644 --- a/src/configurations/destinations/pinterest_tag/db-config.json +++ b/src/configurations/destinations/pinterest_tag/db-config.json @@ -15,7 +15,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -71,17 +72,17 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"] }, "secretKeys": ["adAccountId", "conversionToken"] } diff --git a/src/configurations/destinations/pinterest_tag/schema.json b/src/configurations/destinations/pinterest_tag/schema.json index 8cf54c9be..a5f33f381 100644 --- a/src/configurations/destinations/pinterest_tag/schema.json +++ b/src/configurations/destinations/pinterest_tag/schema.json @@ -129,6 +129,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/pinterest_tag/ui-config.json b/src/configurations/destinations/pinterest_tag/ui-config.json index 45ee932d2..bd0e9256a 100644 --- a/src/configurations/destinations/pinterest_tag/ui-config.json +++ b/src/configurations/destinations/pinterest_tag/ui-config.json @@ -286,7 +286,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/pipedream/db-config.json b/src/configurations/destinations/pipedream/db-config.json index 1a4f91e7f..0b04fa63b 100644 --- a/src/configurations/destinations/pipedream/db-config.json +++ b/src/configurations/destinations/pipedream/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": false, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -34,17 +34,17 @@ }, "destConfig": { "defaultConfig": ["pipedreamUrl", "pipedreamMethod", "headers", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["headers.to"] } diff --git a/src/configurations/destinations/pipedream/schema.json b/src/configurations/destinations/pipedream/schema.json index 19191db5b..ccf28500c 100644 --- a/src/configurations/destinations/pipedream/schema.json +++ b/src/configurations/destinations/pipedream/schema.json @@ -41,6 +41,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/pipedream/ui-config.json b/src/configurations/destinations/pipedream/ui-config.json index d0032746e..fd3ffb189 100644 --- a/src/configurations/destinations/pipedream/ui-config.json +++ b/src/configurations/destinations/pipedream/ui-config.json @@ -74,7 +74,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/persistIq.json b/test/data/validation/destinations/persistIq.json index 06267210f..8b814233d 100644 --- a/test/data/validation/destinations/persistIq.json +++ b/test/data/validation/destinations/persistIq.json @@ -23,5 +23,103 @@ }, "result": false, "err": ["apiKey must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\""] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKey": "893yXXXf823yf0", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiKey": "893yXXXf823yf0", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKey": "893yXXXf823yf0", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiKey": "893yXXXf823yf0", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKey": "893yXXXf823yf0", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/pinterest_tag.json b/test/data/validation/destinations/pinterest_tag.json index 67afdaba4..64df06f60 100644 --- a/test/data/validation/destinations/pinterest_tag.json +++ b/test/data/validation/destinations/pinterest_tag.json @@ -197,5 +197,138 @@ "conversionToken must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,101})$\"", " must match \"then\" schema" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "tagId": "123456789", + "advertiserId": "429000995", + "appId": "429000995", + "enhancedMatch": true, + "sendingUnHashedData": true, + "deduplicationKey": "messageId", + "sendExternalId": true, + "sendAsCustomEvent": true, + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "tagId": "123456789", + "advertiserId": "429000995", + "appId": "429000995", + "enhancedMatch": true, + "sendingUnHashedData": true, + "deduplicationKey": "messageId", + "sendExternalId": true, + "sendAsCustomEvent": true, + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "tagId": "123456789", + "advertiserId": "429000995", + "appId": "429000995", + "enhancedMatch": true, + "sendingUnHashedData": true, + "deduplicationKey": "messageId", + "sendExternalId": true, + "sendAsCustomEvent": true, + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "tagId": "123456789", + "advertiserId": "429000995", + "appId": "429000995", + "enhancedMatch": true, + "sendingUnHashedData": true, + "deduplicationKey": "messageId", + "sendExternalId": true, + "sendAsCustomEvent": true, + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "tagId": "123456789", + "advertiserId": "429000995", + "appId": "429000995", + "enhancedMatch": true, + "sendingUnHashedData": true, + "deduplicationKey": "messageId", + "sendExternalId": true, + "sendAsCustomEvent": true, + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/pipedream.json b/test/data/validation/destinations/pipedream.json index 8f4b83947..59f5d7e96 100644 --- a/test/data/validation/destinations/pipedream.json +++ b/test/data/validation/destinations/pipedream.json @@ -86,5 +86,108 @@ ] }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "pipedreamUrl": "http://sample.com/url", + "pipedreamMethod": "GET", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "pipedreamUrl": "http://sample.com/url", + "pipedreamMethod": "GET", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "pipedreamUrl": "http://sample.com/url", + "pipedreamMethod": "GET", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "pipedreamUrl": "http://sample.com/url", + "pipedreamMethod": "GET", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "pipedreamUrl": "http://sample.com/url", + "pipedreamMethod": "GET", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From e6b6437d4887be5d0b255afb4c0f1c7220540355 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 25 Jun 2024 09:55:48 +0530 Subject: [PATCH 47/68] feat: added GCM support for 5 destinations - Batch 19 (#1496) --- .../destinations/pipedrive/db-config.json | 24 +- .../destinations/pipedrive/ui-config.json | 93 +++- .../destinations/podsights/db-config.json | 5 +- .../destinations/podsights/schema.json | 51 ++ .../destinations/podsights/ui-config.json | 93 +++- .../post_affiliate_pro/db-config.json | 5 +- .../post_affiliate_pro/ui-config.json | 93 +++- .../destinations/postgres/db-config.json | 24 +- .../destinations/postgres/schema.json | 511 ++++++++++++++++++ .../destinations/postgres/ui-config.json | 93 +++- .../destinations/profitwell/db-config.json | 25 +- .../destinations/profitwell/ui-config.json | 93 +++- .../validation/destinations/podsights.json | 98 ++++ .../validation/destinations/postgres.json | 153 ++++++ 14 files changed, 1316 insertions(+), 45 deletions(-) diff --git a/src/configurations/destinations/pipedrive/db-config.json b/src/configurations/destinations/pipedrive/db-config.json index 6328be1df..e7e900d3b 100644 --- a/src/configurations/destinations/pipedrive/db-config.json +++ b/src/configurations/destinations/pipedrive/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -42,17 +42,17 @@ "organizationMap", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiToken"] }, diff --git a/src/configurations/destinations/pipedrive/ui-config.json b/src/configurations/destinations/pipedrive/ui-config.json index 81e279192..f3957a4d7 100644 --- a/src/configurations/destinations/pipedrive/ui-config.json +++ b/src/configurations/destinations/pipedrive/ui-config.json @@ -98,7 +98,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/podsights/db-config.json b/src/configurations/destinations/podsights/db-config.json index f7af7547b..3c68ee492 100644 --- a/src/configurations/destinations/podsights/db-config.json +++ b/src/configurations/destinations/podsights/db-config.json @@ -11,7 +11,8 @@ "whitelistedEvents", "oneTrustCookieCategories", "eventFilteringOption", - "enableAliasCall" + "enableAliasCall", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -27,7 +28,7 @@ "enableAliasCall", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": ["pixelId"] } diff --git a/src/configurations/destinations/podsights/schema.json b/src/configurations/destinations/podsights/schema.json index 81dde292f..bffde2a37 100644 --- a/src/configurations/destinations/podsights/schema.json +++ b/src/configurations/destinations/podsights/schema.json @@ -67,6 +67,57 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { "web": { "type": "string", "enum": ["device"] } } diff --git a/src/configurations/destinations/podsights/ui-config.json b/src/configurations/destinations/podsights/ui-config.json index 4c27c76ad..15d19ca2a 100644 --- a/src/configurations/destinations/podsights/ui-config.json +++ b/src/configurations/destinations/podsights/ui-config.json @@ -150,7 +150,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/post_affiliate_pro/db-config.json b/src/configurations/destinations/post_affiliate_pro/db-config.json index 021e029d8..68cec2e38 100644 --- a/src/configurations/destinations/post_affiliate_pro/db-config.json +++ b/src/configurations/destinations/post_affiliate_pro/db-config.json @@ -22,7 +22,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -49,7 +50,7 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] } } } diff --git a/src/configurations/destinations/post_affiliate_pro/ui-config.json b/src/configurations/destinations/post_affiliate_pro/ui-config.json index cc363ad30..cc016bb2f 100644 --- a/src/configurations/destinations/post_affiliate_pro/ui-config.json +++ b/src/configurations/destinations/post_affiliate_pro/ui-config.json @@ -212,7 +212,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/postgres/db-config.json b/src/configurations/destinations/postgres/db-config.json index ec87c8ed9..1753b0e06 100644 --- a/src/configurations/destinations/postgres/db-config.json +++ b/src/configurations/destinations/postgres/db-config.json @@ -5,7 +5,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -75,17 +75,17 @@ "serverCA", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "cloudSource": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "cloudSource": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": [ "password", diff --git a/src/configurations/destinations/postgres/schema.json b/src/configurations/destinations/postgres/schema.json index 911adad55..ce3c2af65 100644 --- a/src/configurations/destinations/postgres/schema.json +++ b/src/configurations/destinations/postgres/schema.json @@ -52,6 +52,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cloudSource": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/postgres/ui-config.json b/src/configurations/destinations/postgres/ui-config.json index ace3d1a3d..49fc7faf9 100644 --- a/src/configurations/destinations/postgres/ui-config.json +++ b/src/configurations/destinations/postgres/ui-config.json @@ -632,7 +632,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/profitwell/db-config.json b/src/configurations/destinations/profitwell/db-config.json index 676f5865d..722cb9b16 100644 --- a/src/configurations/destinations/profitwell/db-config.json +++ b/src/configurations/destinations/profitwell/db-config.json @@ -10,7 +10,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -48,17 +49,17 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "publicApiKey", "siteType", "connectionMode"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "web": ["useNativeSDK", "publicApiKey", "siteType", "connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["privateApiKey", "publicApiKey"] } diff --git a/src/configurations/destinations/profitwell/ui-config.json b/src/configurations/destinations/profitwell/ui-config.json index 7a72761f9..d8fba950e 100644 --- a/src/configurations/destinations/profitwell/ui-config.json +++ b/src/configurations/destinations/profitwell/ui-config.json @@ -130,7 +130,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/podsights.json b/test/data/validation/destinations/podsights.json index d828d2fd7..3d835321d 100644 --- a/test/data/validation/destinations/podsights.json +++ b/test/data/validation/destinations/podsights.json @@ -94,5 +94,103 @@ ] }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "pixelId": "qwerty1234qwerty", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "pixelId": "qwerty1234qwerty", + "consentManagement": { + "web": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "pixelId": "qwerty1234qwerty", + "consentManagement": { + "web": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0 must have required property 'resolutionStrategy'", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "pixelId": "qwerty1234qwerty", + "consentManagement": { + "web": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "pixelId": "qwerty1234qwerty", + "consentManagement": { + "web": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.web.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/postgres.json b/test/data/validation/destinations/postgres.json index fc5cd7cb8..283643807 100644 --- a/test/data/validation/destinations/postgres.json +++ b/test/data/validation/destinations/postgres.json @@ -456,5 +456,158 @@ "useSSL": true }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "host": "test-host", + "database": "test-database", + "user": "test-user", + "password": "test-password", + "port": "0000", + "sslMode": "disable", + "bucketProvider": "S3", + "syncFrequency": "30", + "useRudderStorage": false, + "bucketName": "test-bucket", + "accessKeyID": "test-access-key-id", + "accessKey": "test-access-key", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "host": "test-host", + "database": "test-database", + "user": "test-user", + "password": "test-password", + "port": "0000", + "sslMode": "disable", + "bucketProvider": "S3", + "syncFrequency": "30", + "useRudderStorage": false, + "bucketName": "test-bucket", + "accessKeyID": "test-access-key-id", + "accessKey": "test-access-key", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "host": "test-host", + "database": "test-database", + "user": "test-user", + "password": "test-password", + "port": "0000", + "sslMode": "disable", + "bucketProvider": "S3", + "syncFrequency": "30", + "useRudderStorage": false, + "bucketName": "test-bucket", + "accessKeyID": "test-access-key-id", + "accessKey": "test-access-key", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "host": "test-host", + "database": "test-database", + "user": "test-user", + "password": "test-password", + "port": "0000", + "sslMode": "disable", + "bucketProvider": "S3", + "syncFrequency": "30", + "useRudderStorage": false, + "bucketName": "test-bucket", + "accessKeyID": "test-access-key-id", + "accessKey": "test-access-key", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "host": "test-host", + "database": "test-database", + "user": "test-user", + "password": "test-password", + "port": "0000", + "sslMode": "disable", + "bucketProvider": "S3", + "syncFrequency": "30", + "useRudderStorage": false, + "bucketName": "test-bucket", + "accessKeyID": "test-access-key-id", + "accessKey": "test-access-key", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From db221d4124c464bba05b9dbb2d25a0b08492f252 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 25 Jun 2024 09:57:49 +0530 Subject: [PATCH 48/68] feat: added GCM support for 5 destinations - Batch 20 (#1497) --- scripts/run-schema-validation.sh | 4 +- .../destinations/qualaroo/db-config.json | 5 +- .../destinations/qualaroo/schema.json | 51 ++ .../destinations/qualaroo/ui-config.json | 93 +++- .../destinations/qualtrics/db-config.json | 9 +- .../destinations/qualtrics/ui-config.json | 93 +++- .../destinations/quantummetric/db-config.json | 5 +- .../destinations/quantummetric/ui-config.json | 93 +++- .../destinations/rakuten/db-config.json | 26 +- .../destinations/rakuten/schema.json | 523 ++++++++++++++++++ .../destinations/rakuten/ui-config.json | 131 ++++- .../destinations/refiner/db-config.json | 25 +- .../destinations/refiner/schema.json | 511 +++++++++++++++++ .../destinations/refiner/ui-config.json | 93 +++- .../validation/destinations/qualaroo.json | 113 ++++ .../data/validation/destinations/rakuten.json | 98 ++++ .../data/validation/destinations/refiner.json | 108 ++++ 17 files changed, 1940 insertions(+), 41 deletions(-) diff --git a/scripts/run-schema-validation.sh b/scripts/run-schema-validation.sh index e776196f9..db28cf3ec 100755 --- a/scripts/run-schema-validation.sh +++ b/scripts/run-schema-validation.sh @@ -9,7 +9,7 @@ for file in $changed_files; do if [[ "$parent_directory" == "src/configurations/destinations" || "$parent_directory" == "src/configurations/sources" ]]; then name=$(echo "$file" | cut -d '/' -f 4) selector=$(echo "$parent_directory" | cut -d '/' -f 3) - selector=${selector::-1} + selector=$(echo "$selector" | sed 's/.$//') # Storing the last directory to ensure that validation runs only once, even if multiple configuration files are changed for a given source or destination. if [ "$last_directory" != "${directory}" ]; then output==$(python scripts/schemaGenerator.py -name="$name" $selector 2>&1) @@ -28,4 +28,4 @@ for file in $changed_files; do last_directory=${directory} fi done -exit $exit_code \ No newline at end of file +exit $exit_code diff --git a/src/configurations/destinations/qualaroo/db-config.json b/src/configurations/destinations/qualaroo/db-config.json index 6f4f7a5ae..c7e5645b6 100644 --- a/src/configurations/destinations/qualaroo/db-config.json +++ b/src/configurations/destinations/qualaroo/db-config.json @@ -14,7 +14,8 @@ "eventFilteringOption", "whitelistedEvents", "blacklistedEvents", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -33,7 +34,7 @@ "blacklistedEvents", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": ["customerId", "siteToken"] } diff --git a/src/configurations/destinations/qualaroo/schema.json b/src/configurations/destinations/qualaroo/schema.json index 1c29c1cb9..33750d82d 100644 --- a/src/configurations/destinations/qualaroo/schema.json +++ b/src/configurations/destinations/qualaroo/schema.json @@ -55,6 +55,57 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { "web": { "type": "string", "enum": ["device"] } } diff --git a/src/configurations/destinations/qualaroo/ui-config.json b/src/configurations/destinations/qualaroo/ui-config.json index aefd001a3..615ad8d1d 100644 --- a/src/configurations/destinations/qualaroo/ui-config.json +++ b/src/configurations/destinations/qualaroo/ui-config.json @@ -210,7 +210,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/qualtrics/db-config.json b/src/configurations/destinations/qualtrics/db-config.json index 6e6595093..4870f96e7 100644 --- a/src/configurations/destinations/qualtrics/db-config.json +++ b/src/configurations/destinations/qualtrics/db-config.json @@ -11,7 +11,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web", "android", "ios"], @@ -28,9 +29,9 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "enableGenericPageTitle", "connectionMode"], - "android": ["useNativeSDK", "connectionMode"], - "ios": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "enableGenericPageTitle", "connectionMode", "consentManagement"], + "android": ["useNativeSDK", "connectionMode", "consentManagement"], + "ios": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": ["projectId"] } diff --git a/src/configurations/destinations/qualtrics/ui-config.json b/src/configurations/destinations/qualtrics/ui-config.json index 8bde326c5..05c9d4629 100644 --- a/src/configurations/destinations/qualtrics/ui-config.json +++ b/src/configurations/destinations/qualtrics/ui-config.json @@ -109,7 +109,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/quantummetric/db-config.json b/src/configurations/destinations/quantummetric/db-config.json index 7130a6c62..45e61ca0e 100644 --- a/src/configurations/destinations/quantummetric/db-config.json +++ b/src/configurations/destinations/quantummetric/db-config.json @@ -9,7 +9,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -23,7 +24,7 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": [] } diff --git a/src/configurations/destinations/quantummetric/ui-config.json b/src/configurations/destinations/quantummetric/ui-config.json index b991d7cc4..d9b338bf1 100644 --- a/src/configurations/destinations/quantummetric/ui-config.json +++ b/src/configurations/destinations/quantummetric/ui-config.json @@ -97,7 +97,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/rakuten/db-config.json b/src/configurations/destinations/rakuten/db-config.json index 0c2b416aa..1fb3b79ea 100644 --- a/src/configurations/destinations/rakuten/db-config.json +++ b/src/configurations/destinations/rakuten/db-config.json @@ -5,7 +5,7 @@ "cdkV2Enabled": true, "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["mid"], + "includeKeys": ["mid", "oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -35,18 +35,18 @@ "cloud": ["cloud"] }, "destConfig": { - "defaultConfig": ["mid"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "web": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "defaultConfig": ["mid", "oneTrustCookieCategories"], + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["mid"] }, diff --git a/src/configurations/destinations/rakuten/schema.json b/src/configurations/destinations/rakuten/schema.json index 93183961b..a7f3957a4 100644 --- a/src/configurations/destinations/rakuten/schema.json +++ b/src/configurations/destinations/rakuten/schema.json @@ -8,6 +8,529 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, + "oneTrustCookieCategories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/rakuten/ui-config.json b/src/configurations/destinations/rakuten/ui-config.json index f29a8be81..fb883e897 100644 --- a/src/configurations/destinations/rakuten/ui-config.json +++ b/src/configurations/destinations/rakuten/ui-config.json @@ -46,14 +46,141 @@ }, { "title": "Configuration settings", - "note": "No configuration settings for this destination", - "sections": [] + "note": "Manage the settings for your destination", + "sections": [ + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [ + { + "title": "OneTrust consent settings", + "note": [ + "Enter your OneTrust consent category IDs if you have them configured. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + { + "text": "Learn more ", + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/consent-manager/onetrust/" + }, + "about RudderStack's OneTrust Consent Management feature." + ], + "fields": [ + { + "type": "tagInput", + "label": "Consent categories", + "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry.", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: C0001", + "default": [ + { + "oneTrustCookieCategory": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + } + ] + } + ] } ], "sdkTemplate": { "title": "SDK settings", "note": "not visible in the ui", "fields": [] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/refiner/db-config.json b/src/configurations/destinations/refiner/db-config.json index ebfeacb2e..7d6f5ebce 100644 --- a/src/configurations/destinations/refiner/db-config.json +++ b/src/configurations/destinations/refiner/db-config.json @@ -12,7 +12,8 @@ "blacklistedEvents", "whitelistedEvents", "eventFilteringOption", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -56,17 +57,17 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"], - "cloud": ["connectionMode"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/refiner/schema.json b/src/configurations/destinations/refiner/schema.json index 922976b8f..534da0be5 100644 --- a/src/configurations/destinations/refiner/schema.json +++ b/src/configurations/destinations/refiner/schema.json @@ -86,6 +86,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/refiner/ui-config.json b/src/configurations/destinations/refiner/ui-config.json index 8122bb6e6..f698d76af 100644 --- a/src/configurations/destinations/refiner/ui-config.json +++ b/src/configurations/destinations/refiner/ui-config.json @@ -139,7 +139,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/qualaroo.json b/test/data/validation/destinations/qualaroo.json index 96147a749..9890af495 100644 --- a/test/data/validation/destinations/qualaroo.json +++ b/test/data/validation/destinations/qualaroo.json @@ -164,5 +164,118 @@ "err": [ "siteToken must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\"" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "customerId": "92X02", + "siteToken": "jXN", + "recordQualarooEvents": true, + "updateEventNames": true, + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "customerId": "92X02", + "siteToken": "jXN", + "recordQualarooEvents": true, + "updateEventNames": true, + "consentManagement": { + "web": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "customerId": "92X02", + "siteToken": "jXN", + "recordQualarooEvents": true, + "updateEventNames": true, + "consentManagement": { + "web": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0 must have required property 'resolutionStrategy'", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "customerId": "92X02", + "siteToken": "jXN", + "recordQualarooEvents": true, + "updateEventNames": true, + "consentManagement": { + "web": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "customerId": "92X02", + "siteToken": "jXN", + "recordQualarooEvents": true, + "updateEventNames": true, + "consentManagement": { + "web": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.web.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/rakuten.json b/test/data/validation/destinations/rakuten.json index 856fd5236..0f3e87a01 100644 --- a/test/data/validation/destinations/rakuten.json +++ b/test/data/validation/destinations/rakuten.json @@ -9,5 +9,103 @@ "config": {}, "result": false, "err": [" must have required property 'mid'"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "mid": "1234595bdXXXX112976i0ff9b", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "mid": "1234595bdXXXX112976i0ff9b", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "mid": "1234595bdXXXX112976i0ff9b", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "mid": "1234595bdXXXX112976i0ff9b", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "mid": "1234595bdXXXX112976i0ff9b", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/refiner.json b/test/data/validation/destinations/refiner.json index f84b378ba..0ac68b9d2 100644 --- a/test/data/validation/destinations/refiner.json +++ b/test/data/validation/destinations/refiner.json @@ -92,5 +92,113 @@ }, "result": false, "err": [" must have required property 'webClientApiKey'"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKey": "d2bnp1XXXXx6zq1p89h5hyx2hf5q1k3v", + "webClientApiKey": "d2bnp1XXXXx6zq1p89h5hyx2hf5q1k3v", + "eventFilteringOption": "disable", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiKey": "d2bnp1XXXXx6zq1p89h5hyx2hf5q1k3v", + "webClientApiKey": "d2bnp1XXXXx6zq1p89h5hyx2hf5q1k3v", + "eventFilteringOption": "disable", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKey": "d2bnp1XXXXx6zq1p89h5hyx2hf5q1k3v", + "webClientApiKey": "d2bnp1XXXXx6zq1p89h5hyx2hf5q1k3v", + "eventFilteringOption": "disable", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiKey": "d2bnp1XXXXx6zq1p89h5hyx2hf5q1k3v", + "webClientApiKey": "d2bnp1XXXXx6zq1p89h5hyx2hf5q1k3v", + "eventFilteringOption": "disable", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKey": "d2bnp1XXXXx6zq1p89h5hyx2hf5q1k3v", + "webClientApiKey": "d2bnp1XXXXx6zq1p89h5hyx2hf5q1k3v", + "eventFilteringOption": "disable", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From 7360b6e802d35dfd1d52b8ce3ba41ed15c9f268d Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 25 Jun 2024 09:59:32 +0530 Subject: [PATCH 49/68] feat: added GCM support for 5 destinations - Batch 22 (#1501) --- .../salesforce_oauth/db-config.json | 22 +- .../destinations/salesforce_oauth/schema.json | 465 ++++++++++++++++++ .../salesforce_oauth/ui-config.json | 93 +++- .../destinations/satismeter/db-config.json | 5 +- .../destinations/satismeter/schema.json | 51 ++ .../destinations/satismeter/ui-config.json | 93 +++- .../destinations/segment/db-config.json | 24 +- .../destinations/segment/ui-config.json | 93 +++- .../destinations/sendgrid/db-config.json | 24 +- .../destinations/sendgrid/ui-config.json | 93 +++- .../destinations/sfmc/db-config.json | 24 +- .../destinations/sfmc/ui-config.json | 93 +++- .../destinations/salesforce_oauth.json | 108 ++++ .../validation/destinations/satismeter.json | 113 +++++ 14 files changed, 1247 insertions(+), 54 deletions(-) diff --git a/src/configurations/destinations/salesforce_oauth/db-config.json b/src/configurations/destinations/salesforce_oauth/db-config.json index e13d0c2ae..a58e70df7 100644 --- a/src/configurations/destinations/salesforce_oauth/db-config.json +++ b/src/configurations/destinations/salesforce_oauth/db-config.json @@ -7,7 +7,7 @@ "auth": { "type": "OAuth", "role": "salesforce", "rudderScopes": ["delivery"] }, "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -30,16 +30,16 @@ "useContactId", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"] }, "secretKeys": [], "supportedConnectionModes": { diff --git a/src/configurations/destinations/salesforce_oauth/schema.json b/src/configurations/destinations/salesforce_oauth/schema.json index 23021d713..056dd635f 100644 --- a/src/configurations/destinations/salesforce_oauth/schema.json +++ b/src/configurations/destinations/salesforce_oauth/schema.json @@ -19,6 +19,471 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/salesforce_oauth/ui-config.json b/src/configurations/destinations/salesforce_oauth/ui-config.json index a92342930..41fb6b927 100644 --- a/src/configurations/destinations/salesforce_oauth/ui-config.json +++ b/src/configurations/destinations/salesforce_oauth/ui-config.json @@ -41,7 +41,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/satismeter/db-config.json b/src/configurations/destinations/satismeter/db-config.json index b231346be..eaee5bfc3 100644 --- a/src/configurations/destinations/satismeter/db-config.json +++ b/src/configurations/destinations/satismeter/db-config.json @@ -14,7 +14,8 @@ "eventFilteringOption", "whitelistedEvents", "blacklistedEvents", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -39,7 +40,7 @@ "blacklistedEvents", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": ["writeKey"] } diff --git a/src/configurations/destinations/satismeter/schema.json b/src/configurations/destinations/satismeter/schema.json index 0aa2b3802..9c8ed3618 100644 --- a/src/configurations/destinations/satismeter/schema.json +++ b/src/configurations/destinations/satismeter/schema.json @@ -65,6 +65,57 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/satismeter/ui-config.json b/src/configurations/destinations/satismeter/ui-config.json index e1a030b3f..5bce6bb5c 100644 --- a/src/configurations/destinations/satismeter/ui-config.json +++ b/src/configurations/destinations/satismeter/ui-config.json @@ -206,7 +206,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/segment/db-config.json b/src/configurations/destinations/segment/db-config.json index 7b436cba1..10981923a 100644 --- a/src/configurations/destinations/segment/db-config.json +++ b/src/configurations/destinations/segment/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -35,17 +35,17 @@ }, "destConfig": { "defaultConfig": ["writeKey", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": [] } diff --git a/src/configurations/destinations/segment/ui-config.json b/src/configurations/destinations/segment/ui-config.json index a26e32a0f..cd78d92ea 100644 --- a/src/configurations/destinations/segment/ui-config.json +++ b/src/configurations/destinations/segment/ui-config.json @@ -31,7 +31,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/sendgrid/db-config.json b/src/configurations/destinations/sendgrid/db-config.json index 7414074f0..48e9b047d 100644 --- a/src/configurations/destinations/sendgrid/db-config.json +++ b/src/configurations/destinations/sendgrid/db-config.json @@ -5,7 +5,7 @@ "isAudienceSupported": true, "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -72,17 +72,17 @@ "utmCampaign", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/sendgrid/ui-config.json b/src/configurations/destinations/sendgrid/ui-config.json index e74946fa6..3f5795056 100644 --- a/src/configurations/destinations/sendgrid/ui-config.json +++ b/src/configurations/destinations/sendgrid/ui-config.json @@ -384,7 +384,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/sfmc/db-config.json b/src/configurations/destinations/sfmc/db-config.json index a74970a1a..dfa09aa5b 100644 --- a/src/configurations/destinations/sfmc/db-config.json +++ b/src/configurations/destinations/sfmc/db-config.json @@ -5,7 +5,7 @@ "transformAtV1": "router", "saveDestinationResponse": true, "throttlingCost": { "eventType": { "identify": 1, "track": 1 } }, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -47,17 +47,17 @@ "eventToDefinitionMapping", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["clientId", "clientSecret", "subDomain"] } diff --git a/src/configurations/destinations/sfmc/ui-config.json b/src/configurations/destinations/sfmc/ui-config.json index 9e17c318b..5e9713e77 100644 --- a/src/configurations/destinations/sfmc/ui-config.json +++ b/src/configurations/destinations/sfmc/ui-config.json @@ -126,7 +126,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/salesforce_oauth.json b/test/data/validation/destinations/salesforce_oauth.json index df31fa005..8d6a59503 100644 --- a/test/data/validation/destinations/salesforce_oauth.json +++ b/test/data/validation/destinations/salesforce_oauth.json @@ -31,5 +31,113 @@ }, "result": false, "err": ["sandbox must be boolean"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "mapProperties": true, + "sandbox": false, + "useContactId": true, + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "mapProperties": true, + "sandbox": false, + "useContactId": true, + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "mapProperties": true, + "sandbox": false, + "useContactId": true, + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "mapProperties": true, + "sandbox": false, + "useContactId": true, + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "mapProperties": true, + "sandbox": false, + "useContactId": true, + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/satismeter.json b/test/data/validation/destinations/satismeter.json index 39ba21e3c..fe51e08de 100644 --- a/test/data/validation/destinations/satismeter.json +++ b/test/data/validation/destinations/satismeter.json @@ -59,5 +59,118 @@ }, "result": false, "err": ["writeKey must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\""] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "writeKey": "dh982XXX2fy923f09", + "recordSatismeterEvents": true, + "identifyAnonymousUsers": true, + "updateEventNames": true, + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "writeKey": "dh982XXX2fy923f09", + "recordSatismeterEvents": true, + "identifyAnonymousUsers": true, + "updateEventNames": true, + "consentManagement": { + "web": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "writeKey": "dh982XXX2fy923f09", + "recordSatismeterEvents": true, + "identifyAnonymousUsers": true, + "updateEventNames": true, + "consentManagement": { + "web": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0 must have required property 'resolutionStrategy'", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "writeKey": "dh982XXX2fy923f09", + "recordSatismeterEvents": true, + "identifyAnonymousUsers": true, + "updateEventNames": true, + "consentManagement": { + "web": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "writeKey": "dh982XXX2fy923f09", + "recordSatismeterEvents": true, + "identifyAnonymousUsers": true, + "updateEventNames": true, + "consentManagement": { + "web": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.web.0.provider must be equal to one of the allowed values"] } ] From fb53441eba682d78e531cc7b5e94f7e18352a14a Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 25 Jun 2024 10:01:08 +0530 Subject: [PATCH 50/68] feat: added GCM support for 5 destinations - Batch 23 (#1502) --- .../destinations/sendinblue/db-config.json | 25 +- .../destinations/sendinblue/schema.json | 511 ++++++++++++++++++ .../destinations/sendinblue/ui-config.json | 93 +++- .../destinations/sentry/db-config.json | 5 +- .../destinations/sentry/schema.json | 51 ++ .../destinations/sentry/ui-config.json | 93 +++- .../destinations/serenytics/db-config.json | 24 +- .../destinations/serenytics/schema.json | 511 ++++++++++++++++++ .../destinations/serenytics/ui-config.json | 93 +++- .../destinations/shynet/db-config.json | 25 +- .../destinations/shynet/schema.json | 511 ++++++++++++++++++ .../destinations/shynet/ui-config.json | 93 +++- .../destinations/signl4/db-config.json | 24 +- .../destinations/signl4/schema.json | 511 ++++++++++++++++++ .../destinations/signl4/ui-config.json | 93 +++- .../validation/destinations/sendinblue.json | 123 +++++ test/data/validation/destinations/sentry.json | 128 +++++ test/data/validation/destinations/shynet.json | 103 ++++ 18 files changed, 2962 insertions(+), 55 deletions(-) diff --git a/src/configurations/destinations/sendinblue/db-config.json b/src/configurations/destinations/sendinblue/db-config.json index 1382b9d1d..189afde7c 100644 --- a/src/configurations/destinations/sendinblue/db-config.json +++ b/src/configurations/destinations/sendinblue/db-config.json @@ -11,7 +11,8 @@ "whitelistedEvents", "blacklistedEvents", "eventFilteringOption", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -58,17 +59,17 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey", "clientKey"] } diff --git a/src/configurations/destinations/sendinblue/schema.json b/src/configurations/destinations/sendinblue/schema.json index 531b3f553..13250f3bc 100644 --- a/src/configurations/destinations/sendinblue/schema.json +++ b/src/configurations/destinations/sendinblue/schema.json @@ -72,6 +72,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/sendinblue/ui-config.json b/src/configurations/destinations/sendinblue/ui-config.json index d0bfbdc0f..e81144dc6 100644 --- a/src/configurations/destinations/sendinblue/ui-config.json +++ b/src/configurations/destinations/sendinblue/ui-config.json @@ -170,7 +170,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/sentry/db-config.json b/src/configurations/destinations/sentry/db-config.json index 0fc7e8d45..fe9ef81f9 100644 --- a/src/configurations/destinations/sentry/db-config.json +++ b/src/configurations/destinations/sentry/db-config.json @@ -19,7 +19,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -43,7 +44,7 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": ["dsn"] } diff --git a/src/configurations/destinations/sentry/schema.json b/src/configurations/destinations/sentry/schema.json index 0ee1543dc..1ab355081 100644 --- a/src/configurations/destinations/sentry/schema.json +++ b/src/configurations/destinations/sentry/schema.json @@ -124,6 +124,57 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { "web": { "type": "string", "enum": ["device"] } } diff --git a/src/configurations/destinations/sentry/ui-config.json b/src/configurations/destinations/sentry/ui-config.json index 527ae1cb2..afa56c17c 100644 --- a/src/configurations/destinations/sentry/ui-config.json +++ b/src/configurations/destinations/sentry/ui-config.json @@ -197,7 +197,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/serenytics/db-config.json b/src/configurations/destinations/serenytics/db-config.json index da2b44662..ba53942e4 100644 --- a/src/configurations/destinations/serenytics/db-config.json +++ b/src/configurations/destinations/serenytics/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -46,17 +46,17 @@ "storageUrlScreen", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"] } } } diff --git a/src/configurations/destinations/serenytics/schema.json b/src/configurations/destinations/serenytics/schema.json index 7574e324e..5fe41c87b 100644 --- a/src/configurations/destinations/serenytics/schema.json +++ b/src/configurations/destinations/serenytics/schema.json @@ -56,6 +56,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/serenytics/ui-config.json b/src/configurations/destinations/serenytics/ui-config.json index 20008b20c..3dab22efe 100644 --- a/src/configurations/destinations/serenytics/ui-config.json +++ b/src/configurations/destinations/serenytics/ui-config.json @@ -82,7 +82,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/shynet/db-config.json b/src/configurations/destinations/shynet/db-config.json index 46e8e211a..a054850ac 100644 --- a/src/configurations/destinations/shynet/db-config.json +++ b/src/configurations/destinations/shynet/db-config.json @@ -10,7 +10,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -49,17 +50,17 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": [] } diff --git a/src/configurations/destinations/shynet/schema.json b/src/configurations/destinations/shynet/schema.json index cd5e83c14..305d9072a 100644 --- a/src/configurations/destinations/shynet/schema.json +++ b/src/configurations/destinations/shynet/schema.json @@ -54,6 +54,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/shynet/ui-config.json b/src/configurations/destinations/shynet/ui-config.json index 1ec2d4561..cdadc6567 100644 --- a/src/configurations/destinations/shynet/ui-config.json +++ b/src/configurations/destinations/shynet/ui-config.json @@ -110,7 +110,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/signl4/db-config.json b/src/configurations/destinations/signl4/db-config.json index ce754b6c9..c8a7c4e48 100644 --- a/src/configurations/destinations/signl4/db-config.json +++ b/src/configurations/destinations/signl4/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -50,17 +50,17 @@ "eventToTitleMapping", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/signl4/schema.json b/src/configurations/destinations/signl4/schema.json index fecc1f1ed..858518542 100644 --- a/src/configurations/destinations/signl4/schema.json +++ b/src/configurations/destinations/signl4/schema.json @@ -79,6 +79,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/signl4/ui-config.json b/src/configurations/destinations/signl4/ui-config.json index 13181bc8d..d84f79c9c 100644 --- a/src/configurations/destinations/signl4/ui-config.json +++ b/src/configurations/destinations/signl4/ui-config.json @@ -218,7 +218,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/sendinblue.json b/test/data/validation/destinations/sendinblue.json index 18acd2c0e..1098c120f 100644 --- a/test/data/validation/destinations/sendinblue.json +++ b/test/data/validation/destinations/sendinblue.json @@ -117,5 +117,128 @@ " must match \"then\" schema", " must match a schema in anyOf" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKey": "xkeysib-cI7d098XXXbW5acf0453FY1XXXfsej32da3f8ae01d7c8f9b78L43153d814td000020eb9-1eXXX95C0", + "clientKey": "1vd0i6w1aXXX38ap5kucurfy", + "doi": true, + "templateId": "2", + "redirectionUrl": "https://test.sendinblue.com/", + "sendTraitsInTrack": false, + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiKey": "xkeysib-cI7d098XXXbW5acf0453FY1XXXfsej32da3f8ae01d7c8f9b78L43153d814td000020eb9-1eXXX95C0", + "clientKey": "1vd0i6w1aXXX38ap5kucurfy", + "doi": true, + "templateId": "2", + "redirectionUrl": "https://test.sendinblue.com/", + "sendTraitsInTrack": false, + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKey": "xkeysib-cI7d098XXXbW5acf0453FY1XXXfsej32da3f8ae01d7c8f9b78L43153d814td000020eb9-1eXXX95C0", + "clientKey": "1vd0i6w1aXXX38ap5kucurfy", + "doi": true, + "templateId": "2", + "redirectionUrl": "https://test.sendinblue.com/", + "sendTraitsInTrack": false, + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiKey": "xkeysib-cI7d098XXXbW5acf0453FY1XXXfsej32da3f8ae01d7c8f9b78L43153d814td000020eb9-1eXXX95C0", + "clientKey": "1vd0i6w1aXXX38ap5kucurfy", + "doi": true, + "templateId": "2", + "redirectionUrl": "https://test.sendinblue.com/", + "sendTraitsInTrack": false, + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKey": "xkeysib-cI7d098XXXbW5acf0453FY1XXXfsej32da3f8ae01d7c8f9b78L43153d814td000020eb9-1eXXX95C0", + "clientKey": "1vd0i6w1aXXX38ap5kucurfy", + "doi": true, + "templateId": "2", + "redirectionUrl": "https://test.sendinblue.com/", + "sendTraitsInTrack": false, + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/sentry.json b/test/data/validation/destinations/sentry.json index 8147c33cf..d59475922 100644 --- a/test/data/validation/destinations/sentry.json +++ b/test/data/validation/destinations/sentry.json @@ -135,5 +135,133 @@ }, "result": false, "err": [" must NOT have additional properties", " must NOT have additional properties"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "dsn": "https://42152b1ac22XXX378fdXXXfbdb442798@o1142740.ingest.sentry.io/6201791", + "environment": "production", + "customVersionProperty": "window.kaholo.version", + "release": "window.kaholo.version", + "serverName": "server", + "logger": "sentry", + "debugMode": false, + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "dsn": "https://42152b1ac22XXX378fdXXXfbdb442798@o1142740.ingest.sentry.io/6201791", + "environment": "production", + "customVersionProperty": "window.kaholo.version", + "release": "window.kaholo.version", + "serverName": "server", + "logger": "sentry", + "debugMode": false, + "consentManagement": { + "web": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "dsn": "https://42152b1ac22XXX378fdXXXfbdb442798@o1142740.ingest.sentry.io/6201791", + "environment": "production", + "customVersionProperty": "window.kaholo.version", + "release": "window.kaholo.version", + "serverName": "server", + "logger": "sentry", + "debugMode": false, + "consentManagement": { + "web": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0 must have required property 'resolutionStrategy'", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "dsn": "https://42152b1ac22XXX378fdXXXfbdb442798@o1142740.ingest.sentry.io/6201791", + "environment": "production", + "customVersionProperty": "window.kaholo.version", + "release": "window.kaholo.version", + "serverName": "server", + "logger": "sentry", + "debugMode": false, + "consentManagement": { + "web": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "dsn": "https://42152b1ac22XXX378fdXXXfbdb442798@o1142740.ingest.sentry.io/6201791", + "environment": "production", + "customVersionProperty": "window.kaholo.version", + "release": "window.kaholo.version", + "serverName": "server", + "logger": "sentry", + "debugMode": false, + "consentManagement": { + "web": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.web.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/shynet.json b/test/data/validation/destinations/shynet.json index cd18591cb..68633de9e 100644 --- a/test/data/validation/destinations/shynet.json +++ b/test/data/validation/destinations/shynet.json @@ -31,5 +31,108 @@ "err": [ "shynetServiceUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|(?!.*\\.ngrok\\.io)^(.{1,300})$\"" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "heartBeatFrequencyInMs": "11234", + "shynetServiceUrl": "https://localhost:5555/ingress/5b3470a9-XXXX-4298-9ec1-3fe3f483738c/script.js", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "heartBeatFrequencyInMs": "11234", + "shynetServiceUrl": "https://localhost:5555/ingress/5b3470a9-XXXX-4298-9ec1-3fe3f483738c/script.js", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "heartBeatFrequencyInMs": "11234", + "shynetServiceUrl": "https://localhost:5555/ingress/5b3470a9-XXXX-4298-9ec1-3fe3f483738c/script.js", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "heartBeatFrequencyInMs": "11234", + "shynetServiceUrl": "https://localhost:5555/ingress/5b3470a9-XXXX-4298-9ec1-3fe3f483738c/script.js", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "heartBeatFrequencyInMs": "11234", + "shynetServiceUrl": "https://localhost:5555/ingress/5b3470a9-XXXX-4298-9ec1-3fe3f483738c/script.js", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From 390288d6988bf6e1b019e04c4cecc1b3406d5728 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 25 Jun 2024 10:02:55 +0530 Subject: [PATCH 51/68] feat: added GCM support for 5 destinations - Batch 24 (#1503) --- .../destinations/singular/db-config.json | 21 +- .../destinations/singular/schema.json | 419 ++++++++++++++ .../destinations/singular/ui-config.json | 93 +++- .../destinations/snap_pixel/db-config.json | 5 +- .../destinations/snap_pixel/ui-config.json | 107 +++- .../snapchat_conversion/db-config.json | 24 +- .../snapchat_conversion/schema.json | 511 ++++++++++++++++++ .../snapchat_conversion/ui-config.json | 93 +++- .../snapchat_custom_audience/db-config.json | 14 +- .../snapchat_custom_audience/schema.json | 143 +++++ .../snapchat_custom_audience/ui-config.json | 93 +++- .../destinations/snapengage/db-config.json | 5 +- .../destinations/snapengage/schema.json | 51 ++ .../destinations/snapengage/ui-config.json | 93 +++- .../validation/destinations/singular.json | 103 ++++ .../destinations/snapchat_conversion.json | 113 ++++ .../validation/destinations/snapengage.json | 108 ++++ 17 files changed, 1960 insertions(+), 36 deletions(-) diff --git a/src/configurations/destinations/singular/db-config.json b/src/configurations/destinations/singular/db-config.json index d29d9dcc8..8a20d8d82 100644 --- a/src/configurations/destinations/singular/db-config.json +++ b/src/configurations/destinations/singular/db-config.json @@ -11,7 +11,8 @@ "blacklistedEvents", "whitelistedEvents", "eventFilteringOption", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -59,15 +60,15 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "android": ["useNativeSDK", "connectionMode"], - "ios": ["useNativeSDK", "connectionMode"], - "reactnative": ["useNativeSDK", "connectionMode"], - "cordova": ["useNativeSDK", "connectionMode"], - "flutter": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["useNativeSDK", "connectionMode", "consentManagement"], + "ios": ["useNativeSDK", "connectionMode", "consentManagement"], + "reactnative": ["useNativeSDK", "connectionMode", "consentManagement"], + "cordova": ["useNativeSDK", "connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey", "apiSecret"] } diff --git a/src/configurations/destinations/singular/schema.json b/src/configurations/destinations/singular/schema.json index ec599357d..f4004cff9 100644 --- a/src/configurations/destinations/singular/schema.json +++ b/src/configurations/destinations/singular/schema.json @@ -74,6 +74,425 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/singular/ui-config.json b/src/configurations/destinations/singular/ui-config.json index 7cddf8961..690edd533 100644 --- a/src/configurations/destinations/singular/ui-config.json +++ b/src/configurations/destinations/singular/ui-config.json @@ -125,7 +125,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/snap_pixel/db-config.json b/src/configurations/destinations/snap_pixel/db-config.json index 777afb56b..efc756c03 100644 --- a/src/configurations/destinations/snap_pixel/db-config.json +++ b/src/configurations/destinations/snap_pixel/db-config.json @@ -14,7 +14,8 @@ "eventFilteringOption", "deduplicationKey", "enableDeduplication", - "ketchConsentPurposes" + "ketchConsentPurposes", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -33,7 +34,7 @@ "oneTrustCookieCategories", "ketchConsentPurposes" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": ["pixelId"] } diff --git a/src/configurations/destinations/snap_pixel/ui-config.json b/src/configurations/destinations/snap_pixel/ui-config.json index d81e86c3d..52545ec5c 100644 --- a/src/configurations/destinations/snap_pixel/ui-config.json +++ b/src/configurations/destinations/snap_pixel/ui-config.json @@ -260,7 +260,19 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } }, { "type": "dynamicCustomForm", @@ -275,7 +287,98 @@ "regex": "^(.{0,100})$", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/snapchat_conversion/db-config.json b/src/configurations/destinations/snapchat_conversion/db-config.json index ee5298473..0d113499c 100644 --- a/src/configurations/destinations/snapchat_conversion/db-config.json +++ b/src/configurations/destinations/snapchat_conversion/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -44,17 +44,17 @@ "deduplicationKey", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/snapchat_conversion/schema.json b/src/configurations/destinations/snapchat_conversion/schema.json index 21b34235b..915b9a996 100644 --- a/src/configurations/destinations/snapchat_conversion/schema.json +++ b/src/configurations/destinations/snapchat_conversion/schema.json @@ -83,6 +83,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/snapchat_conversion/ui-config.json b/src/configurations/destinations/snapchat_conversion/ui-config.json index 2dc455e44..0c8f862ad 100644 --- a/src/configurations/destinations/snapchat_conversion/ui-config.json +++ b/src/configurations/destinations/snapchat_conversion/ui-config.json @@ -235,7 +235,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/snapchat_custom_audience/db-config.json b/src/configurations/destinations/snapchat_custom_audience/db-config.json index 6f16c89c3..1f8286379 100644 --- a/src/configurations/destinations/snapchat_custom_audience/db-config.json +++ b/src/configurations/destinations/snapchat_custom_audience/db-config.json @@ -6,7 +6,13 @@ "auth": { "type": "OAuth", "role": "snapchat_custom_audience", "rudderScopes": ["delivery"] }, "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["segmentId", "schema", "disableHashing", "oneTrustCookieCategories"], + "includeKeys": [ + "segmentId", + "schema", + "disableHashing", + "oneTrustCookieCategories", + "consentManagement" + ], "excludeKeys": [], "supportedSourceTypes": ["cloud", "warehouse", "shopify"], "supportedMessageTypes": { "cloud": ["audiencelist"] }, @@ -25,9 +31,9 @@ "disableHashing", "oneTrustCookieCategories" ], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["segmentId"] } diff --git a/src/configurations/destinations/snapchat_custom_audience/schema.json b/src/configurations/destinations/snapchat_custom_audience/schema.json index 516dbd4a0..c7dd0b3c8 100644 --- a/src/configurations/destinations/snapchat_custom_audience/schema.json +++ b/src/configurations/destinations/snapchat_custom_audience/schema.json @@ -22,6 +22,149 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/snapchat_custom_audience/ui-config.json b/src/configurations/destinations/snapchat_custom_audience/ui-config.json index c8aa3cb49..2e2428e61 100644 --- a/src/configurations/destinations/snapchat_custom_audience/ui-config.json +++ b/src/configurations/destinations/snapchat_custom_audience/ui-config.json @@ -69,7 +69,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/snapengage/db-config.json b/src/configurations/destinations/snapengage/db-config.json index 7384b8031..d7ee7e53a 100644 --- a/src/configurations/destinations/snapengage/db-config.json +++ b/src/configurations/destinations/snapengage/db-config.json @@ -12,7 +12,8 @@ "eventFilteringOption", "blacklistedEvents", "whitelistedEvents", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -29,7 +30,7 @@ "whitelistedEvents", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": ["widgetId"] } diff --git a/src/configurations/destinations/snapengage/schema.json b/src/configurations/destinations/snapengage/schema.json index 854849cac..521b3fe25 100644 --- a/src/configurations/destinations/snapengage/schema.json +++ b/src/configurations/destinations/snapengage/schema.json @@ -51,6 +51,57 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { "web": { "type": "string", "enum": ["device"] } } diff --git a/src/configurations/destinations/snapengage/ui-config.json b/src/configurations/destinations/snapengage/ui-config.json index e294f00c1..4d4f6538d 100644 --- a/src/configurations/destinations/snapengage/ui-config.json +++ b/src/configurations/destinations/snapengage/ui-config.json @@ -168,7 +168,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/singular.json b/test/data/validation/destinations/singular.json index d818511b9..39fd71f61 100644 --- a/test/data/validation/destinations/singular.json +++ b/test/data/validation/destinations/singular.json @@ -79,5 +79,108 @@ } }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKey": "nowstack_3a8df6629XXXe0cf6xxa22fb2220e929_811168a9", + "apiSecret": "gidawgaigfa", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiKey": "nowstack_3a8df6629XXXe0cf6xxa22fb2220e929_811168a9", + "apiSecret": "gidawgaigfa", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKey": "nowstack_3a8df6629XXXe0cf6xxa22fb2220e929_811168a9", + "apiSecret": "gidawgaigfa", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiKey": "nowstack_3a8df6629XXXe0cf6xxa22fb2220e929_811168a9", + "apiSecret": "gidawgaigfa", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKey": "nowstack_3a8df6629XXXe0cf6xxa22fb2220e929_811168a9", + "apiSecret": "gidawgaigfa", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/snapchat_conversion.json b/test/data/validation/destinations/snapchat_conversion.json index a963d624f..02fced8cd 100644 --- a/test/data/validation/destinations/snapchat_conversion.json +++ b/test/data/validation/destinations/snapchat_conversion.json @@ -30,5 +30,118 @@ ] }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKey": "MTp6WHZyNbJXZVNMMm11AlJ1R1BXeVVBOkk0dFk5dkEybUVEWAw5NHXXXXBYUjBIdWp6QzZCNC1TMEFGU9QwYVdnUjg", + "pixelId": "836d6231-aad6-4e41-9cbb-5854565cad8e", + "enableDeduplication": true, + "deduplicationKey": "messageId", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiKey": "MTp6WHZyNbJXZVNMMm11AlJ1R1BXeVVBOkk0dFk5dkEybUVEWAw5NHXXXXBYUjBIdWp6QzZCNC1TMEFGU9QwYVdnUjg", + "pixelId": "836d6231-aad6-4e41-9cbb-5854565cad8e", + "enableDeduplication": true, + "deduplicationKey": "messageId", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKey": "MTp6WHZyNbJXZVNMMm11AlJ1R1BXeVVBOkk0dFk5dkEybUVEWAw5NHXXXXBYUjBIdWp6QzZCNC1TMEFGU9QwYVdnUjg", + "pixelId": "836d6231-aad6-4e41-9cbb-5854565cad8e", + "enableDeduplication": true, + "deduplicationKey": "messageId", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiKey": "MTp6WHZyNbJXZVNMMm11AlJ1R1BXeVVBOkk0dFk5dkEybUVEWAw5NHXXXXBYUjBIdWp6QzZCNC1TMEFGU9QwYVdnUjg", + "pixelId": "836d6231-aad6-4e41-9cbb-5854565cad8e", + "enableDeduplication": true, + "deduplicationKey": "messageId", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKey": "MTp6WHZyNbJXZVNMMm11AlJ1R1BXeVVBOkk0dFk5dkEybUVEWAw5NHXXXXBYUjBIdWp6QzZCNC1TMEFGU9QwYVdnUjg", + "pixelId": "836d6231-aad6-4e41-9cbb-5854565cad8e", + "enableDeduplication": true, + "deduplicationKey": "messageId", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/snapengage.json b/test/data/validation/destinations/snapengage.json index 82b393488..6228787ce 100644 --- a/test/data/validation/destinations/snapengage.json +++ b/test/data/validation/destinations/snapengage.json @@ -57,5 +57,113 @@ }, "result": false, "err": ["widgetId must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\""] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "widgetId": "11234", + "recordLiveChatEvents": true, + "updateEventNames": false, + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "widgetId": "11234", + "recordLiveChatEvents": true, + "updateEventNames": false, + "consentManagement": { + "web": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "widgetId": "11234", + "recordLiveChatEvents": true, + "updateEventNames": false, + "consentManagement": { + "web": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0 must have required property 'resolutionStrategy'", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "widgetId": "11234", + "recordLiveChatEvents": true, + "updateEventNames": false, + "consentManagement": { + "web": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "widgetId": "11234", + "recordLiveChatEvents": true, + "updateEventNames": false, + "consentManagement": { + "web": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.web.0.provider must be equal to one of the allowed values"] } ] From 6cf3eecb84cddab37ab3a5572b3ed0416df1854a Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Tue, 25 Jun 2024 10:04:57 +0530 Subject: [PATCH 52/68] feat: added GCM support for 5 destinations - Batch 25 (#1504) --- .../destinations/splitio/db-config.json | 24 +- .../destinations/splitio/ui-config.json | 93 +++- .../destinations/spotifyPixel/db-config.json | 5 +- .../destinations/spotifyPixel/schema.json | 51 ++ .../destinations/spotifyPixel/ui-config.json | 104 +++- .../destinations/sprig/db-config.json | 27 +- .../destinations/sprig/schema.json | 516 ++++++++++++++++++ .../destinations/sprig/ui-config.json | 104 +++- .../destinations/statsig/db-config.json | 24 +- .../destinations/statsig/schema.json | 511 +++++++++++++++++ .../destinations/statsig/ui-config.json | 101 +++- .../destinations/stormly/db-config.json | 24 +- .../destinations/stormly/schema.json | 511 +++++++++++++++++ .../destinations/stormly/ui-config.json | 93 +++- .../validation/destinations/spotifyPixel.json | 98 ++++ test/data/validation/destinations/sprig.json | 66 +++ .../data/validation/destinations/statsig.json | 98 ++++ .../data/validation/destinations/stormly.json | 100 ++++ 18 files changed, 2490 insertions(+), 60 deletions(-) create mode 100644 test/data/validation/destinations/stormly.json diff --git a/src/configurations/destinations/splitio/db-config.json b/src/configurations/destinations/splitio/db-config.json index df18e613c..ec3e49092 100644 --- a/src/configurations/destinations/splitio/db-config.json +++ b/src/configurations/destinations/splitio/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -35,17 +35,17 @@ }, "destConfig": { "defaultConfig": ["apiKey", "environment", "trafficType", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/splitio/ui-config.json b/src/configurations/destinations/splitio/ui-config.json index 925db2eb9..b3884911a 100644 --- a/src/configurations/destinations/splitio/ui-config.json +++ b/src/configurations/destinations/splitio/ui-config.json @@ -50,7 +50,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/spotifyPixel/db-config.json b/src/configurations/destinations/spotifyPixel/db-config.json index 73801045e..6ac68bff9 100644 --- a/src/configurations/destinations/spotifyPixel/db-config.json +++ b/src/configurations/destinations/spotifyPixel/db-config.json @@ -11,7 +11,8 @@ "whitelistedEvents", "oneTrustCookieCategories", "eventFilteringOption", - "enableAliasCall" + "enableAliasCall", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -33,7 +34,7 @@ "enableAliasCall", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": ["pixelId"] } diff --git a/src/configurations/destinations/spotifyPixel/schema.json b/src/configurations/destinations/spotifyPixel/schema.json index ae51c344f..f3c5248d9 100644 --- a/src/configurations/destinations/spotifyPixel/schema.json +++ b/src/configurations/destinations/spotifyPixel/schema.json @@ -77,6 +77,57 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/spotifyPixel/ui-config.json b/src/configurations/destinations/spotifyPixel/ui-config.json index 2ba754299..a01dfc0cc 100644 --- a/src/configurations/destinations/spotifyPixel/ui-config.json +++ b/src/configurations/destinations/spotifyPixel/ui-config.json @@ -155,7 +155,15 @@ } } ] - }, + } + ] + }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [ { "title": "OneTrust cookie consent settings", "note": [ @@ -180,7 +188,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -259,6 +279,86 @@ "title": "Web SDK settings", "note": "not visible in the ui", "fields": [] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/sprig/db-config.json b/src/configurations/destinations/sprig/db-config.json index 515301c2f..4417b9e6c 100644 --- a/src/configurations/destinations/sprig/db-config.json +++ b/src/configurations/destinations/sprig/db-config.json @@ -9,7 +9,9 @@ "environmentId", "whitelistedEvents", "blacklistedEvents", - "oneTrustCookieCategories" + "eventFilteringOption", + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedConnectionModes": { @@ -44,19 +46,20 @@ "environmentId", "whitelistedEvents", "blacklistedEvents", + "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/sprig/schema.json b/src/configurations/destinations/sprig/schema.json index 505a7da17..0b0d83802 100644 --- a/src/configurations/destinations/sprig/schema.json +++ b/src/configurations/destinations/sprig/schema.json @@ -21,6 +21,11 @@ "warehouse": { "type": "string", "enum": ["cloud"] } } }, + "eventFilteringOption": { + "type": "string", + "enum": ["disable", "whitelistedEvents", "blacklistedEvents"], + "default": "disable" + }, "whitelistedEvents": { "type": "array", "items": { @@ -45,6 +50,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "oneTrustCookieCategories": { "type": "array", "items": { diff --git a/src/configurations/destinations/sprig/ui-config.json b/src/configurations/destinations/sprig/ui-config.json index 54061d120..37bf1fd80 100644 --- a/src/configurations/destinations/sprig/ui-config.json +++ b/src/configurations/destinations/sprig/ui-config.json @@ -159,7 +159,15 @@ } } ] - }, + } + ] + }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [ { "title": "OneTrust consent settings", "note": [ @@ -184,7 +192,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -195,6 +215,86 @@ "title": "Web SDK settings", "note": "not visible in the ui", "fields": [] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/statsig/db-config.json b/src/configurations/destinations/statsig/db-config.json index fada93aa3..164935b6d 100644 --- a/src/configurations/destinations/statsig/db-config.json +++ b/src/configurations/destinations/statsig/db-config.json @@ -5,7 +5,7 @@ "transformAtV1": "router", "cdkV2Enabled": true, "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -36,17 +36,17 @@ }, "destConfig": { "defaultConfig": ["secretKey", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"] }, "secretKeys": ["secretKey"] } diff --git a/src/configurations/destinations/statsig/schema.json b/src/configurations/destinations/statsig/schema.json index 91090e32d..01406b437 100644 --- a/src/configurations/destinations/statsig/schema.json +++ b/src/configurations/destinations/statsig/schema.json @@ -20,6 +20,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/statsig/ui-config.json b/src/configurations/destinations/statsig/ui-config.json index 702315968..30f26c8aa 100644 --- a/src/configurations/destinations/statsig/ui-config.json +++ b/src/configurations/destinations/statsig/ui-config.json @@ -49,9 +49,10 @@ "note": "Manage the settings for your destination", "sections": [ { - "title": "Other settings", - "note": "Configure advanced RudderStack features here", - "icon": "otherSettings", + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", "groups": [ { "title": "OneTrust consent settings", @@ -77,7 +78,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -88,6 +101,86 @@ "title": "Web SDK settings", "note": "not visible in the ui", "fields": [] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/stormly/db-config.json b/src/configurations/destinations/stormly/db-config.json index 62c4e45c8..ee42128a0 100644 --- a/src/configurations/destinations/stormly/db-config.json +++ b/src/configurations/destinations/stormly/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories", "apiKey"], + "includeKeys": ["oneTrustCookieCategories", "apiKey", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -37,17 +37,17 @@ }, "destConfig": { "defaultConfig": ["apiKey", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] }, diff --git a/src/configurations/destinations/stormly/schema.json b/src/configurations/destinations/stormly/schema.json index 37a30b251..6d7bc63e6 100644 --- a/src/configurations/destinations/stormly/schema.json +++ b/src/configurations/destinations/stormly/schema.json @@ -20,6 +20,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/stormly/ui-config.json b/src/configurations/destinations/stormly/ui-config.json index ea182c1c0..6e8016148 100644 --- a/src/configurations/destinations/stormly/ui-config.json +++ b/src/configurations/destinations/stormly/ui-config.json @@ -33,7 +33,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/spotifyPixel.json b/test/data/validation/destinations/spotifyPixel.json index d349ef3e6..faa04160a 100644 --- a/test/data/validation/destinations/spotifyPixel.json +++ b/test/data/validation/destinations/spotifyPixel.json @@ -148,5 +148,103 @@ }, "result": false, "err": ["eventsToSpotifyPixelEvents.0.to must be equal to one of the allowed values"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "pixelId": "qwerty1234qwerty", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "pixelId": "qwerty1234qwerty", + "consentManagement": { + "web": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "pixelId": "qwerty1234qwerty", + "consentManagement": { + "web": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0 must have required property 'resolutionStrategy'", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "pixelId": "qwerty1234qwerty", + "consentManagement": { + "web": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "pixelId": "qwerty1234qwerty", + "consentManagement": { + "web": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.web.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/sprig.json b/test/data/validation/destinations/sprig.json index 07e402fc7..77167a9c4 100644 --- a/test/data/validation/destinations/sprig.json +++ b/test/data/validation/destinations/sprig.json @@ -130,5 +130,71 @@ ] }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKey": "12345", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKey": "12345", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiKey": "12345", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKey": "12345", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/statsig.json b/test/data/validation/destinations/statsig.json index b93e3642e..37d8d4d95 100644 --- a/test/data/validation/destinations/statsig.json +++ b/test/data/validation/destinations/statsig.json @@ -41,5 +41,103 @@ }, "result": false, "err": ["connectionMode.web must be equal to one of the allowed values"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "secretKey": "fghdsew56uy7", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "secretKey": "fghdsew56uy7", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "secretKey": "fghdsew56uy7", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "secretKey": "fghdsew56uy7", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "secretKey": "fghdsew56uy7", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/stormly.json b/test/data/validation/destinations/stormly.json new file mode 100644 index 000000000..228d742f0 --- /dev/null +++ b/test/data/validation/destinations/stormly.json @@ -0,0 +1,100 @@ +[ + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKey": "test-host", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiKey": "test-host", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKey": "test-host", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiKey": "test-host", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKey": "test-host", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] + } +] From ddb344e6983921aa739f01a217776828b2c8339d Mon Sep 17 00:00:00 2001 From: Aanshi Lahoti <110057617+aanshi07@users.noreply.github.com> Date: Tue, 25 Jun 2024 12:26:35 +0530 Subject: [PATCH 53/68] feat: updated schema and testCases for 3 destinations (#1482) Co-authored-by: Anant Jain --- .../destinations/appcues/schema.json | 64 ++++++++- .../destinations/appcues/ui-config.json | 2 +- .../destinations/bqstream/schema.json | 30 +++- .../destinations/bqstream/ui-config.json | 2 +- .../destinations/variance/schema.json | 22 ++- .../destinations/variance/ui-config.json | 4 +- .../data/validation/destinations/appcues.json | 132 ++++++++++++++++++ .../validation/destinations/bqstream.json | 76 ++++++++++ .../validation/destinations/variance.json | 72 ++++++++++ 9 files changed, 397 insertions(+), 7 deletions(-) diff --git a/src/configurations/destinations/appcues/schema.json b/src/configurations/destinations/appcues/schema.json index 00a7a5b2d..485b07e12 100644 --- a/src/configurations/destinations/appcues/schema.json +++ b/src/configurations/destinations/appcues/schema.json @@ -1,7 +1,7 @@ { "configSchema": { "$schema": "http://json-schema.org/draft-07/schema#", - "required": [], + "required": ["accountId"], "type": "object", "properties": { "consentManagement": { @@ -437,6 +437,68 @@ } } } + }, + "accountId": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "nativeSdkUrl": { + "type": "object", + "properties": { + "web": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|(?!.*\\.ngrok\\.io)^(.{0,100})$" + } + } + }, + "useNativeSDK": { + "type": "object", + "properties": { + "web": { + "type": "boolean" + } + } + }, + "eventFilteringOption": { + "type": "string", + "enum": ["disable", "whitelistedEvents", "blacklistedEvents"], + "default": "disable" + }, + "whitelistedEvents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "eventName": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "blacklistedEvents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "eventName": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "oneTrustCookieCategories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } } } } diff --git a/src/configurations/destinations/appcues/ui-config.json b/src/configurations/destinations/appcues/ui-config.json index c6d11c334..20cbfb67a 100644 --- a/src/configurations/destinations/appcues/ui-config.json +++ b/src/configurations/destinations/appcues/ui-config.json @@ -7,7 +7,7 @@ "type": "textInput", "label": "Account Id", "value": "accountId", - "regex": "^(.{0,100})$", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", "regexErrorMessage": "Invalid Account Id", "required": true, "placeholder": "e.g: 81X29" diff --git a/src/configurations/destinations/bqstream/schema.json b/src/configurations/destinations/bqstream/schema.json index 00a7a5b2d..801dd808b 100644 --- a/src/configurations/destinations/bqstream/schema.json +++ b/src/configurations/destinations/bqstream/schema.json @@ -1,7 +1,7 @@ { "configSchema": { "$schema": "http://json-schema.org/draft-07/schema#", - "required": [], + "required": ["projectId", "datasetId", "tableId", "credentials"], "type": "object", "properties": { "consentManagement": { @@ -437,6 +437,34 @@ } } } + }, + "projectId": { + "type": "string" + }, + "datasetId": { + "type": "string" + }, + "tableId": { + "type": "string" + }, + "insertId": { + "type": "string" + }, + "credentials": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|.*" + }, + "oneTrustCookieCategories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } } } } diff --git a/src/configurations/destinations/bqstream/ui-config.json b/src/configurations/destinations/bqstream/ui-config.json index a5b4d682b..4b85e70d7 100644 --- a/src/configurations/destinations/bqstream/ui-config.json +++ b/src/configurations/destinations/bqstream/ui-config.json @@ -38,7 +38,7 @@ "label": "Credentials", "labelNote": "GCP Service Account credentials JSON for RudderStack to use in loading data into your BigQuery database", "value": "credentials", - "regex": ".*", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|.*", "required": true, "footerNote": "Create a service account in your GCP Project for RudderStack with roles of 'BigQuery Data Editor'", "secret": true diff --git a/src/configurations/destinations/variance/schema.json b/src/configurations/destinations/variance/schema.json index 00a7a5b2d..c33056035 100644 --- a/src/configurations/destinations/variance/schema.json +++ b/src/configurations/destinations/variance/schema.json @@ -1,7 +1,7 @@ { "configSchema": { "$schema": "http://json-schema.org/draft-07/schema#", - "required": [], + "required": ["webhookUrl", "authHeader"], "type": "object", "properties": { "consentManagement": { @@ -437,6 +437,26 @@ } } } + }, + "webhookUrl": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|(?!.*\\.ngrok\\.io)^(https?|ftp)://[^\\s/$.?#].[^\\s]*$" + }, + "authHeader": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,500})$" + }, + "oneTrustCookieCategories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } } } } diff --git a/src/configurations/destinations/variance/ui-config.json b/src/configurations/destinations/variance/ui-config.json index 57065db23..6f13e00a2 100644 --- a/src/configurations/destinations/variance/ui-config.json +++ b/src/configurations/destinations/variance/ui-config.json @@ -9,7 +9,7 @@ "value": "webhookUrl", "required": true, "placeholder": "https://your-org.variance.com", - "regex": "^(?!.*\\.ngrok\\.io).*" + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|(?!.*\\.ngrok\\.io)^(https?|ftp)://[^\\s/$.?#].[^\\s]*$" }, { "type": "textInput", @@ -17,7 +17,7 @@ "value": "authHeader", "required": true, "placeholder": "", - "regex": ".*", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,500})$", "secret": true } ] diff --git a/test/data/validation/destinations/appcues.json b/test/data/validation/destinations/appcues.json index 0cf1a3a31..2d695e667 100644 --- a/test/data/validation/destinations/appcues.json +++ b/test/data/validation/destinations/appcues.json @@ -2,6 +2,7 @@ { "testTitle": "With valid multiple consent management providers config", "config": { + "accountId": "11", "apiKey": "QyWIGHjXXXX2L4ePAPiXCA", "consentManagement": { "web": [ @@ -34,6 +35,7 @@ { "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", "config": { + "accountId": "12", "apiKey": "QyWIGHjXXXX2L4ePAPiXCA", "consentManagement": { "android": [ @@ -53,6 +55,7 @@ { "testTitle": "With consent management custom provider config and no resolutionStrategy value", "config": { + "accountId": "13", "apiKey": "QyWIGHjXXXX2L4ePAPiXCA", "consentManagement": { "android": [ @@ -71,6 +74,7 @@ { "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", "config": { + "accountId": "14", "apiKey": "QyWIGHjXXXX2L4ePAPiXCA", "consentManagement": { "android": [ @@ -85,6 +89,7 @@ { "testTitle": "With consent management custom provider config invalid provider value", "config": { + "accountId": "15", "apiKey": "QyWIGHjXXXX2L4ePAPiXCA", "consentManagement": { "android": [ @@ -96,5 +101,132 @@ }, "result": false, "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] + }, + { + "testTitle": "Basic test with only accountId", + "config": { + "accountId": "1234", + "eventFilteringOption": "disable", + "whitelistedEvents": [], + "blacklistedEvents": [], + "oneTrustCookieCategories": [], + "nativeSdkUrl": { + "web": "" + }, + "useNativeSDK": { + "web": true + }, + "connectionMode": { + "web": "device" + }, + "consentManagement": {} + }, + "result": true + }, + { + "testTitle": "With nativeSdkUrl and for Client-side Events Filtering allowlist events are picked, mode -> cloud", + "config": { + "accountId": "1235", + "eventFilteringOption": "whitelistedEvents", + "whitelistedEvents": [ + { + "eventName": "Anonymous Page visit" + } + ], + "blacklistedEvents": [], + "oneTrustCookieCategories": [], + "nativeSdkUrl": { + "web": "https://fast.appcues.com/1235.js" + }, + "useNativeSDK": { + "web": false + }, + "connectionMode": { + "web": "cloud" + }, + "consentManagement": {} + }, + "result": true + }, + { + "testTitle": "without accountId", + "config": { + "eventFilteringOption": "blacklistedEvents", + "whitelistedEvents": [], + "blacklistedEvents": [ + { + "eventName": "Credit card added" + } + ], + "oneTrustCookieCategories": [], + "nativeSdkUrl": { + "web": "https://fast.appcues.com/1236.js" + }, + "useNativeSDK": { + "web": true + }, + "connectionMode": { + "web": "device" + }, + "consentManagement": {} + }, + "result": false, + "err": [" must have required property 'accountId'"] + }, + { + "testTitle": "eventFilteringOption -> disable, as enabling device-mode integrations works only with either allowlisted or denylisted events", + "config": { + "accountId": "1237", + "eventFilteringOption": "disable", + "whitelistedEvents": [], + "blacklistedEvents": [ + { + "eventName": "Credit card added" + } + ], + "oneTrustCookieCategories": [], + "nativeSdkUrl": { + "web": "https://fast.appcues.com/1237.js" + }, + "useNativeSDK": { + "web": true + }, + "connectionMode": { + "web": "device" + }, + "consentManagement": {} + }, + "result": true + }, + { + "testTitle": "Invalid accountId", + "config": { + "accountId": "1238nwbdwhdgweydgydgewydgwhjakjsksjshshhsuwyd7deuwejdhwjdsanxamsxbasxbahcgdshjcsmnfjjmnajshjhkanamcnsdbcjdsbcsmn", + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "Anonymous Page visit" + } + ], + "blacklistedEvents": [ + { + "eventName": "Credit card added" + } + ], + "nativeSdkUrl": { + "web": "htt://fast.appcues.com/1238.js" + }, + "useNativeSDK": { + "web": false + }, + "connectionMode": { + "web": "cloud" + }, + "consentManagement": {} + }, + "result": false, + "err": [ + "accountId must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"" + ] } ] diff --git a/test/data/validation/destinations/bqstream.json b/test/data/validation/destinations/bqstream.json index 6243afa6b..4733a4ad9 100644 --- a/test/data/validation/destinations/bqstream.json +++ b/test/data/validation/destinations/bqstream.json @@ -2,6 +2,9 @@ { "testTitle": "With valid multiple consent management providers config", "config": { + "projectId": "1", + "tableId": "1", + "credentials": "", "datasetId": "test-bucket", "consentManagement": { "web": [ @@ -34,6 +37,9 @@ { "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", "config": { + "projectId": "2", + "tableId": "2", + "credentials": "", "datasetId": "test-bucket", "consentManagement": { "android": [ @@ -53,6 +59,9 @@ { "testTitle": "With consent management custom provider config and no resolutionStrategy value", "config": { + "projectId": "3", + "tableId": "3", + "credentials": "", "datasetId": "test-bucket", "consentManagement": { "android": [ @@ -71,6 +80,9 @@ { "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", "config": { + "projectId": "4", + "tableId": "4", + "credentials": "", "datasetId": "test-bucket", "consentManagement": { "android": [ @@ -85,6 +97,9 @@ { "testTitle": "With consent management custom provider config invalid provider value", "config": { + "projectId": "5", + "tableId": "5", + "credentials": "", "datasetId": "test-bucket", "consentManagement": { "android": [ @@ -96,5 +111,66 @@ }, "result": false, "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] + }, + { + "testTitle": "With all IDs, credentials", + "config": { + "projectId": "sustained-opus-345008", + "datasetId": "sustained-opus-345008.http_source", + "tableId": "sustained-opus-345008.http_source.demo_track", + "insertId": "id", + "credentials": "{\n \"type\": \"service_account\",\n \"project_id\": \"big-query-integration-poc\",\n \"private_key_id\": \"49c492d06ea116676b8660c3b26ef50ad58b1924\",\n \"private_key\": \"-----BEGIN PRIVATE KEY-----\\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDxX2e5y365Ww6K\\nBplRdtJNH44GmJmRYh9dbYbOlfULqqJR71BZ7AZC6+iqoSsMYVnBGYfQ1+7dsfNN\\nmJCjWhQnB9xRpSQtC+4XeZcWmAta/yJ/3PQMy1lJzD1F/sSVEZD6eJTJbnRrBczQ\\nKWH5n6UKItCnABlhtxuLOCy5IQTgQI3wfCTpO/TfyHYlYbVitaBwmqsfHNFwd29c\\ntqLHDLUbFXFgGa1p4vPwfVfJ6jY2aFzZvLP0fuuMokKLADi0fBsA1C+mX5aZpyR3\\nY1BGQvZqj1sWMJBSQDpQstXt2jOz4+TLdFKrjZPMeZ2ooWiYxDU9pFUKjNZi9tJO\\n/wDPFw8vAgMBAAECggEAeFaafjUIbx0IuKPlmInm+3B5/KvkFGmZPZk3lpOI4lIm\\nLzdjFhHoZUD8dOV5cuiuOOmjnumpO3pW1R71LZvhZDw1CbeNu6+w+p8yRp9zOeDt\\nsFXWjvJrB7H98oG8PJ3PbDDl7S9Wd20i2b1oDW4ceFs3L6uK+/6wis5s7beamLpe\\nq6M88rWa7jxN1S9XVIkn1sEReVMJR4MzUmnWvXV6kLk+Ld9oqwOehxh1FCHX8+zV\\n9sMgdGTIX4bIzGTZBJsW7FH5v/sHjHrDmLttYu803UiGlqoh4m3g7gNJEt3HomAi\\nEqDG7ydFgM/aC9gP8WiT/xx40PoWqwSnveiwW78WAQKBgQD5kaZF50sRDOwaJiE8\\nBMSqyBjrdOGNpyA9fiIEiVd+JgUyDIfeY475dtqjEQEj6iyf1dkyoL2S7r5A4ZYQ\\nB3eIv+Jc46TR96GS1bFMc5GUshNToQvX+ePEhKO3MHAFn3Qnv1pUwiIsk0vAyuY4\\n7qWgFa/1aUCQTNNDp0JqEa2ugQKBgQD3l6/N4Xfvt+oZ88WyK+c9xaVVV11jo6KL\\niTOYrwf/tBTo8ebocCUc+YqquGLXjY4hvqp9BY1w9yc+Y6ei//FBAnYjylLJNl3i\\nVfhbPisfhuTUrXik4PE8VhQML3w+WBHfN6xKOZngCbxPwrchHH2IEvgGdOneh+Bv\\n1/soJ1RFrwKBgQCaG8N2BQZIqBcfao45NqSO5PLmao1hYGM7Nakh7gFWB3pL1osL\\n26SNDUSjTzvKBq+5n174sWN+2OgovmRgz4uTqRHJ1FSRx31BY62RDQhHrtLaYGck\\n3c01K8bAtytlfXpHlRTdo+dgaTBtA524aD1kJiA6xdy1fosyipUrVHFQgQKBgEiF\\nSZ1IOVUhzZQkbvetHGJfjfndSSFyQJ4WZeKHAhTHrog8sqHKl1RRU2iF8Y2pjMQd\\nkNpl0fQQsJH5ppR72zJrgichj/YX0pAFFmXDY+YsIMKavQeuS3qcy+p1zjKEoVd8\\nex6SmJuivmGuau1r5ukAhV1+yTHBIuAfpxUvz+NJAoGAZgBeRkAqPVuLITHUXObb\\n5ZREBLBrBwXO4G32790NwQ0mH6Yya3ym6PVsVJEOQZ6YWMKunkhHwJdWqjYwE7m6\\nq2tPJXKz7QNh8lzEkrvzgmzPW9ybkefIpkgNO4ECVNswpMXWsYvHpU8GN64sou+W\\nlT7fLKgan+Hqmf+Cdb28Uww=\\n-----END PRIVATE KEY-----\\n\",\n \"client_email\": \"aanshi-665@big-query-integration-poc.iam.gserviceaccount.com\",\n \"client_id\": \"100694647342214372954\",\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n \"token_uri\": \"https://oauth2.googleapis.com/token\",\n \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n \"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/aanshi-665%40big-query-integration-poc.iam.gserviceaccount.com\",\n \"universe_domain\": \"googleapis.com\"\n}", + "oneTrustCookieCategories": [], + "connectionMode": { + "web": "cloud" + }, + "consentManagement": {} + }, + "result": true + }, + { + "testTitle": "Without insertId (optional field)", + "config": { + "projectId": "sustained-opus-345009", + "datasetId": "sustained-opus-345009.http_source", + "tableId": "sustained-opus-345009.http_source.demo_track", + "insertId": "", + "credentials": "{\n \"type\": \"service_account\",\n \"project_id\": \"big-query-integration-poc\",\n \"private_key_id\": \"49c492d06ea116676b8660c3b26ef50ad58b1924\",\n \"private_key\": \"-----BEGIN PRIVATE KEY-----\\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDxX2e5y365Ww6K\\nBplRdtJNH44GmJmRYh9dbYbOlfULqqJR71BZ7AZC6+iqoSsMYVnBGYfQ1+7dsfNN\\nmJCjWhQnB9xRpSQtC+4XeZcWmAta/yJ/3PQMy1lJzD1F/sSVEZD6eJTJbnRrBczQ\\nKWH5n6UKItCnABlhtxuLOCy5IQTgQI3wfCTpO/TfyHYlYbVitaBwmqsfHNFwd29c\\ntqLHDLUbFXFgGa1p4vPwfVfJ6jY2aFzZvLP0fuuMokKLADi0fBsA1C+mX5aZpyR3\\nY1BGQvZqj1sWMJBSQDpQstXt2jOz4+TLdFKrjZPMeZ2ooWiYxDU9pFUKjNZi9tJO\\n/wDPFw8vAgMBAAECggEAeFaafjUIbx0IuKPlmInm+3B5/KvkFGmZPZk3lpOI4lIm\\nLzdjFhHoZUD8dOV5cuiuOOmjnumpO3pW1R71LZvhZDw1CbeNu6+w+p8yRp9zOeDt\\nsFXWjvJrB7H98oG8PJ3PbDDl7S9Wd20i2b1oDW4ceFs3L6uK+/6wis5s7beamLpe\\nq6M88rWa7jxN1S9XVIkn1sEReVMJR4MzUmnWvXV6kLk+Ld9oqwOehxh1FCHX8+zV\\n9sMgdGTIX4bIzGTZBJsW7FH5v/sHjHrDmLttYu803UiGlqoh4m3g7gNJEt3HomAi\\nEqDG7ydFgM/aC9gP8WiT/xx40PoWqwSnveiwW78WAQKBgQD5kaZF50sRDOwaJiE8\\nBMSqyBjrdOGNpyA9fiIEiVd+JgUyDIfeY475dtqjEQEj6iyf1dkyoL2S7r5A4ZYQ\\nB3eIv+Jc46TR96GS1bFMc5GUshNToQvX+ePEhKO3MHAFn3Qnv1pUwiIsk0vAyuY4\\n7qWgFa/1aUCQTNNDp0JqEa2ugQKBgQD3l6/N4Xfvt+oZ88WyK+c9xaVVV11jo6KL\\niTOYrwf/tBTo8ebocCUc+YqquGLXjY4hvqp9BY1w9yc+Y6ei//FBAnYjylLJNl3i\\nVfhbPisfhuTUrXik4PE8VhQML3w+WBHfN6xKOZngCbxPwrchHH2IEvgGdOneh+Bv\\n1/soJ1RFrwKBgQCaG8N2BQZIqBcfao45NqSO5PLmao1hYGM7Nakh7gFWB3pL1osL\\n26SNDUSjTzvKBq+5n174sWN+2OgovmRgz4uTqRHJ1FSRx31BY62RDQhHrtLaYGck\\n3c01K8bAtytlfXpHlRTdo+dgaTBtA524aD1kJiA6xdy1fosyipUrVHFQgQKBgEiF\\nSZ1IOVUhzZQkbvetHGJfjfndSSFyQJ4WZeKHAhTHrog8sqHKl1RRU2iF8Y2pjMQd\\nkNpl0fQQsJH5ppR72zJrgichj/YX0pAFFmXDY+YsIMKavQeuS3qcy+p1zjKEoVd8\\nex6SmJuivmGuau1r5ukAhV1+yTHBIuAfpxUvz+NJAoGAZgBeRkAqPVuLITHUXObb\\n5ZREBLBrBwXO4G32790NwQ0mH6Yya3ym6PVsVJEOQZ6YWMKunkhHwJdWqjYwE7m6\\nq2tPJXKz7QNh8lzEkrvzgmzPW9ybkefIpkgNO4ECVNswpMXWsYvHpU8GN64sou+W\\nlT7fLKgan+Hqmf+Cdb28Uww=\\n-----END PRIVATE KEY-----\\n\",\n \"client_email\": \"aanshi-665@big-query-integration-poc.iam.gserviceaccount.com\",\n \"client_id\": \"100694647342214372954\",\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n \"token_uri\": \"https://oauth2.googleapis.com/token\",\n \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n \"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/aanshi-665%40big-query-integration-poc.iam.gserviceaccount.com\",\n \"universe_domain\": \"googleapis.com\"\n}", + "connectionMode": { + "web": "cloud" + }, + "consentManagement": {} + }, + "result": true + }, + { + "testTitle": "Without projectId", + "config": { + "datasetId": "sustained-opus-345010.http_source", + "tableId": "sustained-opus-345010.http_source.demo_track", + "insertId": "", + "credentials": "{\n \"type\": \"service_account\",\n \"project_id\": \"big-query-integration-poc\",\n \"private_key_id\": \"49c492d06ea116676b8660c3b26ef50ad58b1924\",\n \"private_key\": \"-----BEGIN PRIVATE KEY-----\\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDxX2e5y365Ww6K\\nBplRdtJNH44GmJmRYh9dbYbOlfULqqJR71BZ7AZC6+iqoSsMYVnBGYfQ1+7dsfNN\\nmJCjWhQnB9xRpSQtC+4XeZcWmAta/yJ/3PQMy1lJzD1F/sSVEZD6eJTJbnRrBczQ\\nKWH5n6UKItCnABlhtxuLOCy5IQTgQI3wfCTpO/TfyHYlYbVitaBwmqsfHNFwd29c\\ntqLHDLUbFXFgGa1p4vPwfVfJ6jY2aFzZvLP0fuuMokKLADi0fBsA1C+mX5aZpyR3\\nY1BGQvZqj1sWMJBSQDpQstXt2jOz4+TLdFKrjZPMeZ2ooWiYxDU9pFUKjNZi9tJO\\n/wDPFw8vAgMBAAECggEAeFaafjUIbx0IuKPlmInm+3B5/KvkFGmZPZk3lpOI4lIm\\nLzdjFhHoZUD8dOV5cuiuOOmjnumpO3pW1R71LZvhZDw1CbeNu6+w+p8yRp9zOeDt\\nsFXWjvJrB7H98oG8PJ3PbDDl7S9Wd20i2b1oDW4ceFs3L6uK+/6wis5s7beamLpe\\nq6M88rWa7jxN1S9XVIkn1sEReVMJR4MzUmnWvXV6kLk+Ld9oqwOehxh1FCHX8+zV\\n9sMgdGTIX4bIzGTZBJsW7FH5v/sHjHrDmLttYu803UiGlqoh4m3g7gNJEt3HomAi\\nEqDG7ydFgM/aC9gP8WiT/xx40PoWqwSnveiwW78WAQKBgQD5kaZF50sRDOwaJiE8\\nBMSqyBjrdOGNpyA9fiIEiVd+JgUyDIfeY475dtqjEQEj6iyf1dkyoL2S7r5A4ZYQ\\nB3eIv+Jc46TR96GS1bFMc5GUshNToQvX+ePEhKO3MHAFn3Qnv1pUwiIsk0vAyuY4\\n7qWgFa/1aUCQTNNDp0JqEa2ugQKBgQD3l6/N4Xfvt+oZ88WyK+c9xaVVV11jo6KL\\niTOYrwf/tBTo8ebocCUc+YqquGLXjY4hvqp9BY1w9yc+Y6ei//FBAnYjylLJNl3i\\nVfhbPisfhuTUrXik4PE8VhQML3w+WBHfN6xKOZngCbxPwrchHH2IEvgGdOneh+Bv\\n1/soJ1RFrwKBgQCaG8N2BQZIqBcfao45NqSO5PLmao1hYGM7Nakh7gFWB3pL1osL\\n26SNDUSjTzvKBq+5n174sWN+2OgovmRgz4uTqRHJ1FSRx31BY62RDQhHrtLaYGck\\n3c01K8bAtytlfXpHlRTdo+dgaTBtA524aD1kJiA6xdy1fosyipUrVHFQgQKBgEiF\\nSZ1IOVUhzZQkbvetHGJfjfndSSFyQJ4WZeKHAhTHrog8sqHKl1RRU2iF8Y2pjMQd\\nkNpl0fQQsJH5ppR72zJrgichj/YX0pAFFmXDY+YsIMKavQeuS3qcy+p1zjKEoVd8\\nex6SmJuivmGuau1r5ukAhV1+yTHBIuAfpxUvz+NJAoGAZgBeRkAqPVuLITHUXObb\\n5ZREBLBrBwXO4G32790NwQ0mH6Yya3ym6PVsVJEOQZ6YWMKunkhHwJdWqjYwE7m6\\nq2tPJXKz7QNh8lzEkrvzgmzPW9ybkefIpkgNO4ECVNswpMXWsYvHpU8GN64sou+W\\nlT7fLKgan+Hqmf+Cdb28Uww=\\n-----END PRIVATE KEY-----\\n\",\n \"client_email\": \"aanshi-665@big-query-integration-poc.iam.gserviceaccount.com\",\n \"client_id\": \"100694647342214372954\",\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n \"token_uri\": \"https://oauth2.googleapis.com/token\",\n \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n \"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/aanshi-665%40big-query-integration-poc.iam.gserviceaccount.com\",\n \"universe_domain\": \"googleapis.com\"\n}", + "connectionMode": { + "web": "cloud" + }, + "consentManagement": {} + }, + "result": false, + "err": [" must have required property 'projectId'"] + }, + { + "testTitle": "Without credentials", + "config": { + "projectId": "sustained-opus-345011", + "datasetId": "sustained-opus-345011.http_source", + "tableId": "sustained-opus-345011.http_source.demo_track", + "insertId": "", + "connectionMode": { + "web": "cloud" + }, + "consentManagement": {} + }, + "result": false, + "err": [" must have required property 'credentials'"] } ] diff --git a/test/data/validation/destinations/variance.json b/test/data/validation/destinations/variance.json index a6a5cfcc8..df00b5b83 100644 --- a/test/data/validation/destinations/variance.json +++ b/test/data/validation/destinations/variance.json @@ -3,6 +3,7 @@ "testTitle": "With valid multiple consent management providers config", "config": { "webhookUrl": "https://google.com", + "authHeader": "aa11", "consentManagement": { "web": [ { @@ -35,6 +36,7 @@ "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", "config": { "webhookUrl": "https://google.com", + "authHeader": "aa12", "consentManagement": { "android": [ { @@ -54,6 +56,7 @@ "testTitle": "With consent management custom provider config and no resolutionStrategy value", "config": { "webhookUrl": "https://google.com", + "authHeader": "aa13", "consentManagement": { "android": [ { @@ -72,6 +75,7 @@ "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", "config": { "webhookUrl": "https://google.com", + "authHeader": "aa14", "consentManagement": { "android": [ { @@ -86,6 +90,7 @@ "testTitle": "With consent management custom provider config invalid provider value", "config": { "webhookUrl": "https://google.com", + "authHeader": "aa15", "consentManagement": { "android": [ { @@ -96,5 +101,72 @@ }, "result": false, "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] + }, + { + "testTitle": "Basic test with correct webhookUrl and authHeader", + "config": { + "webhookUrl": "https://webhook.site/3b922986-eeb0-4671-9816-df753f2d2ecd", + "authHeader": "abc123", + "oneTrustCookieCategories": [], + "connectionMode": { + "web": "cloud" + }, + "consentManagement": {} + }, + "result": true + }, + { + "testTitle": "No value added in authHeader", + "config": { + "webhookUrl": "https://webhook.site/3b922986-eeb0-4671-9816-df753f2d2ecd", + "oneTrustCookieCategories": [], + "connectionMode": { + "web": "cloud" + }, + "consentManagement": {} + }, + "result": false, + "err": [" must have required property 'authHeader'"] + }, + { + "testTitle": "Without webhookUrl", + "config": { + "authHeader": "abc1234", + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "C0001" + } + ], + "connectionMode": { + "web": "cloud" + }, + "consentManagement": {} + }, + "result": false, + "err": [" must have required property 'webhookUrl'"] + }, + { + "testTitle": "With consentManagement provider -> OneTrust, consent category ID -> Marketing", + "config": { + "webhookUrl": "https://webhook.site/3b922986-eeb0-4671-9816-df753f2d2ecd", + "authHeader": "abc1235", + "connectionMode": { + "web": "cloud" + }, + "consentManagement": { + "web": [ + { + "provider": "oneTrust", + "resolutionStrategy": "", + "consents": [ + { + "consent": "Marketing" + } + ] + } + ] + } + }, + "result": true } ] From 526dd7c442248b3c774bab651a776eadb3963e3e Mon Sep 17 00:00:00 2001 From: Utsab Chowdhury Date: Wed, 26 Jun 2024 09:10:53 +0530 Subject: [PATCH 54/68] fix: ga4 cm defaults (#1513) --- .../destinations/ga4_v2/ui-config.json | 68 +++++++++++++++++- .../destinations/ga4_v2/ui-default.json | 71 +++++++++++++++++-- 2 files changed, 132 insertions(+), 7 deletions(-) diff --git a/src/configurations/destinations/ga4_v2/ui-config.json b/src/configurations/destinations/ga4_v2/ui-config.json index e9584bb03..dd2e9a265 100644 --- a/src/configurations/destinations/ga4_v2/ui-config.json +++ b/src/configurations/destinations/ga4_v2/ui-config.json @@ -598,6 +598,10 @@ "from": "$.properties.category", "to": "$.events[0].params.item_list_name" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.products[*].product_id", "to": "$.events[0].params.items[*].item_id", @@ -698,6 +702,10 @@ "from": "$.properties.category", "to": "$.events[0].params.item_list_name" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", @@ -806,6 +814,10 @@ "from": "$.properties.promotion_id", "to": "$.events[0].params.promotion_id" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.products[*].product_id", "to": "$.events[0].params.items[*].item_id", @@ -914,6 +926,10 @@ "from": "$.properties.promotion_id", "to": "$.events[0].params.promotion_id" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.products[*].product_id", "to": "$.events[0].params.items[*].item_id", @@ -1016,6 +1032,10 @@ "to": "$.events[0].params.value", "required": true }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", @@ -1118,6 +1138,10 @@ "to": "$.events[0].params.value", "required": true }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", @@ -1189,7 +1213,7 @@ "to": "$.events[0].params.items[*].item_list_id" }, { - "from": "properties.item_list_name", + "from": "$.properties.item_list_name", "to": "$.events[0].params.items[*].item_list_name" }, { @@ -1220,6 +1244,10 @@ "to": "$.events[0].params.currency", "required": true }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", @@ -1291,7 +1319,7 @@ "to": "$.events[0].params.items[*].item_list_id" }, { - "from": "properties.item_list_name", + "from": "$.properties.item_list_name", "to": "$.events[0].params.items[*].item_list_name" }, { @@ -1322,6 +1350,10 @@ "to": "$.events[0].params.value", "required": true }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.products[*].product_id", "to": "$.events[0].params.items[*].item_id", @@ -1424,6 +1456,10 @@ "to": "$.events[0].params.value", "required": true }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", @@ -1530,6 +1566,10 @@ "from": "$.properties.coupon", "to": "$.events[0].params.coupon" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.products[*].product_id", "to": "$.events[0].params.items[*].item_id", @@ -1649,6 +1689,10 @@ "from": "$.properties.tax", "to": "$.events[0].params.tax" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.products[*].product_id", "to": "$.events[0].params.items[*].item_id", @@ -1768,6 +1812,10 @@ "from": "$.properties.tax", "to": "$.events[0].params.tax" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.products[*].product_id", "to": "$.events[0].params.items[*].item_id", @@ -1872,6 +1920,10 @@ "from": "$.properties.content_type", "to": "$.events[0].params.content_type" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -1894,6 +1946,10 @@ "from": "$.properties.cart_id", "to": "$.events[0].params.item_id" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -1922,6 +1978,10 @@ "from": "$.properties.payment_method", "to": "$.events[0].params.payment_type" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.products[*].product_id", "to": "$.events[0].params.items[*].item_id", @@ -2032,6 +2092,10 @@ "from": "$.properties.shipping_method", "to": "$.events[0].params.shipping_tier" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.products[*].product_id", "to": "$.events[0].params.items[*].item_id", diff --git a/src/configurations/destinations/ga4_v2/ui-default.json b/src/configurations/destinations/ga4_v2/ui-default.json index 93e803d8d..9071a43b9 100644 --- a/src/configurations/destinations/ga4_v2/ui-default.json +++ b/src/configurations/destinations/ga4_v2/ui-default.json @@ -21,6 +21,10 @@ "eventProperties": [ { "from": "$.properties.list_id", "to": "$.events[0].params.item_list_id" }, { "from": "$.properties.category", "to": "$.events[0].params.item_list_name" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.products[*].product_id", "to": "$.events[0].params.items[*].item_id", @@ -115,6 +119,10 @@ "eventProperties": [ { "from": "$.properties.list_id", "to": "$.events[0].params.item_list_id" }, { "from": "$.properties.category", "to": "$.events[0].params.item_list_name" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", @@ -211,6 +219,10 @@ { "from": "$.properties.creative_slot", "to": "$.events[0].params.creative_slot" }, { "from": "$.properties.promotion_name", "to": "$.events[0].params.promotion_name" }, { "from": "$.properties.promotion_id", "to": "$.events[0].params.promotion_id" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.products[*].product_id", "to": "$.events[0].params.items[*].item_id", @@ -307,6 +319,10 @@ { "from": "$.properties.creative_slot", "to": "$.events[0].params.creative_slot" }, { "from": "$.properties.promotion_name", "to": "$.events[0].params.promotion_name" }, { "from": "$.properties.promotion_id", "to": "$.events[0].params.promotion_id" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.products[*].product_id", "to": "$.events[0].params.items[*].item_id", @@ -405,6 +421,10 @@ "to": "$.events[0].params.value", "required": true }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", @@ -499,6 +519,10 @@ "eventProperties": [ { "from": "$.properties.currency", "to": "$.events[0].params.currency", "required": true }, { "from": "$.properties.revenue", "to": "$.events[0].params.value", "required": true }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", @@ -570,7 +594,7 @@ "to": "$.events[0].params.items[*].item_list_id" }, { - "from": "properties.item_list_name", + "from": "$.properties.item_list_name", "to": "$.events[0].params.items[*].item_list_name" }, { @@ -597,6 +621,10 @@ "to": "$.events[0].params.currency", "required": true }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", @@ -668,7 +696,7 @@ "to": "$.events[0].params.items[*].item_list_id" }, { - "from": "properties.item_list_name", + "from": "$.properties.item_list_name", "to": "$.events[0].params.items[*].item_list_name" }, { @@ -691,6 +719,10 @@ "eventProperties": [ { "from": "$.properties.currency", "to": "$.events[0].params.currency", "required": true }, { "from": "$.properties.revenue", "to": "$.events[0].params.value", "required": true }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.products[*].product_id", "to": "$.events[0].params.items[*].item_id", @@ -789,6 +821,10 @@ "to": "$.events[0].params.value", "required": true }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.product_id", "to": "$.events[0].params.items[*].item_id", @@ -884,7 +920,10 @@ { "from": "$.properties.currency", "to": "$.events[0].params.currency", "required": true }, { "from": "$.properties.revenue", "to": "$.events[0].params.value", "required": true }, { "from": "$.properties.coupon", "to": "$.events[0].params.coupon" }, - + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.products[*].product_id", "to": "$.events[0].params.items[*].item_id", @@ -987,6 +1026,10 @@ { "from": "$.properties.coupon", "to": "$.events[0].params.coupon" }, { "from": "$.properties.shipping", "to": "$.events[0].params.shipping" }, { "from": "$.properties.tax", "to": "$.events[0].params.tax" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.products[*].product_id", "to": "$.events[0].params.items[*].item_id", @@ -1089,7 +1132,10 @@ { "from": "$.properties.coupon", "to": "$.events[0].params.coupon" }, { "from": "$.properties.shipping", "to": "$.events[0].params.shipping" }, { "from": "$.properties.tax", "to": "$.events[0].params.tax" }, - + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.products[*].product_id", "to": "$.events[0].params.items[*].item_id", @@ -1185,6 +1231,10 @@ { "from": "$.properties.product_id", "to": "$.events[0].params.item_id" }, { "from": "$.properties.share_via", "to": "$.events[0].params.method" }, { "from": "$.properties.content_type", "to": "$.events[0].params.content_type" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -1198,6 +1248,10 @@ { "from": "$.properties.share_via", "to": "$.events[0].params.method" }, { "from": "$.properties.content_type", "to": "$.events[0].params.content_type" }, { "from": "$.properties.cart_id", "to": "$.events[0].params.item_id" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.context.traits.*", "to": "$.user_properties.*.value" @@ -1212,7 +1266,10 @@ { "from": "$.properties.revenue", "to": "$.events[0].params.value", "required": true }, { "from": "$.properties.coupon", "to": "$.events[0].params.coupon" }, { "from": "$.properties.payment_method", "to": "$.events[0].params.payment_type" }, - + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.products[*].product_id", "to": "$.events[0].params.items[*].item_id", @@ -1309,6 +1366,10 @@ { "from": "$.properties.revenue", "to": "$.events[0].params.value", "required": true }, { "from": "$.properties.coupon", "to": "$.events[0].params.coupon" }, { "from": "$.properties.shipping_method", "to": "$.events[0].params.shipping_tier" }, + { + "from": "1", + "to": "$.events[0].params.engagement_time_msec" + }, { "from": "$.properties.products[*].product_id", "to": "$.events[0].params.items[*].item_id", From 1c59e36e32a36dfa4ad6b6f6a05d78558231f27c Mon Sep 17 00:00:00 2001 From: Alexandros Milaios Date: Wed, 26 Jun 2024 09:01:06 +0300 Subject: [PATCH 55/68] chore: update image versions for hubspot and zendesk support (#1509) --- src/configurations/sources/singer_hubspot/db-config.json | 2 +- .../sources/singer_zendesk_support/db-config.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/configurations/sources/singer_hubspot/db-config.json b/src/configurations/sources/singer_hubspot/db-config.json index 46c693cdc..137a2ea64 100644 --- a/src/configurations/sources/singer_hubspot/db-config.json +++ b/src/configurations/sources/singer_hubspot/db-config.json @@ -7,7 +7,7 @@ "oauthRole": "hubspot" }, "digest": "sha256:4e4d43d688a81ce3e166b5d7c20c0050101c43f8b50187e0da8d63a37e2b412b", - "image": "rudderstack/source-hubspot:v8.2.19", + "image": "rudderstack/source-hubspot:v8.2.21", "isBeta": false }, "type": "cloudSource" diff --git a/src/configurations/sources/singer_zendesk_support/db-config.json b/src/configurations/sources/singer_zendesk_support/db-config.json index 6626185c0..39ed595a3 100644 --- a/src/configurations/sources/singer_zendesk_support/db-config.json +++ b/src/configurations/sources/singer_zendesk_support/db-config.json @@ -3,7 +3,7 @@ "category": "singer-protocol", "displayName": "Zendesk Support", "options": { - "image": "rudderstack/source-zendesk-support:v8.2.2" + "image": "rudderstack/source-zendesk-support:v8.2.21" }, "type": "cloudSource" } From 92d2331de4d9df516c9091f64b872036537b3e53 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Wed, 26 Jun 2024 13:26:39 +0530 Subject: [PATCH 56/68] feat: added GCM support for Facebook App Events (#1352) --- .../destinations/fb/db-config.json | 23 +- .../destinations/fb/schema.json | 419 ++++++++++++++++++ .../destinations/fb/ui-config.json | 152 +++++-- test/data/validation/destinations/fb.json | 98 ++++ 4 files changed, 655 insertions(+), 37 deletions(-) diff --git a/src/configurations/destinations/fb/db-config.json b/src/configurations/destinations/fb/db-config.json index 4b3217d50..f43be40d0 100644 --- a/src/configurations/destinations/fb/db-config.json +++ b/src/configurations/destinations/fb/db-config.json @@ -12,7 +12,8 @@ "blacklistedEvents", "whitelistedEvents", "eventFilteringOption", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -58,16 +59,16 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "android": ["useNativeSDK", "connectionMode"], - "ios": ["useNativeSDK", "connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["useNativeSDK", "connectionMode", "consentManagement"], + "ios": ["useNativeSDK", "connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": [] } diff --git a/src/configurations/destinations/fb/schema.json b/src/configurations/destinations/fb/schema.json index 93c0be79a..169a9e738 100644 --- a/src/configurations/destinations/fb/schema.json +++ b/src/configurations/destinations/fb/schema.json @@ -4,6 +4,425 @@ "required": ["appID"], "type": "object", "properties": { + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "appID": { "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" diff --git a/src/configurations/destinations/fb/ui-config.json b/src/configurations/destinations/fb/ui-config.json index 831502e72..0fd15c686 100644 --- a/src/configurations/destinations/fb/ui-config.json +++ b/src/configurations/destinations/fb/ui-config.json @@ -101,6 +101,52 @@ } ] }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [ + { + "title": "OneTrust consent settings", + "note": [ + "Enter your OneTrust consent category IDs if you have them configured. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + { + "text": "Learn more ", + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/consent-manager/onetrust/" + }, + "about RudderStack's OneTrust Consent Management feature." + ], + "fields": [ + { + "type": "tagInput", + "label": "Consent categories", + "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry.", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: C0001", + "default": [ + { + "oneTrustCookieCategory": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + } + ] + }, { "title": "Other settings", "note": "Configure advanced RudderStack features here", @@ -174,32 +220,6 @@ } } ] - }, - { - "title": "OneTrust consent settings", - "note": [ - "Enter your OneTrust consent category IDs if you have them configured. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", - { - "text": "Learn more ", - "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/consent-manager/onetrust/" - }, - "about RudderStack's OneTrust Consent Management feature." - ], - "fields": [ - { - "type": "tagInput", - "label": "Consent categories", - "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry.", - "configKey": "oneTrustCookieCategories", - "tagKey": "oneTrustCookieCategory", - "placeholder": "e.g: C0001", - "default": [ - { - "oneTrustCookieCategory": "" - } - ] - } - ] } ] } @@ -210,6 +230,86 @@ "title": "SDK settings", "note": "not visible in the ui", "fields": [] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/test/data/validation/destinations/fb.json b/test/data/validation/destinations/fb.json index 9a7257427..2429577f3 100644 --- a/test/data/validation/destinations/fb.json +++ b/test/data/validation/destinations/fb.json @@ -46,5 +46,103 @@ ] }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "appID": "appid101", + "consentManagement": { + "android": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "appID": "appid101", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "appID": "appid101", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "appID": "appid101", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "appID": "appid101", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From e80d7148abf98034ebd51de5f5d2f5b03cfef36b Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Wed, 26 Jun 2024 13:29:32 +0530 Subject: [PATCH 57/68] feat: added GCM support for 5 destinations - Batch 9 (#1435) --- .../destinations/gcs/db-config.json | 24 +- .../destinations/gcs/schema.json | 511 ++++++++++++++++++ .../destinations/gcs/ui-config.json | 93 +++- .../destinations/gcs_datalake/db-config.json | 24 +- .../destinations/gcs_datalake/schema.json | 511 ++++++++++++++++++ .../destinations/gcs_datalake/ui-config.json | 93 +++- .../google_optimize/db-config.json | 6 +- .../google_optimize/ui-config.json | 93 +++- .../destinations/googlesheets/db-config.json | 24 +- .../destinations/googlesheets/ui-config.json | 93 +++- .../destinations/hotjar/db-config.json | 5 +- .../destinations/hotjar/schema.json | 51 ++ .../destinations/hotjar/ui-config.json | 93 +++- test/data/validation/destinations/gcs.json | 98 ++++ .../validation/destinations/gcs_datalake.json | 118 ++++ test/data/validation/destinations/hotjar.json | 98 ++++ 16 files changed, 1890 insertions(+), 45 deletions(-) diff --git a/src/configurations/destinations/gcs/db-config.json b/src/configurations/destinations/gcs/db-config.json index d5f1fe19e..315a0688c 100644 --- a/src/configurations/destinations/gcs/db-config.json +++ b/src/configurations/destinations/gcs/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "none", "saveDestinationResponse": false, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -34,17 +34,17 @@ }, "destConfig": { "defaultConfig": ["bucketName", "prefix", "credentials", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["credentials"] } diff --git a/src/configurations/destinations/gcs/schema.json b/src/configurations/destinations/gcs/schema.json index 4348a1dc3..45552ad30 100644 --- a/src/configurations/destinations/gcs/schema.json +++ b/src/configurations/destinations/gcs/schema.json @@ -25,6 +25,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/gcs/ui-config.json b/src/configurations/destinations/gcs/ui-config.json index b674fba52..35a80d924 100644 --- a/src/configurations/destinations/gcs/ui-config.json +++ b/src/configurations/destinations/gcs/ui-config.json @@ -50,7 +50,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/gcs_datalake/db-config.json b/src/configurations/destinations/gcs_datalake/db-config.json index 6464cf5ad..722437250 100644 --- a/src/configurations/destinations/gcs_datalake/db-config.json +++ b/src/configurations/destinations/gcs_datalake/db-config.json @@ -5,7 +5,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -47,17 +47,17 @@ "syncStartAt", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "cloudSource": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "cloudSource": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["credentials"] } diff --git a/src/configurations/destinations/gcs_datalake/schema.json b/src/configurations/destinations/gcs_datalake/schema.json index 033cae75a..47caa1be9 100644 --- a/src/configurations/destinations/gcs_datalake/schema.json +++ b/src/configurations/destinations/gcs_datalake/schema.json @@ -50,6 +50,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cloudSource": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/gcs_datalake/ui-config.json b/src/configurations/destinations/gcs_datalake/ui-config.json index b0fd28c79..a855913cd 100644 --- a/src/configurations/destinations/gcs_datalake/ui-config.json +++ b/src/configurations/destinations/gcs_datalake/ui-config.json @@ -175,7 +175,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/google_optimize/db-config.json b/src/configurations/destinations/google_optimize/db-config.json index 91a8fc4c7..ced581612 100644 --- a/src/configurations/destinations/google_optimize/db-config.json +++ b/src/configurations/destinations/google_optimize/db-config.json @@ -12,7 +12,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "secretKeys": [], @@ -33,7 +34,8 @@ "async", "aflicker", "useNativeSDK", - "connectionMode" + "connectionMode", + "consentManagement" ] } } diff --git a/src/configurations/destinations/google_optimize/ui-config.json b/src/configurations/destinations/google_optimize/ui-config.json index 7ae2a68fa..dd2a9d839 100644 --- a/src/configurations/destinations/google_optimize/ui-config.json +++ b/src/configurations/destinations/google_optimize/ui-config.json @@ -129,7 +129,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/googlesheets/db-config.json b/src/configurations/destinations/googlesheets/db-config.json index 203ad121e..2c13b9579 100644 --- a/src/configurations/destinations/googlesheets/db-config.json +++ b/src/configurations/destinations/googlesheets/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -40,17 +40,17 @@ "credentials", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["credentials"] } diff --git a/src/configurations/destinations/googlesheets/ui-config.json b/src/configurations/destinations/googlesheets/ui-config.json index cb912a313..502921dca 100644 --- a/src/configurations/destinations/googlesheets/ui-config.json +++ b/src/configurations/destinations/googlesheets/ui-config.json @@ -66,7 +66,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/hotjar/db-config.json b/src/configurations/destinations/hotjar/db-config.json index ca7cb05e8..93f894f79 100644 --- a/src/configurations/destinations/hotjar/db-config.json +++ b/src/configurations/destinations/hotjar/db-config.json @@ -9,7 +9,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -29,7 +30,7 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": [] } diff --git a/src/configurations/destinations/hotjar/schema.json b/src/configurations/destinations/hotjar/schema.json index 8e6042e66..f1e11291f 100644 --- a/src/configurations/destinations/hotjar/schema.json +++ b/src/configurations/destinations/hotjar/schema.json @@ -57,6 +57,57 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/hotjar/ui-config.json b/src/configurations/destinations/hotjar/ui-config.json index 180f6c03f..0c417f75c 100644 --- a/src/configurations/destinations/hotjar/ui-config.json +++ b/src/configurations/destinations/hotjar/ui-config.json @@ -99,7 +99,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/gcs.json b/test/data/validation/destinations/gcs.json index 71e165968..2ea266842 100644 --- a/test/data/validation/destinations/gcs.json +++ b/test/data/validation/destinations/gcs.json @@ -40,5 +40,103 @@ }, "result": false, "err": ["bucketName must be string"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "bucketName": "event-logs", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "bucketName": "event-logs", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "bucketName": "event-logs", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "bucketName": "event-logs", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "bucketName": "event-logs", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/gcs_datalake.json b/test/data/validation/destinations/gcs_datalake.json index 7c5cb00f1..00339071a 100644 --- a/test/data/validation/destinations/gcs_datalake.json +++ b/test/data/validation/destinations/gcs_datalake.json @@ -109,5 +109,123 @@ "err": [ "bucketName must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^((?!goog)(?!.*google.*)(?!^(\\d+(\\.|$)){4}$)(?!.*\\.\\..*)[a-z0-9][a-z0-9-._]{1,61}[a-z0-9])$\"" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "prefix": "", + "namespace": "", + "syncFrequency": "30", + "bucketName": "test-bucket", + "credentials": "{}", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "prefix": "", + "namespace": "", + "syncFrequency": "30", + "bucketName": "test-bucket", + "credentials": "{}", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "prefix": "", + "namespace": "", + "syncFrequency": "30", + "bucketName": "test-bucket", + "credentials": "{}", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "prefix": "", + "namespace": "", + "syncFrequency": "30", + "bucketName": "test-bucket", + "credentials": "{}", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "prefix": "", + "namespace": "", + "syncFrequency": "30", + "bucketName": "test-bucket", + "credentials": "{}", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/hotjar.json b/test/data/validation/destinations/hotjar.json index a6c957764..9cad39aee 100644 --- a/test/data/validation/destinations/hotjar.json +++ b/test/data/validation/destinations/hotjar.json @@ -48,5 +48,103 @@ }, "result": false, "err": [" must have required property 'siteID'"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "siteID": "hd000380", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "siteID": "hd000380", + "consentManagement": { + "web": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "siteID": "hd000380", + "consentManagement": { + "web": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0 must have required property 'resolutionStrategy'", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "siteID": "hd000380", + "consentManagement": { + "web": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "siteID": "hd000380", + "consentManagement": { + "web": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.web.0.provider must be equal to one of the allowed values"] } ] From bedc97f015cc485b2035c518a5f2e12194b0da51 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Wed, 26 Jun 2024 13:31:36 +0530 Subject: [PATCH 58/68] feat: added GCM support for 5 destinations - Batch 21 (#1498) --- .../destinations/revenue_cat/db-config.json | 24 +- .../destinations/revenue_cat/schema.json | 511 ++++++++++++++++++ .../destinations/revenue_cat/ui-config.json | 93 +++- .../destinations/rockerbox/db-config.json | 26 +- .../destinations/rockerbox/schema.json | 511 ++++++++++++++++++ .../destinations/rockerbox/ui-config.json | 104 +++- .../destinations/rollbar/db-config.json | 7 +- .../destinations/rollbar/schema.json | 51 ++ .../destinations/rollbar/ui-config.json | 93 +++- .../destinations/s3_datalake/db-config.json | 27 +- .../destinations/s3_datalake/schema.json | 511 ++++++++++++++++++ .../destinations/s3_datalake/ui-config.json | 93 +++- .../destinations/salesforce/db-config.json | 24 +- .../destinations/salesforce/schema.json | 511 ++++++++++++++++++ .../destinations/salesforce/ui-config.json | 93 +++- .../validation/destinations/revenue_cat.json | 103 ++++ .../validation/destinations/rockerbox.json | 98 ++++ .../data/validation/destinations/rollbar.json | 108 ++++ .../validation/destinations/s3_datalake.json | 133 +++++ .../validation/destinations/salesforce.json | 123 +++++ 20 files changed, 3187 insertions(+), 57 deletions(-) diff --git a/src/configurations/destinations/revenue_cat/db-config.json b/src/configurations/destinations/revenue_cat/db-config.json index cc1823ff6..b3ef7341a 100644 --- a/src/configurations/destinations/revenue_cat/db-config.json +++ b/src/configurations/destinations/revenue_cat/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "web", @@ -37,17 +37,17 @@ }, "destConfig": { "defaultConfig": ["apiKey", "xPlatform", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/revenue_cat/schema.json b/src/configurations/destinations/revenue_cat/schema.json index 098ed9a05..db0c3fee8 100644 --- a/src/configurations/destinations/revenue_cat/schema.json +++ b/src/configurations/destinations/revenue_cat/schema.json @@ -25,6 +25,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/revenue_cat/ui-config.json b/src/configurations/destinations/revenue_cat/ui-config.json index 3f9391ba2..a0a596ec3 100644 --- a/src/configurations/destinations/revenue_cat/ui-config.json +++ b/src/configurations/destinations/revenue_cat/ui-config.json @@ -67,7 +67,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/rockerbox/db-config.json b/src/configurations/destinations/rockerbox/db-config.json index c8c3529ae..b9c58076f 100644 --- a/src/configurations/destinations/rockerbox/db-config.json +++ b/src/configurations/destinations/rockerbox/db-config.json @@ -15,7 +15,8 @@ "clientAuthId", "customDomain", "enableCookieSync", - "connectionMode" + "connectionMode", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -64,18 +65,19 @@ "useNativeSDKToSend", "clientAuthId", "customDomain", - "enableCookieSync" + "enableCookieSync", + "consentManagement" ], - "amp": ["connectionMode"], - "android": ["connectionMode"], - "cordova": ["connectionMode"], - "cloud": ["connectionMode"], - "flutter": ["connectionMode"], - "ios": ["connectionMode"], - "reactnative": ["connectionMode"], - "unity": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "amp": ["connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] } } } diff --git a/src/configurations/destinations/rockerbox/schema.json b/src/configurations/destinations/rockerbox/schema.json index c27d6c0b9..4cedbfc4b 100644 --- a/src/configurations/destinations/rockerbox/schema.json +++ b/src/configurations/destinations/rockerbox/schema.json @@ -85,6 +85,517 @@ }, "enableCookieSync": { "type": "object", "properties": { "web": { "type": "boolean" } } }, "useNativeSDK": { "type": "object", "properties": { "web": { "type": "boolean" } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/rockerbox/ui-config.json b/src/configurations/destinations/rockerbox/ui-config.json index 249e25f31..f82e9e001 100644 --- a/src/configurations/destinations/rockerbox/ui-config.json +++ b/src/configurations/destinations/rockerbox/ui-config.json @@ -139,7 +139,15 @@ } } ] - }, + } + ] + }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [ { "title": "OneTrust consent settings", "note": [ @@ -164,7 +172,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -250,6 +270,86 @@ } ] } + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/rollbar/db-config.json b/src/configurations/destinations/rollbar/db-config.json index 8a30fa7e2..22aa477c8 100644 --- a/src/configurations/destinations/rollbar/db-config.json +++ b/src/configurations/destinations/rollbar/db-config.json @@ -15,7 +15,9 @@ "sourceMapEnabled", "blacklistedEvents", "whitelistedEvents", - "oneTrustCookieCategories" + "eventFilteringOption", + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -32,10 +34,11 @@ "ignoredMessages", "sourceMapEnabled", "blacklistedEvents", + "eventFilteringOption", "whitelistedEvents", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": ["accessToken"] } diff --git a/src/configurations/destinations/rollbar/schema.json b/src/configurations/destinations/rollbar/schema.json index edaf35513..5e7a43d0c 100644 --- a/src/configurations/destinations/rollbar/schema.json +++ b/src/configurations/destinations/rollbar/schema.json @@ -74,6 +74,57 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { "web": { "type": "string", "enum": ["device"] } } diff --git a/src/configurations/destinations/rollbar/ui-config.json b/src/configurations/destinations/rollbar/ui-config.json index e6b41005c..349ffd0f7 100644 --- a/src/configurations/destinations/rollbar/ui-config.json +++ b/src/configurations/destinations/rollbar/ui-config.json @@ -170,7 +170,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/s3_datalake/db-config.json b/src/configurations/destinations/s3_datalake/db-config.json index 0517ee86d..c2b9b38e7 100644 --- a/src/configurations/destinations/s3_datalake/db-config.json +++ b/src/configurations/destinations/s3_datalake/db-config.json @@ -5,7 +5,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -50,19 +50,20 @@ "syncStartAt", "excludeWindow", "timeWindowLayout", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "enableSSE" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "cloudSource": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "cloudSource": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["password", "accessKeyID", "accessKey"] } diff --git a/src/configurations/destinations/s3_datalake/schema.json b/src/configurations/destinations/s3_datalake/schema.json index ad272d8f3..99e4cf3a8 100644 --- a/src/configurations/destinations/s3_datalake/schema.json +++ b/src/configurations/destinations/s3_datalake/schema.json @@ -36,6 +36,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cloudSource": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/s3_datalake/ui-config.json b/src/configurations/destinations/s3_datalake/ui-config.json index dabbf34ba..6aa507ce6 100644 --- a/src/configurations/destinations/s3_datalake/ui-config.json +++ b/src/configurations/destinations/s3_datalake/ui-config.json @@ -194,7 +194,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/salesforce/db-config.json b/src/configurations/destinations/salesforce/db-config.json index 1c67c825d..ab98e6ebe 100644 --- a/src/configurations/destinations/salesforce/db-config.json +++ b/src/configurations/destinations/salesforce/db-config.json @@ -7,7 +7,7 @@ "transformAtV1": "router", "saveDestinationResponse": true, "throttlingCost": { "eventType": { "identify": 3 } }, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -46,17 +46,17 @@ "useContactId", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["password", "initialAccessToken"] } diff --git a/src/configurations/destinations/salesforce/schema.json b/src/configurations/destinations/salesforce/schema.json index 89070cefb..5e205c057 100644 --- a/src/configurations/destinations/salesforce/schema.json +++ b/src/configurations/destinations/salesforce/schema.json @@ -31,6 +31,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/salesforce/ui-config.json b/src/configurations/destinations/salesforce/ui-config.json index ddb2f96bd..f7cf0abd2 100644 --- a/src/configurations/destinations/salesforce/ui-config.json +++ b/src/configurations/destinations/salesforce/ui-config.json @@ -74,7 +74,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/revenue_cat.json b/test/data/validation/destinations/revenue_cat.json index 4965cccad..27fc2de09 100644 --- a/test/data/validation/destinations/revenue_cat.json +++ b/test/data/validation/destinations/revenue_cat.json @@ -13,5 +13,108 @@ "xPlatform": "amazon" }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKey": "str_1435XXXXX012", + "xPlatform": "amazon", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiKey": "str_1435XXXXX012", + "xPlatform": "amazon", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKey": "str_1435XXXXX012", + "xPlatform": "amazon", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiKey": "str_1435XXXXX012", + "xPlatform": "amazon", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKey": "str_1435XXXXX012", + "xPlatform": "amazon", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/rockerbox.json b/test/data/validation/destinations/rockerbox.json index b3f8ce18b..f608440a5 100644 --- a/test/data/validation/destinations/rockerbox.json +++ b/test/data/validation/destinations/rockerbox.json @@ -127,5 +127,103 @@ } }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "advertiserId": "test id", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "advertiserId": "test id", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "advertiserId": "test id", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "advertiserId": "test id", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "advertiserId": "test id", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/rollbar.json b/test/data/validation/destinations/rollbar.json index 1e24328a9..9b38399ab 100644 --- a/test/data/validation/destinations/rollbar.json +++ b/test/data/validation/destinations/rollbar.json @@ -31,5 +31,113 @@ "err": [ "accessToken must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\"" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "accessToken": "11XX4", + "captureUncaughtException": true, + "guessUncaughtFrames": true, + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "accessToken": "11XX4", + "captureUncaughtException": true, + "guessUncaughtFrames": true, + "consentManagement": { + "web": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "accessToken": "11XX4", + "captureUncaughtException": true, + "guessUncaughtFrames": true, + "consentManagement": { + "web": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0 must have required property 'resolutionStrategy'", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "accessToken": "11XX4", + "captureUncaughtException": true, + "guessUncaughtFrames": true, + "consentManagement": { + "web": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "accessToken": "11XX4", + "captureUncaughtException": true, + "guessUncaughtFrames": true, + "consentManagement": { + "web": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.web.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/s3_datalake.json b/test/data/validation/destinations/s3_datalake.json index 50477f6f3..3caa5e8d3 100644 --- a/test/data/validation/destinations/s3_datalake.json +++ b/test/data/validation/destinations/s3_datalake.json @@ -143,5 +143,138 @@ "err": [ "bucketName must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^((?!^xn--)(?!.*\\.\\..*)(?!^(\\d+(\\.|$)){4}$)[a-z0-9][a-z0-9-.]{1,61}[a-z0-9])$\"" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "bucketName": "test-bucket", + "useGlue": true, + "prefix": "xyzxx", + "namespace": "eu_new3", + "accessKeyID": "", + "accessKey": "", + "syncFrequency": "30", + "region": "us-east-1", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "bucketName": "test-bucket", + "useGlue": true, + "prefix": "xyzxx", + "namespace": "eu_new3", + "accessKeyID": "", + "accessKey": "", + "syncFrequency": "30", + "region": "us-east-1", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "bucketName": "test-bucket", + "useGlue": true, + "prefix": "xyzxx", + "namespace": "eu_new3", + "accessKeyID": "", + "accessKey": "", + "syncFrequency": "30", + "region": "us-east-1", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "bucketName": "test-bucket", + "useGlue": true, + "prefix": "xyzxx", + "namespace": "eu_new3", + "accessKeyID": "", + "accessKey": "", + "syncFrequency": "30", + "region": "us-east-1", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "bucketName": "test-bucket", + "useGlue": true, + "prefix": "xyzxx", + "namespace": "eu_new3", + "accessKeyID": "", + "accessKey": "", + "syncFrequency": "30", + "region": "us-east-1", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/salesforce.json b/test/data/validation/destinations/salesforce.json index 08464281d..4f990bcc2 100644 --- a/test/data/validation/destinations/salesforce.json +++ b/test/data/validation/destinations/salesforce.json @@ -31,5 +31,128 @@ }, "result": false, "err": [" must have required property 'password'"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "userName": "user_namenew", + "mapProperties": true, + "sandbox": false, + "useContactId": true, + "password": "password", + "initialAccessToken": "testXXXtoken", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "userName": "user_namenew", + "mapProperties": true, + "sandbox": false, + "useContactId": true, + "password": "password", + "initialAccessToken": "testXXXtoken", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "userName": "user_namenew", + "mapProperties": true, + "sandbox": false, + "useContactId": true, + "password": "password", + "initialAccessToken": "testXXXtoken", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "userName": "user_namenew", + "mapProperties": true, + "sandbox": false, + "useContactId": true, + "password": "password", + "initialAccessToken": "testXXXtoken", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "userName": "user_namenew", + "mapProperties": true, + "sandbox": false, + "useContactId": true, + "password": "password", + "initialAccessToken": "testXXXtoken", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From 7069b4d3005a1386a6e6bec67c611670b79a24b0 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Wed, 26 Jun 2024 13:33:30 +0530 Subject: [PATCH 59/68] feat: added GCM support for 5 destinations - Batch 26 (#1506) --- .../the_trade_desk/db-config.json | 2 +- .../destinations/the_trade_desk/schema.json | 51 ++ .../the_trade_desk/ui-config.json | 101 +++- .../db-config.json | 22 +- .../schema.json | 511 ++++++++++++++++++ .../ui-config.json | 101 +++- .../destinations/tiktok_ads/db-config.json | 23 +- .../destinations/tiktok_ads/schema.json | 465 ++++++++++++++++ .../destinations/tiktok_ads/ui-config.json | 107 +++- .../tiktok_ads_offline_events/db-config.json | 24 +- .../tiktok_ads_offline_events/schema.json | 511 ++++++++++++++++++ .../tiktok_ads_offline_events/ui-config.json | 93 +++- .../tiktok_audience/db-config.json | 6 +- .../tiktok_audience/ui-config.json | 93 +++- .../destinations/the_trade_desk.json | 118 ++++ .../the_trade_desk_real_time_conversions.json | 103 ++++ .../validation/destinations/tiktok_ads.json | 103 ++++ .../tiktok_ads_offline_events.json | 98 ++++ 18 files changed, 2482 insertions(+), 50 deletions(-) diff --git a/src/configurations/destinations/the_trade_desk/db-config.json b/src/configurations/destinations/the_trade_desk/db-config.json index 748a1fc8a..9a0508168 100644 --- a/src/configurations/destinations/the_trade_desk/db-config.json +++ b/src/configurations/destinations/the_trade_desk/db-config.json @@ -22,7 +22,7 @@ "ttlInDays", "oneTrustCookieCategories" ], - "warehouse": ["connectionMode"] + "warehouse": ["connectionMode", "consentManagement"] }, "secretKeys": ["advertiserSecretKey"] }, diff --git a/src/configurations/destinations/the_trade_desk/schema.json b/src/configurations/destinations/the_trade_desk/schema.json index 5d7bf4421..8225adc4b 100644 --- a/src/configurations/destinations/the_trade_desk/schema.json +++ b/src/configurations/destinations/the_trade_desk/schema.json @@ -37,6 +37,57 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/the_trade_desk/ui-config.json b/src/configurations/destinations/the_trade_desk/ui-config.json index 64cb50bb1..e45e42c38 100644 --- a/src/configurations/destinations/the_trade_desk/ui-config.json +++ b/src/configurations/destinations/the_trade_desk/ui-config.json @@ -114,9 +114,10 @@ ] }, { - "title": "Other settings", - "note": "Configure advanced RudderStack features here", - "icon": "otherSettings", + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", "groups": [ { "title": "OneTrust cookie consent settings", @@ -142,7 +143,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -153,6 +166,86 @@ "title": "SDK settings", "note": "not visible in the ui", "fields": [] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/the_trade_desk_real_time_conversions/db-config.json b/src/configurations/destinations/the_trade_desk_real_time_conversions/db-config.json index b9d42bf63..d0101f103 100644 --- a/src/configurations/destinations/the_trade_desk_real_time_conversions/db-config.json +++ b/src/configurations/destinations/the_trade_desk_real_time_conversions/db-config.json @@ -40,17 +40,17 @@ "trackerId", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] } }, "options": { "isBeta": true } diff --git a/src/configurations/destinations/the_trade_desk_real_time_conversions/schema.json b/src/configurations/destinations/the_trade_desk_real_time_conversions/schema.json index c951319a2..f8a2b4e4c 100644 --- a/src/configurations/destinations/the_trade_desk_real_time_conversions/schema.json +++ b/src/configurations/destinations/the_trade_desk_real_time_conversions/schema.json @@ -63,6 +63,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/the_trade_desk_real_time_conversions/ui-config.json b/src/configurations/destinations/the_trade_desk_real_time_conversions/ui-config.json index 60c42a304..672feb6ab 100644 --- a/src/configurations/destinations/the_trade_desk_real_time_conversions/ui-config.json +++ b/src/configurations/destinations/the_trade_desk_real_time_conversions/ui-config.json @@ -57,9 +57,10 @@ "note": "Manage the settings for your destination", "sections": [ { - "title": "Other settings", - "note": "Configure advanced RudderStack features here", - "icon": "otherSettings", + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", "groups": [ { "title": "OneTrust cookie consent settings", @@ -85,7 +86,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -241,6 +254,86 @@ } ] } + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/tiktok_ads/db-config.json b/src/configurations/destinations/tiktok_ads/db-config.json index 7e7d38484..32ec2f6c6 100644 --- a/src/configurations/destinations/tiktok_ads/db-config.json +++ b/src/configurations/destinations/tiktok_ads/db-config.json @@ -14,7 +14,8 @@ "whitelistedEvents", "eventFilteringOption", "oneTrustCookieCategories", - "ketchConsentPurposes" + "ketchConsentPurposes", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -59,16 +60,16 @@ "oneTrustCookieCategories", "ketchConsentPurposes" ], - "web": ["useNativeSDK", "connectionMode"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "cloud": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"] }, "secretKeys": ["accessToken", "pixelCode"] } diff --git a/src/configurations/destinations/tiktok_ads/schema.json b/src/configurations/destinations/tiktok_ads/schema.json index ac0a362f2..457810654 100644 --- a/src/configurations/destinations/tiktok_ads/schema.json +++ b/src/configurations/destinations/tiktok_ads/schema.json @@ -93,6 +93,471 @@ "properties": { "purpose": { "type": "string", "pattern": "^(.{0,100})$" } } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/tiktok_ads/ui-config.json b/src/configurations/destinations/tiktok_ads/ui-config.json index 991e7599c..ee9401dcc 100644 --- a/src/configurations/destinations/tiktok_ads/ui-config.json +++ b/src/configurations/destinations/tiktok_ads/ui-config.json @@ -222,7 +222,19 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } }, { "type": "dynamicCustomForm", @@ -237,7 +249,98 @@ "regex": "^(.{0,100})$", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/tiktok_ads_offline_events/db-config.json b/src/configurations/destinations/tiktok_ads_offline_events/db-config.json index 025abd1cc..9a3da23b6 100644 --- a/src/configurations/destinations/tiktok_ads_offline_events/db-config.json +++ b/src/configurations/destinations/tiktok_ads_offline_events/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "amp", @@ -40,17 +40,17 @@ "eventsToStandard", "oneTrustCookieCategories" ], - "amp": ["connectionMode"], - "android": ["connectionMode"], - "cordova": ["connectionMode"], - "cloud": ["connectionMode"], - "flutter": ["connectionMode"], - "ios": ["connectionMode"], - "reactnative": ["connectionMode"], - "unity": ["connectionMode"], - "warehouse": ["connectionMode"], - "web": ["connectionMode"], - "shopify": ["connectionMode"] + "amp": ["connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["accessToken"] } diff --git a/src/configurations/destinations/tiktok_ads_offline_events/schema.json b/src/configurations/destinations/tiktok_ads_offline_events/schema.json index 538ea3a57..3d80494d8 100644 --- a/src/configurations/destinations/tiktok_ads_offline_events/schema.json +++ b/src/configurations/destinations/tiktok_ads_offline_events/schema.json @@ -53,6 +53,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/tiktok_ads_offline_events/ui-config.json b/src/configurations/destinations/tiktok_ads_offline_events/ui-config.json index 5bfd80e47..ac208516b 100644 --- a/src/configurations/destinations/tiktok_ads_offline_events/ui-config.json +++ b/src/configurations/destinations/tiktok_ads_offline_events/ui-config.json @@ -118,7 +118,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/tiktok_audience/db-config.json b/src/configurations/destinations/tiktok_audience/db-config.json index a8a1a1a79..064954abf 100644 --- a/src/configurations/destinations/tiktok_audience/db-config.json +++ b/src/configurations/destinations/tiktok_audience/db-config.json @@ -6,7 +6,7 @@ "disableJsonMapper": true, "excludeKeys": [], "auth": { "type": "OAuth" }, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "isAudienceSupported": true, "saveDestinationResponse": true, "supportsBlankAudienceCreation": true, @@ -17,8 +17,8 @@ "transformAtV1": "router", "destConfig": { "defaultConfig": ["rudderAccountId", "isHashRequired", "oneTrustCookieCategories"], - "cloud": ["audienceId", "connectionMode"], - "warehouse": ["adAccountId", "connectionMode"] + "cloud": ["audienceId", "connectionMode", "consentManagement"], + "warehouse": ["adAccountId", "connectionMode", "consentManagement"] }, "supportedConnectionModes": { "cloud": ["cloud"], "warehouse": ["cloud"] } }, diff --git a/src/configurations/destinations/tiktok_audience/ui-config.json b/src/configurations/destinations/tiktok_audience/ui-config.json index c22184dc8..42561a955 100644 --- a/src/configurations/destinations/tiktok_audience/ui-config.json +++ b/src/configurations/destinations/tiktok_audience/ui-config.json @@ -35,7 +35,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/the_trade_desk.json b/test/data/validation/destinations/the_trade_desk.json index 349b2c492..9f757052e 100644 --- a/test/data/validation/destinations/the_trade_desk.json +++ b/test/data/validation/destinations/the_trade_desk.json @@ -80,5 +80,123 @@ }, "result": false, "err": [" must have required property 'advertiserSecretKey'"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "audienceId": "test-segment", + "advertiserId": "test-advertiserId", + "advertiserSecretKey": "test-advertiserSecretKey", + "segmentName": "test-segment", + "dataServer": "usEastCoast", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "audienceId": "test-segment", + "advertiserId": "test-advertiserId", + "advertiserSecretKey": "test-advertiserSecretKey", + "segmentName": "test-segment", + "dataServer": "usEastCoast", + "consentManagement": { + "warehouse": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.warehouse.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.warehouse.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "audienceId": "test-segment", + "advertiserId": "test-advertiserId", + "advertiserSecretKey": "test-advertiserSecretKey", + "segmentName": "test-segment", + "dataServer": "usEastCoast", + "consentManagement": { + "warehouse": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.warehouse.0 must have required property 'resolutionStrategy'", + "consentManagement.warehouse.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "audienceId": "test-segment", + "advertiserId": "test-advertiserId", + "advertiserSecretKey": "test-advertiserSecretKey", + "segmentName": "test-segment", + "dataServer": "usEastCoast", + "consentManagement": { + "warehouse": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "audienceId": "test-segment", + "advertiserId": "test-advertiserId", + "advertiserSecretKey": "test-advertiserSecretKey", + "segmentName": "test-segment", + "dataServer": "usEastCoast", + "consentManagement": { + "warehouse": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.warehouse.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/the_trade_desk_real_time_conversions.json b/test/data/validation/destinations/the_trade_desk_real_time_conversions.json index dd43b1121..068785953 100644 --- a/test/data/validation/destinations/the_trade_desk_real_time_conversions.json +++ b/test/data/validation/destinations/the_trade_desk_real_time_conversions.json @@ -94,5 +94,108 @@ "eventsMapping.0.from must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"", "customProperties.0.rudderProperty must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "advertiserId": "test-advertiserId", + "trackerId": "test-trackerId", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "advertiserId": "test-advertiserId", + "trackerId": "test-trackerId", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "advertiserId": "test-advertiserId", + "trackerId": "test-trackerId", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "advertiserId": "test-advertiserId", + "trackerId": "test-trackerId", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "advertiserId": "test-advertiserId", + "trackerId": "test-trackerId", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/tiktok_ads.json b/test/data/validation/destinations/tiktok_ads.json index 3d6d5bc15..c2138e90c 100644 --- a/test/data/validation/destinations/tiktok_ads.json +++ b/test/data/validation/destinations/tiktok_ads.json @@ -58,5 +58,108 @@ "hashUserProperties": true }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "pixelCode": "fuwheirujkvjnkrtgkf", + "sendCustomEvents": true, + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "pixelCode": "fuwheirujkvjnkrtgkf", + "sendCustomEvents": true, + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "pixelCode": "fuwheirujkvjnkrtgkf", + "sendCustomEvents": true, + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "pixelCode": "fuwheirujkvjnkrtgkf", + "sendCustomEvents": true, + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "pixelCode": "fuwheirujkvjnkrtgkf", + "sendCustomEvents": true, + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/tiktok_ads_offline_events.json b/test/data/validation/destinations/tiktok_ads_offline_events.json index 7f25d3448..3e5751246 100644 --- a/test/data/validation/destinations/tiktok_ads_offline_events.json +++ b/test/data/validation/destinations/tiktok_ads_offline_events.json @@ -64,5 +64,103 @@ "hashUserProperties": true }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "accessToken": "fuwheirujkvjnkrtgkf", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "accessToken": "fuwheirujkvjnkrtgkf", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "accessToken": "fuwheirujkvjnkrtgkf", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "accessToken": "fuwheirujkvjnkrtgkf", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "accessToken": "fuwheirujkvjnkrtgkf", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From b0542f36753727327d7ae5cd06e17cf02e30105d Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Wed, 26 Jun 2024 13:37:39 +0530 Subject: [PATCH 60/68] feat: added GCM support for 5 destinations - Batch 27 (#1508) --- .../destinations/trengo/db-config.json | 24 +- .../destinations/trengo/ui-config.json | 93 +++- .../destinations/tvsquared/db-config.json | 5 +- .../destinations/tvsquared/ui-config.json | 93 +++- .../destinations/user/db-config.json | 25 +- .../destinations/user/schema.json | 511 ++++++++++++++++++ .../destinations/user/ui-config.json | 93 +++- .../destinations/userlist/db-config.json | 24 +- .../destinations/userlist/ui-config.json | 93 +++- .../destinations/vitally/db-config.json | 24 +- .../destinations/vitally/schema.json | 511 ++++++++++++++++++ .../destinations/vitally/ui-config.json | 93 +++- test/data/validation/destinations/user.json | 105 ++++ .../data/validation/destinations/vitally.json | 98 ++++ 14 files changed, 1737 insertions(+), 55 deletions(-) create mode 100644 test/data/validation/destinations/user.json diff --git a/src/configurations/destinations/trengo/db-config.json b/src/configurations/destinations/trengo/db-config.json index 8301be350..84b7037fe 100644 --- a/src/configurations/destinations/trengo/db-config.json +++ b/src/configurations/destinations/trengo/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -42,17 +42,17 @@ "eventTemplateMap", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiToken"] } diff --git a/src/configurations/destinations/trengo/ui-config.json b/src/configurations/destinations/trengo/ui-config.json index 12ae7b1d6..26b084691 100644 --- a/src/configurations/destinations/trengo/ui-config.json +++ b/src/configurations/destinations/trengo/ui-config.json @@ -83,7 +83,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/tvsquared/db-config.json b/src/configurations/destinations/tvsquared/db-config.json index 739a32616..f962036d7 100644 --- a/src/configurations/destinations/tvsquared/db-config.json +++ b/src/configurations/destinations/tvsquared/db-config.json @@ -12,7 +12,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -35,7 +36,7 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": ["credentials"] } diff --git a/src/configurations/destinations/tvsquared/ui-config.json b/src/configurations/destinations/tvsquared/ui-config.json index 94d998616..f6d038350 100644 --- a/src/configurations/destinations/tvsquared/ui-config.json +++ b/src/configurations/destinations/tvsquared/ui-config.json @@ -132,7 +132,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/user/db-config.json b/src/configurations/destinations/user/db-config.json index d617cf890..f726b403b 100644 --- a/src/configurations/destinations/user/db-config.json +++ b/src/configurations/destinations/user/db-config.json @@ -13,7 +13,8 @@ "userEventName", "eventProperties", "companyAttributesMapping", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -55,17 +56,17 @@ "companyAttributesMapping", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey"] } diff --git a/src/configurations/destinations/user/schema.json b/src/configurations/destinations/user/schema.json index 0e4935534..a7e006e00 100644 --- a/src/configurations/destinations/user/schema.json +++ b/src/configurations/destinations/user/schema.json @@ -88,6 +88,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/user/ui-config.json b/src/configurations/destinations/user/ui-config.json index 7d376b904..39a1dba6d 100644 --- a/src/configurations/destinations/user/ui-config.json +++ b/src/configurations/destinations/user/ui-config.json @@ -105,7 +105,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/userlist/db-config.json b/src/configurations/destinations/userlist/db-config.json index e638f2f0e..1108c56f8 100644 --- a/src/configurations/destinations/userlist/db-config.json +++ b/src/configurations/destinations/userlist/db-config.json @@ -5,7 +5,7 @@ "transformAtV1": "processor", "cdkV2Enabled": true, "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -36,17 +36,17 @@ "supportedMessageTypes": { "cloud": ["group", "identify", "track"] }, "destConfig": { "defaultConfig": ["pushKey", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["pushKey"] } diff --git a/src/configurations/destinations/userlist/ui-config.json b/src/configurations/destinations/userlist/ui-config.json index b266fc722..a8e9a68e1 100644 --- a/src/configurations/destinations/userlist/ui-config.json +++ b/src/configurations/destinations/userlist/ui-config.json @@ -31,7 +31,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/vitally/db-config.json b/src/configurations/destinations/vitally/db-config.json index 1b7504baa..2f8e77224 100644 --- a/src/configurations/destinations/vitally/db-config.json +++ b/src/configurations/destinations/vitally/db-config.json @@ -35,19 +35,19 @@ }, "destConfig": { "defaultConfig": ["apiKeyVitally", "oneTrustCookieCategories"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKeyVitally"], - "includeKeys": ["oneTrustCookieCategories"] + "includeKeys": ["oneTrustCookieCategories", "consentManagement"] } } diff --git a/src/configurations/destinations/vitally/schema.json b/src/configurations/destinations/vitally/schema.json index 21d3042e4..31bd4c3b6 100644 --- a/src/configurations/destinations/vitally/schema.json +++ b/src/configurations/destinations/vitally/schema.json @@ -20,6 +20,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/vitally/ui-config.json b/src/configurations/destinations/vitally/ui-config.json index d0b8c1ae7..50beaaec8 100644 --- a/src/configurations/destinations/vitally/ui-config.json +++ b/src/configurations/destinations/vitally/ui-config.json @@ -32,7 +32,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/user.json b/test/data/validation/destinations/user.json new file mode 100644 index 000000000..2fbf83a57 --- /dev/null +++ b/test/data/validation/destinations/user.json @@ -0,0 +1,105 @@ +[ + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKey": "test-host", + "appSubdomain": "test-database", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiKey": "test-host", + "appSubdomain": "test-database", + "consentManagement": { + "web": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKey": "test-host", + "appSubdomain": "test-database", + "consentManagement": { + "web": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0 must have required property 'resolutionStrategy'", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiKey": "test-host", + "appSubdomain": "test-database", + "consentManagement": { + "web": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKey": "test-host", + "appSubdomain": "test-database", + "consentManagement": { + "web": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.web.0.provider must be equal to one of the allowed values"] + } +] diff --git a/test/data/validation/destinations/vitally.json b/test/data/validation/destinations/vitally.json index 2eb6f5954..cbab34256 100644 --- a/test/data/validation/destinations/vitally.json +++ b/test/data/validation/destinations/vitally.json @@ -19,5 +19,103 @@ "err": [ "apiKeyVitally must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,500})$\"" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKeyVitally": "ZXlKaGJHY2lPaUpJVXXXXXXpSXNJblI1Y0NJNklrcFhWQ0o5LmV5SmhkV1FpT2lKbU1XVTFNbVUzWmkxbU5ESTJMVXXXXXXXXXXX9UQXdNUzB5TWprMU5EWXdNVEZtWkRnaUxDSmhjR2tpT2lJMU1UVTJaRGhsTnkwMU1ESm1MVFF4WlRjdFlUUTFNQzFqT1RZME9ERmlOekExTTJVaUxDSnpaV01pT2lKaFpqZ3dNakF5TVNKOS41a290bzgxZGZ1R2R3TnhrNFBXcFMsdhfbdsaijfgbsdiulfgbsdaiufjbdsuifbdsgiufbsdjufbsdgufjbsjkfbdsujfbsdujfb", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiKeyVitally": "ZXlKaGJHY2lPaUpJVXXXXXXpSXNJblI1Y0NJNklrcFhWQ0o5LmV5SmhkV1FpT2lKbU1XVTFNbVUzWmkxbU5ESTJMVXXXXXXXXXXX9UQXdNUzB5TWprMU5EWXdNVEZtWkRnaUxDSmhjR2tpT2lJMU1UVTJaRGhsTnkwMU1ESm1MVFF4WlRjdFlUUTFNQzFqT1RZME9ERmlOekExTTJVaUxDSnpaV01pT2lKaFpqZ3dNakF5TVNKOS41a290bzgxZGZ1R2R3TnhrNFBXcFMsdhfbdsaijfgbsdiulfgbsdaiufjbdsuifbdsgiufbsdjufbsdgufjbsjkfbdsujfbsdujfb", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKeyVitally": "ZXlKaGJHY2lPaUpJVXXXXXXpSXNJblI1Y0NJNklrcFhWQ0o5LmV5SmhkV1FpT2lKbU1XVTFNbVUzWmkxbU5ESTJMVXXXXXXXXXXX9UQXdNUzB5TWprMU5EWXdNVEZtWkRnaUxDSmhjR2tpT2lJMU1UVTJaRGhsTnkwMU1ESm1MVFF4WlRjdFlUUTFNQzFqT1RZME9ERmlOekExTTJVaUxDSnpaV01pT2lKaFpqZ3dNakF5TVNKOS41a290bzgxZGZ1R2R3TnhrNFBXcFMsdhfbdsaijfgbsdiulfgbsdaiufjbdsuifbdsgiufbsdjufbsdgufjbsjkfbdsujfbsdujfb", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiKeyVitally": "ZXlKaGJHY2lPaUpJVXXXXXXpSXNJblI1Y0NJNklrcFhWQ0o5LmV5SmhkV1FpT2lKbU1XVTFNbVUzWmkxbU5ESTJMVXXXXXXXXXXX9UQXdNUzB5TWprMU5EWXdNVEZtWkRnaUxDSmhjR2tpT2lJMU1UVTJaRGhsTnkwMU1ESm1MVFF4WlRjdFlUUTFNQzFqT1RZME9ERmlOekExTTJVaUxDSnpaV01pT2lKaFpqZ3dNakF5TVNKOS41a290bzgxZGZ1R2R3TnhrNFBXcFMsdhfbdsaijfgbsdiulfgbsdaiufjbdsuifbdsgiufbsdjufbsdgufjbsjkfbdsujfbsdujfb", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKeyVitally": "ZXlKaGJHY2lPaUpJVXXXXXXpSXNJblI1Y0NJNklrcFhWQ0o5LmV5SmhkV1FpT2lKbU1XVTFNbVUzWmkxbU5ESTJMVXXXXXXXXXXX9UQXdNUzB5TWprMU5EWXdNVEZtWkRnaUxDSmhjR2tpT2lJMU1UVTJaRGhsTnkwMU1ESm1MVFF4WlRjdFlUUTFNQzFqT1RZME9ERmlOekExTTJVaUxDSnpaV01pT2lKaFpqZ3dNakF5TVNKOS41a290bzgxZGZ1R2R3TnhrNFBXcFMsdhfbdsaijfgbsdiulfgbsdaiufjbdsuifbdsgiufbsdjufbsdgufjbsjkfbdsujfbsdujfb", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From acf8eeea902bc24649aa4448723d9cd8ddacf05f Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Wed, 26 Jun 2024 13:41:20 +0530 Subject: [PATCH 61/68] feat: added GCM support for 5 destinations - Batch 29 (#1511) --- .../destinations/zapier/db-config.json | 25 +- .../destinations/zapier/schema.json | 511 ++++++++++++++++++ .../destinations/zapier/ui-config.json | 93 +++- .../destinations/zendesk/db-config.json | 24 +- .../destinations/zendesk/schema.json | 511 ++++++++++++++++++ .../destinations/zendesk/ui-config.json | 93 +++- test/data/validation/destinations/zapier.json | 148 +++++ .../data/validation/destinations/zendesk.json | 123 +++++ 8 files changed, 1502 insertions(+), 26 deletions(-) diff --git a/src/configurations/destinations/zapier/db-config.json b/src/configurations/destinations/zapier/db-config.json index f5850d514..d642dffd4 100644 --- a/src/configurations/destinations/zapier/db-config.json +++ b/src/configurations/destinations/zapier/db-config.json @@ -9,7 +9,8 @@ "zapUrl", "trackEventsToZap", "pageScreenEventsToZap", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -46,17 +47,17 @@ "pageScreenEventsToZap", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["zapUrl"] } diff --git a/src/configurations/destinations/zapier/schema.json b/src/configurations/destinations/zapier/schema.json index 12bc4a91f..2c420cda3 100644 --- a/src/configurations/destinations/zapier/schema.json +++ b/src/configurations/destinations/zapier/schema.json @@ -52,6 +52,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/zapier/ui-config.json b/src/configurations/destinations/zapier/ui-config.json index 60d3fe875..abf2dab78 100644 --- a/src/configurations/destinations/zapier/ui-config.json +++ b/src/configurations/destinations/zapier/ui-config.json @@ -59,7 +59,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/zendesk/db-config.json b/src/configurations/destinations/zendesk/db-config.json index 6d9cf9160..eed1f1add 100644 --- a/src/configurations/destinations/zendesk/db-config.json +++ b/src/configurations/destinations/zendesk/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -45,17 +45,17 @@ "oneTrustCookieCategories", "sourceName" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiToken"] } diff --git a/src/configurations/destinations/zendesk/schema.json b/src/configurations/destinations/zendesk/schema.json index 798c21cc7..481a3a5de 100644 --- a/src/configurations/destinations/zendesk/schema.json +++ b/src/configurations/destinations/zendesk/schema.json @@ -37,6 +37,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/zendesk/ui-config.json b/src/configurations/destinations/zendesk/ui-config.json index 822c37e49..a1e31ef50 100644 --- a/src/configurations/destinations/zendesk/ui-config.json +++ b/src/configurations/destinations/zendesk/ui-config.json @@ -85,7 +85,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/zapier.json b/test/data/validation/destinations/zapier.json index 2a69ac2d1..8600759e6 100644 --- a/test/data/validation/destinations/zapier.json +++ b/test/data/validation/destinations/zapier.json @@ -61,5 +61,153 @@ }, "result": false, "err": [" must have required property 'zapUrl'"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "zapUrl": "abc.zap.com", + "trackEventsToZap": [ + { + "from": "First", + "to": "def.zap.com" + }, + { + "from": "second", + "to": "def.zap.com" + } + ], + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "zapUrl": "abc.zap.com", + "trackEventsToZap": [ + { + "from": "First", + "to": "def.zap.com" + }, + { + "from": "second", + "to": "def.zap.com" + } + ], + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "zapUrl": "abc.zap.com", + "trackEventsToZap": [ + { + "from": "First", + "to": "def.zap.com" + }, + { + "from": "second", + "to": "def.zap.com" + } + ], + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "zapUrl": "abc.zap.com", + "trackEventsToZap": [ + { + "from": "First", + "to": "def.zap.com" + }, + { + "from": "second", + "to": "def.zap.com" + } + ], + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "zapUrl": "abc.zap.com", + "trackEventsToZap": [ + { + "from": "First", + "to": "def.zap.com" + }, + { + "from": "second", + "to": "def.zap.com" + } + ], + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/zendesk.json b/test/data/validation/destinations/zendesk.json index dbaf5ef91..14217b0f5 100644 --- a/test/data/validation/destinations/zendesk.json +++ b/test/data/validation/destinations/zendesk.json @@ -46,5 +46,128 @@ }, "result": false, "err": ["apiToken must be string"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "email": "test@email.com", + "apiToken": "WpUn4Q6xTqXwvKUGDVcbWY7XXXXXXOdEBvKIIOKP3", + "domain": "sampledomain0000.zendesk.com", + "createUsersAsVerified": true, + "sendGroupCallsWithoutUserId": false, + "removeUsersFromOrganization": false, + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "email": "test@email.com", + "apiToken": "WpUn4Q6xTqXwvKUGDVcbWY7XXXXXXOdEBvKIIOKP3", + "domain": "sampledomain0000.zendesk.com", + "createUsersAsVerified": true, + "sendGroupCallsWithoutUserId": false, + "removeUsersFromOrganization": false, + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "email": "test@email.com", + "apiToken": "WpUn4Q6xTqXwvKUGDVcbWY7XXXXXXOdEBvKIIOKP3", + "domain": "sampledomain0000.zendesk.com", + "createUsersAsVerified": true, + "sendGroupCallsWithoutUserId": false, + "removeUsersFromOrganization": false, + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "email": "test@email.com", + "apiToken": "WpUn4Q6xTqXwvKUGDVcbWY7XXXXXXOdEBvKIIOKP3", + "domain": "sampledomain0000.zendesk.com", + "createUsersAsVerified": true, + "sendGroupCallsWithoutUserId": false, + "removeUsersFromOrganization": false, + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "email": "test@email.com", + "apiToken": "WpUn4Q6xTqXwvKUGDVcbWY7XXXXXXOdEBvKIIOKP3", + "domain": "sampledomain0000.zendesk.com", + "createUsersAsVerified": true, + "sendGroupCallsWithoutUserId": false, + "removeUsersFromOrganization": false, + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From 5daa43caa328344d3cac14604feac65c423356d2 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Wed, 26 Jun 2024 14:48:27 +0530 Subject: [PATCH 62/68] feat: added GCM support for 5 destinations - Batch 28 (#1510) --- .../destinations/twitter_ads/db-config.json | 22 +- .../destinations/twitter_ads/schema.json | 511 ++++++++++++++++++ .../destinations/twitter_ads/ui-config.json | 84 +++ .../destinations/webengage/db-config.json | 24 +- .../destinations/webengage/schema.json | 511 ++++++++++++++++++ .../destinations/webengage/ui-config.json | 93 +++- .../destinations/woopra/db-config.json | 25 +- .../destinations/woopra/schema.json | 511 ++++++++++++++++++ .../destinations/woopra/ui-config.json | 93 +++- .../destinations/yahoo_dsp/db-config.json | 8 +- .../destinations/yahoo_dsp/schema.json | 143 +++++ .../destinations/yahoo_dsp/ui-config.json | 93 +++- .../yandex_metrica/db-config.json | 5 +- .../destinations/yandex_metrica/schema.json | 51 ++ .../yandex_metrica/ui-config.json | 93 +++- .../validation/destinations/twitter_ads.json | 105 ++++ .../validation/destinations/webengage.json | 108 ++++ test/data/validation/destinations/woopra.json | 148 +++++ .../validation/destinations/yahoo_dsp.json | 123 +++++ .../destinations/yandex_metrica.json | 86 +++ 20 files changed, 2792 insertions(+), 45 deletions(-) create mode 100644 test/data/validation/destinations/twitter_ads.json diff --git a/src/configurations/destinations/twitter_ads/db-config.json b/src/configurations/destinations/twitter_ads/db-config.json index 2d80f5076..223a4a433 100644 --- a/src/configurations/destinations/twitter_ads/db-config.json +++ b/src/configurations/destinations/twitter_ads/db-config.json @@ -39,17 +39,17 @@ "rudderEventName", "twitterEventId" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": [], "supportedMessageTypes": { "cloud": ["track"] } diff --git a/src/configurations/destinations/twitter_ads/schema.json b/src/configurations/destinations/twitter_ads/schema.json index 90c1cefb7..cf1f670d6 100644 --- a/src/configurations/destinations/twitter_ads/schema.json +++ b/src/configurations/destinations/twitter_ads/schema.json @@ -24,6 +24,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/twitter_ads/ui-config.json b/src/configurations/destinations/twitter_ads/ui-config.json index cc37b4c0d..658532887 100644 --- a/src/configurations/destinations/twitter_ads/ui-config.json +++ b/src/configurations/destinations/twitter_ads/ui-config.json @@ -40,6 +40,90 @@ ] } ] + }, + { + "title": "Consent Settings", + "fields": [ + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } ] } diff --git a/src/configurations/destinations/webengage/db-config.json b/src/configurations/destinations/webengage/db-config.json index 2f364ccba..aadb27b58 100644 --- a/src/configurations/destinations/webengage/db-config.json +++ b/src/configurations/destinations/webengage/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "web", @@ -35,17 +35,17 @@ }, "destConfig": { "defaultConfig": ["licenseCode", "apiKey", "dataCenter", "oneTrustCookieCategories"], - "web": ["connectionMode"], - "cloud": ["connectionMode"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "web": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["licenseCode", "apiKey"] } diff --git a/src/configurations/destinations/webengage/schema.json b/src/configurations/destinations/webengage/schema.json index b770fd60a..bc3e92096 100644 --- a/src/configurations/destinations/webengage/schema.json +++ b/src/configurations/destinations/webengage/schema.json @@ -25,6 +25,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/webengage/ui-config.json b/src/configurations/destinations/webengage/ui-config.json index a01cf465d..dcf29b8d5 100644 --- a/src/configurations/destinations/webengage/ui-config.json +++ b/src/configurations/destinations/webengage/ui-config.json @@ -60,7 +60,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/woopra/db-config.json b/src/configurations/destinations/woopra/db-config.json index 40ab1644b..64433d9c8 100644 --- a/src/configurations/destinations/woopra/db-config.json +++ b/src/configurations/destinations/woopra/db-config.json @@ -19,7 +19,8 @@ "whitelistedEvents", "blacklistedEvents", "eventFilteringOption", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -70,17 +71,17 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] } } } diff --git a/src/configurations/destinations/woopra/schema.json b/src/configurations/destinations/woopra/schema.json index fd0004499..827609696 100644 --- a/src/configurations/destinations/woopra/schema.json +++ b/src/configurations/destinations/woopra/schema.json @@ -72,6 +72,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/woopra/ui-config.json b/src/configurations/destinations/woopra/ui-config.json index 27743f93b..5b824a907 100644 --- a/src/configurations/destinations/woopra/ui-config.json +++ b/src/configurations/destinations/woopra/ui-config.json @@ -195,7 +195,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/yahoo_dsp/db-config.json b/src/configurations/destinations/yahoo_dsp/db-config.json index 2bae357af..bacdf2cf6 100644 --- a/src/configurations/destinations/yahoo_dsp/db-config.json +++ b/src/configurations/destinations/yahoo_dsp/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": ["cloud", "warehouse", "shopify"], "syncBehaviours": [], @@ -25,9 +25,9 @@ "seedListType", "oneTrustCookieCategories" ], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["clientId", "clientSecret"] } diff --git a/src/configurations/destinations/yahoo_dsp/schema.json b/src/configurations/destinations/yahoo_dsp/schema.json index 03e933b10..5179a0658 100644 --- a/src/configurations/destinations/yahoo_dsp/schema.json +++ b/src/configurations/destinations/yahoo_dsp/schema.json @@ -38,6 +38,149 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/yahoo_dsp/ui-config.json b/src/configurations/destinations/yahoo_dsp/ui-config.json index 3778fc171..8a7560d4b 100644 --- a/src/configurations/destinations/yahoo_dsp/ui-config.json +++ b/src/configurations/destinations/yahoo_dsp/ui-config.json @@ -139,7 +139,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/yandex_metrica/db-config.json b/src/configurations/destinations/yandex_metrica/db-config.json index b0452f08d..0c504db2a 100644 --- a/src/configurations/destinations/yandex_metrica/db-config.json +++ b/src/configurations/destinations/yandex_metrica/db-config.json @@ -16,7 +16,8 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption" + "eventFilteringOption", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": ["web"], @@ -37,7 +38,7 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK", "connectionMode"] + "web": ["useNativeSDK", "connectionMode", "consentManagement"] }, "secretKeys": ["tagId"] } diff --git a/src/configurations/destinations/yandex_metrica/schema.json b/src/configurations/destinations/yandex_metrica/schema.json index 70c03ee65..2bb2b1ff6 100644 --- a/src/configurations/destinations/yandex_metrica/schema.json +++ b/src/configurations/destinations/yandex_metrica/schema.json @@ -75,6 +75,57 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { "web": { "type": "string", "enum": ["device"] } } diff --git a/src/configurations/destinations/yandex_metrica/ui-config.json b/src/configurations/destinations/yandex_metrica/ui-config.json index 7a6b4b6b4..eb406fe12 100644 --- a/src/configurations/destinations/yandex_metrica/ui-config.json +++ b/src/configurations/destinations/yandex_metrica/ui-config.json @@ -185,7 +185,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/twitter_ads.json b/test/data/validation/destinations/twitter_ads.json new file mode 100644 index 000000000..f1ab91a12 --- /dev/null +++ b/test/data/validation/destinations/twitter_ads.json @@ -0,0 +1,105 @@ +[ + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "rudderAccountId": "test-host", + "pixelId": "test-database", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "rudderAccountId": "test-host", + "pixelId": "test-database", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "rudderAccountId": "test-host", + "pixelId": "test-database", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "rudderAccountId": "test-host", + "pixelId": "test-database", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "rudderAccountId": "test-host", + "pixelId": "test-database", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] + } +] diff --git a/test/data/validation/destinations/webengage.json b/test/data/validation/destinations/webengage.json index 287cebab0..be874aa48 100644 --- a/test/data/validation/destinations/webengage.json +++ b/test/data/validation/destinations/webengage.json @@ -26,5 +26,113 @@ "dataCenter": "standard" }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "licenseCode": "adhs123", + "apiKey": "ajsdgkh21", + "dataCenter": "standard", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "licenseCode": "adhs123", + "apiKey": "ajsdgkh21", + "dataCenter": "standard", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "licenseCode": "adhs123", + "apiKey": "ajsdgkh21", + "dataCenter": "standard", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "licenseCode": "adhs123", + "apiKey": "ajsdgkh21", + "dataCenter": "standard", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "licenseCode": "adhs123", + "apiKey": "ajsdgkh21", + "dataCenter": "standard", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/woopra.json b/test/data/validation/destinations/woopra.json index 3deb0705e..5944c2c18 100644 --- a/test/data/validation/destinations/woopra.json +++ b/test/data/validation/destinations/woopra.json @@ -33,5 +33,153 @@ "err": [ "projectName must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(([a-z0-9]+[.])+[a-z]{1,})$\"" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "projectName": "abcwork.com", + "cookieName": "iugefiu23", + "cookiePath": "folder/tmp", + "cookieDomain": "testing.com", + "clickTracking": false, + "downloadTracking": true, + "hideCampaign": true, + "idleTimeout": "30000", + "ignoreQueryUrl": false, + "outgoingIgnoreSubdomain": true, + "outgoingTracking": true, + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "projectName": "abcwork.com", + "cookieName": "iugefiu23", + "cookiePath": "folder/tmp", + "cookieDomain": "testing.com", + "clickTracking": false, + "downloadTracking": true, + "hideCampaign": true, + "idleTimeout": "30000", + "ignoreQueryUrl": false, + "outgoingIgnoreSubdomain": true, + "outgoingTracking": true, + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "projectName": "abcwork.com", + "cookieName": "iugefiu23", + "cookiePath": "folder/tmp", + "cookieDomain": "testing.com", + "clickTracking": false, + "downloadTracking": true, + "hideCampaign": true, + "idleTimeout": "30000", + "ignoreQueryUrl": false, + "outgoingIgnoreSubdomain": true, + "outgoingTracking": true, + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "projectName": "abcwork.com", + "cookieName": "iugefiu23", + "cookiePath": "folder/tmp", + "cookieDomain": "testing.com", + "clickTracking": false, + "downloadTracking": true, + "hideCampaign": true, + "idleTimeout": "30000", + "ignoreQueryUrl": false, + "outgoingIgnoreSubdomain": true, + "outgoingTracking": true, + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "projectName": "abcwork.com", + "cookieName": "iugefiu23", + "cookiePath": "folder/tmp", + "cookieDomain": "testing.com", + "clickTracking": false, + "downloadTracking": true, + "hideCampaign": true, + "idleTimeout": "30000", + "ignoreQueryUrl": false, + "outgoingIgnoreSubdomain": true, + "outgoingTracking": true, + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/yahoo_dsp.json b/test/data/validation/destinations/yahoo_dsp.json index 0b1fa83cd..acafe56ba 100644 --- a/test/data/validation/destinations/yahoo_dsp.json +++ b/test/data/validation/destinations/yahoo_dsp.json @@ -102,5 +102,128 @@ }, "result": false, "err": ["hashRequired must be boolean"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "clientId": "a43deb8-a123-XXXX-XXXX-958b3XXXd431", + "clientSecret": "dheAscasz6yc9LrRRIPXXX9h5dssfdsLccXXXXXXcA6eEoFR4rXQ", + "audienceId": "000000", + "accountId": "00000", + "audienceType": "DEVICE_ID", + "seedListType": "GPADVID", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "clientId": "a43deb8-a123-XXXX-XXXX-958b3XXXd431", + "clientSecret": "dheAscasz6yc9LrRRIPXXX9h5dssfdsLccXXXXXXcA6eEoFR4rXQ", + "audienceId": "000000", + "accountId": "00000", + "audienceType": "DEVICE_ID", + "seedListType": "GPADVID", + "consentManagement": { + "shopify": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.shopify.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.shopify.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "clientId": "a43deb8-a123-XXXX-XXXX-958b3XXXd431", + "clientSecret": "dheAscasz6yc9LrRRIPXXX9h5dssfdsLccXXXXXXcA6eEoFR4rXQ", + "audienceId": "000000", + "accountId": "00000", + "audienceType": "DEVICE_ID", + "seedListType": "GPADVID", + "consentManagement": { + "shopify": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.shopify.0 must have required property 'resolutionStrategy'", + "consentManagement.shopify.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "clientId": "a43deb8-a123-XXXX-XXXX-958b3XXXd431", + "clientSecret": "dheAscasz6yc9LrRRIPXXX9h5dssfdsLccXXXXXXcA6eEoFR4rXQ", + "audienceId": "000000", + "accountId": "00000", + "audienceType": "DEVICE_ID", + "seedListType": "GPADVID", + "consentManagement": { + "shopify": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "clientId": "a43deb8-a123-XXXX-XXXX-958b3XXXd431", + "clientSecret": "dheAscasz6yc9LrRRIPXXX9h5dssfdsLccXXXXXXcA6eEoFR4rXQ", + "audienceId": "000000", + "accountId": "00000", + "audienceType": "DEVICE_ID", + "seedListType": "GPADVID", + "consentManagement": { + "shopify": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.shopify.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/yandex_metrica.json b/test/data/validation/destinations/yandex_metrica.json index 453f55a9f..64d00c3d5 100644 --- a/test/data/validation/destinations/yandex_metrica.json +++ b/test/data/validation/destinations/yandex_metrica.json @@ -358,5 +358,91 @@ } }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "tagId": "34XXX223", + "clickMap": false, + "trackLinks": false, + "trackBounce": false, + "webvisor": false, + "containerName": "dataLayer", + "consentManagement": { + "web": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "tagId": "34XXX223", + "clickMap": false, + "trackLinks": false, + "trackBounce": false, + "webvisor": false, + "containerName": "dataLayer", + "consentManagement": { + "web": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.web.0 must have required property 'resolutionStrategy'", + "consentManagement.web.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "tagId": "34XXX223", + "clickMap": false, + "trackLinks": false, + "trackBounce": false, + "webvisor": false, + "containerName": "dataLayer", + "consentManagement": { + "web": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "tagId": "34XXX223", + "clickMap": false, + "trackLinks": false, + "trackBounce": false, + "webvisor": false, + "containerName": "dataLayer", + "consentManagement": { + "web": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.web.0.provider must be equal to one of the allowed values"] } ] From 4a3beab87937c309b92fd5ae41d6f8f941faceb2 Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Wed, 26 Jun 2024 14:59:09 +0530 Subject: [PATCH 63/68] feat: added GCM support for Awin destination (#1402) --- .../destinations/awin/db-config.json | 30 +- .../destinations/awin/schema.json | 511 ++++++++++++++++++ .../destinations/awin/ui-config.json | 93 +++- test/data/validation/destinations/awin.json | 98 ++++ 4 files changed, 719 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/awin/db-config.json b/src/configurations/destinations/awin/db-config.json index 0d1c2b45e..64da2c849 100644 --- a/src/configurations/destinations/awin/db-config.json +++ b/src/configurations/destinations/awin/db-config.json @@ -4,7 +4,13 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["advertiserId", "eventsToTrack", "customFieldMap", "oneTrustCookieCategories"], + "includeKeys": [ + "advertiserId", + "eventsToTrack", + "customFieldMap", + "oneTrustCookieCategories", + "consentManagement" + ], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -40,17 +46,17 @@ "customFieldMap", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "warehouse": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["advertiserId"] } diff --git a/src/configurations/destinations/awin/schema.json b/src/configurations/destinations/awin/schema.json index 8af476a01..af3e5f8ab 100644 --- a/src/configurations/destinations/awin/schema.json +++ b/src/configurations/destinations/awin/schema.json @@ -63,6 +63,517 @@ "cloud": { "type": "string", "enum": ["cloud"] }, "warehouse": { "type": "string", "enum": ["cloud"] } } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } } } } diff --git a/src/configurations/destinations/awin/ui-config.json b/src/configurations/destinations/awin/ui-config.json index 40c015788..cc336b503 100644 --- a/src/configurations/destinations/awin/ui-config.json +++ b/src/configurations/destinations/awin/ui-config.json @@ -69,7 +69,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/awin.json b/test/data/validation/destinations/awin.json index c2c26489e..7ec36f185 100644 --- a/test/data/validation/destinations/awin.json +++ b/test/data/validation/destinations/awin.json @@ -79,5 +79,103 @@ }, "result": false, "err": ["customFieldMap.0.to must match pattern \"^\\s*p\\d+\\s*$\""] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "advertiserId": "12345", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "advertiserId": "12345", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "advertiserId": "12345", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "advertiserId": "12345", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "advertiserId": "12345", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From 0200d89df2830e6bea8deabe7037101eb2918a6c Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Wed, 26 Jun 2024 17:48:06 +0530 Subject: [PATCH 64/68] feat: added GCM support for 5 destinations - Batch 8 (#1434) --- .../destinations/ga360/db-config.json | 28 +- .../destinations/ga360/ui-config.json | 107 +++- .../db-config.json | 24 +- .../ui-config.json | 101 +++- .../db-config.json | 8 +- .../ui-config.json | 93 +++- .../google_cloud_function/db-config.json | 22 +- .../google_cloud_function/schema.json | 511 ++++++++++++++++++ .../google_cloud_function/ui-config.json | 93 +++- .../destinations/googlepubsub/db-config.json | 24 +- .../destinations/googlepubsub/schema.json | 511 ++++++++++++++++++ .../destinations/googlepubsub/ui-config.json | 93 +++- .../destinations/google_cloud_function.json | 98 ++++ .../validation/destinations/googlepubsub.json | 103 ++++ 14 files changed, 1756 insertions(+), 60 deletions(-) diff --git a/src/configurations/destinations/ga360/db-config.json b/src/configurations/destinations/ga360/db-config.json index 4a5a8175a..d370758d6 100644 --- a/src/configurations/destinations/ga360/db-config.json +++ b/src/configurations/destinations/ga360/db-config.json @@ -11,6 +11,7 @@ "includeSearch", "trackCategorizedPages", "trackNamedPages", + "useRichEventNames", "sampleRate", "siteSpeedSampleRate", "dimensions", @@ -30,7 +31,8 @@ "whitelistedEvents", "eventFilteringOption", "oneTrustCookieCategories", - "ketchConsentPurposes" + "ketchConsentPurposes", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -91,6 +93,7 @@ "useNativeSDK", "trackCategorizedPages", "trackNamedPages", + "useRichEventNames", "sampleRate", "siteSpeedSampleRate", "resetCustomDimensionsOnPage", @@ -99,18 +102,19 @@ "optimize", "useGoogleAmpClientId", "namedTracker", - "connectionMode" + "connectionMode", + "consentManagement" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": [] } diff --git a/src/configurations/destinations/ga360/ui-config.json b/src/configurations/destinations/ga360/ui-config.json index a9590866f..f7ae43311 100644 --- a/src/configurations/destinations/ga360/ui-config.json +++ b/src/configurations/destinations/ga360/ui-config.json @@ -328,7 +328,19 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } }, { "type": "dynamicCustomForm", @@ -343,7 +355,98 @@ "regex": "^(.{0,100})$", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/google_adwords_enhanced_conversions/db-config.json b/src/configurations/destinations/google_adwords_enhanced_conversions/db-config.json index 3f772d895..139ec78e9 100644 --- a/src/configurations/destinations/google_adwords_enhanced_conversions/db-config.json +++ b/src/configurations/destinations/google_adwords_enhanced_conversions/db-config.json @@ -10,7 +10,7 @@ }, "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedMessageTypes": { "cloud": ["track"] @@ -51,17 +51,17 @@ "requireHash", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"] }, "secretKeys": [] }, diff --git a/src/configurations/destinations/google_adwords_enhanced_conversions/ui-config.json b/src/configurations/destinations/google_adwords_enhanced_conversions/ui-config.json index 66929eff9..68c45545d 100644 --- a/src/configurations/destinations/google_adwords_enhanced_conversions/ui-config.json +++ b/src/configurations/destinations/google_adwords_enhanced_conversions/ui-config.json @@ -102,9 +102,10 @@ ] }, { - "title": "Other settings", - "note": "Configure advanced RudderStack features here", - "icon": "otherSettings", + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", "groups": [ { "title": "OneTrust consent settings", @@ -130,7 +131,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -141,6 +154,86 @@ "title": "Web SDK settings", "note": "not visible in the ui", "fields": [] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/google_adwords_remarketing_lists/db-config.json b/src/configurations/destinations/google_adwords_remarketing_lists/db-config.json index 9292aa002..7bd4716a1 100644 --- a/src/configurations/destinations/google_adwords_remarketing_lists/db-config.json +++ b/src/configurations/destinations/google_adwords_remarketing_lists/db-config.json @@ -10,7 +10,7 @@ }, "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": ["cloud", "warehouse", "shopify"], "syncBehaviours": ["mirror"], @@ -40,9 +40,9 @@ "personalizationConsent", "oneTrustCookieCategories" ], - "cloud": ["audienceId", "connectionMode"], - "shopify": ["connectionMode"], - "warehouse": ["connectionMode"] + "cloud": ["audienceId", "connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"] }, "secretKeys": [] }, diff --git a/src/configurations/destinations/google_adwords_remarketing_lists/ui-config.json b/src/configurations/destinations/google_adwords_remarketing_lists/ui-config.json index a51cd1c3b..bfc8d1cfe 100644 --- a/src/configurations/destinations/google_adwords_remarketing_lists/ui-config.json +++ b/src/configurations/destinations/google_adwords_remarketing_lists/ui-config.json @@ -173,7 +173,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/google_cloud_function/db-config.json b/src/configurations/destinations/google_cloud_function/db-config.json index cfefaa4bc..559ce3ee7 100644 --- a/src/configurations/destinations/google_cloud_function/db-config.json +++ b/src/configurations/destinations/google_cloud_function/db-config.json @@ -40,17 +40,17 @@ "maxBatchSize", "oneTrustCookieCategories" ], - "amp": ["connectionMode"], - "android": ["connectionMode"], - "cordova": ["connectionMode"], - "cloud": ["connectionMode"], - "flutter": ["connectionMode"], - "ios": ["connectionMode"], - "reactnative": ["connectionMode"], - "unity": ["connectionMode"], - "warehouse": ["connectionMode"], - "web": ["connectionMode"], - "shopify": ["connectionMode"] + "amp": ["connectionMode", "consentManagement"], + "android": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["credentials"] } diff --git a/src/configurations/destinations/google_cloud_function/schema.json b/src/configurations/destinations/google_cloud_function/schema.json index 569514988..ee2865f30 100644 --- a/src/configurations/destinations/google_cloud_function/schema.json +++ b/src/configurations/destinations/google_cloud_function/schema.json @@ -22,6 +22,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/google_cloud_function/ui-config.json b/src/configurations/destinations/google_cloud_function/ui-config.json index 9c4506f69..d76a71145 100644 --- a/src/configurations/destinations/google_cloud_function/ui-config.json +++ b/src/configurations/destinations/google_cloud_function/ui-config.json @@ -77,7 +77,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/googlepubsub/db-config.json b/src/configurations/destinations/googlepubsub/db-config.json index 105fbaf8d..7b710d24e 100644 --- a/src/configurations/destinations/googlepubsub/db-config.json +++ b/src/configurations/destinations/googlepubsub/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -40,17 +40,17 @@ "eventToAttributesMap", "oneTrustCookieCategories" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["credentials"] } diff --git a/src/configurations/destinations/googlepubsub/schema.json b/src/configurations/destinations/googlepubsub/schema.json index 3f53b97f8..8d1616be6 100644 --- a/src/configurations/destinations/googlepubsub/schema.json +++ b/src/configurations/destinations/googlepubsub/schema.json @@ -53,6 +53,517 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/googlepubsub/ui-config.json b/src/configurations/destinations/googlepubsub/ui-config.json index e0446b41c..b59e58ced 100644 --- a/src/configurations/destinations/googlepubsub/ui-config.json +++ b/src/configurations/destinations/googlepubsub/ui-config.json @@ -65,7 +65,98 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/data/validation/destinations/google_cloud_function.json b/test/data/validation/destinations/google_cloud_function.json index ef5296cb4..7f4006797 100644 --- a/test/data/validation/destinations/google_cloud_function.json +++ b/test/data/validation/destinations/google_cloud_function.json @@ -15,5 +15,103 @@ "err": [ "googleCloudFunctionUrl must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|(?!.*\\.ngrok\\.io)^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$\"" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "googleCloudFunctionUrl": "http://sample.com/url", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "googleCloudFunctionUrl": "http://sample.com/url", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "googleCloudFunctionUrl": "http://sample.com/url", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "googleCloudFunctionUrl": "http://sample.com/url", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "googleCloudFunctionUrl": "http://sample.com/url", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/googlepubsub.json b/test/data/validation/destinations/googlepubsub.json index 7d6a2be92..ebc14def3 100644 --- a/test/data/validation/destinations/googlepubsub.json +++ b/test/data/validation/destinations/googlepubsub.json @@ -55,5 +55,108 @@ }, "result": false, "err": [" must have required property 'credentials'"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "projectId": "sampleIdnew1", + "credentials": "{\n \"type\": \"service_account\",\n \"project_id\": \"\",\n \"private_key_id\": \"\",\n \"private_key\": \"-----BEGIN PRIVATE KEY----------END PRIVATE KEY-----\\n\",\n \"client_email\": \"\",\n \"client_id\": \"\",\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n \"token_uri\": \"https://oauth2.googleapis.com/token\",\n \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n \"client_x509_cert_url\": \"\"\n}", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "projectId": "sampleIdnew1", + "credentials": "{\n \"type\": \"service_account\",\n \"project_id\": \"\",\n \"private_key_id\": \"\",\n \"private_key\": \"-----BEGIN PRIVATE KEY----------END PRIVATE KEY-----\\n\",\n \"client_email\": \"\",\n \"client_id\": \"\",\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n \"token_uri\": \"https://oauth2.googleapis.com/token\",\n \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n \"client_x509_cert_url\": \"\"\n}", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "projectId": "sampleIdnew1", + "credentials": "{\n \"type\": \"service_account\",\n \"project_id\": \"\",\n \"private_key_id\": \"\",\n \"private_key\": \"-----BEGIN PRIVATE KEY----------END PRIVATE KEY-----\\n\",\n \"client_email\": \"\",\n \"client_id\": \"\",\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n \"token_uri\": \"https://oauth2.googleapis.com/token\",\n \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n \"client_x509_cert_url\": \"\"\n}", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "projectId": "sampleIdnew1", + "credentials": "{\n \"type\": \"service_account\",\n \"project_id\": \"\",\n \"private_key_id\": \"\",\n \"private_key\": \"-----BEGIN PRIVATE KEY----------END PRIVATE KEY-----\\n\",\n \"client_email\": \"\",\n \"client_id\": \"\",\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n \"token_uri\": \"https://oauth2.googleapis.com/token\",\n \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n \"client_x509_cert_url\": \"\"\n}", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "projectId": "sampleIdnew1", + "credentials": "{\n \"type\": \"service_account\",\n \"project_id\": \"\",\n \"private_key_id\": \"\",\n \"private_key\": \"-----BEGIN PRIVATE KEY----------END PRIVATE KEY-----\\n\",\n \"client_email\": \"\",\n \"client_id\": \"\",\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n \"token_uri\": \"https://oauth2.googleapis.com/token\",\n \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n \"client_x509_cert_url\": \"\"\n}", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From a943ab080713aadb6841a4209d6a9216413ffb2b Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Thu, 27 Jun 2024 14:00:01 +0530 Subject: [PATCH 65/68] feat: added GCM support for Iterable destination (#1356) --- .../destinations/iterable/db-config.json | 32 +- .../destinations/iterable/schema.json | 511 ++++++++++++++++++ .../destinations/iterable/ui-config.json | 152 +++++- .../validation/destinations/iterable.json | 98 ++++ 4 files changed, 755 insertions(+), 38 deletions(-) diff --git a/src/configurations/destinations/iterable/db-config.json b/src/configurations/destinations/iterable/db-config.json index bd16c9a20..b59589747 100644 --- a/src/configurations/destinations/iterable/db-config.json +++ b/src/configurations/destinations/iterable/db-config.json @@ -28,7 +28,11 @@ "iconPath", "isRequiredToDismissMessage", "closeButtonPosition", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "eventFilteringOption", + "whitelistedEvents", + "blacklistedEvents", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -95,18 +99,22 @@ "iconPath", "isRequiredToDismissMessage", "closeButtonPosition", - "connectionMode" + "connectionMode", + "eventFilteringOption", + "whitelistedEvents", + "blacklistedEvents", + "consentManagement" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey", "registerDeviceOrBrowserApiKey"] } diff --git a/src/configurations/destinations/iterable/schema.json b/src/configurations/destinations/iterable/schema.json index 63cf6e60f..e9ba587fa 100644 --- a/src/configurations/destinations/iterable/schema.json +++ b/src/configurations/destinations/iterable/schema.json @@ -280,6 +280,517 @@ "enum": ["cloud"] } } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } } }, "anyOf": [ diff --git a/src/configurations/destinations/iterable/ui-config.json b/src/configurations/destinations/iterable/ui-config.json index d818a9464..29f591265 100644 --- a/src/configurations/destinations/iterable/ui-config.json +++ b/src/configurations/destinations/iterable/ui-config.json @@ -203,6 +203,52 @@ } ] }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure advanced RudderStack features here", + "icon": "settings", + "groups": [ + { + "title": "OneTrust consent settings", + "note": [ + "Enter your OneTrust consent category IDs if you have them configured. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + { + "text": "Learn more ", + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/consent-manager/onetrust/" + }, + "about RudderStack's OneTrust Consent Management feature." + ], + "fields": [ + { + "type": "tagInput", + "label": "Consent categories", + "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry.", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: C0001", + "default": [ + { + "oneTrustCookieCategory": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + } + ] + }, { "title": "Other settings", "note": "Configure advanced RudderStack features here", @@ -289,32 +335,6 @@ } } ] - }, - { - "title": "OneTrust consent settings", - "note": [ - "Enter your OneTrust consent category IDs if you have them configured. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", - { - "text": "Learn more ", - "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/consent-manager/onetrust/" - }, - "about RudderStack's OneTrust Consent Management feature." - ], - "fields": [ - { - "type": "tagInput", - "label": "Consent categories", - "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry.", - "configKey": "oneTrustCookieCategories", - "tagKey": "oneTrustCookieCategory", - "placeholder": "e.g: C0001", - "default": [ - { - "oneTrustCookieCategory": "" - } - ] - } - ] } ] } @@ -491,6 +511,86 @@ "configKey": "isRequiredToDismissMessage" } ] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/test/data/validation/destinations/iterable.json b/test/data/validation/destinations/iterable.json index bf055d379..94f11b4b3 100644 --- a/test/data/validation/destinations/iterable.json +++ b/test/data/validation/destinations/iterable.json @@ -202,5 +202,103 @@ " must match \"then\" schema", " must match a schema in anyOf" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKey": "73983282843839749873", + "consentManagement": { + "android": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiKey": "73983282843839749873", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKey": "73983282843839749873", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiKey": "73983282843839749873", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKey": "73983282843839749873", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From b85bb29fefbb3e539b877336d558bf5c9701583f Mon Sep 17 00:00:00 2001 From: Arnab Pal Date: Thu, 27 Jun 2024 14:05:02 +0530 Subject: [PATCH 66/68] feat: added GCM support for Apache Kafka destination (#1367) --- .../destinations/kafka/db-config.json | 24 +- .../destinations/kafka/schema.json | 511 ++++++++++++++++++ .../destinations/kafka/ui-config.json | 99 +++- test/data/validation/destinations/kafka.json | 108 ++++ 4 files changed, 727 insertions(+), 15 deletions(-) diff --git a/src/configurations/destinations/kafka/db-config.json b/src/configurations/destinations/kafka/db-config.json index a94a3facb..f0fa80176 100644 --- a/src/configurations/destinations/kafka/db-config.json +++ b/src/configurations/destinations/kafka/db-config.json @@ -5,7 +5,7 @@ "transformAtV1": "processor", "configFilters": ["caCertificate"], "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -57,17 +57,17 @@ "sshPublicKey", "embedAvroSchemaID" ], - "android": ["connectionMode"], - "ios": ["connectionMode"], - "web": ["connectionMode"], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "reactnative": ["connectionMode"], - "flutter": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "android": ["connectionMode", "consentManagement"], + "ios": ["connectionMode", "consentManagement"], + "web": ["connectionMode", "consentManagement"], + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "reactnative": ["connectionMode", "consentManagement"], + "flutter": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["password"] } diff --git a/src/configurations/destinations/kafka/schema.json b/src/configurations/destinations/kafka/schema.json index a2804a405..444cb3a19 100644 --- a/src/configurations/destinations/kafka/schema.json +++ b/src/configurations/destinations/kafka/schema.json @@ -57,6 +57,517 @@ "cordova": { "type": "string", "enum": ["cloud"] }, "shopify": { "type": "string", "enum": ["cloud"] } } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } } }, "allOf": [ diff --git a/src/configurations/destinations/kafka/ui-config.json b/src/configurations/destinations/kafka/ui-config.json index 2c73da779..1c18c6bd7 100644 --- a/src/configurations/destinations/kafka/ui-config.json +++ b/src/configurations/destinations/kafka/ui-config.json @@ -170,8 +170,9 @@ ] }, { - "title": "Other settings", - "note": "Configure advanced RudderStack features here", + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", "icon": "otherSettings", "groups": [ { @@ -198,7 +199,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -343,6 +356,86 @@ } ] } + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/test/data/validation/destinations/kafka.json b/test/data/validation/destinations/kafka.json index e70dbbcb8..a38544aea 100644 --- a/test/data/validation/destinations/kafka.json +++ b/test/data/validation/destinations/kafka.json @@ -223,5 +223,113 @@ "embedAvroSchemaID": true }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "hostName": "b-2.helloworld.XXXXXX.XXX.kafka.us-east-1.amazonaws.com", + "port": "443", + "topic": "test-topic", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "hostName": "b-2.helloworld.XXXXXX.XXX.kafka.us-east-1.amazonaws.com", + "port": "443", + "topic": "test-topic", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "hostName": "b-2.helloworld.XXXXXX.XXX.kafka.us-east-1.amazonaws.com", + "port": "443", + "topic": "test-topic", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "hostName": "b-2.helloworld.XXXXXX.XXX.kafka.us-east-1.amazonaws.com", + "port": "443", + "topic": "test-topic", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "hostName": "b-2.helloworld.XXXXXX.XXX.kafka.us-east-1.amazonaws.com", + "port": "443", + "topic": "test-topic", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] From c2d2c1934c565ebe8af8b68d18f011b7df0e579c Mon Sep 17 00:00:00 2001 From: Aanshi Lahoti <110057617+aanshi07@users.noreply.github.com> Date: Mon, 1 Jul 2024 16:28:53 +0530 Subject: [PATCH 67/68] feat: updated bingAds schema and testCases (#1472) --- .../destinations/bingads/schema.json | 88 +++++++++++- .../destinations/bingads/ui-config.json | 3 +- .../data/validation/destinations/bingads.json | 129 ++++++++++++++++++ 3 files changed, 217 insertions(+), 3 deletions(-) diff --git a/src/configurations/destinations/bingads/schema.json b/src/configurations/destinations/bingads/schema.json index 0a511d61d..df7c55d91 100644 --- a/src/configurations/destinations/bingads/schema.json +++ b/src/configurations/destinations/bingads/schema.json @@ -1,7 +1,7 @@ { "configSchema": { "$schema": "http://json-schema.org/draft-07/schema#", - "required": [], + "required": ["tagID"], "type": "object", "properties": { "consentManagement": { @@ -47,7 +47,91 @@ } } } + }, + "tagID": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "enableEnhancedConversions": { + "type": "boolean", + "default": false + }, + "useNativeSDK": { + "type": "object", + "properties": { + "web": { + "type": "boolean" + } + } + }, + "eventFilteringOption": { + "type": "string", + "enum": ["disable", "whitelistedEvents", "blacklistedEvents"], + "default": "disable" + }, + "whitelistedEvents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "eventName": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "blacklistedEvents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "eventName": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "oneTrustCookieCategories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "connectionMode": { + "type": "object", + "properties": { + "web": { "type": "string", "enum": ["device"] } + } + } + }, + "anyOf": [ + { + "if": { + "properties": { + "enableEnhancedConversions": { + "const": true + } + }, + "required": ["enableEnhancedConversions"] + }, + "then": { + "properties": { + "isHashRequired": { + "type": "boolean", + "default": true + } + }, + "required": ["isHashRequired"] + } } - } + ] } } diff --git a/src/configurations/destinations/bingads/ui-config.json b/src/configurations/destinations/bingads/ui-config.json index bbd3fd2d5..4b9b334f4 100644 --- a/src/configurations/destinations/bingads/ui-config.json +++ b/src/configurations/destinations/bingads/ui-config.json @@ -7,7 +7,7 @@ "type": "textInput", "label": "Tag ID", "value": "tagID", - "regex": "^(.{0,100})$", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", "regexErrorMessage": "Invalid Bing Ads Tag ID", "required": true, "placeholder": "e.g. 123XXX78" @@ -23,6 +23,7 @@ "type": "checkbox", "label": "Enable Hashing for Enhanced Conversions", "value": "isHashRequired", + "required": true, "preRequisiteField": { "name": "enableEnhancedConversions", "selectedValue": true diff --git a/test/data/validation/destinations/bingads.json b/test/data/validation/destinations/bingads.json index 32a3ad28c..f8b4174a3 100644 --- a/test/data/validation/destinations/bingads.json +++ b/test/data/validation/destinations/bingads.json @@ -96,5 +96,134 @@ }, "result": false, "err": ["consentManagement.web.0.provider must be equal to one of the allowed values"] + }, + { + "testTitle": "Basic test case including tagID, enableEnhancedConversions -> true", + "config": { + "tagID": "1", + "enableEnhancedConversions": true, + "eventFilteringOption": "disable", + "whitelistedEvents": [], + "blacklistedEvents": [], + "oneTrustCookieCategories": [], + "isHashRequired": true, + "useNativeSDK": { + "web": true + }, + "connectionMode": { + "web": "device" + }, + "consentManagement": {} + }, + "result": true + }, + { + "testTitle": "Disabled EnhancedConversions", + "config": { + "tagID": "2", + "enableEnhancedConversions": false, + "eventFilteringOption": "disable", + "isHashRequired": true, + "whitelistedEvents": [], + "blacklistedEvents": [], + "oneTrustCookieCategories": [], + "useNativeSDK": { + "web": true + }, + "connectionMode": { + "web": "device" + }, + "consentManagement": {} + }, + "result": true + }, + { + "testTitle": "Enabled Enhanced Conversions, Event Filtering Option -> whitelisted Events, isHashRequired -> false", + "config": { + "tagID": "3", + "enableEnhancedConversions": true, + "eventFilteringOption": "whitelistedEvents", + "isHashRequired": false, + "whitelistedEvents": [ + { + "eventName": "Anonymous Page Visit" + } + ], + "blacklistedEvents": [], + "oneTrustCookieCategories": [], + "useNativeSDK": { + "web": true + }, + "connectionMode": { + "web": "device" + }, + "consentManagement": {} + }, + "result": true + }, + { + "testTitle": "Event Filtering Option -> blacklisted Events", + "config": { + "tagID": "4", + "enableEnhancedConversions": true, + "eventFilteringOption": "blacklistedEvents", + "isHashRequired": true, + "whitelistedEvents": [ + { + "eventName": "Anonymous Page Visit" + } + ], + "blacklistedEvents": [], + "oneTrustCookieCategories": [], + "useNativeSDK": { + "web": true + }, + "connectionMode": { + "web": "device" + }, + "consentManagement": {} + }, + "result": true + }, + { + "testTitle": "connection Mode -> cloud", + "config": { + "tagID": "5", + "enableEnhancedConversions": true, + "eventFilteringOption": "disable", + "whitelistedEvents": [], + "blacklistedEvents": [], + "oneTrustCookieCategories": [], + "isHashRequired": true, + "useNativeSDK": { + "web": true + }, + "connectionMode": { + "web": "cloud" + }, + "consentManagement": {} + }, + "result": false, + "err": ["connectionMode.web must be equal to one of the allowed values"] + }, + { + "testTitle": "Without tagID", + "config": { + "enableEnhancedConversions": true, + "eventFilteringOption": "disable", + "whitelistedEvents": [], + "blacklistedEvents": [], + "oneTrustCookieCategories": [], + "isHashRequired": true, + "useNativeSDK": { + "web": true + }, + "connectionMode": { + "web": "device" + }, + "consentManagement": {} + }, + "result": false, + "err": [" must have required property 'tagID'"] } ] From 0daadf3f2b92ea4be8b5ddb41f15afef2405300f Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 1 Jul 2024 11:01:51 +0000 Subject: [PATCH 68/68] chore(release): 1.78.0 --- CHANGELOG.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++ package-lock.json | 4 +-- package.json | 2 +- 3 files changed, 73 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36af25307..1a70d86c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,76 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.78.0](https://github.com/rudderlabs/rudder-config-schema/compare/v1.77.5...v1.78.0) (2024-07-01) + + +### Features + +* added GCM support for 5 destinations - Batch 10 ([#1480](https://github.com/rudderlabs/rudder-config-schema/issues/1480)) ([4340084](https://github.com/rudderlabs/rudder-config-schema/commit/434008474677c0e7ea6335cf3fa00df2b550f1c3)) +* added GCM support for 5 destinations - Batch 11 ([#1483](https://github.com/rudderlabs/rudder-config-schema/issues/1483)) ([53fee90](https://github.com/rudderlabs/rudder-config-schema/commit/53fee906a954fb95851beb0d202c2a84d68e6a02)) +* added GCM support for 5 destinations - Batch 12 ([#1487](https://github.com/rudderlabs/rudder-config-schema/issues/1487)) ([55af8c7](https://github.com/rudderlabs/rudder-config-schema/commit/55af8c7f66fdfb26b3bc436d2122916ae42729dc)) +* added GCM support for 5 destinations - Batch 13 ([#1488](https://github.com/rudderlabs/rudder-config-schema/issues/1488)) ([af7909f](https://github.com/rudderlabs/rudder-config-schema/commit/af7909f7f7f5a40beaf04104d74eca930d143d42)) +* added GCM support for 5 destinations - Batch 14 ([#1489](https://github.com/rudderlabs/rudder-config-schema/issues/1489)) ([ae45d1b](https://github.com/rudderlabs/rudder-config-schema/commit/ae45d1b96414142aedbbd6044710b065f088a863)) +* added GCM support for 5 destinations - Batch 15 ([#1490](https://github.com/rudderlabs/rudder-config-schema/issues/1490)) ([5871961](https://github.com/rudderlabs/rudder-config-schema/commit/5871961add908033a53436459cb2f63e56bc1072)) +* added GCM support for 5 destinations - Batch 16 ([#1492](https://github.com/rudderlabs/rudder-config-schema/issues/1492)) ([a538556](https://github.com/rudderlabs/rudder-config-schema/commit/a538556b7ba6042eb979b1ddd6356c066732e1e5)) +* added GCM support for 5 destinations - Batch 17 ([#1494](https://github.com/rudderlabs/rudder-config-schema/issues/1494)) ([6f20dea](https://github.com/rudderlabs/rudder-config-schema/commit/6f20dea9cc4d2c7b70d728761c57ce44f449c79d)) +* added GCM support for 5 destinations - Batch 18 ([#1495](https://github.com/rudderlabs/rudder-config-schema/issues/1495)) ([2bd407f](https://github.com/rudderlabs/rudder-config-schema/commit/2bd407f2ec6f01b8c521b233a297b1047b46b035)) +* added GCM support for 5 destinations - Batch 19 ([#1496](https://github.com/rudderlabs/rudder-config-schema/issues/1496)) ([e6b6437](https://github.com/rudderlabs/rudder-config-schema/commit/e6b6437d4887be5d0b255afb4c0f1c7220540355)) +* added GCM support for 5 destinations - Batch 20 ([#1497](https://github.com/rudderlabs/rudder-config-schema/issues/1497)) ([db221d4](https://github.com/rudderlabs/rudder-config-schema/commit/db221d4124c464bba05b9dbb2d25a0b08492f252)) +* added GCM support for 5 destinations - Batch 21 ([#1498](https://github.com/rudderlabs/rudder-config-schema/issues/1498)) ([bedc97f](https://github.com/rudderlabs/rudder-config-schema/commit/bedc97f015cc485b2035c518a5f2e12194b0da51)) +* added GCM support for 5 destinations - Batch 22 ([#1501](https://github.com/rudderlabs/rudder-config-schema/issues/1501)) ([7360b6e](https://github.com/rudderlabs/rudder-config-schema/commit/7360b6e802d35dfd1d52b8ce3ba41ed15c9f268d)) +* added GCM support for 5 destinations - Batch 23 ([#1502](https://github.com/rudderlabs/rudder-config-schema/issues/1502)) ([fb53441](https://github.com/rudderlabs/rudder-config-schema/commit/fb53441eba682d78e531cc7b5e94f7e18352a14a)) +* added GCM support for 5 destinations - Batch 24 ([#1503](https://github.com/rudderlabs/rudder-config-schema/issues/1503)) ([390288d](https://github.com/rudderlabs/rudder-config-schema/commit/390288d6988bf6e1b019e04c4cecc1b3406d5728)) +* added GCM support for 5 destinations - Batch 25 ([#1504](https://github.com/rudderlabs/rudder-config-schema/issues/1504)) ([6cf3eec](https://github.com/rudderlabs/rudder-config-schema/commit/6cf3eecb84cddab37ab3a5572b3ed0416df1854a)) +* added GCM support for 5 destinations - Batch 26 ([#1506](https://github.com/rudderlabs/rudder-config-schema/issues/1506)) ([7069b4d](https://github.com/rudderlabs/rudder-config-schema/commit/7069b4d3005a1386a6e6bec67c611670b79a24b0)) +* added GCM support for 5 destinations - Batch 27 ([#1508](https://github.com/rudderlabs/rudder-config-schema/issues/1508)) ([b0542f3](https://github.com/rudderlabs/rudder-config-schema/commit/b0542f36753727327d7ae5cd06e17cf02e30105d)) +* added GCM support for 5 destinations - Batch 28 ([#1510](https://github.com/rudderlabs/rudder-config-schema/issues/1510)) ([5daa43c](https://github.com/rudderlabs/rudder-config-schema/commit/5daa43caa328344d3cac14604feac65c423356d2)) +* added GCM support for 5 destinations - Batch 29 ([#1511](https://github.com/rudderlabs/rudder-config-schema/issues/1511)) ([acf8eee](https://github.com/rudderlabs/rudder-config-schema/commit/acf8eeea902bc24649aa4448723d9cd8ddacf05f)) +* added GCM support for 5 destinations - Batch 8 ([#1434](https://github.com/rudderlabs/rudder-config-schema/issues/1434)) ([0200d89](https://github.com/rudderlabs/rudder-config-schema/commit/0200d89df2830e6bea8deabe7037101eb2918a6c)) +* added GCM support for 5 destinations - Batch 9 ([#1435](https://github.com/rudderlabs/rudder-config-schema/issues/1435)) ([e80d714](https://github.com/rudderlabs/rudder-config-schema/commit/e80d7148abf98034ebd51de5f5d2f5b03cfef36b)) +* added GCM support for Airship destination ([#1361](https://github.com/rudderlabs/rudder-config-schema/issues/1361)) ([41feb43](https://github.com/rudderlabs/rudder-config-schema/commit/41feb431702e2ae56ae017e878fedb9581039764)) +* added GCM support for Algolia Insights destination ([#1362](https://github.com/rudderlabs/rudder-config-schema/issues/1362)) ([16a70ed](https://github.com/rudderlabs/rudder-config-schema/commit/16a70eda8cc0cc73a38e0d8ede9d2a510f76049e)) +* added GCM support for Amazon Kinesis destination ([#1364](https://github.com/rudderlabs/rudder-config-schema/issues/1364)) ([cc08e84](https://github.com/rudderlabs/rudder-config-schema/commit/cc08e849d80b61ba0642311d501437e82d8accee)) +* added GCM support for Amazon Kinesis Firehose destination ([#1366](https://github.com/rudderlabs/rudder-config-schema/issues/1366)) ([aabaa44](https://github.com/rudderlabs/rudder-config-schema/commit/aabaa44575ac25a29afae131e0125b7808a3167a)) +* added GCM support for Apache Kafka destination ([#1367](https://github.com/rudderlabs/rudder-config-schema/issues/1367)) ([b85bb29](https://github.com/rudderlabs/rudder-config-schema/commit/b85bb29fefbb3e539b877336d558bf5c9701583f)) +* added GCM support for App Center destination ([#1375](https://github.com/rudderlabs/rudder-config-schema/issues/1375)) ([0a3ef1e](https://github.com/rudderlabs/rudder-config-schema/commit/0a3ef1e3d09032d99611a2a476d8acf1cc9d7925)) +* added GCM support for Attentive Tag destination ([#1377](https://github.com/rudderlabs/rudder-config-schema/issues/1377)) ([908382e](https://github.com/rudderlabs/rudder-config-schema/commit/908382e14cc5ed120b1fe9e1e094ed6ca5fe63a3)) +* added GCM support for Attribution destination ([#1381](https://github.com/rudderlabs/rudder-config-schema/issues/1381)) ([dbf1b31](https://github.com/rudderlabs/rudder-config-schema/commit/dbf1b311c7127a9f0250c2299ad26141c214a859)) +* added GCM support for Autopilot destination ([#1382](https://github.com/rudderlabs/rudder-config-schema/issues/1382)) ([3d2947b](https://github.com/rudderlabs/rudder-config-schema/commit/3d2947b275a628ba193881a77ffb8777b7e6b872)) +* added GCM support for Awin destination ([#1402](https://github.com/rudderlabs/rudder-config-schema/issues/1402)) ([4a3beab](https://github.com/rudderlabs/rudder-config-schema/commit/4a3beab87937c309b92fd5ae41d6f8f941faceb2)) +* added GCM support for AWS EventBridge destination ([#1403](https://github.com/rudderlabs/rudder-config-schema/issues/1403)) ([6a83035](https://github.com/rudderlabs/rudder-config-schema/commit/6a8303560ee5be1f322843f537a6d8099b25d249)) +* added GCM support for AWS Lambda destination ([#1404](https://github.com/rudderlabs/rudder-config-schema/issues/1404)) ([f8f7f84](https://github.com/rudderlabs/rudder-config-schema/commit/f8f7f846b0be1c73065798fa4c221a350ccfdf89)) +* added GCM support for AWS Personalize destination ([#1405](https://github.com/rudderlabs/rudder-config-schema/issues/1405)) ([37cfd43](https://github.com/rudderlabs/rudder-config-schema/commit/37cfd439684d362da27f999186c3db9b9ce43605)) +* added GCM support for Axeptio destination ([#1406](https://github.com/rudderlabs/rudder-config-schema/issues/1406)) ([fded3eb](https://github.com/rudderlabs/rudder-config-schema/commit/fded3eb29233000834d206b8f464881baa0bb576)) +* added GCM support for Azure Blob Storage destination ([#1408](https://github.com/rudderlabs/rudder-config-schema/issues/1408)) ([8913571](https://github.com/rudderlabs/rudder-config-schema/commit/8913571469a3aec134aabc3204f3310b6dcf8c05)) +* added GCM support for Azure Deltalake destination ([#1409](https://github.com/rudderlabs/rudder-config-schema/issues/1409)) ([3d6380e](https://github.com/rudderlabs/rudder-config-schema/commit/3d6380e4a7c3780b61acfe3705c7e3bfd9dbab4f)) +* added GCM support for Azure Event Hub destination ([#1410](https://github.com/rudderlabs/rudder-config-schema/issues/1410)) ([46ea8e1](https://github.com/rudderlabs/rudder-config-schema/commit/46ea8e1637952e27d3f8ab9b4ebf0ead17cd7773)) +* added GCM support for Azure Synapse destination ([#1411](https://github.com/rudderlabs/rudder-config-schema/issues/1411)) ([fcb0dfd](https://github.com/rudderlabs/rudder-config-schema/commit/fcb0dfd6a2b3c837b58c5251460742cba9f58b7e)) +* added GCM support for Bigquery destination ([#1412](https://github.com/rudderlabs/rudder-config-schema/issues/1412)) ([818b7db](https://github.com/rudderlabs/rudder-config-schema/commit/818b7db99fcd0053493354a03b9f711aa8e619df)) +* added GCM support for BingAds Audience destination ([#1413](https://github.com/rudderlabs/rudder-config-schema/issues/1413)) ([bc0e543](https://github.com/rudderlabs/rudder-config-schema/commit/bc0e54317c0743ae31639c9b6b6e6474cb0a6ac6)) +* added GCM support for bloomreach destination ([#1414](https://github.com/rudderlabs/rudder-config-schema/issues/1414)) ([605f312](https://github.com/rudderlabs/rudder-config-schema/commit/605f312962bcf044d3570e2ac9fad5abe0107691)) +* added GCM support for Bluecore destination ([#1415](https://github.com/rudderlabs/rudder-config-schema/issues/1415)) ([4373487](https://github.com/rudderlabs/rudder-config-schema/commit/43734876ad67c538b7a83654693ea2ce99320cbc)) +* added GCM support for Blueshift destination ([#1416](https://github.com/rudderlabs/rudder-config-schema/issues/1416)) ([b46838a](https://github.com/rudderlabs/rudder-config-schema/commit/b46838af31db012f1d7cac935e385dddcab7a425)) +* added GCM support for Branch Metrics destination ([#1417](https://github.com/rudderlabs/rudder-config-schema/issues/1417)) ([b28b0fe](https://github.com/rudderlabs/rudder-config-schema/commit/b28b0fece79bc6048391c4fce1a6415a3e066718)) +* added GCM support for Facebook App Events ([#1352](https://github.com/rudderlabs/rudder-config-schema/issues/1352)) ([92d2331](https://github.com/rudderlabs/rudder-config-schema/commit/92d2331de4d9df516c9091f64b872036537b3e53)) +* added GCM support for Indicative destination ([#1360](https://github.com/rudderlabs/rudder-config-schema/issues/1360)) ([08a8f5a](https://github.com/rudderlabs/rudder-config-schema/commit/08a8f5af1bb15ca7de1bcf6b22f021f96b70cdb6)) +* added GCM support for Iterable destination ([#1356](https://github.com/rudderlabs/rudder-config-schema/issues/1356)) ([a943ab0](https://github.com/rudderlabs/rudder-config-schema/commit/a943ab080713aadb6841a4209d6a9216413ffb2b)) +* added GCM support for MoEngage destination ([#1357](https://github.com/rudderlabs/rudder-config-schema/issues/1357)) ([c913fb6](https://github.com/rudderlabs/rudder-config-schema/commit/c913fb628f1f64f94977e0193b42ec8ad9ee52e1)) +* added support for key pair authentication option for snowflake source ([#1476](https://github.com/rudderlabs/rudder-config-schema/issues/1476)) ([2d0e97a](https://github.com/rudderlabs/rudder-config-schema/commit/2d0e97aed5eb63ae6859416823cc0708578ebdb5)) +* cm360 enhanced conversions ([#1407](https://github.com/rudderlabs/rudder-config-schema/issues/1407)) ([6b98436](https://github.com/rudderlabs/rudder-config-schema/commit/6b9843688faae40d96148e8fedf4abbd534b1a16)) +* counting method support for dcm floodlight ([#1424](https://github.com/rudderlabs/rudder-config-schema/issues/1424)) ([5697d35](https://github.com/rudderlabs/rudder-config-schema/commit/5697d35958da9755332b3061fd7f4ddeef7bc0b0)) +* make connection mode to auth type ([#1478](https://github.com/rudderlabs/rudder-config-schema/issues/1478)) ([cd115e4](https://github.com/rudderlabs/rudder-config-schema/commit/cd115e41640db4314703a568bf8e3ae2062b8da1)) +* onboard source closeCRM ([#1479](https://github.com/rudderlabs/rudder-config-schema/issues/1479)) ([05fdb01](https://github.com/rudderlabs/rudder-config-schema/commit/05fdb019575a0911c9da1bee203e2cc207d0f238)) +* onboarding clicksend ([#1464](https://github.com/rudderlabs/rudder-config-schema/issues/1464)) ([7043913](https://github.com/rudderlabs/rudder-config-schema/commit/70439133cf813cec51cf9377ecfd2f3607f96ef4)) +* updated bingAds schema and testCases ([#1472](https://github.com/rudderlabs/rudder-config-schema/issues/1472)) ([c2d2c19](https://github.com/rudderlabs/rudder-config-schema/commit/c2d2c1934c565ebe8af8b68d18f011b7df0e579c)) +* updated schema and testCases for 3 destinations ([#1482](https://github.com/rudderlabs/rudder-config-schema/issues/1482)) ([ddb344e](https://github.com/rudderlabs/rudder-config-schema/commit/ddb344e6983921aa739f01a217776828b2c8339d)) + + +### Bug Fixes + +* ga4 cm defaults ([#1513](https://github.com/rudderlabs/rudder-config-schema/issues/1513)) ([526dd7c](https://github.com/rudderlabs/rudder-config-schema/commit/526dd7c442248b3c774bab651a776eadb3963e3e)) +* update default for config ([#1505](https://github.com/rudderlabs/rudder-config-schema/issues/1505)) ([fbad3a0](https://github.com/rudderlabs/rudder-config-schema/commit/fbad3a0eb3f7019880b7ee874d7f89b9a7d39502)) + ### [1.77.5](https://github.com/rudderlabs/rudder-config-schema/compare/v1.77.4...v1.77.5) (2024-06-25) diff --git a/package-lock.json b/package-lock.json index 898b5842b..853dfe656 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-config-schema", - "version": "1.77.5", + "version": "1.78.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-config-schema", - "version": "1.77.5", + "version": "1.78.0", "license": "MIT", "dependencies": { "ajv": "^8.12.0", diff --git a/package.json b/package.json index 3e371d62b..d368f9453 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-config-schema", - "version": "1.77.5", + "version": "1.78.0", "description": "", "main": "src/index.ts", "private": true,