From c57a2f69a95c0ebcb9e4d80419844358afda30dc Mon Sep 17 00:00:00 2001 From: David Meiklejohn Date: Mon, 18 Nov 2024 18:46:45 +1000 Subject: [PATCH 1/7] feat: accoil analytics ui --- .../accoil_analytics/db-config.json | 121 +++ .../destinations/accoil_analytics/schema.json | 861 ++++++++++++++++++ .../accoil_analytics/ui-config.json | 196 ++++ 3 files changed, 1178 insertions(+) create mode 100644 src/configurations/destinations/accoil_analytics/db-config.json create mode 100644 src/configurations/destinations/accoil_analytics/schema.json create mode 100644 src/configurations/destinations/accoil_analytics/ui-config.json diff --git a/src/configurations/destinations/accoil_analytics/db-config.json b/src/configurations/destinations/accoil_analytics/db-config.json new file mode 100644 index 000000000..8d2f2c46b --- /dev/null +++ b/src/configurations/destinations/accoil_analytics/db-config.json @@ -0,0 +1,121 @@ +{ + "name": "Accoil_Analytics", + "displayName": "Accoil Analytics", + "config": { + "cdkV2Enabled": true, + "transformAtV1": "processor", + "saveDestinationResponse": true, + "includeKeys": [ + "oneTrustCookieCategories", + "connectionMode", + "consentManagement", + "ketchConsentPurposes" + ], + "excludeKeys": [], + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "warehouse", + "reactnative", + "flutter", + "cordova", + "shopify" + ], + "supportedMessageTypes": { + "cloud": ["identify", "page", "screen", "track", "group"] + }, + "supportedConnectionModes": { + "web": ["cloud"], + "android": ["cloud"], + "ios": ["cloud"], + "unity": ["cloud"], + "amp": ["cloud"], + "reactnative": ["cloud"], + "flutter": ["cloud"], + "cordova": ["cloud"], + "shopify": ["cloud"], + "cloud": ["cloud"], + "warehouse": ["cloud"] + }, + "destConfig": { + "defaultConfig": ["apiKey", "blacklistedEvents", "whitelistedEvents", "eventFilteringOption"], + "web": [ + "useNativeSDK", + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "android": [ + "useNativeSDK", + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "ios": [ + "useNativeSDK", + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "unity": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "amp": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "cloud": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "warehouse": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "reactnative": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "flutter": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "cordova": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "shopify": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ] + }, + "secretKeys": ["apiKey"] + }, + "options": { + "isBeta": true + } +} diff --git a/src/configurations/destinations/accoil_analytics/schema.json b/src/configurations/destinations/accoil_analytics/schema.json new file mode 100644 index 000000000..ce6fbd7f1 --- /dev/null +++ b/src/configurations/destinations/accoil_analytics/schema.json @@ -0,0 +1,861 @@ +{ + "configSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "required": ["apiKey"], + "type": "object", + "properties": { + "apiKey": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + }, + "oneTrustCookieCategories": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + } + }, + "ketchConsentPurposes": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "shopify": { + "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"] + } + } + ] + } + }, + "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"] + } + } + ] + } + }, + "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"] + } + } + ] + } + }, + "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": { + "cloud": { + "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"] + }, + "warehouse": { + "type": "string", + "enum": ["cloud"] + }, + "reactnative": { + "type": "string", + "enum": ["cloud"] + }, + "flutter": { + "type": "string", + "enum": ["cloud"] + }, + "cordova": { + "type": "string", + "enum": ["cloud"] + }, + "shopify": { + "type": "string", + "enum": ["cloud"] + } + } + }, + "useNativeSDK": { + "type": "object", + "properties": { + "web": { + "type": "boolean" + }, + "android": { + "type": "boolean" + }, + "ios": { + "type": "boolean" + } + } + } + } + } +} diff --git a/src/configurations/destinations/accoil_analytics/ui-config.json b/src/configurations/destinations/accoil_analytics/ui-config.json new file mode 100644 index 000000000..56da30fb8 --- /dev/null +++ b/src/configurations/destinations/accoil_analytics/ui-config.json @@ -0,0 +1,196 @@ +{ + "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 Key", + "configKey": "apiKey", + "regex": "^[0-9a-zA-Z_]{1,80}$", + "regexErrorMessage": "Invalid API Key", + "placeholder": "Your Accoil.com API Key. You can find your API Key in your Accoil account settings.", + "secret": true + } + ] + } + ] + }, + { + "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": [ + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [] + } + ] + } + ], + "sdkTemplate": { + "title": "Web SDK settings", + "note": "not visible in the ui", + "fields": [] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "tagInput", + "label": "OneTrust consent category IDs", + "note": "Input your OneTrust 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": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: C0001", + "default": [ + { + "oneTrustCookieCategory": "" + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "tagInput", + "label": "Ketch consent purpose IDs", + "note": "Input your Ketch consent purpose IDs 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" + } + }, + { + "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 + } + ] + } + } + ] + } + } +} From 0b9e56adfb9e8ee20d9451c0facc5dd540adddeb Mon Sep 17 00:00:00 2001 From: accoilmj Date: Mon, 9 Dec 2024 13:50:26 +1000 Subject: [PATCH 2/7] Capitalise name in db-config.json Co-authored-by: Manish Kumar <144022547+manish339k@users.noreply.github.com> --- src/configurations/destinations/accoil_analytics/db-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/destinations/accoil_analytics/db-config.json b/src/configurations/destinations/accoil_analytics/db-config.json index 8d2f2c46b..9c3491a72 100644 --- a/src/configurations/destinations/accoil_analytics/db-config.json +++ b/src/configurations/destinations/accoil_analytics/db-config.json @@ -1,5 +1,5 @@ { - "name": "Accoil_Analytics", + "name": "ACCOIL_ANALYTICS", "displayName": "Accoil Analytics", "config": { "cdkV2Enabled": true, From 2a758c098e33ab41a553c30e9e91d8a6998a429f Mon Sep 17 00:00:00 2001 From: accoilmj Date: Mon, 9 Dec 2024 13:51:31 +1000 Subject: [PATCH 3/7] Set transformAtV1 to router in db-config.json Co-authored-by: Manish Kumar <144022547+manish339k@users.noreply.github.com> --- src/configurations/destinations/accoil_analytics/db-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/destinations/accoil_analytics/db-config.json b/src/configurations/destinations/accoil_analytics/db-config.json index 9c3491a72..09fe33de3 100644 --- a/src/configurations/destinations/accoil_analytics/db-config.json +++ b/src/configurations/destinations/accoil_analytics/db-config.json @@ -3,7 +3,7 @@ "displayName": "Accoil Analytics", "config": { "cdkV2Enabled": true, - "transformAtV1": "processor", + "transformAtV1": "router", "saveDestinationResponse": true, "includeKeys": [ "oneTrustCookieCategories", From 97f4ab1645fca5e9a9b2da61e2b185503780ebb7 Mon Sep 17 00:00:00 2001 From: David Meiklejohn Date: Mon, 9 Dec 2024 14:05:57 +1000 Subject: [PATCH 4/7] feat: regenerating schema.json to update apiKey regex --- src/configurations/destinations/accoil_analytics/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/destinations/accoil_analytics/schema.json b/src/configurations/destinations/accoil_analytics/schema.json index ce6fbd7f1..4e09d5f3b 100644 --- a/src/configurations/destinations/accoil_analytics/schema.json +++ b/src/configurations/destinations/accoil_analytics/schema.json @@ -6,7 +6,7 @@ "properties": { "apiKey": { "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^[0-9a-zA-Z_]{1,80}$" }, "oneTrustCookieCategories": { "type": "object", From 62bf66d3ea832666e85348511828a81ee4e4f137 Mon Sep 17 00:00:00 2001 From: David Meiklejohn Date: Mon, 9 Dec 2024 14:14:35 +1000 Subject: [PATCH 5/7] feat: fixing placeholder example, moving existing placeholder to note --- .../destinations/accoil_analytics/ui-config.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/configurations/destinations/accoil_analytics/ui-config.json b/src/configurations/destinations/accoil_analytics/ui-config.json index 56da30fb8..8fd035deb 100644 --- a/src/configurations/destinations/accoil_analytics/ui-config.json +++ b/src/configurations/destinations/accoil_analytics/ui-config.json @@ -18,7 +18,8 @@ "configKey": "apiKey", "regex": "^[0-9a-zA-Z_]{1,80}$", "regexErrorMessage": "Invalid API Key", - "placeholder": "Your Accoil.com API Key. You can find your API Key in your Accoil account settings.", + "placeholder": "e.g. cXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX0", + "note": "Your Accoil.com API Key. You can find your API Key in your Accoil account settings.", "secret": true } ] From 3b2992a130d132612f3e63243f5cb010feeb37ca Mon Sep 17 00:00:00 2001 From: David Meiklejohn Date: Mon, 9 Dec 2024 14:29:31 +1000 Subject: [PATCH 6/7] feat: removing unused config keys --- src/configurations/destinations/accoil_analytics/db-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/destinations/accoil_analytics/db-config.json b/src/configurations/destinations/accoil_analytics/db-config.json index 09fe33de3..556acf08f 100644 --- a/src/configurations/destinations/accoil_analytics/db-config.json +++ b/src/configurations/destinations/accoil_analytics/db-config.json @@ -42,7 +42,7 @@ "warehouse": ["cloud"] }, "destConfig": { - "defaultConfig": ["apiKey", "blacklistedEvents", "whitelistedEvents", "eventFilteringOption"], + "defaultConfig": ["apiKey"], "web": [ "useNativeSDK", "connectionMode", From 807e1aef4fc6f0bee034505b3ce490c0f95acece Mon Sep 17 00:00:00 2001 From: David Meiklejohn Date: Thu, 23 Jan 2025 11:52:02 +1000 Subject: [PATCH 7/7] feat: added accoil analytics data validation test json --- .../accoil_analytics/ui-config.json | 60 +-- .../destinations/accoil_analytics.json | 363 ++++++++++++++++++ 2 files changed, 364 insertions(+), 59 deletions(-) create mode 100644 test/data/validation/destinations/accoil_analytics.json diff --git a/src/configurations/destinations/accoil_analytics/ui-config.json b/src/configurations/destinations/accoil_analytics/ui-config.json index 8fd035deb..5012d5a48 100644 --- a/src/configurations/destinations/accoil_analytics/ui-config.json +++ b/src/configurations/destinations/accoil_analytics/ui-config.json @@ -67,56 +67,6 @@ "title": "Consent settings", "note": "not visible in the ui", "fields": [ - { - "type": "tagInput", - "label": "OneTrust consent category IDs", - "note": "Input your OneTrust 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": "oneTrustCookieCategories", - "tagKey": "oneTrustCookieCategory", - "placeholder": "e.g: C0001", - "default": [ - { - "oneTrustCookieCategory": "" - } - ], - "preRequisites": { - "featureFlags": [ - { - "configKey": "AMP_enable-gcm", - "value": false - }, - { - "configKey": "AMP_enable-gcm" - } - ], - "featureFlagsCondition": "or" - } - }, - { - "type": "tagInput", - "label": "Ketch consent purpose IDs", - "note": "Input your Ketch consent purpose IDs 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" - } - }, { "type": "dynamicCustomForm", "configKey": "consentManagement", @@ -181,15 +131,7 @@ } ] } - ], - "preRequisites": { - "featureFlags": [ - { - "configKey": "AMP_enable-gcm", - "value": true - } - ] - } + ] } ] } diff --git a/test/data/validation/destinations/accoil_analytics.json b/test/data/validation/destinations/accoil_analytics.json new file mode 100644 index 000000000..148791377 --- /dev/null +++ b/test/data/validation/destinations/accoil_analytics.json @@ -0,0 +1,363 @@ +[ + { + "config": { + "apiUrl": "https://in.accoil.com", + "apiKey": "1234243XXX43424321" + }, + "result": true + }, + { + "config": { + "apiUrl": "https://in.accoil.com" + }, + "result": false, + "err": [" must have required property 'apiKey'"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiUrl": "https://x.com/1", + "apiKey": "12342432143424321", + "eventKey": "2142343124", + "actid": "12423424", + "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": { + "apiUrl": "https://x.com/1", + "apiKey": "12342432143424321", + "eventKey": "2142343124", + "actid": "12423424", + "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": { + "apiUrl": "https://x.com/1", + "apiKey": "12342432143424321", + "eventKey": "2142343124", + "actid": "12423424", + "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": { + "apiUrl": "https://x.com/1", + "apiKey": "12342432143424321", + "eventKey": "2142343124", + "actid": "12423424", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiUrl": "https://x.com/1", + "apiKey": "12342432143424321", + "eventKey": "2142343124", + "actid": "12423424", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] + }, + { + "config": { + "apiUrl": "https://in.accoil.com", + "apiKey": "1234243XXX43424321", + "eventKey": "214XXX3124", + "actid": "12XXX424", + "oneTrustCookieCategories": { + "android": [ + { + "oneTrustCookieCategory": "C0001" + }, + { + "oneTrustCookieCategory": "C0002" + } + ], + "ios": [ + { + "oneTrustCookieCategory": "C0003" + }, + { + "oneTrustCookieCategory": "C0004" + } + ], + "web": [ + { + "oneTrustCookieCategory": "" + } + ], + "unity": [], + "amp": [ + { + "oneTrustCookieCategory": "env.ENVIRONMENT_VARIABLE" + } + ], + "cloud": [ + { + "oneTrustCookieCategory": "{{ event.properties.prop1 || 'val' }}" + } + ], + "warehouse": [ + { + "oneTrustCookieCategory": "C0001" + }, + { + "oneTrustCookieCategory": "C0002" + } + ], + "reactnative": [ + { + "oneTrustCookieCategory": "C0003" + }, + { + "oneTrustCookieCategory": "C0004" + } + ], + "flutter": [ + { + "oneTrustCookieCategory": "" + } + ], + "cordova": [], + "shopify": [ + { + "oneTrustCookieCategory": "env.ENVIRONMENT_VARIABLE" + } + ] + }, + "ketchConsentPurposes": { + "android": [ + { + "purpose": "P1" + }, + { + "purpose": "P2" + } + ], + "ios": [ + { + "purpose": "P3" + }, + { + "purpose": "P4" + } + ], + "web": [ + { + "purpose": "" + } + ], + "unity": [], + "amp": [ + { + "purpose": "env.ENVIRONMENT_VARIABLE" + } + ], + "cloud": [ + { + "purpose": "{{ event.properties.prop1 || 'val' }}" + } + ], + "warehouse": [ + { + "purpose": "P1" + }, + { + "purpose": "P2" + } + ], + "reactnative": [ + { + "purpose": "P3" + }, + { + "purpose": "P4" + } + ], + "flutter": [ + { + "purpose": "" + } + ], + "cordova": [], + "shopify": [ + { + "purpose": "env.ENVIRONMENT_VARIABLE" + } + ] + } + }, + "result": true + }, + { + "config": { + "apiUrl": "https://in.accoil.com", + "apiKey": "1234243XXX43424321", + "eventKey": "214XXX3124", + "actid": "12XXX424", + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "C0001" + }, + { + "oneTrustCookieCategory": "C0002" + } + ], + "ketchConsentPurposes": [ + { + "purpose": "P1" + }, + { + "purpose": "P2" + } + ] + }, + "result": false, + "err": ["oneTrustCookieCategories must be object", "ketchConsentPurposes must be object"] + }, + { + "config": { + "apiUrl": "https://in.accoil.com", + "apiKey": "1234243XXX43424321", + "eventKey": "214XXX3124", + "actid": "12XXX424", + "oneTrustCookieCategories": { + "android": [ + { + "oneTrustCookieCategory": "more than 100 characters string - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "oneTrustCookieCategory": "C0004" + } + ], + "ios": [ + { + "oneTrustCookieCategory": { + "not": "a string" + } + }, + { + "oneTrustCookieCategory": "C0004" + } + ], + "web": { + "not": "an array" + }, + "unity": [ + "not an object", + { + "oneTrustCookieCategory": "C0004" + } + ] + }, + "ketchConsentPurposes": { + "android": [ + { + "purpose": "more than 100 characters string - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "purpose": "P4" + } + ], + "ios": [ + { + "purpose": { + "not": "a string" + } + }, + { + "purpose": "P4" + } + ], + "web": { + "not": "an array" + }, + "unity": [ + "not an object", + { + "purpose": "P4" + } + ] + } + }, + "result": false, + "err": [ + "oneTrustCookieCategories.android.0.oneTrustCookieCategory must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"", + "oneTrustCookieCategories.ios.0.oneTrustCookieCategory must be string", + "oneTrustCookieCategories.web must be array", + "oneTrustCookieCategories.unity.0 must be object", + "ketchConsentPurposes.android.0.purpose must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"", + "ketchConsentPurposes.ios.0.purpose must be string", + "ketchConsentPurposes.web must be array", + "ketchConsentPurposes.unity.0 must be object" + ] + } +]