From dee78f54873b00a5802fbc3e34a33e65558b8933 Mon Sep 17 00:00:00 2001 From: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> Date: Tue, 7 Nov 2023 15:05:32 +0530 Subject: [PATCH 01/21] fix: remove web from Singular supported source (#1051) --- src/configurations/destinations/singular/db-config.json | 1 - 1 file changed, 1 deletion(-) diff --git a/src/configurations/destinations/singular/db-config.json b/src/configurations/destinations/singular/db-config.json index 9d6cb2c4e..3ba6b1e86 100644 --- a/src/configurations/destinations/singular/db-config.json +++ b/src/configurations/destinations/singular/db-config.json @@ -21,7 +21,6 @@ "flutter", "reactnative", "cordova", - "web", "amp", "cloud", "warehouse", From 6bbd11f221f63563503445b4950124899b2fafce Mon Sep 17 00:00:00 2001 From: nidhilashkari17 <108564211+nidhilashkari17@users.noreply.github.com> Date: Tue, 7 Nov 2023 15:20:18 +0530 Subject: [PATCH 02/21] chore: update google ads image (ETL-189) (#1048) --- src/configurations/sources/singer_google_ads/db-config.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/configurations/sources/singer_google_ads/db-config.json b/src/configurations/sources/singer_google_ads/db-config.json index 4ac8602ae..a33ab61f0 100644 --- a/src/configurations/sources/singer_google_ads/db-config.json +++ b/src/configurations/sources/singer_google_ads/db-config.json @@ -6,8 +6,7 @@ "auth": { "provider": "Google" }, - "digest": "sha256:9b52972787a0747792ed43d0d909eee3f0d1c3fe755b2492e109d63cd9731fd6", - "image": "rudderstack/source-google-ads:v6.2.0-fix-google-ads-error-handling", + "image": "rudderstack/source-google-ads:v6.2.0-fix-google-ads-custom-query", "isBeta": false }, "type": "cloudSource" From e1964fbf74372761c076be00df9eedb285f036ed Mon Sep 17 00:00:00 2001 From: George Bardis <109069547+bardisg@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:37:19 +0200 Subject: [PATCH 03/21] feat: add Ketch for Mixpanel, CustomerIO & Snowflake (#1054) --- .github/pull_request_template.md | 1 + package.json | 8 +- scripts/schemaGenerator.py | 47 +++++--- .../destinations/customerio/db-config.json | 4 +- .../destinations/customerio/schema.json | 31 ++---- .../destinations/customerio/ui-config.json | 15 +++ .../destinations/mp/db-config.json | 2 + .../destinations/mp/schema.json | 101 +++++------------- .../destinations/mp/ui-config.json | 15 +++ .../destinations/snowflake/db-config.json | 5 +- .../destinations/snowflake/schema.json | 7 ++ .../destinations/snowflake/ui-config.json | 16 ++- 12 files changed, 135 insertions(+), 117 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f5c84544e..4f15c149d 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -12,6 +12,7 @@ - [ ] I have made corresponding changes to the documentation - [ ] The code changed/added as part of this pull request has been covered with tests - [ ] All tests related to the changed code pass in development +- [ ] I have executed schemaGenerator tests and updated schema if needed ### Code review diff --git a/package.json b/package.json index 975d34377..c6dba745b 100755 --- a/package.json +++ b/package.json @@ -26,7 +26,13 @@ "prepare": "husky install", "pre-commit": "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" + "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", + "check:schema:source": "python3 scripts/schemaGenerator.py source -name ", + "update:schema:source": "python3 scripts/schemaGenerator.py source -update -name ", + "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 " }, "devDependencies": { "@babel/core": "^7.21.3", diff --git a/scripts/schemaGenerator.py b/scripts/schemaGenerator.py index 6791d65e9..747ca7d0d 100644 --- a/scripts/schemaGenerator.py +++ b/scripts/schemaGenerator.py @@ -1,8 +1,9 @@ ''' - Usage: schemaGenerator.py [-h] [-name name | -all] selector + Usage: schemaGenerator.py [-h] [-name name | -all] [-update] selector 1. selector - “source” or “destination” 2. all - runs the validator for all the selector. 3. name - any particular source or destination name such as `google_analytics` + 3. update - updates existing schema with detected changes Example: 1. python3 scripts/schemaGenerator.py -name="adobe_analytics" destination 2. python3 scripts/schemaGenerator.py -all source @@ -802,7 +803,7 @@ def generate_config_props(config): generate_config_props(config) -def generate_schema(uiConfig, dbConfig, name, selector): +def generate_schema(uiConfig, dbConfig, name, selector, shouldUpdateSchema): """Returns the schema generated from given uiConfig and dbConfig. Args: @@ -810,6 +811,7 @@ def generate_schema(uiConfig, dbConfig, name, selector): dbConfig (object): Configurations of db-config.json. name (string): name of the source or destination. selector (string): either 'source' or 'destination' + shouldUpdateSchema (boolean): if it should update the existing schema with generated one Returns: object: schema @@ -824,7 +826,7 @@ def generate_schema(uiConfig, dbConfig, name, selector): if is_old_format(uiConfig): allOfSchemaObj = generate_schema_for_allOf(uiConfig, dbConfig, "value") if allOfSchemaObj: - # AnyOf occuring separately, not inside of allOf. + # AnyOf occurring separately, not inside allOf. if len(allOfSchemaObj) == 1: if isinstance(allOfSchemaObj[0], list): schemaObject['anyOf'] = allOfSchemaObj[0] @@ -835,6 +837,19 @@ def generate_schema(uiConfig, dbConfig, name, selector): generate_schema_properties(uiConfig, dbConfig, schemaObject, schemaObject['properties'], name, selector) newSchema['configSchema'] = schemaObject + + if shouldUpdateSchema: + # Get the parent directory (one level up) + script_directory = os.path.dirname(os.path.abspath(__file__)) + directory = os.path.dirname(script_directory) + # Define the relative path + relative_path = f'src/configurations/{selector}s/{name.lower()}/schema.json' + file_path = os.path.join(directory, relative_path) + new_content = json.dumps(newSchema) + # Write the new content + with open(file_path, 'w') as file: + file.write(new_content) + return newSchema def generate_warnings_for_each_type(uiConfig, dbConfig, schema, curUiType): @@ -924,7 +939,7 @@ def generate_warnings_for_each_type(uiConfig, dbConfig, schema, curUiType): } -def validate_config_consistency(name, selector, uiConfig, dbConfig, schema): +def validate_config_consistency(name, selector, uiConfig, dbConfig, schema, shouldUpdateSchema): """Generates a schema and compares it with an existing one. If schemaDiff is present, it calls for individual warnings by iterating over each ui-type. @@ -934,6 +949,7 @@ def validate_config_consistency(name, selector, uiConfig, dbConfig, schema): uiConfig (object): file content of ui-config.json. dbConfig (object): Configurations of db-config.json. schema (object): Existing schema in schema.json. + shouldUpdateSchema (boolean): if it should update the existing schema with generated one """ if schema == None and uiConfig == None: return @@ -942,7 +958,7 @@ def validate_config_consistency(name, selector, uiConfig, dbConfig, schema): warnings.warn(f"Ui-Config is null for {name} in {selector} \n",UserWarning) print('-'*50) return - generatedSchema = generate_schema(uiConfig, dbConfig, name, selector) + generatedSchema = generate_schema(uiConfig, dbConfig, name, selector, shouldUpdateSchema) if schema: schemaDiff = diff(schema, generatedSchema["configSchema"]) if schemaDiff: @@ -986,12 +1002,13 @@ def validate_config_consistency(name, selector, uiConfig, dbConfig, schema): print(json.dumps(generatedSchema,indent=2)) print('-'*50) -def get_schema_diff(name, selector): +def get_schema_diff(name, selector, shouldUpdateSchema=False): """ Validates the schema for the given name and selector. Args: name (string): name of the source or destination. selector (string): either 'source' or 'destination'. + shouldUpdateSchema (boolean): if it should update the existing schema with generated one """ file_selectors = ['db-config.json', 'ui-config.json', 'schema.json'] directory = f'./{CONFIG_DIR}/{selector}s/{name}' @@ -1005,25 +1022,27 @@ def get_schema_diff(name, selector): schema = file_content.get("configSchema") dbConfig = file_content.get("config") if name not in EXCLUDED_DEST: - validate_config_consistency(name, selector, uiConfig, dbConfig, schema) + validate_config_consistency(name, selector, uiConfig, dbConfig, schema, shouldUpdateSchema) if __name__ == '__main__': - parser = argparse.ArgumentParser(description='Generates schema.json from ui-cofing.json and db-config.json and validates against actual scheme.json') + parser = argparse.ArgumentParser(description='Generates schema.json from ui-config.json and db-config.json and validates against actual scheme.json') group = parser.add_mutually_exclusive_group() - parser.add_argument('selector',metavar='selector',type=str,help='Enter wheather -name is a source or destination') - group.add_argument('-name',metavar='name',type=str,help='Enter the folder name under selector') - group.add_argument('-all',action='store_true', help='will run validation for all entites under selector') - + parser.add_argument('selector', metavar='selector', type=str, help='Enter whether -name is a source or destination') + parser.add_argument('-update', action='store_true', help='Will update existing schema with any changes') + group.add_argument('-name', metavar='name', type=str, help='Enter the folder name under selector') + group.add_argument('-all', action='store_true', help='Will run validation for all entities under selector') args = parser.parse_args() selector = args.selector + shouldUpdateSchema = args.update + if args.all: CONFIG_DIR = 'src/configurations' current_items = os.listdir(f'./{CONFIG_DIR}/{selector}s') for name in current_items: - get_schema_diff(name,selector) + get_schema_diff(name, selector) else: name = args.name - get_schema_diff(name, selector) \ No newline at end of file + get_schema_diff(name, selector, shouldUpdateSchema) diff --git a/src/configurations/destinations/customerio/db-config.json b/src/configurations/destinations/customerio/db-config.json index 47207c3c5..960e26acf 100644 --- a/src/configurations/destinations/customerio/db-config.json +++ b/src/configurations/destinations/customerio/db-config.json @@ -14,6 +14,7 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", + "ketchConsentPurposes", "eventFilteringOption", "sendPageNameInSDK" ], @@ -41,7 +42,8 @@ "blacklistedEvents", "whitelistedEvents", "eventFilteringOption", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "ketchConsentPurposes" ], "web": ["useNativeSDK", "sendPageNameInSDK"] }, diff --git a/src/configurations/destinations/customerio/schema.json b/src/configurations/destinations/customerio/schema.json index b158475ff..839fa3911 100644 --- a/src/configurations/destinations/customerio/schema.json +++ b/src/configurations/destinations/customerio/schema.json @@ -16,27 +16,9 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, - "datacenter": { - "type": "string", - "enum": ["US", "EU"], - "default": "US" - }, - "sendPageNameInSDK": { - "type": "object", - "properties": { - "web": { - "type": "boolean" - } - } - }, - "useNativeSDK": { - "type": "object", - "properties": { - "web": { - "type": "boolean" - } - } - }, + "datacenter": { "type": "string", "enum": ["US", "EU"], "default": "US" }, + "sendPageNameInSDK": { "type": "object", "properties": { "web": { "type": "boolean" } } }, + "useNativeSDK": { "type": "object", "properties": { "web": { "type": "boolean" } } }, "eventFilteringOption": { "type": "string", "enum": ["disable", "whitelistedEvents", "blacklistedEvents"], @@ -77,6 +59,13 @@ } } } + }, + "ketchConsentPurposes": { + "type": "array", + "items": { + "type": "object", + "properties": { "purpose": { "type": "string", "pattern": "^(.{0,100})$" } } + } } } } diff --git a/src/configurations/destinations/customerio/ui-config.json b/src/configurations/destinations/customerio/ui-config.json index 82c99cb8b..dcee63644 100644 --- a/src/configurations/destinations/customerio/ui-config.json +++ b/src/configurations/destinations/customerio/ui-config.json @@ -142,6 +142,21 @@ "required": false } ] + }, + { + "type": "dynamicCustomForm", + "value": "ketchConsentPurposes", + "label": "Ketch Consent Purposes", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "purpose", + "label": "Purpose ID", + "regex": "^(.{0,100})$", + "required": false + } + ] } ] } diff --git a/src/configurations/destinations/mp/db-config.json b/src/configurations/destinations/mp/db-config.json index d44f590dc..9c6254d31 100644 --- a/src/configurations/destinations/mp/db-config.json +++ b/src/configurations/destinations/mp/db-config.json @@ -28,6 +28,7 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", + "ketchConsentPurposes", "eventFilteringOption", "identityMergeApi" ], @@ -75,6 +76,7 @@ "serviceAccountSecret", "projectId", "oneTrustCookieCategories", + "ketchConsentPurposes", "identityMergeApi", "userDeletionApi", "gdprApiToken", diff --git a/src/configurations/destinations/mp/schema.json b/src/configurations/destinations/mp/schema.json index 80037d134..cf9b2c11f 100644 --- a/src/configurations/destinations/mp/schema.json +++ b/src/configurations/destinations/mp/schema.json @@ -12,46 +12,20 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, - "serviceAccountUserName": { - "type": "string" - }, - "serviceAccountSecret": { - "type": "string" - }, - "projectId": { - "type": "string" - }, - "dataResidency": { - "type": "string", - "enum": ["us", "eu"], - "default": "us" - }, + "serviceAccountUserName": { "type": "string" }, + "serviceAccountSecret": { "type": "string" }, + "projectId": { "type": "string" }, + "dataResidency": { "type": "string", "enum": ["us", "eu"], "default": "us" }, "identityMergeApi": { "type": "string", "enum": ["simplified", "original"], "default": "original" }, - "strictMode": { - "type": "boolean", - "default": false - }, - "ignoreDnt": { - "type": "boolean", - "default": false - }, - "userDeletionApi": { - "type": "string", - "enum": ["engage", "task"], - "default": "engage" - }, - "people": { - "type": "boolean", - "default": false - }, - "setAllTraitsByDefault": { - "type": "boolean", - "default": false - }, + "userDeletionApi": { "type": "string", "enum": ["engage", "task"], "default": "engage" }, + "strictMode": { "type": "boolean", "default": false }, + "ignoreDnt": { "type": "boolean", "default": false }, + "people": { "type": "boolean", "default": false }, + "setAllTraitsByDefault": { "type": "boolean", "default": false }, "superProperties": { "type": "array", "items": { @@ -100,31 +74,14 @@ } } }, - "consolidatedPageCalls": { - "type": "boolean", - "default": true - }, - "trackCategorizedPages": { - "type": "boolean", - "default": false - }, - "trackNamedPages": { - "type": "boolean", - "default": false - }, + "consolidatedPageCalls": { "type": "boolean", "default": true }, + "trackCategorizedPages": { "type": "boolean", "default": false }, + "trackNamedPages": { "type": "boolean", "default": false }, "sourceName": { "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, - "crossSubdomainCookie": { - "type": "boolean", - "default": false - }, - "persistence": { - "type": "string", - "enum": ["none", "cookie", "localStorage"], - "default": "none" - }, + "crossSubdomainCookie": { "type": "boolean", "default": false }, "persistenceType": { "type": "string", "enum": ["none", "cookie", "localStorage"], @@ -134,10 +91,7 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, - "secureCookie": { - "type": "boolean", - "default": false - }, + "secureCookie": { "type": "boolean", "default": false }, "groupKeySettings": { "type": "array", "items": { @@ -150,18 +104,8 @@ } } }, - "useNativeSDK": { - "type": "object", - "properties": { - "web": { - "type": "boolean" - } - } - }, - "useNewMapping": { - "type": "boolean", - "default": false - }, + "useNativeSDK": { "type": "object", "properties": { "web": { "type": "boolean" } } }, + "useNewMapping": { "type": "boolean", "default": false }, "eventFilteringOption": { "type": "string", "enum": ["disable", "whitelistedEvents", "blacklistedEvents"], @@ -202,16 +146,19 @@ } } } + }, + "ketchConsentPurposes": { + "type": "array", + "items": { + "type": "object", + "properties": { "purpose": { "type": "string", "pattern": "^(.{0,100})$" } } + } } }, "anyOf": [ { "if": { - "properties": { - "userDeletionApi": { - "const": "task" - } - }, + "properties": { "userDeletionApi": { "const": "task" } }, "required": ["userDeletionApi"] }, "then": { diff --git a/src/configurations/destinations/mp/ui-config.json b/src/configurations/destinations/mp/ui-config.json index dfb52da41..276098b5f 100644 --- a/src/configurations/destinations/mp/ui-config.json +++ b/src/configurations/destinations/mp/ui-config.json @@ -406,6 +406,21 @@ "required": false } ] + }, + { + "type": "dynamicCustomForm", + "value": "ketchConsentPurposes", + "label": "Ketch Consent Purposes", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "purpose", + "label": "Purpose ID", + "regex": "^(.{0,100})$", + "required": false + } + ] } ] } diff --git a/src/configurations/destinations/snowflake/db-config.json b/src/configurations/destinations/snowflake/db-config.json index 58bcb7dbe..db7388ae8 100644 --- a/src/configurations/destinations/snowflake/db-config.json +++ b/src/configurations/destinations/snowflake/db-config.json @@ -6,7 +6,7 @@ "transformAt": "processor", "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": [], + "includeKeys": ["oneTrustCookieCategories", "ketchConsentPurposes"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -50,7 +50,8 @@ "excludeWindow", "jsonPaths", "useRudderStorage", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "ketchConsentPurposes" ] }, "secretKeys": ["password", "accessKeyID", "accessKey", "accountKey", "sasToken"] diff --git a/src/configurations/destinations/snowflake/schema.json b/src/configurations/destinations/snowflake/schema.json index 60fdf5a1c..36b185cba 100644 --- a/src/configurations/destinations/snowflake/schema.json +++ b/src/configurations/destinations/snowflake/schema.json @@ -67,6 +67,13 @@ } } } + }, + "ketchConsentPurposes": { + "type": "array", + "items": { + "type": "object", + "properties": { "purpose": { "type": "string", "pattern": "^(.{0,100})$" } } + } } }, "allOf": [ diff --git a/src/configurations/destinations/snowflake/ui-config.json b/src/configurations/destinations/snowflake/ui-config.json index 932f52902..cbeec9121 100644 --- a/src/configurations/destinations/snowflake/ui-config.json +++ b/src/configurations/destinations/snowflake/ui-config.json @@ -556,11 +556,25 @@ "type": "textInput", "placeholder": "Marketing", "value": "oneTrustCookieCategory", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", "label": "Category Name/ID", "required": false } ] + }, + { + "type": "dynamicCustomForm", + "value": "ketchConsentPurposes", + "label": "Ketch Consent Purposes", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "purpose", + "label": "Purpose ID", + "regex": "^(.{0,100})$", + "required": false + } + ] } ] } From 08745124a3279695c1242919c216f8eef3dbe5cb Mon Sep 17 00:00:00 2001 From: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Date: Thu, 9 Nov 2023 17:24:30 +0530 Subject: [PATCH 04/21] feat: onboard mixpanel on new ui (#1008) --- .../destinations/mp/db-config.json | 51 +- .../destinations/mp/schema.json | 232 ++++- .../destinations/mp/ui-config.json | 851 +++++++++++------- test/data/validation/destinations/mp.json | 211 +++-- 4 files changed, 858 insertions(+), 487 deletions(-) diff --git a/src/configurations/destinations/mp/db-config.json b/src/configurations/destinations/mp/db-config.json index 9c6254d31..50801bd6d 100644 --- a/src/configurations/destinations/mp/db-config.json +++ b/src/configurations/destinations/mp/db-config.json @@ -30,7 +30,8 @@ "oneTrustCookieCategories", "ketchConsentPurposes", "eventFilteringOption", - "identityMergeApi" + "identityMergeApi", + "ignoreDnt" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -46,6 +47,17 @@ "cordova", "shopify" ], + "supportedConnectionModes": { + "web": ["cloud", "device"], + "android": ["cloud"], + "ios": ["cloud"], + "unity": ["cloud"], + "amp": ["cloud"], + "reactnative": ["cloud"], + "flutter": ["cloud"], + "cordova": ["cloud"], + "shopify": ["cloud"] + }, "supportedMessageTypes": ["alias", "group", "identify", "page", "screen", "track"], "destConfig": { "defaultConfig": [ @@ -53,21 +65,7 @@ "groupKeySettings", "apiSecret", "dataResidency", - "people", - "setAllTraitsByDefault", - "superProperties", - "peopleProperties", - "eventIncrements", "propIncrements", - "consolidatedPageCalls", - "trackCategorizedPages", - "trackNamedPages", - "sourceName", - "crossSubdomainCookie", - "persistence", - "persistenceType", - "persistenceName", - "secureCookie", "blacklistedEvents", "whitelistedEvents", "eventFilteringOption", @@ -80,10 +78,27 @@ "identityMergeApi", "userDeletionApi", "gdprApiToken", - "strictMode", - "ignoreDnt" + "strictMode" ], - "web": ["useNativeSDK"] + "web": [ + "useNativeSDK", + "connectionMode", + "people", + "setAllTraitsByDefault", + "ignoreDnt", + "consolidatedPageCalls", + "trackCategorizedPages", + "trackNamedPages", + "sourceName", + "crossSubdomainCookie", + "persistence", + "persistenceType", + "persistenceName", + "secureCookie", + "superProperties", + "peopleProperties", + "eventIncrements" + ] }, "secretKeys": ["token", "gdprApiToken"] } diff --git a/src/configurations/destinations/mp/schema.json b/src/configurations/destinations/mp/schema.json index cf9b2c11f..363a1ec6e 100644 --- a/src/configurations/destinations/mp/schema.json +++ b/src/configurations/destinations/mp/schema.json @@ -12,52 +12,108 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, - "serviceAccountUserName": { "type": "string" }, - "serviceAccountSecret": { "type": "string" }, - "projectId": { "type": "string" }, - "dataResidency": { "type": "string", "enum": ["us", "eu"], "default": "us" }, + "serviceAccountUserName": { + "type": "string" + }, + "serviceAccountSecret": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "dataResidency": { + "type": "string", + "enum": ["us", "eu"], + "default": "us" + }, "identityMergeApi": { "type": "string", "enum": ["simplified", "original"], "default": "original" }, - "userDeletionApi": { "type": "string", "enum": ["engage", "task"], "default": "engage" }, - "strictMode": { "type": "boolean", "default": false }, - "ignoreDnt": { "type": "boolean", "default": false }, - "people": { "type": "boolean", "default": false }, - "setAllTraitsByDefault": { "type": "boolean", "default": false }, + "strictMode": { + "type": "boolean", + "default": false + }, + "ignoreDnt": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "default": false + } + } + }, + "userDeletionApi": { + "type": "string", + "enum": ["engage", "task"], + "default": "engage" + }, + "people": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "default": false + } + } + }, + "setAllTraitsByDefault": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "default": false + } + } + }, "superProperties": { - "type": "array", - "items": { - "type": "object", - "properties": { - "property": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + "type": "object", + "properties": { + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "property": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } } } } }, "peopleProperties": { - "type": "array", - "items": { - "type": "object", - "properties": { - "property": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + "type": "object", + "properties": { + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "property": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } } } } }, "eventIncrements": { - "type": "array", - "items": { - "type": "object", - "properties": { - "property": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + "type": "object", + "properties": { + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "property": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } } } } @@ -74,24 +130,89 @@ } } }, - "consolidatedPageCalls": { "type": "boolean", "default": true }, - "trackCategorizedPages": { "type": "boolean", "default": false }, - "trackNamedPages": { "type": "boolean", "default": false }, + "consolidatedPageCalls": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "default": true + } + } + }, + "trackCategorizedPages": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "default": false + } + } + }, + "trackNamedPages": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "default": false + } + } + }, "sourceName": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + "type": "object", + "properties": { + "web": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + }, + "crossSubdomainCookie": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "default": false + } + } + }, + "persistence": { + "type": "object", + "properties": { + "web": { + "type": "string", + "enum": ["none", "cookie", "localStorage"], + "default": "none" + } + } }, - "crossSubdomainCookie": { "type": "boolean", "default": false }, "persistenceType": { - "type": "string", - "enum": ["none", "cookie", "localStorage"], - "default": "cookie" + "type": "object", + "properties": { + "web": { + "type": "string", + "enum": ["none", "cookie", "localStorage"], + "default": "cookie" + } + } }, "persistenceName": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + "type": "object", + "properties": { + "web": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + }, + "secureCookie": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "default": false + } + } }, - "secureCookie": { "type": "boolean", "default": false }, "groupKeySettings": { "type": "array", "items": { @@ -104,8 +225,18 @@ } } }, - "useNativeSDK": { "type": "object", "properties": { "web": { "type": "boolean" } } }, - "useNewMapping": { "type": "boolean", "default": false }, + "useNativeSDK": { + "type": "object", + "properties": { + "web": { + "type": "boolean" + } + } + }, + "useNewMapping": { + "type": "boolean", + "default": false + }, "eventFilteringOption": { "type": "string", "enum": ["disable", "whitelistedEvents", "blacklistedEvents"], @@ -151,14 +282,23 @@ "type": "array", "items": { "type": "object", - "properties": { "purpose": { "type": "string", "pattern": "^(.{0,100})$" } } + "properties": { + "purpose": { + "type": "string", + "pattern": "^(.{0,100})$" + } + } } } }, "anyOf": [ { "if": { - "properties": { "userDeletionApi": { "const": "task" } }, + "properties": { + "userDeletionApi": { + "const": "task" + } + }, "required": ["userDeletionApi"] }, "then": { diff --git a/src/configurations/destinations/mp/ui-config.json b/src/configurations/destinations/mp/ui-config.json index 276098b5f..ab2b2d453 100644 --- a/src/configurations/destinations/mp/ui-config.json +++ b/src/configurations/destinations/mp/ui-config.json @@ -1,428 +1,579 @@ { - "uiConfig": [ - { - "title": "Connection Settings", - "fields": [ - { - "type": "textInput", - "label": "API Token", - "value": "token", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", - "regexErrorMessage": "Invalid API Token", - "required": true, - "placeholder": "c24f56ed817221606de5a5f0befe8b92", - "secret": true - }, - { - "type": "textInput", - "label": "API Secret", - "value": "apiSecret", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "regexErrorMessage": "Invalid API Secret", - "required": false, - "placeholder": "f8a911adfbb6546cc43cdfe29e912a90", - "secret": true - }, - { - "type": "textInput", - "label": "Service Account Username", - "value": "serviceAccountUserName", - "required": false - }, - { - "type": "textInput", - "label": "Service Account Secret", - "value": "serviceAccountSecret", - "required": false - }, - { - "type": "textInput", - "label": "Project ID", - "value": "projectId", - "required": false - }, - { - "type": "singleSelect", - "label": "Data Residency", - "value": "dataResidency", - "options": [ - { - "name": "US", - "value": "us" - }, - { - "name": "EU", - "value": "eu" - } - ], - "defaultOption": { - "name": "US", - "value": "us" - }, - "required": false - }, - { - "type": "singleSelect", - "label": "Identity Merge", - "value": "identityMergeApi", - "footerNote": "Select Identity Merge API. For more information about Simplified vs Original ID Merge API refer doc (https://help.mixpanel.com/hc/en-us/articles/14383975110292)", - "options": [ - { - "name": "Simplified ID Merge", - "value": "simplified" - }, - { - "name": "Original ID Merge", - "value": "original" - } - ], - "defaultOption": { - "name": "Original ID Merge", - "value": "original" - }, - "required": false - }, - { - "type": "singleSelect", - "label": "User Deletion", - "value": "userDeletionApi", - "footerNote": "Select Mixpanel User Deletion API. For more information about difference between the two APIs refer doc (https://www.rudderstack.com/docs/destinations/streaming-destinations/mixpanel/#deleting-a-user)", - "options": [ - { - "name": "Delete Profile", - "value": "engage" - }, - { - "name": "Delete Profile and Associated Events", - "value": "task" - } - ], - "defaultOption": { - "name": "Delete Profile", - "value": "engage" + "uiConfig": { + "baseTemplate": [ + { + "title": "Initial setup", + "note": "Review how this destination is set up", + "sections": [ + { + "groups": [ + { + "title": "Connection settings", + "icon": "settings", + "fields": [ + { + "type": "textInput", + "label": "Project Token", + "configKey": "token", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid Project Token", + "required": true, + "placeholder": "c24f56ed817221606de5a5f0befe8b92", + "secret": true, + "note": [ + "Obtain the Project Token by navigating to Project > Project Settings > Access Key. For detailed instructions", + { + "text": "Learn more here", + "link": "https://docs.mixpanel.com/docs/tracking/how-tos/api-credentials#project-token" + } + ] + }, + { + "type": "singleSelect", + "label": "Data Residency", + "configKey": "dataResidency", + "options": [ + { + "label": "US", + "value": "us" + }, + { + "label": "EU", + "value": "eu" + } + ], + "default": "us" + }, + { + "type": "singleSelect", + "label": "Identity Merge", + "configKey": "identityMergeApi", + "note": [ + "Select Identity Merge API.", + { + "text": "Learn more", + "link": "https://help.mixpanel.com/hc/en-us/articles/14383975110292" + }, + " about Simplified vs Original ID Merge API." + ], + "options": [ + { + "label": "Simplified ID Merge", + "value": "simplified" + }, + { + "label": "Original ID Merge", + "value": "original" + } + ], + "default": "original" + } + ] + } + ] }, - "required": false - }, - { - "type": "textInput", - "preRequisiteField": { - "name": "userDeletionApi", - "selectedValue": "task" + { + "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": "Mixpanel Fullstack IT", + "fields": [ + { + "type": "textInput", + "label": "API Secret", + "configKey": "apiSecret", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "regexErrorMessage": "Invalid API Secret", + "required": false, + "placeholder": "f8a911adfbb6546cc43cdfe29e912a90", + "secret": true, + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + }, + "note": [ + "Obtain the API Secret by navigating to Project > Project Settings > Access Key. For detailed instructions", + { + "text": "Learn more here", + "link": "https://docs.mixpanel.com/docs/tracking/how-tos/api-credentials#api-secret" + } + ] + }, + { + "type": "textInput", + "label": "Service Account Username", + "configKey": "serviceAccountUserName", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + }, + "note": [ + "Refer to ", + { + "text": "this", + "link": "https://docs.mixpanel.com/docs/tracking/how-tos/api-credentials#api-secret" + }, + " Mixpanel guide for managing service account and obtaining the username." + ] + }, + { + "type": "textInput", + "label": "Service Account Secret", + "configKey": "serviceAccountSecret", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + }, + "note": [ + "Refer to ", + { + "text": "this", + "link": "https://docs.mixpanel.com/docs/tracking/how-tos/api-credentials#api-secret" + }, + " Mixpanel guide for managing service account and obtaining the secret." + ] + }, + { + "type": "textInput", + "label": "Project ID", + "configKey": "projectId", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + }, + "note": [ + "Obtain the Project ID by navigating to Project > Project Settings > Project Details. For detailed instructions", + { + "text": "Learn more here", + "link": "https://docs.mixpanel.com/docs/admin/organizations-projects/manage-projects#viewing-project-information" + } + ] + }, + { + "type": "checkbox", + "label": "Strict Mode", + "configKey": "strictMode", + "default": false, + "note": "If enabled, Mixpanel will validate the request and return errors per event that failed", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + } + }, + { + "type": "tagInput", + "configKey": "propIncrements", + "label": "Properties to increment in People", + "tagKey": "property", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid Property Name", + "placeholder": "e.g: Cart-Value" + } + ] + }, + { + "title": "Event Map Setting", + "fields": [ + { + "type": "checkbox", + "configKey": "useNewMapping", + "label": "Use New Mapping", + "default": false, + "note": "It is recommended to set this to on as we are deprecating support for the old mapping soon.", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + } + } + ] + }, + { + "title": "Group Key Settings", + "fields": [ + { + "type": "tagInput", + "configKey": "groupKeySettings", + "tagKey": "groupKey", + "label": "Group Keys", + "placeholder": "e.g: company", + "default": [ + { + "groupKey": "" + } + ] + } + ] + }, + { + "title": "User Deletion Setting", + "fields": [ + { + "type": "singleSelect", + "label": "User Deletion", + "configKey": "userDeletionApi", + "note": [ + "Select Mixpanel User Deletion API.", + { + "text": "Learn more", + "link": "https://www.rudderstack.com/docs/destinations/streaming-destinations/mixpanel/#deleting-a-user" + }, + " about difference between the two APIs" + ], + "options": [ + { + "label": "Delete Profile", + "value": "engage" + }, + { + "label": "Delete Profile and Associated Events", + "value": "task" + } + ], + "default": "engage", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + } + }, + { + "type": "textInput", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + }, + { + "configKey": "userDeletionApi", + "value": "task" + } + ], + "condition": "and" + }, + "label": "GDPR API Token", + "configKey": "gdprApiToken", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid GDPR API Token", + "required": true, + "placeholder": "e.g: 7vwaux7et2tk2ih1o0qtbt1x97n2je", + "secret": true + } + ] + } + ] }, - "label": "GDPR API Token", - "value": "gdprApiToken", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", - "regexErrorMessage": "Invalid GDPR API Token", - "required": true, - "placeholder": "e.g: 7vwaux7et2tk2ih1o0qtbt1x97n2je", - "secret": true - }, - { - "type": "checkbox", - "label": "Strict Mode", - "value": "strictMode", - "default": false, - "footerNote": "If enabled, Mixpanel will validate the request and return errors per event that failed" - }, - { - "type": "checkbox", - "label": "Ignore \"Do Not Track\"", - "value": "ignoreDnt", - "default": false, - "footerNote": "If enabled, Mixpanel will ignore \"Do Not Track\" setting of browser" - } - ] - }, - { - "title": "Device Mode Settings", + { + "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 event filtering: ", + "configKey": "eventFilteringOption", + "note": "You must select either allowlist or denylist to enable events filtering", + "options": [ + { + "label": "Disabled", + "configKey": "disable" + }, + { + "label": "Filter via allowlist", + "configKey": "whitelistedEvents" + }, + { + "label": "Filter via denylist", + "configKey": "blacklistedEvents" + } + ], + "default": "disable" + }, + { + "type": "tagInput", + "label": "Allowlisted events", + "note": "Input the events you want to allowlist.\nInput separate events by pressing ‘Enter’.", + "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 the events you want to denylist.\nInput separate events by pressing ‘Enter’.", + "configKey": "blacklistedEvents", + "tagKey": "eventName", + "placeholder": "e.g: Anonymous page visit", + "default": [ + { + "eventName": "" + } + ], + "preRequisites": { + "fields": [ + { + "configKey": "eventFilteringOption", + "value": "blacklistedEvents" + } + ] + } + } + ] + }, + { + "title": "OneTrust cookie consent settings", + "note": [ + "Enter your OneTrust consent category IDs or names if you have them configured. We recommend providing category IDs over names, as the category names only work in the device connection mode. So, you can seamlessly switch between the connection modes.", + { + "text": "Learn more", + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/onetrust-consent-manager/" + }, + " about RudderStack’s OneTrust Consent Manager feature." + ], + "fields": [ + { + "type": "tagInput", + "label": "Consent categories", + "note": "Input your OneTrust consent category IDs or names by pressing ‘Enter’ after each entry. You should prefer category IDs over names. Refer to this section's note.", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: C0001", + "default": [ + { + "oneTrustCookieCategory": "" + } + ] + } + ] + }, + { + "title": "Ketch Consent Purposes", + "fields": [ + { + "type": "tagInput", + "label": "Purpose ID", + "configKey": "ketchConsentPurposes", + "tagKey": "purpose", + "regex": "^(.{0,100})$", + "default": [ + { + "purpose": "" + } + ] + } + ] + } + ] + } + ] + } + ], + "sdkTemplate": { + "title": "SDK settings", "fields": [ { "type": "checkbox", "label": "Use Mixpanel People", - "value": "people", + "configKey": "people", "default": false, - "footerNote": "This will send all of your identify calls to Mixpanel's People feature." + "note": "This will send all of your identify calls to Mixpanel's People feature." }, { "type": "checkbox", "label": "Automatically set all Traits as Super Properties and People Properties", - "value": "setAllTraitsByDefault", + "configKey": "setAllTraitsByDefault", "default": false, - "footerNote": "While this is checked, our integration automatically sets all traits on identify calls as super properties and people properties if Mixpanel People is checked as well." + "note": "While this is checked, our integration automatically sets all traits on identify calls as super properties and people properties if Mixpanel People is checked as well." }, { - "type": "dynamicCustomForm", - "value": "superProperties", - "customFields": [ - { - "type": "textInput", - "label": "Property to send as super Properties", - "value": "property", - "regex": "^(.{0,100})$", - "regexErrorMessage": "Invalid Property Name", - "required": false, - "placeholder": "e.g: residence" - } - ] - }, - { - "type": "dynamicCustomForm", - "value": "peopleProperties", - "customFields": [ - { - "type": "textInput", - "label": "Traits to set as People Properties", - "value": "property", - "regex": "^(.{0,100})$", - "regexErrorMessage": "Invalid Property Name", - "required": false, - "placeholder": "e.g: address" - } - ] - }, - { - "type": "dynamicCustomForm", - "value": "eventIncrements", - "customFields": [ - { - "type": "textInput", - "label": "Events to increment in People", - "value": "property", - "regex": "^(.{0,100})$", - "regexErrorMessage": "Invalid Property Name", - "required": false, - "placeholder": "e.g: Added-to-cart" - } - ] - }, - { - "type": "dynamicCustomForm", - "value": "propIncrements", - "customFields": [ - { - "type": "textInput", - "label": "Properties to increment in People", - "value": "property", - "regex": "^(.{0,100})$", - "regexErrorMessage": "Invalid Property Name", - "required": false, - "placeholder": "e.g: Cart-Value" - } - ] + "type": "checkbox", + "label": "Ignore \"Do Not Track\"", + "configKey": "ignoreDnt", + "default": false, + "note": "If enabled, Mixpanel will ignore \"Do Not Track\" setting of browser" }, { "type": "checkbox", "label": "Track All Pages to Mixpanel with a Consolidated Event Name", - "value": "consolidatedPageCalls", + "configKey": "consolidatedPageCalls", "default": true, - "footerNote": "This will track Loaded a Page events to Mixpanel for all page method calls. We enable this by default as it's how Mixpanel suggests sending these calls." + "note": "This will track Loaded a Page events to Mixpanel for all page method calls. We enable this by default as it's how Mixpanel suggests sending these calls." }, { "type": "checkbox", "label": "Track Categorized Pages to Mixpanel", - "value": "trackCategorizedPages", + "configKey": "trackCategorizedPages", "default": false, - "footerNote": "This will track events to Mixpanel for page method calls that have a category associated with them. For example page('Docs', 'Index') would translate to Viewed Docs Index Page." + "note": "This will track events to Mixpanel for page method calls that have a category associated with them. For example page('Docs', 'Index') would translate to Viewed Docs Index Page." }, { "type": "checkbox", "label": "Track Named Pages to Mixpanel", - "value": "trackNamedPages", + "configKey": "trackNamedPages", "default": false, - "footerNote": "This will track events to Mixpanel for page method calls that have a name associated with them. For example page('Signup') would translate to Viewed Signup Page." + "note": "This will track events to Mixpanel for page method calls that have a name associated with them. For example page('Signup') would translate to Viewed Signup Page." }, { "type": "textInput", "label": "Source Name", - "value": "sourceName", + "configKey": "sourceName", "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", "regexErrorMessage": "Invalid Source Name", "required": false, "placeholder": "e.g: Rudder-JS", - "footerNote": "This value, if it's not blank, will be sent as rudderstack_source_name to Mixpanel for every event/page/screen call." + "note": "This value, if it's not blank, will be sent as rudderstack_source_name to Mixpanel for every event/page/screen call." }, { "type": "checkbox", "label": "Cross Subdomain Cookie", - "value": "crossSubdomainCookie", + "configKey": "crossSubdomainCookie", "default": false, - "footerNote": "This will allow the Mixpanel cookie to persist between different pages of your application." + "note": "This will allow the Mixpanel cookie to persist between different pages of your application." }, { "type": "singleSelect", "label": "Persistence Type", - "value": "persistenceType", + "configKey": "persistenceType", "options": [ { - "name": "None", + "label": "None", "value": "none" }, { - "name": "Cookie", + "label": "Cookie", "value": "cookie" }, { - "name": "Local Storage", + "label": "Local Storage", "value": "localStorage" } ], - "defaultOption": { - "name": "Cookie", - "value": "cookie" - }, - "footerNote": "Choose the persistence type for Mixpanel cookie. If 'Local Storage' is selected, then any existing Mixpanel cookie value with the same persistence name will be transferred to 'Local Storage' and deleted." + "default": "cookie", + "note": "Choose the persistence type for Mixpanel cookie. If 'Local Storage' is selected, then any existing Mixpanel cookie value with the same persistence name will be transferred to 'Local Storage' and deleted." }, { "type": "textInput", "label": "Persistence Name", - "value": "persistenceName", + "configKey": "persistenceName", "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "footerNote": "Enter a persistence name for the Mixpanel cookie." + "note": "Enter a persistence name for the Mixpanel cookie." }, { "type": "checkbox", "label": "Secure Cookie", - "value": "secureCookie", - "default": false, - "footerNote": "This will mark the Mixpanel cookie as secure, meaning it will only be transmitted over https" - } - ] - }, - { - "title": "Group Key Settings", - "fields": [ - { - "type": "dynamicCustomForm", - "value": "groupKeySettings", - "label": "Group Keys", - "customFields": [ - { - "type": "textInput", - "label": "Group Key", - "value": "groupKey", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "regexErrorMessage": "Invalid Group Key", - "required": false, - "placeholder": "company" - } - ] - } - ] - }, - { - "title": "Native SDK", - "fields": [ - { - "type": "checkbox", - "label": "Use device-mode to send events", - "value": "useNativeSDK", - "default": false - } - ] - }, - { - "title": "Event Map Setting", - "fields": [ - { - "type": "checkbox", - "value": "useNewMapping", - "label": "Use New Mapping", + "configKey": "secureCookie", "default": false, - "footerNote": "It is recomended to set this to on as we are deprecating support for the old mapping soon." - } - ] - }, - { - "title": "Client-side Events Filtering", - "sectionNote": "Applicable only for device-mode integrations. If enabled, it works only with either allowlisted or denylisted events", - "fields": [ - { - "type": "singleSelect", - "value": "eventFilteringOption", - "required": false, - "options": [ - { - "name": "Disable", - "value": "disable" - }, - { - "name": "Allowlist", - "value": "whitelistedEvents" - }, - { - "name": "Denylist", - "value": "blacklistedEvents" - } - ], - "defaultOption": { - "name": "Disable", - "value": "disable" - } + "note": "This will mark the Mixpanel cookie as secure, meaning it will only be transmitted over https" }, { - "type": "dynamicCustomForm", - "value": "whitelistedEvents", - "label": "Allowlist", - "customFields": [ - { - "type": "textInput", - "value": "eventName", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "required": false, - "placeholder": "e.g: Anonymous Page Visit" - } - ] + "type": "tagInput", + "configKey": "superProperties", + "label": "Property to send as super Properties", + "tagKey": "property", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid Property Name", + "placeholder": "e.g: residence" }, { - "type": "dynamicCustomForm", - "value": "blacklistedEvents", - "label": "Denylist", - "customFields": [ - { - "type": "textInput", - "value": "eventName", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "required": false, - "placeholder": "e.g: Credit Card Added" - } - ] - } - ] - }, - { - "title": "Consent Settings", - "fields": [ - { - "type": "dynamicCustomForm", - "value": "oneTrustCookieCategories", - "label": "OneTrust Cookie Categories", - "customFields": [ - { - "type": "textInput", - "placeholder": "Marketing", - "value": "oneTrustCookieCategory", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "label": "Category Name/ID", - "required": false - } - ] + "type": "tagInput", + "configKey": "peopleProperties", + "label": "Traits to set as People Properties", + "tagKey": "property", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid Property Name", + "placeholder": "e.g: address" }, { - "type": "dynamicCustomForm", - "value": "ketchConsentPurposes", - "label": "Ketch Consent Purposes", - "customFields": [ - { - "type": "textInput", - "placeholder": "Marketing", - "value": "purpose", - "label": "Purpose ID", - "regex": "^(.{0,100})$", - "required": false - } - ] + "type": "tagInput", + "configKey": "eventIncrements", + "label": "Events to increment in People", + "tagKey": "property", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid Property Name", + "placeholder": "e.g: Added-to-cart" } ] } - ] + } } diff --git a/test/data/validation/destinations/mp.json b/test/data/validation/destinations/mp.json index 8bbe40e06..19b95c333 100644 --- a/test/data/validation/destinations/mp.json +++ b/test/data/validation/destinations/mp.json @@ -4,32 +4,60 @@ "token": "2de18c6hf6v45201ab43d2344b0c128x", "apiSecret": "1c078994c2141897ffaf71c36a75v227", "dataResidency": "us", - "people": false, - "setAllTraitsByDefault": false, - "consolidatedPageCalls": true, - "trackCategorizedPages": false, - "trackNamedPages": false, - "sourceName": "AWS", - "crossSubdomainCookie": true, - "persistence": "cookie", - "persistenceType": "cookie", - "persistenceName": "cookie", - "secureCookie": true, - "superProperties": [ - { - "property": "super001" - } - ], - "peopleProperties": [ - { - "property": "maidenName" - } - ], - "eventIncrements": [ - { - "property": "triggerName" - } - ], + "people": { + "web": false + }, + "setAllTraitsByDefault": { + "web": false + }, + "consolidatedPageCalls": { + "web": true + }, + "trackCategorizedPages": { + "web": false + }, + "trackNamedPages": { + "web": false + }, + "sourceName": { + "web": "AWS" + }, + "crossSubdomainCookie": { + "web": true + }, + "persistence": { + "web": "cookie" + }, + "persistenceType": { + "web": "cookie" + }, + "persistenceName": { + "web": "cookie" + }, + "secureCookie": { + "web": true + }, + "superProperties": { + "web": [ + { + "property": "super001" + } + ] + }, + "peopleProperties": { + "web": [ + { + "property": "maidenName" + } + ] + }, + "eventIncrements": { + "web": [ + { + "property": "triggerName" + } + ] + }, "propIncrements": [ { "property": "extraProps" @@ -41,7 +69,7 @@ } ], "useNativeSDK": { - "android": false + "web": true }, "blacklistedEvents": [ { @@ -81,20 +109,38 @@ "config": { "token": "2de18c6hf6v45201ab43d2344b0c128x", "dataResidency": "us", - "people": false, - "setAllTraitsByDefault": false, - "consolidatedPageCalls": true, - "trackCategorizedPages": false, - "trackNamedPages": false, - "crossSubdomainCookie": false, - "persistence": "localStorage", - "secureCookie": false, + "people": { + "web": false + }, + "setAllTraitsByDefault": { + "web": false + }, + "consolidatedPageCalls": { + "web": false + }, + "trackCategorizedPages": { + "web": false + }, + "trackNamedPages": { + "web": false + }, + "crossSubdomainCookie": { + "web": false + }, + "persistence": { + "web": "localStorage" + }, + "secureCookie": { + "web": false + }, "eventFilteringOption": "disable", "useNativeSDK": { "web": false }, "strictMode": false, - "ignoreDnt": true, + "ignoreDnt": { + "web": true + }, "oneTrustCookieCategories": [ { "oneTrustCookieCategory": "Marketing" @@ -107,11 +153,21 @@ "config": { "token": "2de18c6hf6v45201ab43d2344b0c128x", "dataResidency": "us", - "people": true, - "trackNamedPages": false, - "crossSubdomainCookie": false, - "persistence": "localStorage", - "secureCookie": false, + "people": { + "web": true + }, + "trackNamedPages": { + "web": false + }, + "crossSubdomainCookie": { + "web": false + }, + "persistence": { + "web": "localStorage" + }, + "secureCookie": { + "web": false + }, "eventFilteringOption": "disable", "useNativeSDK": { "web": false @@ -128,37 +184,51 @@ "config": { "token": "2de18c6hf6v45201ab43d2344b0c128x", "dataResidency": "us", - "people": false, - "setAllTraitsByDefault": false, - "consolidatedPageCalls": false, - "trackCategorizedPages": false, + "people": { + "web": false + }, + "setAllTraitsByDefault": { + "web": false + }, + "consolidatedPageCalls": { + "web": false + }, + "trackCategorizedPages": { + "web": false + }, "trackNamedPages": { - "name": true + "web": 123 + }, + "crossSubdomainCookie": { + "web": false + }, + "persistence": { + "web": "localStorage" + }, + "secureCookie": { + "web": false }, - "crossSubdomainCookie": false, - "persistence": "localStorage", - "secureCookie": false, "eventFilteringOption": "disable", "useNativeSDK": { "web": false } }, "result": false, - "err": ["trackNamedPages must be boolean"] + "err": ["trackNamedPages.web must be boolean"] }, { "config": { "token": "2de18c6hf6v45201ab43d2344b0c128x", "dataResidency": "us", - "people": false, - "setAllTraitsByDefault": false, - "consolidatedPageCalls": false, - "trackCategorizedPages": false, - "trackNamedPages": false, - "sourceName": "qflkmnzhahdgfhdhfe9he9wfhwe9fhweqdwgygqdwiqflkmnzhahdgfhdhfe9he9wfhwe9fhweqdwgygqdwiqflkmnzhahdgfhdhfe9he9wfhwe9fhweqdwgygqdwi", - "crossSubdomainCookie": false, - "persistence": "localStorage", - "secureCookie": false, + "sourceName": { + "web": "qflkmnzhahdgfhdhfe9he9wfhwe9fhweqdwgygqdwiqflkmnzhahdgfhdhfe9he9wfhwe9fhweqdwgygqdwiqflkmnzhahdgfhdhfe9he9wfhwe9fhweqdwgygqdwi" + }, + "persistence": { + "web": "localStorage" + }, + "secureCookie": { + "web": false + }, "eventFilteringOption": "disable", "useNativeSDK": { "web": false @@ -166,7 +236,7 @@ }, "result": false, "err": [ - "sourceName must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"" + "sourceName.web must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"" ] }, { @@ -188,26 +258,21 @@ "config": { "token": "2de18c6hf6v45201ab43d2344b0c128x", "dataResidency": "us", - "people": false, - "setAllTraitsByDefault": false, - "consolidatedPageCalls": false, - "trackCategorizedPages": false, - "trackNamedPages": true, - "crossSubdomainCookie": false, - "persistence": "none", - "persistenceType": "abc", - "persistenceName": "", - "secureCookie": false, + "persistenceType": { + "web": "abc" + }, "eventFilteringOption": "disable", - "ignoreDnt": "true", + "ignoreDnt": { + "web": "true" + }, "useNativeSDK": { "web": false } }, "result": false, "err": [ - "ignoreDnt must be boolean", - "persistenceType must be equal to one of the allowed values" + "ignoreDnt.web must be boolean", + "persistenceType.web must be equal to one of the allowed values" ] } ] From 968310a5f72e8480e2e38106b0be8e7b98e531d6 Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Fri, 10 Nov 2023 09:33:42 +0530 Subject: [PATCH 05/21] feat: marketo: migrate to new UI layout (#1044) Co-authored-by: Ujjwal Abhishek <63387036+ujjwal-ab@users.noreply.github.com> --- .../destinations/marketo/db-config.json | 119 +++++- .../destinations/marketo/schema.json | 98 ++++- .../destinations/marketo/ui-config.json | 370 ++++++++++++------ .../data/validation/destinations/marketo.json | 121 ++++++ 4 files changed, 558 insertions(+), 150 deletions(-) create mode 100644 test/data/validation/destinations/marketo.json diff --git a/src/configurations/destinations/marketo/db-config.json b/src/configurations/destinations/marketo/db-config.json index 2f41a3333..158d2d313 100644 --- a/src/configurations/destinations/marketo/db-config.json +++ b/src/configurations/destinations/marketo/db-config.json @@ -7,7 +7,9 @@ "transformAt": "router", "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": [ + "oneTrustCookieCategories" + ], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -22,7 +24,41 @@ "cordova", "shopify" ], - "supportedMessageTypes": ["identify", "track"], + "supportedConnectionModes": { + "web": [ + "cloud" + ], + "android": [ + "cloud" + ], + "ios": [ + "cloud" + ], + "unity": [ + "cloud" + ], + "amp": [ + "cloud" + ], + "reactnative": [ + "cloud" + ], + "flutter": [ + "cloud" + ], + "cordova": [ + "cloud" + ], + "shopify": [ + "cloud" + ] + }, + "supportedMessageTypes": { + "cloud": [ + "identify", + "track" + ] + }, "destConfig": { "defaultConfig": [ "accountId", @@ -30,38 +66,81 @@ "clientSecret", "trackAnonymousEvents", "createIfNotExist", - "customActivityEventMap", + "rudderEventsMapping", "customActivityPropertyMap", - "customActivityPrimaryKeyMap", "leadTraitMapping", "oneTrustCookieCategories" ] }, - "secretKeys": ["clientSecret"] + "secretKeys": [ + "clientSecret" + ] }, "responseRules": { "responseType": "JSON", "rules": { "retryable": [ - { "success": "false", "errors.0.code": 600 }, - { "success": "false", "errors.0.code": 601 }, - { "success": "false", "errors.0.code": 602 }, - { "success": "false", "errors.0.code": 604 }, - { "success": "false", "errors.0.code": 611 } + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 611 + } ], "abortable": [ - { "success": "false", "errors.0.code": 603 }, - { "success": "false", "errors.0.code": 605 }, - { "success": "false", "errors.0.code": 609 }, - { "success": "false", "errors.0.code": 610 } + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } ], "throttled": [ - { "success": "false", "errors.0.code": 502 }, - { "success": "false", "errors.0.code": 606 }, - { "success": "false", "errors.0.code": 607 }, - { "success": "false", "errors.0.code": 608 }, - { "success": "false", "errors.0.code": 615 } + { + "success": "false", + "errors.0.code": 502 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 615 + } ] } } -} +} \ No newline at end of file diff --git a/src/configurations/destinations/marketo/schema.json b/src/configurations/destinations/marketo/schema.json index fddffa4cc..b8bc4e603 100644 --- a/src/configurations/destinations/marketo/schema.json +++ b/src/configurations/destinations/marketo/schema.json @@ -1,3 +1,97 @@ { - "configSchema": null -} + "configSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "required": [ + "accountId", + "clientId", + "clientSecret" + ], + "type": "object", + "properties": { + "accountId": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + }, + "clientId": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + }, + "clientSecret": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + }, + "trackAnonymousEvents": { + "type": "boolean", + "default": false + }, + "createIfNotExist": { + "type": "boolean", + "default": true + }, + "leadTraitMapping": { + "type": "array", + "items": { + "type": "object", + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + } + } + } + }, + "customActivityPropertyMap": { + "type": "array", + "items": { + "type": "object", + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + } + } + } + }, + "rudderEventsMapping": { + "type": "array", + "items": { + "type": "object", + "properties": { + "event": { + "type": "string" + }, + "marketoPrimarykey": { + "type": "string" + }, + "marketoActivityId": { + "type": "string" + } + } + } + }, + "oneTrustCookieCategories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "useNativeSDK": { + "type": "boolean" + }, + "connectionMode": { + "type": "object", + "properties": {} + } + } + } +} \ No newline at end of file diff --git a/src/configurations/destinations/marketo/ui-config.json b/src/configurations/destinations/marketo/ui-config.json index f7bf47d10..c588fae0c 100644 --- a/src/configurations/destinations/marketo/ui-config.json +++ b/src/configurations/destinations/marketo/ui-config.json @@ -1,131 +1,245 @@ { - "uiConfig": [ - { - "title": "Connection Settings", - "fields": [ - { - "type": "textInput", - "label": "Munchkin Account Id", - "value": "accountId", - "regex": "^(.{0,100})$", - "regexErrorMessage": "Invalid Munchkin Account Id", - "required": true, - "footerNote": "Your Marketo Accound ID from Admin settings section", - "placeholder": "e.g: 585-AXP-446" - }, - { - "type": "textInput", - "label": "Client ID", - "value": "clientId", - "regex": "^(.{0,100})$", - "regexErrorMessage": "Invalid Client ID", - "required": true, - "placeholder": "e.g: 53b1934e-51dd-4599-b24b-92612c71515f", - "footerNote": "Your REST API Client ID" - }, - { - "type": "textInput", - "label": "Client Secret", - "value": "clientSecret", - "regex": "^(.{0,100})$", - "regexErrorMessage": "Invalid Client Secret", - "required": true, - "placeholder": "e.g: oxzXtNhcuw9YGsdhplKUeEMi8765dsfw", - "secret": true, - "footerNote": "Your REST API Client Secret" - } - ] + "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": "Munchkin Account Id", + "configKey": "accountId", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid Munchkin Account Id", + "note": "Your Marketo Accound ID from Admin settings section", + "placeholder": "e.g: 585-AXP-446" + }, + { + "type": "textInput", + "label": "Client ID", + "configKey": "clientId", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid Client ID", + "placeholder": "e.g: 53b1934e-51dd-4599-b24b-92612c71515f", + "note": "Your REST API Client ID" + }, + { + "type": "textInput", + "label": "Client Secret", + "configKey": "clientSecret", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid Client Secret", + "placeholder": "e.g: oxzXtNhcuw9YGsdhplKUeEMi8765dsfw", + "secret": true, + "note": "Your REST API Client Secret" + } + ] + } + ] + }, + { + "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 RudderStack features here", + "icon": "otherSettings", + "groups": [ + { + "title": "Custom Activity Settings", + "note": "Configure your Custom Activity Settings", + "fields": [ + { + "type": "checkbox", + "label": "Track anonymous events", + "configKey": "trackAnonymousEvents", + "default": false, + "note": "If turned on, you need to send userId with every track call" + }, + { + "type": "checkbox", + "label": "Create Lead if it does not exist", + "configKey": "createIfNotExist", + "default": true, + "note": "If turned on, we will create a new lead if the user is not present" + } + ] + }, + { + "title": "OneTrust cookie consent settings", + "note": [ + "Enter your OneTrust category names if you have them configured. ", + { + "text": "Learn more ", + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/onetrust-consent-manager/" + }, + "about RudderStack’s OneTrust Consent Manager feature." + ], + "fields": [ + { + "type": "tagInput", + "label": "Cookie category name", + "note": "Input your OneTrust category names by pressing ‘Enter’ after each entry", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: Credit card visit", + "default": [ + { + "oneTrustCookieCategory": "" + } + ] + } + ] + } + ] + } + ] + }, + { + "title": "Mappings", + "hideEditIcon": true, + "sections": [ + { + "groups": [ + { + "title": "Rudderstack to Marketo Event Mappings", + "fields": [ + { + "type": "redirect", + "redirectGroupKey": "eventMapping", + "label": "Event and property mappings" + } + ] + } + ] + } + ] + } + ], + "sdkTemplate": { + "title": "SDK settings", + "note": "empty", + "fields": [] }, - { - "title": "Custom Activity Settings", - "fields": [ - { - "type": "checkbox", - "label": "Track anonymous events", - "value": "trackAnonymousEvents", - "default": false, - "footerNote": "If turned on, you need to send userId with every track call" - }, - { - "type": "checkbox", - "label": "Create Lead if it does not exist", - "value": "createIfNotExist", - "default": true, - "footerNote": "If turned on, we will create a new lead if the user is not present" - }, - { - "type": "dynamicForm", - "label": "Map events to Marketo Activity ID", - "labelLeft": "Event Name", - "labelRight": "Activity ID", - "keyLeft": "from", - "keyRight": "to", - "placeholderLeft": "e.g: Product Clicked", - "placeholderRight": "e.g: 100001", - "value": "customActivityEventMap", - "footerNote": "You can find the Activity ID in your Admin section under Custom Activity on your Marketo dashboard. Make sure event name has both Activity ID and Primary Key mapped." - }, - { - "type": "dynamicForm", - "label": "Map event name to Marketo Primary Key", - "labelLeft": "Event Name", - "labelRight": "Marketo Primary Key", - "keyLeft": "from", - "keyRight": "to", - "placeholderLeft": "e.g: Product Clicked", - "placeholderRight": "e.g: name", - "value": "customActivityPrimaryKeyMap", - "footerNote": "Map your event name to the desired primary key field. Make sure event name has both Activity ID and Primary Key mapped." - }, - { - "type": "dynamicForm", - "label": "Map your event properties to Marketo custom activity's field", - "labelLeft": "Event Property", - "labelRight": "Marketo Custom Activity field", - "keyLeft": "from", - "keyRight": "to", - "placeholderLeft": "e.g: name", - "placeholderRight": "e.g: productName", - "value": "customActivityPropertyMap", - "footerNote": "The value passed in Event Property name here will be sent in the corresponding mapped field." - } - ] - }, - { - "title": "Lead Mapping", - "fields": [ - { - "type": "dynamicForm", - "label": "Map your traits to Marketo custom fields", - "labelLeft": "Traits name", - "labelRight": "Custom field api name", - "keyLeft": "from", - "keyRight": "to", - "placeholderLeft": "e.g: leadScore", - "placeholderRight": "e.g: customLeadScore", - "value": "leadTraitMapping", - "footerNote": "Map your user traits to your desired custom field's api name." - } - ] - }, - { - "title": "Consent Settings", - "fields": [ - { - "type": "dynamicCustomForm", - "value": "oneTrustCookieCategories", - "label": "OneTrust Cookie Categories", - "customFields": [ - { - "type": "textInput", - "placeholder": "Marketing", - "value": "oneTrustCookieCategory", - "label": "Category Name/ID", - "required": false - } - ] - } - ] + "redirectGroups": { + "eventMapping": { + "tabs": [ + { + "name": "Custom events", + "note": "Map RudderStack events/properties to Marketo custom Activity ID/Primary Key", + "fields": [ + { + "type": "mapping", + "label": "Map events to Marketo Activity ID and Primary Key", + "note": [ + "You can find the Activity ID in your Admin section under Custom Activity on your Marketo dashboard", + "Map your event name to the desired primary key field." + ], + "configKey": "rudderEventsMapping", + "default": [], + "columns": [ + { + "type": "textInput", + "key": "event", + "label": "RudderStack Event Name", + "placeholder": "e.g: Product Searched" + }, + { + "type": "textInput", + "key": "marketoPrimarykey", + "label": "Marketo Primary Key", + "placeholder": "e.g: name" + }, + { + "type": "textInput", + "key": "marketoActivityId", + "label": "Activity ID", + "placeholder": "e.g: 100001" + } + ] + } + ] + }, + { + "name": "Lead trait Mapping", + "fields": [ + { + "type": "mapping", + "label": "Map your traits to Marketo custom fields", + "note": "Map your user traits to your desired custom field's api name.", + "configKey": "leadTraitMapping", + "default": [], + "columns": [ + { + "type": "textInput", + "key": "from", + "label": "Traits name", + "placeholder": "e.g: leadScore" + }, + { + "type": "textInput", + "key": "to", + "label": "Custom field api name", + "placeholder": "e.g: customLeadScore" + } + ] + } + ] + }, + { + "name": "Custom Activity Property Map", + "fields": [ + { + "type": "mapping", + "label": "Map your event properties to Marketo custom activity's field", + "note": "The configKey passed in Event Property name here will be sent in the corresponding mapped field.", + "configKey": "customActivityPropertyMap", + "default": [], + "columns": [ + { + "type": "textInput", + "key": "from", + "label": "Event Property", + "placeholder": "e.g: name" + }, + { + "type": "textInput", + "key": "to", + "label": "Marketo Custom Activity field", + "placeholder": "e.g: productName" + } + ] + } + ] + } + ] + } } - ] -} \ No newline at end of file + } +} diff --git a/test/data/validation/destinations/marketo.json b/test/data/validation/destinations/marketo.json new file mode 100644 index 000000000..5bccaa537 --- /dev/null +++ b/test/data/validation/destinations/marketo.json @@ -0,0 +1,121 @@ +[ + { + "config": { + "accountId": "testACCID", + "clientId": "testCLIENTID", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "" + } + ], + "android-connectionMode": "cloud", + "rudderEventsMapping": [ + { + "event": "test Mapping", + "marketoPrimarykey": "name", + "marketoActivityId": "1023" + } + ], + "leadTraitMapping": [ + { + "from": "leadScore", + "to": "customLeadScore" + } + ] + }, + "result": false, + "err": [ + " must have required property 'clientSecret'" + ] + }, + { + "config": { + "accountId": "testACCID", + "clientId": "testCLIENTID", + "clientSecret": "******", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "" + } + ], + "android-connectionMode": "cloud", + "rudderEventsMapping": [ + { + "event": "test Mapping", + "marketoPrimarykey": "name", + "marketoActivityId": "1023" + } + ] + }, + "result": true + }, + { + "config": { + "clientId": "1234", + "clientSecret": "******", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "" + } + ], + "android-connectionMode": "cloud", + "rudderEventsMapping": [ + { + "event": "test Mapping", + "marketoPrimarykey": "name", + "marketoActivityId": "1023" + } + ] + }, + "result": false, + "err": [ + " must have required property 'accountId'" + ] + }, + { + "config": { + "accountId": "testACCID", + "clientId": "testCLIENTID", + "clientSecret": "******", + "trackAnonymousEvents": true, + "createIfNotExist": false, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "" + } + ], + "android-connectionMode": "cloud" + }, + "result": true + }, + { + "config": { + "accountId": "testACCID", + "clientId": "testCLIENTID", + "clientSecret": "******", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "" + } + ], + "leadTraitMapping": [], + "android-connectionMode": "cloud", + "rudderEventsMapping": [], + "customActivityPropertyMap": [ + { + "from": "name", + "to": "pagename" + } + ] + }, + "result": true + } +] \ No newline at end of file From f774dfdc371e12bf8545fc17672fa8420667d4f5 Mon Sep 17 00:00:00 2001 From: shrouti1507 <60211312+shrouti1507@users.noreply.github.com> Date: Fri, 10 Nov 2023 10:14:18 +0530 Subject: [PATCH 06/21] feat: onboarding salesforce with oauth (#998) --- .../salesforce_oauth/db-config.json | 45 +++++++++++++++++++ .../salesforce_oauth/metadata.json | 25 +++++++++++ .../destinations/salesforce_oauth/schema.json | 24 ++++++++++ .../salesforce_oauth/ui-config.json | 43 ++++++++++++++++++ .../destinations/salesforce_oauth.json | 35 +++++++++++++++ 5 files changed, 172 insertions(+) create mode 100644 src/configurations/destinations/salesforce_oauth/db-config.json create mode 100644 src/configurations/destinations/salesforce_oauth/metadata.json create mode 100644 src/configurations/destinations/salesforce_oauth/schema.json create mode 100644 src/configurations/destinations/salesforce_oauth/ui-config.json create mode 100644 test/data/validation/destinations/salesforce_oauth.json diff --git a/src/configurations/destinations/salesforce_oauth/db-config.json b/src/configurations/destinations/salesforce_oauth/db-config.json new file mode 100644 index 000000000..0e7115bb1 --- /dev/null +++ b/src/configurations/destinations/salesforce_oauth/db-config.json @@ -0,0 +1,45 @@ +{ + "name": "SALESFORCE_OAUTH", + "displayName": "Salesforce V2", + "config": { + "isAudienceSupported": true, + "supportsVisualMapper": true, + "auth": { + "type": "OAuth", + "role": "salesforce", + "rudderScopes": [ + "delivery" + ] + }, + "transformAt": "router", + "transformAtV1": "router", + "saveDestinationResponse": true, + "includeKeys": ["oneTrustCookieCategories"], + "excludeKeys": [], + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "warehouse", + "reactnative", + "flutter", + "cordova", + "shopify" + ], + "supportedMessageTypes": ["identify"], + "destConfig": { + "defaultConfig": [ + "rudderAccountId", + "mapProperties", + "sandbox", + "useContactId", + "oneTrustCookieCategories" + ] + }, + "secretKeys": [] + }, + "options": { "hidden": true } +} diff --git a/src/configurations/destinations/salesforce_oauth/metadata.json b/src/configurations/destinations/salesforce_oauth/metadata.json new file mode 100644 index 000000000..59c4d726b --- /dev/null +++ b/src/configurations/destinations/salesforce_oauth/metadata.json @@ -0,0 +1,25 @@ +{ + "metadata": { + "primaryCategory": "", + "secondaryCategory": [], + "docLink": "", + "logoPath": "", + "connectionMode": { + "cloud-mode": true, + "device-mode": ["web", "android"] + }, + "supportedMethods": { + "cloud-mode": ["track", "identify"], + "device-mode": { + "web": ["track", "identify"] + } + }, + "releaseStatus": "beta", + "sourceCode": { + "android": { + "github": "", + "version": "v1.0.0" + } + } + } +} diff --git a/src/configurations/destinations/salesforce_oauth/schema.json b/src/configurations/destinations/salesforce_oauth/schema.json new file mode 100644 index 000000000..2383092fc --- /dev/null +++ b/src/configurations/destinations/salesforce_oauth/schema.json @@ -0,0 +1,24 @@ +{ + "configSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "required": [], + "type": "object", + "properties": { + "mapProperties": { "type": "boolean", "default": true }, + "sandbox": { "type": "boolean", "default": false }, + "useContactId": { "type": "boolean", "default": false }, + "oneTrustCookieCategories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + } + } +} diff --git a/src/configurations/destinations/salesforce_oauth/ui-config.json b/src/configurations/destinations/salesforce_oauth/ui-config.json new file mode 100644 index 000000000..8c7f52dcc --- /dev/null +++ b/src/configurations/destinations/salesforce_oauth/ui-config.json @@ -0,0 +1,43 @@ +{ + "uiConfig": [ + { + "title": "Other Settings", + "fields": [ + { + "type": "checkbox", + "label": "Map Rudder Properties to Salesforce Properties", + "value": "mapProperties", + "default": true + }, + { "type": "checkbox", "label": "Sandbox mode", "value": "sandbox", "default": false }, + { + "type": "checkbox", + "label": "Use contactId for converted leads", + "value": "useContactId", + "default": false, + "footerNote": "It is suggested to enable this option when both lead and contact field mappings are same." + } + ] + }, + { + "title": "Consent Settings", + "fields": [ + { + "type": "dynamicCustomForm", + "value": "oneTrustCookieCategories", + "label": "OneTrust Cookie Categories", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "oneTrustCookieCategory", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "label": "Category Name/ID", + "required": false + } + ] + } + ] + } + ] +} diff --git a/test/data/validation/destinations/salesforce_oauth.json b/test/data/validation/destinations/salesforce_oauth.json new file mode 100644 index 000000000..df31fa005 --- /dev/null +++ b/test/data/validation/destinations/salesforce_oauth.json @@ -0,0 +1,35 @@ +[ + { + "config": { + "mapProperties": true, + "sandbox": false, + "useContactId": true + }, + "result": true + }, + { + "config": { + "mapProperties": true, + "sandbox": false, + "useContactId": true + }, + "result": true + }, + { + "config": { + "mapProperties": true, + "sandbox": false, + "useContactId": true + }, + "result": true + }, + { + "config": { + "mapProperties": true, + "sandbox": "random", + "useContactId": true + }, + "result": false, + "err": ["sandbox must be boolean"] + } +] From 62f089d4741c4b7d7d398412affcd17b886fd35f Mon Sep 17 00:00:00 2001 From: Mihir Bhalala <77438541+mihir-4116@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:23:08 +0530 Subject: [PATCH 07/21] feat(INT-901): onboard sprig destination (#1052) --- .../destinations/sprig/db-config.json | 28 +++ .../destinations/sprig/metadata.json | 22 +++ .../destinations/sprig/schema.json | 66 +++++++ .../destinations/sprig/ui-config.json | 175 ++++++++++++++++++ test/data/validation/destinations/sprig.json | 75 ++++++++ 5 files changed, 366 insertions(+) create mode 100644 src/configurations/destinations/sprig/db-config.json create mode 100644 src/configurations/destinations/sprig/metadata.json create mode 100644 src/configurations/destinations/sprig/schema.json create mode 100644 src/configurations/destinations/sprig/ui-config.json create mode 100644 test/data/validation/destinations/sprig.json diff --git a/src/configurations/destinations/sprig/db-config.json b/src/configurations/destinations/sprig/db-config.json new file mode 100644 index 000000000..02bbc65cf --- /dev/null +++ b/src/configurations/destinations/sprig/db-config.json @@ -0,0 +1,28 @@ +{ + "name": "SPRIG", + "displayName": "Sprig", + "config": { + "transformAt": "processor", + "transformAtV1": "processor", + "saveDestinationResponse": false, + "includeKeys": ["apiKey", "whitelistedEvents", "blacklistedEvents", "oneTrustCookieCategories"], + "excludeKeys": [], + "supportedConnectionModes": { + "web": ["device"] + }, + "supportedSourceTypes": ["web"], + "destConfig": { + "defaultConfig": [ + "apiKey", + "whitelistedEvents", + "blacklistedEvents", + "oneTrustCookieCategories" + ], + "web": [ + "useNativeSDK", + "connectionMode" + ] + }, + "secretKeys": ["apiKey"] + } +} diff --git a/src/configurations/destinations/sprig/metadata.json b/src/configurations/destinations/sprig/metadata.json new file mode 100644 index 000000000..e475ab5b6 --- /dev/null +++ b/src/configurations/destinations/sprig/metadata.json @@ -0,0 +1,22 @@ +{ + "metadata": { + "primaryCategory": "", + "secondaryCategory": [], + "docLink": "", + "logoPath": "", + "connectionMode": { + "device-mode": ["web"] + }, + "supportedMethods": { + "device-mode": { + "web": ["track", "identify"] + } + }, + "sourceCode": { + "android": { + "github": "", + "version": "v1.0.0" + } + } + } +} diff --git a/src/configurations/destinations/sprig/schema.json b/src/configurations/destinations/sprig/schema.json new file mode 100644 index 000000000..be16fd9f8 --- /dev/null +++ b/src/configurations/destinations/sprig/schema.json @@ -0,0 +1,66 @@ +{ + "configSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "required": ["apiKey"], + "type": "object", + "properties": { + "apiKey": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + }, + "useNativeSDK": { + "type": "object", + "properties": { + "web": { + "type": "boolean" + } + } + }, + "connectionMode": { + "type": "object", + "properties": { + "web": { + "type": "string", + "enum": ["device"] + } + } + }, + "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/sprig/ui-config.json b/src/configurations/destinations/sprig/ui-config.json new file mode 100644 index 000000000..9d3277535 --- /dev/null +++ b/src/configurations/destinations/sprig/ui-config.json @@ -0,0 +1,175 @@ +{ + "uiConfig": { + "baseTemplate": [ + { + "title": "Initial setup", + "note": "Review how this destination is set up", + "sections": [ + { + "groups": [ + { + "title": "One click checkout", + "note": "Update your connection settings here", + "icon": "settings", + "fields": [ + { + "type": "textInput", + "label": "API Key", + "note": "Enter your sprig api key. Find this under your sprig dashboard > integrations > installation > javascript", + "configKey": "apiKey", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid API Key", + "placeholder": "e.g: EKfGdrD2IbPr", + "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": [ + { + "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" + } + ] + } + } + ] + }, + { + "title": "OneTrust cookie consent settings", + "note": [ + "Enter your OneTrust category names if you have them configured. ", + { + "text": "Learn more ", + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/onetrust-consent-manager/" + }, + "about RudderStack’s OneTrust Consent Manager feature." + ], + "fields": [ + { + "type": "tagInput", + "label": "Cookie category name", + "note": "Input your OneTrust category names by pressing ‘Enter’ after each entry", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: Marketing", + "default": [ + { + "oneTrustCookieCategory": "" + } + ] + } + ] + } + ] + } + ] + } + ], + "sdkTemplate": { + "title": "Web SDK settings", + "note": "not visible in the ui", + "fields": [] + } + } +} diff --git a/test/data/validation/destinations/sprig.json b/test/data/validation/destinations/sprig.json new file mode 100644 index 000000000..350601279 --- /dev/null +++ b/test/data/validation/destinations/sprig.json @@ -0,0 +1,75 @@ +[ + { + "config": { + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "useNativeSDK": { + "web": true + }, + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "Marketing" + } + ] + }, + "result": false, + "err": [" must have required property 'apiKey'"] + }, + { + "config": { + "apiKey": "", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "useNativeSDK": { + "web": true + }, + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "Marketing" + } + ] + }, + "result": false, + "err": ["apiKey must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\""] + }, + { + "config": { + "apiKey": "12345", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "useNativeSDK": { + "web": true + }, + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "Marketing" + } + ] + }, + "result": true + } +] From 688aa0b67f2c70da37915407bdc7fc6f18281ebb Mon Sep 17 00:00:00 2001 From: Ujjwal Abhishek <63387036+ujjwal-ab@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:23:21 +0530 Subject: [PATCH 08/21] fix: schema generator script for updating tagInput fiel schema (#1066) --- scripts/schemaGenerator.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/schemaGenerator.py b/scripts/schemaGenerator.py index 747ca7d0d..0edc0637d 100644 --- a/scripts/schemaGenerator.py +++ b/scripts/schemaGenerator.py @@ -415,6 +415,15 @@ def generate_schema_for_tag_input(field, dbConfig, schema_field_name): } tagItem['properties'] = tagItemProps tagObject["items"] = tagItem + isSourceDependent = is_dest_field_dependent_on_source(field, dbConfig, schema_field_name) + if isSourceDependent: + tagObjectCopy = tagObject + tagObject = {} + tagObject = {"type": FieldTypeEnum.OBJECT.value} + tagObject["properties"] = {} + for sourceType in dbConfig["supportedSourceTypes"]: + if sourceType in dbConfig["destConfig"] and field[schema_field_name] in dbConfig["destConfig"][sourceType]: + tagObject["properties"][sourceType] = tagObjectCopy return tagObject From 8e0cf6a362b4dae4e3361a8a0789a34c35f0fa28 Mon Sep 17 00:00:00 2001 From: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:35:25 +0530 Subject: [PATCH 09/21] fix: eventFiltering options key and schema (#1064) --- .../destinations/mp/schema.json | 37 +++++++------------ .../destinations/mp/ui-config.json | 6 +-- 2 files changed, 16 insertions(+), 27 deletions(-) diff --git a/src/configurations/destinations/mp/schema.json b/src/configurations/destinations/mp/schema.json index 363a1ec6e..bb755ca2f 100644 --- a/src/configurations/destinations/mp/schema.json +++ b/src/configurations/destinations/mp/schema.json @@ -1,7 +1,7 @@ { "configSchema": { "$schema": "http://json-schema.org/draft-07/schema#", - "required": ["token"], + "required": ["token", "dataResidency", "identityMergeApi"], "type": "object", "properties": { "token": { @@ -39,22 +39,19 @@ "type": "object", "properties": { "web": { - "type": "boolean", - "default": false + "type": "boolean" } } }, "userDeletionApi": { "type": "string", - "enum": ["engage", "task"], - "default": "engage" + "enum": ["engage", "task"] }, "people": { "type": "object", "properties": { "web": { - "type": "boolean", - "default": false + "type": "boolean" } } }, @@ -62,8 +59,7 @@ "type": "object", "properties": { "web": { - "type": "boolean", - "default": false + "type": "boolean" } } }, @@ -134,8 +130,7 @@ "type": "object", "properties": { "web": { - "type": "boolean", - "default": true + "type": "boolean" } } }, @@ -143,8 +138,7 @@ "type": "object", "properties": { "web": { - "type": "boolean", - "default": false + "type": "boolean" } } }, @@ -152,8 +146,7 @@ "type": "object", "properties": { "web": { - "type": "boolean", - "default": false + "type": "boolean" } } }, @@ -170,8 +163,7 @@ "type": "object", "properties": { "web": { - "type": "boolean", - "default": false + "type": "boolean" } } }, @@ -180,8 +172,7 @@ "properties": { "web": { "type": "string", - "enum": ["none", "cookie", "localStorage"], - "default": "none" + "enum": ["none", "cookie", "localStorage"] } } }, @@ -208,8 +199,7 @@ "type": "object", "properties": { "web": { - "type": "boolean", - "default": false + "type": "boolean" } } }, @@ -239,8 +229,7 @@ }, "eventFilteringOption": { "type": "string", - "enum": ["disable", "whitelistedEvents", "blacklistedEvents"], - "default": "disable" + "enum": ["disable", "whitelistedEvents", "blacklistedEvents"] }, "whitelistedEvents": { "type": "array", @@ -285,7 +274,7 @@ "properties": { "purpose": { "type": "string", - "pattern": "^(.{0,100})$" + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" } } } diff --git a/src/configurations/destinations/mp/ui-config.json b/src/configurations/destinations/mp/ui-config.json index ab2b2d453..9dfe09c9d 100644 --- a/src/configurations/destinations/mp/ui-config.json +++ b/src/configurations/destinations/mp/ui-config.json @@ -344,15 +344,15 @@ "options": [ { "label": "Disabled", - "configKey": "disable" + "value": "disable" }, { "label": "Filter via allowlist", - "configKey": "whitelistedEvents" + "value": "whitelistedEvents" }, { "label": "Filter via denylist", - "configKey": "blacklistedEvents" + "value": "blacklistedEvents" } ], "default": "disable" From 7cf7385d0e019a8844dd10d006f841adb4aae062 Mon Sep 17 00:00:00 2001 From: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:59:59 +0530 Subject: [PATCH 10/21] feat(analytics-js-integrations): add in-app message in customerIo (#1017) --- .../destinations/customerio/db-config.json | 5 +-- .../destinations/customerio/schema.json | 32 +++++++++++++++++-- .../destinations/customerio/ui-config.json | 7 ++++ 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/src/configurations/destinations/customerio/db-config.json b/src/configurations/destinations/customerio/db-config.json index 960e26acf..15abb5c18 100644 --- a/src/configurations/destinations/customerio/db-config.json +++ b/src/configurations/destinations/customerio/db-config.json @@ -16,7 +16,8 @@ "oneTrustCookieCategories", "ketchConsentPurposes", "eventFilteringOption", - "sendPageNameInSDK" + "sendPageNameInSDK", + "dataUseInApp" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -45,7 +46,7 @@ "oneTrustCookieCategories", "ketchConsentPurposes" ], - "web": ["useNativeSDK", "sendPageNameInSDK"] + "web": ["dataUseInApp", "useNativeSDK", "sendPageNameInSDK"] }, "secretKeys": [] } diff --git a/src/configurations/destinations/customerio/schema.json b/src/configurations/destinations/customerio/schema.json index 839fa3911..29aced2da 100644 --- a/src/configurations/destinations/customerio/schema.json +++ b/src/configurations/destinations/customerio/schema.json @@ -16,9 +16,35 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, - "datacenter": { "type": "string", "enum": ["US", "EU"], "default": "US" }, - "sendPageNameInSDK": { "type": "object", "properties": { "web": { "type": "boolean" } } }, - "useNativeSDK": { "type": "object", "properties": { "web": { "type": "boolean" } } }, + "datacenter": { + "type": "string", + "enum": ["US", "EU"], + "default": "US" + }, + "sendPageNameInSDK": { + "type": "object", + "properties": { + "web": { + "type": "boolean" + } + } + }, + "useNativeSDK": { + "type": "object", + "properties": { + "web": { + "type": "boolean" + } + } + }, + "dataUseInApp": { + "type": "object", + "properties": { + "web": { + "type": "boolean" + } + } + }, "eventFilteringOption": { "type": "string", "enum": ["disable", "whitelistedEvents", "blacklistedEvents"], diff --git a/src/configurations/destinations/customerio/ui-config.json b/src/configurations/destinations/customerio/ui-config.json index dcee63644..47fd7f997 100644 --- a/src/configurations/destinations/customerio/ui-config.json +++ b/src/configurations/destinations/customerio/ui-config.json @@ -68,6 +68,13 @@ "label": "Use device-mode to send events", "value": "useNativeSDK", "default": false + }, + { + "type": "checkbox", + "label": "Enable in-app message support", + "value": "dataUseInApp", + "default": false, + "footerNote": "Turn it ON if you want to send in-app messages to your website." } ] }, From d55dd543972cdfeb74c01f0e0d7595a17d0f275c Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Fri, 10 Nov 2023 15:03:21 +0530 Subject: [PATCH 11/21] Revert "feat: marketo: migrate to new UI layout" (#1067) --- .../destinations/marketo/db-config.json | 119 +----- .../destinations/marketo/schema.json | 98 +---- .../destinations/marketo/ui-config.json | 370 ++++++------------ .../data/validation/destinations/marketo.json | 121 ------ 4 files changed, 150 insertions(+), 558 deletions(-) delete mode 100644 test/data/validation/destinations/marketo.json diff --git a/src/configurations/destinations/marketo/db-config.json b/src/configurations/destinations/marketo/db-config.json index 158d2d313..2f41a3333 100644 --- a/src/configurations/destinations/marketo/db-config.json +++ b/src/configurations/destinations/marketo/db-config.json @@ -7,9 +7,7 @@ "transformAt": "router", "transformAtV1": "router", "saveDestinationResponse": true, - "includeKeys": [ - "oneTrustCookieCategories" - ], + "includeKeys": ["oneTrustCookieCategories"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -24,41 +22,7 @@ "cordova", "shopify" ], - "supportedConnectionModes": { - "web": [ - "cloud" - ], - "android": [ - "cloud" - ], - "ios": [ - "cloud" - ], - "unity": [ - "cloud" - ], - "amp": [ - "cloud" - ], - "reactnative": [ - "cloud" - ], - "flutter": [ - "cloud" - ], - "cordova": [ - "cloud" - ], - "shopify": [ - "cloud" - ] - }, - "supportedMessageTypes": { - "cloud": [ - "identify", - "track" - ] - }, + "supportedMessageTypes": ["identify", "track"], "destConfig": { "defaultConfig": [ "accountId", @@ -66,81 +30,38 @@ "clientSecret", "trackAnonymousEvents", "createIfNotExist", - "rudderEventsMapping", + "customActivityEventMap", "customActivityPropertyMap", + "customActivityPrimaryKeyMap", "leadTraitMapping", "oneTrustCookieCategories" ] }, - "secretKeys": [ - "clientSecret" - ] + "secretKeys": ["clientSecret"] }, "responseRules": { "responseType": "JSON", "rules": { "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 611 - } + { "success": "false", "errors.0.code": 600 }, + { "success": "false", "errors.0.code": 601 }, + { "success": "false", "errors.0.code": 602 }, + { "success": "false", "errors.0.code": 604 }, + { "success": "false", "errors.0.code": 611 } ], "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } + { "success": "false", "errors.0.code": 603 }, + { "success": "false", "errors.0.code": 605 }, + { "success": "false", "errors.0.code": 609 }, + { "success": "false", "errors.0.code": 610 } ], "throttled": [ - { - "success": "false", - "errors.0.code": 502 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 615 - } + { "success": "false", "errors.0.code": 502 }, + { "success": "false", "errors.0.code": 606 }, + { "success": "false", "errors.0.code": 607 }, + { "success": "false", "errors.0.code": 608 }, + { "success": "false", "errors.0.code": 615 } ] } } -} \ No newline at end of file +} diff --git a/src/configurations/destinations/marketo/schema.json b/src/configurations/destinations/marketo/schema.json index b8bc4e603..fddffa4cc 100644 --- a/src/configurations/destinations/marketo/schema.json +++ b/src/configurations/destinations/marketo/schema.json @@ -1,97 +1,3 @@ { - "configSchema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "required": [ - "accountId", - "clientId", - "clientSecret" - ], - "type": "object", - "properties": { - "accountId": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" - }, - "clientId": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" - }, - "clientSecret": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" - }, - "trackAnonymousEvents": { - "type": "boolean", - "default": false - }, - "createIfNotExist": { - "type": "boolean", - "default": true - }, - "leadTraitMapping": { - "type": "array", - "items": { - "type": "object", - "properties": { - "from": { - "type": "string" - }, - "to": { - "type": "string" - } - } - } - }, - "customActivityPropertyMap": { - "type": "array", - "items": { - "type": "object", - "properties": { - "from": { - "type": "string" - }, - "to": { - "type": "string" - } - } - } - }, - "rudderEventsMapping": { - "type": "array", - "items": { - "type": "object", - "properties": { - "event": { - "type": "string" - }, - "marketoPrimarykey": { - "type": "string" - }, - "marketoActivityId": { - "type": "string" - } - } - } - }, - "oneTrustCookieCategories": { - "type": "array", - "items": { - "type": "object", - "properties": { - "oneTrustCookieCategory": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" - } - } - } - }, - "useNativeSDK": { - "type": "boolean" - }, - "connectionMode": { - "type": "object", - "properties": {} - } - } - } -} \ No newline at end of file + "configSchema": null +} diff --git a/src/configurations/destinations/marketo/ui-config.json b/src/configurations/destinations/marketo/ui-config.json index c588fae0c..f7bf47d10 100644 --- a/src/configurations/destinations/marketo/ui-config.json +++ b/src/configurations/destinations/marketo/ui-config.json @@ -1,245 +1,131 @@ { - "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": "Munchkin Account Id", - "configKey": "accountId", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", - "regexErrorMessage": "Invalid Munchkin Account Id", - "note": "Your Marketo Accound ID from Admin settings section", - "placeholder": "e.g: 585-AXP-446" - }, - { - "type": "textInput", - "label": "Client ID", - "configKey": "clientId", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", - "regexErrorMessage": "Invalid Client ID", - "placeholder": "e.g: 53b1934e-51dd-4599-b24b-92612c71515f", - "note": "Your REST API Client ID" - }, - { - "type": "textInput", - "label": "Client Secret", - "configKey": "clientSecret", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", - "regexErrorMessage": "Invalid Client Secret", - "placeholder": "e.g: oxzXtNhcuw9YGsdhplKUeEMi8765dsfw", - "secret": true, - "note": "Your REST API Client Secret" - } - ] - } - ] - }, - { - "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 RudderStack features here", - "icon": "otherSettings", - "groups": [ - { - "title": "Custom Activity Settings", - "note": "Configure your Custom Activity Settings", - "fields": [ - { - "type": "checkbox", - "label": "Track anonymous events", - "configKey": "trackAnonymousEvents", - "default": false, - "note": "If turned on, you need to send userId with every track call" - }, - { - "type": "checkbox", - "label": "Create Lead if it does not exist", - "configKey": "createIfNotExist", - "default": true, - "note": "If turned on, we will create a new lead if the user is not present" - } - ] - }, - { - "title": "OneTrust cookie consent settings", - "note": [ - "Enter your OneTrust category names if you have them configured. ", - { - "text": "Learn more ", - "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/onetrust-consent-manager/" - }, - "about RudderStack’s OneTrust Consent Manager feature." - ], - "fields": [ - { - "type": "tagInput", - "label": "Cookie category name", - "note": "Input your OneTrust category names by pressing ‘Enter’ after each entry", - "configKey": "oneTrustCookieCategories", - "tagKey": "oneTrustCookieCategory", - "placeholder": "e.g: Credit card visit", - "default": [ - { - "oneTrustCookieCategory": "" - } - ] - } - ] - } - ] - } - ] - }, - { - "title": "Mappings", - "hideEditIcon": true, - "sections": [ - { - "groups": [ - { - "title": "Rudderstack to Marketo Event Mappings", - "fields": [ - { - "type": "redirect", - "redirectGroupKey": "eventMapping", - "label": "Event and property mappings" - } - ] - } - ] - } - ] - } - ], - "sdkTemplate": { - "title": "SDK settings", - "note": "empty", - "fields": [] + "uiConfig": [ + { + "title": "Connection Settings", + "fields": [ + { + "type": "textInput", + "label": "Munchkin Account Id", + "value": "accountId", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid Munchkin Account Id", + "required": true, + "footerNote": "Your Marketo Accound ID from Admin settings section", + "placeholder": "e.g: 585-AXP-446" + }, + { + "type": "textInput", + "label": "Client ID", + "value": "clientId", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid Client ID", + "required": true, + "placeholder": "e.g: 53b1934e-51dd-4599-b24b-92612c71515f", + "footerNote": "Your REST API Client ID" + }, + { + "type": "textInput", + "label": "Client Secret", + "value": "clientSecret", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid Client Secret", + "required": true, + "placeholder": "e.g: oxzXtNhcuw9YGsdhplKUeEMi8765dsfw", + "secret": true, + "footerNote": "Your REST API Client Secret" + } + ] }, - "redirectGroups": { - "eventMapping": { - "tabs": [ - { - "name": "Custom events", - "note": "Map RudderStack events/properties to Marketo custom Activity ID/Primary Key", - "fields": [ - { - "type": "mapping", - "label": "Map events to Marketo Activity ID and Primary Key", - "note": [ - "You can find the Activity ID in your Admin section under Custom Activity on your Marketo dashboard", - "Map your event name to the desired primary key field." - ], - "configKey": "rudderEventsMapping", - "default": [], - "columns": [ - { - "type": "textInput", - "key": "event", - "label": "RudderStack Event Name", - "placeholder": "e.g: Product Searched" - }, - { - "type": "textInput", - "key": "marketoPrimarykey", - "label": "Marketo Primary Key", - "placeholder": "e.g: name" - }, - { - "type": "textInput", - "key": "marketoActivityId", - "label": "Activity ID", - "placeholder": "e.g: 100001" - } - ] - } - ] - }, - { - "name": "Lead trait Mapping", - "fields": [ - { - "type": "mapping", - "label": "Map your traits to Marketo custom fields", - "note": "Map your user traits to your desired custom field's api name.", - "configKey": "leadTraitMapping", - "default": [], - "columns": [ - { - "type": "textInput", - "key": "from", - "label": "Traits name", - "placeholder": "e.g: leadScore" - }, - { - "type": "textInput", - "key": "to", - "label": "Custom field api name", - "placeholder": "e.g: customLeadScore" - } - ] - } - ] - }, - { - "name": "Custom Activity Property Map", - "fields": [ - { - "type": "mapping", - "label": "Map your event properties to Marketo custom activity's field", - "note": "The configKey passed in Event Property name here will be sent in the corresponding mapped field.", - "configKey": "customActivityPropertyMap", - "default": [], - "columns": [ - { - "type": "textInput", - "key": "from", - "label": "Event Property", - "placeholder": "e.g: name" - }, - { - "type": "textInput", - "key": "to", - "label": "Marketo Custom Activity field", - "placeholder": "e.g: productName" - } - ] - } - ] - } - ] - } + { + "title": "Custom Activity Settings", + "fields": [ + { + "type": "checkbox", + "label": "Track anonymous events", + "value": "trackAnonymousEvents", + "default": false, + "footerNote": "If turned on, you need to send userId with every track call" + }, + { + "type": "checkbox", + "label": "Create Lead if it does not exist", + "value": "createIfNotExist", + "default": true, + "footerNote": "If turned on, we will create a new lead if the user is not present" + }, + { + "type": "dynamicForm", + "label": "Map events to Marketo Activity ID", + "labelLeft": "Event Name", + "labelRight": "Activity ID", + "keyLeft": "from", + "keyRight": "to", + "placeholderLeft": "e.g: Product Clicked", + "placeholderRight": "e.g: 100001", + "value": "customActivityEventMap", + "footerNote": "You can find the Activity ID in your Admin section under Custom Activity on your Marketo dashboard. Make sure event name has both Activity ID and Primary Key mapped." + }, + { + "type": "dynamicForm", + "label": "Map event name to Marketo Primary Key", + "labelLeft": "Event Name", + "labelRight": "Marketo Primary Key", + "keyLeft": "from", + "keyRight": "to", + "placeholderLeft": "e.g: Product Clicked", + "placeholderRight": "e.g: name", + "value": "customActivityPrimaryKeyMap", + "footerNote": "Map your event name to the desired primary key field. Make sure event name has both Activity ID and Primary Key mapped." + }, + { + "type": "dynamicForm", + "label": "Map your event properties to Marketo custom activity's field", + "labelLeft": "Event Property", + "labelRight": "Marketo Custom Activity field", + "keyLeft": "from", + "keyRight": "to", + "placeholderLeft": "e.g: name", + "placeholderRight": "e.g: productName", + "value": "customActivityPropertyMap", + "footerNote": "The value passed in Event Property name here will be sent in the corresponding mapped field." + } + ] + }, + { + "title": "Lead Mapping", + "fields": [ + { + "type": "dynamicForm", + "label": "Map your traits to Marketo custom fields", + "labelLeft": "Traits name", + "labelRight": "Custom field api name", + "keyLeft": "from", + "keyRight": "to", + "placeholderLeft": "e.g: leadScore", + "placeholderRight": "e.g: customLeadScore", + "value": "leadTraitMapping", + "footerNote": "Map your user traits to your desired custom field's api name." + } + ] + }, + { + "title": "Consent Settings", + "fields": [ + { + "type": "dynamicCustomForm", + "value": "oneTrustCookieCategories", + "label": "OneTrust Cookie Categories", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "oneTrustCookieCategory", + "label": "Category Name/ID", + "required": false + } + ] + } + ] } - } -} + ] +} \ No newline at end of file diff --git a/test/data/validation/destinations/marketo.json b/test/data/validation/destinations/marketo.json deleted file mode 100644 index 5bccaa537..000000000 --- a/test/data/validation/destinations/marketo.json +++ /dev/null @@ -1,121 +0,0 @@ -[ - { - "config": { - "accountId": "testACCID", - "clientId": "testCLIENTID", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "oneTrustCookieCategories": [ - { - "oneTrustCookieCategory": "" - } - ], - "android-connectionMode": "cloud", - "rudderEventsMapping": [ - { - "event": "test Mapping", - "marketoPrimarykey": "name", - "marketoActivityId": "1023" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ] - }, - "result": false, - "err": [ - " must have required property 'clientSecret'" - ] - }, - { - "config": { - "accountId": "testACCID", - "clientId": "testCLIENTID", - "clientSecret": "******", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "oneTrustCookieCategories": [ - { - "oneTrustCookieCategory": "" - } - ], - "android-connectionMode": "cloud", - "rudderEventsMapping": [ - { - "event": "test Mapping", - "marketoPrimarykey": "name", - "marketoActivityId": "1023" - } - ] - }, - "result": true - }, - { - "config": { - "clientId": "1234", - "clientSecret": "******", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "oneTrustCookieCategories": [ - { - "oneTrustCookieCategory": "" - } - ], - "android-connectionMode": "cloud", - "rudderEventsMapping": [ - { - "event": "test Mapping", - "marketoPrimarykey": "name", - "marketoActivityId": "1023" - } - ] - }, - "result": false, - "err": [ - " must have required property 'accountId'" - ] - }, - { - "config": { - "accountId": "testACCID", - "clientId": "testCLIENTID", - "clientSecret": "******", - "trackAnonymousEvents": true, - "createIfNotExist": false, - "oneTrustCookieCategories": [ - { - "oneTrustCookieCategory": "" - } - ], - "android-connectionMode": "cloud" - }, - "result": true - }, - { - "config": { - "accountId": "testACCID", - "clientId": "testCLIENTID", - "clientSecret": "******", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "oneTrustCookieCategories": [ - { - "oneTrustCookieCategory": "" - } - ], - "leadTraitMapping": [], - "android-connectionMode": "cloud", - "rudderEventsMapping": [], - "customActivityPropertyMap": [ - { - "from": "name", - "to": "pagename" - } - ] - }, - "result": true - } -] \ No newline at end of file From 4bf4f48ae1a312b20aa9493d6c455d157c79b823 Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Fri, 10 Nov 2023 22:23:27 +0530 Subject: [PATCH 12/21] feat(INT-503): hybrid mode braze (#1030) --- .../destinations/braze/db-config.json | 16 +++++++++++++--- .../destinations/braze/schema.json | 5 +++-- .../destinations/braze/ui-config.json | 14 ++++++++++++++ test/data/validation/destinations/braze.json | 3 +-- 4 files changed, 31 insertions(+), 7 deletions(-) diff --git a/src/configurations/destinations/braze/db-config.json b/src/configurations/destinations/braze/db-config.json index 4037af6dd..60732c6cb 100644 --- a/src/configurations/destinations/braze/db-config.json +++ b/src/configurations/destinations/braze/db-config.json @@ -19,7 +19,8 @@ "whitelistedEvents", "oneTrustCookieCategories", "eventFilteringOption", - "connectionMode" + "connectionMode", + "enablePushNotification" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -37,11 +38,20 @@ ], "supportedConnectionModes": { "android": ["cloud", "device", "hybrid"], - "web": ["cloud", "device"], + "web": ["cloud", "device", "hybrid"], "ios": ["cloud", "device", "hybrid"], "flutter": ["cloud", "device"], "reactnative": ["cloud", "device"] }, + "hybridModeCloudEventsFilter": { + "web": { + "messageType": [ + "identify", + "track", + "page" + ] + } + }, "supportedMessageTypes": ["group", "identify", "page", "screen", "track", "alias"], "destConfig": { "defaultConfig": [ @@ -61,7 +71,7 @@ "ios": ["useNativeSDK", "connectionMode"], "reactnative": ["useNativeSDK", "connectionMode"], "flutter": ["useNativeSDK", "connectionMode"], - "web": ["useNativeSDK", "enableBrazeLogging", "connectionMode"] + "web": ["useNativeSDK", "enableBrazeLogging", "connectionMode", "enablePushNotification"] }, "secretKeys": ["restApiKey"] } diff --git a/src/configurations/destinations/braze/schema.json b/src/configurations/destinations/braze/schema.json index 5b691ee1e..77cad0f87 100644 --- a/src/configurations/destinations/braze/schema.json +++ b/src/configurations/destinations/braze/schema.json @@ -90,11 +90,12 @@ "properties": { "android": { "type": "string", "enum": ["cloud", "device", "hybrid"] }, "ios": { "type": "string", "enum": ["cloud", "device", "hybrid"] }, - "web": { "type": "string", "enum": ["cloud", "device"] }, + "web": { "type": "string", "enum": ["cloud", "device", "hybrid"] }, "reactnative": { "type": "string", "enum": ["cloud", "device"] }, "flutter": { "type": "string", "enum": ["cloud", "device"] } } - } + }, + "enablePushNotification": { "type": "object", "properties": { "web": { "type": "boolean" } } } } } } diff --git a/src/configurations/destinations/braze/ui-config.json b/src/configurations/destinations/braze/ui-config.json index e08209153..96c4780f3 100644 --- a/src/configurations/destinations/braze/ui-config.json +++ b/src/configurations/destinations/braze/ui-config.json @@ -380,6 +380,20 @@ "configKey": "enableBrazeLogging", "default": false, "note": "Turn on if you want to show braze logs to customer" + }, + { + "type": "checkbox", + "label": "Use web push notifications", + "configKey": "enablePushNotification", + "default": false, + "note": [ + "Turn on if you want to use ", + { + "text": "push notification", + "link": "https://www.braze.com/docs/developer_guide/platform_integration_guides/web/push_notifications/integration/#step-1-configure-your-sites-service-worker" + }, + ". It requires service worker setup by client." + ] } ] } diff --git a/test/data/validation/destinations/braze.json b/test/data/validation/destinations/braze.json index 2339b91ca..46ff68054 100644 --- a/test/data/validation/destinations/braze.json +++ b/test/data/validation/destinations/braze.json @@ -166,7 +166,6 @@ "web": "hybrid" } }, - "result": false, - "err": ["connectionMode.web must be equal to one of the allowed values"] + "result": true } ] From ee7cbed52b26927c95f9b5204c93b0b2e0a9106a Mon Sep 17 00:00:00 2001 From: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Date: Sat, 11 Nov 2023 21:24:06 +0530 Subject: [PATCH 13/21] fix: mp schema inconsistency (#1068) --- src/configurations/destinations/mp/schema.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/configurations/destinations/mp/schema.json b/src/configurations/destinations/mp/schema.json index bb755ca2f..893e303d2 100644 --- a/src/configurations/destinations/mp/schema.json +++ b/src/configurations/destinations/mp/schema.json @@ -167,15 +167,6 @@ } } }, - "persistence": { - "type": "object", - "properties": { - "web": { - "type": "string", - "enum": ["none", "cookie", "localStorage"] - } - } - }, "persistenceType": { "type": "object", "properties": { From 6b105041274efbf5e02a8af64c6b212a4910afec Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Mon, 13 Nov 2023 11:05:14 +0530 Subject: [PATCH 14/21] feat: added allowUserSuppliedJavascript for braze (#1070) --- src/configurations/destinations/braze/db-config.json | 5 +++-- src/configurations/destinations/braze/schema.json | 3 ++- src/configurations/destinations/braze/ui-config.json | 7 +++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/configurations/destinations/braze/db-config.json b/src/configurations/destinations/braze/db-config.json index 60732c6cb..693afbb10 100644 --- a/src/configurations/destinations/braze/db-config.json +++ b/src/configurations/destinations/braze/db-config.json @@ -20,7 +20,8 @@ "oneTrustCookieCategories", "eventFilteringOption", "connectionMode", - "enablePushNotification" + "enablePushNotification", + "allowUserSuppliedJavascript" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -71,7 +72,7 @@ "ios": ["useNativeSDK", "connectionMode"], "reactnative": ["useNativeSDK", "connectionMode"], "flutter": ["useNativeSDK", "connectionMode"], - "web": ["useNativeSDK", "enableBrazeLogging", "connectionMode", "enablePushNotification"] + "web": ["useNativeSDK", "enableBrazeLogging", "connectionMode", "enablePushNotification", "allowUserSuppliedJavascript"] }, "secretKeys": ["restApiKey"] } diff --git a/src/configurations/destinations/braze/schema.json b/src/configurations/destinations/braze/schema.json index 77cad0f87..7d34ef7d7 100644 --- a/src/configurations/destinations/braze/schema.json +++ b/src/configurations/destinations/braze/schema.json @@ -95,7 +95,8 @@ "flutter": { "type": "string", "enum": ["cloud", "device"] } } }, - "enablePushNotification": { "type": "object", "properties": { "web": { "type": "boolean" } } } + "enablePushNotification": { "type": "object", "properties": { "web": { "type": "boolean" } } }, + "allowUserSuppliedJavascript": { "type": "object", "properties": { "web": { "type": "boolean" } } } } } } diff --git a/src/configurations/destinations/braze/ui-config.json b/src/configurations/destinations/braze/ui-config.json index 96c4780f3..2a7aeaeb9 100644 --- a/src/configurations/destinations/braze/ui-config.json +++ b/src/configurations/destinations/braze/ui-config.json @@ -394,6 +394,13 @@ }, ". It requires service worker setup by client." ] + }, + { + "type": "checkbox", + "label": "enable HTML in-app messages", + "configKey": "allowUserSuppliedJavascript", + "default": false, + "note": "Turn on if you want to enable HTML in-app messages" } ] } From c78780e2be5b3603457ff6c4cd80e027f8a07e04 Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Mon, 13 Nov 2023 13:09:41 +0530 Subject: [PATCH 15/21] feat: custom screen call amplitude (#1069) --- .../destinations/am/db-config.json | 8 +++- .../destinations/am/schema.json | 5 +++ .../destinations/am/ui-config.json | 39 +++++++++++++++++++ 3 files changed, 50 insertions(+), 2 deletions(-) diff --git a/src/configurations/destinations/am/db-config.json b/src/configurations/destinations/am/db-config.json index 5b1950dfd..bcbc6bdb2 100644 --- a/src/configurations/destinations/am/db-config.json +++ b/src/configurations/destinations/am/db-config.json @@ -37,7 +37,9 @@ "attribution", "eventUploadThreshold", "eventUploadPeriodMillis", - "trackNewCampaigns" + "trackNewCampaigns", + "userProvidedScreenEventString", + "useUserDefinedScreenEventName" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -84,7 +86,9 @@ "mapDeviceBrand", "oneTrustCookieCategories", "userProvidedPageEventString", - "useUserDefinedPageEventName" + "useUserDefinedPageEventName", + "userProvidedScreenEventString", + "useUserDefinedScreenEventName" ], "web": [ "useNativeSDK", diff --git a/src/configurations/destinations/am/schema.json b/src/configurations/destinations/am/schema.json index acc10ff25..a02e004a6 100644 --- a/src/configurations/destinations/am/schema.json +++ b/src/configurations/destinations/am/schema.json @@ -84,6 +84,11 @@ "mapDeviceBrand": { "type": "boolean", "default": false }, "trackProductsOnce": { "type": "boolean", "default": false }, "trackRevenuePerProduct": { "type": "boolean", "default": false }, + "useUserDefinedScreenEventName": { "type": "boolean", "default": false }, + "userProvidedScreenEventString": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,200})$" + }, "eventFilteringOption": { "type": "string", "enum": ["disable", "whitelistedEvents", "blacklistedEvents"], diff --git a/src/configurations/destinations/am/ui-config.json b/src/configurations/destinations/am/ui-config.json index d7e0dee59..bcb6261af 100644 --- a/src/configurations/destinations/am/ui-config.json +++ b/src/configurations/destinations/am/ui-config.json @@ -176,6 +176,45 @@ } } ] + }, + { + "title": "Screen settings", + "note": "Set how you want to send your screen calls to Amplitude", + "icon": "file", + "fields": [ + { + "type": "checkbox", + "label": "Use Custom Screen Event Name", + "configKey": "useUserDefinedScreenEventName", + "default": false, + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + } + }, + { + "type": "textInput", + "label": "Screen Event Name Format", + "note": "Assign a event name for your screen calls. Text {{ }} will be replaced with event payload value", + "configKey": "userProvidedScreenEventString", + "regex": "^(.{0,200})$", + "regexErrorMessage": "Invalid Screen Event Name", + "placeholder": "e.g: Viewed a {{ name }}", + "secret": false, + "preRequisites": { + "fields": [ + { + "configKey": "useUserDefinedScreenEventName", + "value": true + } + ] + } + } + ] } ] }, From 18af5eef75d367dbd15a9cc2a25ec33ecb30d61a Mon Sep 17 00:00:00 2001 From: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Date: Mon, 13 Nov 2023 13:39:41 +0530 Subject: [PATCH 16/21] chore: add throttling cost (#1047) --- .../db-config.json | 18 ++--- .../destinations/marketo/db-config.json | 76 +++++++++++++++---- .../marketo_bulk_upload/db-config.json | 4 +- .../destinations/salesforce/db-config.json | 5 ++ .../destinations/sfmc/db-config.json | 6 ++ 5 files changed, 83 insertions(+), 26 deletions(-) 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 5d31a81bb..7dbbee326 100644 --- a/src/configurations/destinations/google_adwords_remarketing_lists/db-config.json +++ b/src/configurations/destinations/google_adwords_remarketing_lists/db-config.json @@ -32,20 +32,18 @@ "typeOfList", "oneTrustCookieCategories" ], - "cloud": [ - "audienceId" - ] + "cloud": ["audienceId"] }, "secretKeys": [] }, - "options": { + "options": { "isBeta": false, "destinationFeatures": { - "vdmLabels": { - "newAudienceAlternateLabel": "Create New List", - "existingAudienceAlternateLabel": "Use Existing List", - "audienceAlternateLabel": "List Id" - } - } + "vdmLabels": { + "newAudienceAlternateLabel": "Create New List", + "existingAudienceAlternateLabel": "Use Existing List", + "audienceAlternateLabel": "List Id" + } + } } } diff --git a/src/configurations/destinations/marketo/db-config.json b/src/configurations/destinations/marketo/db-config.json index 2f41a3333..9758f8c5f 100644 --- a/src/configurations/destinations/marketo/db-config.json +++ b/src/configurations/destinations/marketo/db-config.json @@ -7,6 +7,12 @@ "transformAt": "router", "transformAtV1": "router", "saveDestinationResponse": true, + "throttlingCost": { + "eventType": { + "identify": 3, + "track": 3 + } + }, "includeKeys": ["oneTrustCookieCategories"], "excludeKeys": [], "supportedSourceTypes": [ @@ -43,24 +49,66 @@ "responseType": "JSON", "rules": { "retryable": [ - { "success": "false", "errors.0.code": 600 }, - { "success": "false", "errors.0.code": 601 }, - { "success": "false", "errors.0.code": 602 }, - { "success": "false", "errors.0.code": 604 }, - { "success": "false", "errors.0.code": 611 } + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 611 + } ], "abortable": [ - { "success": "false", "errors.0.code": 603 }, - { "success": "false", "errors.0.code": 605 }, - { "success": "false", "errors.0.code": 609 }, - { "success": "false", "errors.0.code": 610 } + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } ], "throttled": [ - { "success": "false", "errors.0.code": 502 }, - { "success": "false", "errors.0.code": 606 }, - { "success": "false", "errors.0.code": 607 }, - { "success": "false", "errors.0.code": 608 }, - { "success": "false", "errors.0.code": 615 } + { + "success": "false", + "errors.0.code": 502 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 615 + } ] } } diff --git a/src/configurations/destinations/marketo_bulk_upload/db-config.json b/src/configurations/destinations/marketo_bulk_upload/db-config.json index b477d298d..14ad192ce 100644 --- a/src/configurations/destinations/marketo_bulk_upload/db-config.json +++ b/src/configurations/destinations/marketo_bulk_upload/db-config.json @@ -34,7 +34,7 @@ }, "secretKeys": ["clientId", "clientSecret"] }, - "options": { - "isBeta": true + "options": { + "isBeta": true } } diff --git a/src/configurations/destinations/salesforce/db-config.json b/src/configurations/destinations/salesforce/db-config.json index 48a024d3e..da7313d01 100644 --- a/src/configurations/destinations/salesforce/db-config.json +++ b/src/configurations/destinations/salesforce/db-config.json @@ -7,6 +7,11 @@ "transformAt": "router", "transformAtV1": "router", "saveDestinationResponse": true, + "throttlingCost": { + "eventType": { + "identify": 3 + } + }, "includeKeys": ["oneTrustCookieCategories"], "excludeKeys": [], "supportedSourceTypes": [ diff --git a/src/configurations/destinations/sfmc/db-config.json b/src/configurations/destinations/sfmc/db-config.json index 32d81a54a..f586e288b 100644 --- a/src/configurations/destinations/sfmc/db-config.json +++ b/src/configurations/destinations/sfmc/db-config.json @@ -5,6 +5,12 @@ "transformAt": "router", "transformAtV1": "router", "saveDestinationResponse": true, + "throttlingCost": { + "eventType": { + "identify": 1, + "track": 1 + } + }, "includeKeys": ["oneTrustCookieCategories"], "excludeKeys": [], "supportedSourceTypes": [ From 459cae21189b88b74a5abb178516e6512741ca22 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 13 Nov 2023 08:15:14 +0000 Subject: [PATCH 17/21] chore(release): 1.59.0 --- CHANGELOG.md | 23 +++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c3f2c9c4..a96c89f26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,29 @@ 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.59.0](https://github.com/rudderlabs/rudder-config-schema/compare/v1.58.1...v1.59.0) (2023-11-13) + + +### Features + +* add Ketch for Mixpanel, CustomerIO & Snowflake ([#1054](https://github.com/rudderlabs/rudder-config-schema/issues/1054)) ([e1964fb](https://github.com/rudderlabs/rudder-config-schema/commit/e1964fbf74372761c076be00df9eedb285f036ed)) +* added allowUserSuppliedJavascript for braze ([#1070](https://github.com/rudderlabs/rudder-config-schema/issues/1070)) ([6b10504](https://github.com/rudderlabs/rudder-config-schema/commit/6b105041274efbf5e02a8af64c6b212a4910afec)) +* **analytics-js-integrations:** add in-app message in customerIo ([#1017](https://github.com/rudderlabs/rudder-config-schema/issues/1017)) ([7cf7385](https://github.com/rudderlabs/rudder-config-schema/commit/7cf7385d0e019a8844dd10d006f841adb4aae062)) +* custom screen call amplitude ([#1069](https://github.com/rudderlabs/rudder-config-schema/issues/1069)) ([c78780e](https://github.com/rudderlabs/rudder-config-schema/commit/c78780e2be5b3603457ff6c4cd80e027f8a07e04)) +* **INT-503:** hybrid mode braze ([#1030](https://github.com/rudderlabs/rudder-config-schema/issues/1030)) ([4bf4f48](https://github.com/rudderlabs/rudder-config-schema/commit/4bf4f48ae1a312b20aa9493d6c455d157c79b823)) +* **INT-901:** onboard sprig destination ([#1052](https://github.com/rudderlabs/rudder-config-schema/issues/1052)) ([62f089d](https://github.com/rudderlabs/rudder-config-schema/commit/62f089d4741c4b7d7d398412affcd17b886fd35f)) +* marketo: migrate to new UI layout ([#1044](https://github.com/rudderlabs/rudder-config-schema/issues/1044)) ([968310a](https://github.com/rudderlabs/rudder-config-schema/commit/968310a5f72e8480e2e38106b0be8e7b98e531d6)) +* onboard mixpanel on new ui ([#1008](https://github.com/rudderlabs/rudder-config-schema/issues/1008)) ([0874512](https://github.com/rudderlabs/rudder-config-schema/commit/08745124a3279695c1242919c216f8eef3dbe5cb)) +* onboarding salesforce with oauth ([#998](https://github.com/rudderlabs/rudder-config-schema/issues/998)) ([f774dfd](https://github.com/rudderlabs/rudder-config-schema/commit/f774dfdc371e12bf8545fc17672fa8420667d4f5)) + + +### Bug Fixes + +* eventFiltering options key and schema ([#1064](https://github.com/rudderlabs/rudder-config-schema/issues/1064)) ([8e0cf6a](https://github.com/rudderlabs/rudder-config-schema/commit/8e0cf6a362b4dae4e3361a8a0789a34c35f0fa28)) +* mp schema inconsistency ([#1068](https://github.com/rudderlabs/rudder-config-schema/issues/1068)) ([ee7cbed](https://github.com/rudderlabs/rudder-config-schema/commit/ee7cbed52b26927c95f9b5204c93b0b2e0a9106a)) +* remove web from Singular supported source ([#1051](https://github.com/rudderlabs/rudder-config-schema/issues/1051)) ([dee78f5](https://github.com/rudderlabs/rudder-config-schema/commit/dee78f54873b00a5802fbc3e34a33e65558b8933)) +* schema generator script for updating tagInput fiel schema ([#1066](https://github.com/rudderlabs/rudder-config-schema/issues/1066)) ([688aa0b](https://github.com/rudderlabs/rudder-config-schema/commit/688aa0b67f2c70da37915407bdc7fc6f18281ebb)) + ### [1.58.1](https://github.com/rudderlabs/rudder-config-schema/compare/v1.58.0...v1.58.1) (2023-11-09) diff --git a/package-lock.json b/package-lock.json index fd1e992b0..2145b812a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-config-schema", - "version": "1.58.1", + "version": "1.59.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-config-schema", - "version": "1.58.1", + "version": "1.59.0", "license": "MIT", "dependencies": { "ajv": "^8.12.0", diff --git a/package.json b/package.json index 9ebcd1319..5a235d34b 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-config-schema", - "version": "1.58.1", + "version": "1.59.0", "description": "", "main": "src/index.ts", "private": true, From 2927f61f1cb91bee519c33f48fefb334ff89f930 Mon Sep 17 00:00:00 2001 From: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Date: Tue, 14 Nov 2023 19:06:05 +0530 Subject: [PATCH 18/21] revert: onboarding mixpanel on new form builder (#1075) --- CHANGELOG.md | 1 - .../destinations/mp/db-config.json | 48 +- .../destinations/mp/schema.json | 218 +---- .../destinations/mp/ui-config.json | 851 +++++++----------- test/data/validation/destinations/mp.json | 211 ++--- 5 files changed, 489 insertions(+), 840 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a96c89f26..e2873c915 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,6 @@ All notable changes to this project will be documented in this file. See [standa * **INT-503:** hybrid mode braze ([#1030](https://github.com/rudderlabs/rudder-config-schema/issues/1030)) ([4bf4f48](https://github.com/rudderlabs/rudder-config-schema/commit/4bf4f48ae1a312b20aa9493d6c455d157c79b823)) * **INT-901:** onboard sprig destination ([#1052](https://github.com/rudderlabs/rudder-config-schema/issues/1052)) ([62f089d](https://github.com/rudderlabs/rudder-config-schema/commit/62f089d4741c4b7d7d398412affcd17b886fd35f)) * marketo: migrate to new UI layout ([#1044](https://github.com/rudderlabs/rudder-config-schema/issues/1044)) ([968310a](https://github.com/rudderlabs/rudder-config-schema/commit/968310a5f72e8480e2e38106b0be8e7b98e531d6)) -* onboard mixpanel on new ui ([#1008](https://github.com/rudderlabs/rudder-config-schema/issues/1008)) ([0874512](https://github.com/rudderlabs/rudder-config-schema/commit/08745124a3279695c1242919c216f8eef3dbe5cb)) * onboarding salesforce with oauth ([#998](https://github.com/rudderlabs/rudder-config-schema/issues/998)) ([f774dfd](https://github.com/rudderlabs/rudder-config-schema/commit/f774dfdc371e12bf8545fc17672fa8420667d4f5)) diff --git a/src/configurations/destinations/mp/db-config.json b/src/configurations/destinations/mp/db-config.json index 50801bd6d..dfa78ec4e 100644 --- a/src/configurations/destinations/mp/db-config.json +++ b/src/configurations/destinations/mp/db-config.json @@ -47,17 +47,6 @@ "cordova", "shopify" ], - "supportedConnectionModes": { - "web": ["cloud", "device"], - "android": ["cloud"], - "ios": ["cloud"], - "unity": ["cloud"], - "amp": ["cloud"], - "reactnative": ["cloud"], - "flutter": ["cloud"], - "cordova": ["cloud"], - "shopify": ["cloud"] - }, "supportedMessageTypes": ["alias", "group", "identify", "page", "screen", "track"], "destConfig": { "defaultConfig": [ @@ -65,7 +54,21 @@ "groupKeySettings", "apiSecret", "dataResidency", + "people", + "setAllTraitsByDefault", + "superProperties", + "peopleProperties", + "eventIncrements", "propIncrements", + "consolidatedPageCalls", + "trackCategorizedPages", + "trackNamedPages", + "sourceName", + "crossSubdomainCookie", + "persistence", + "persistenceType", + "persistenceName", + "secureCookie", "blacklistedEvents", "whitelistedEvents", "eventFilteringOption", @@ -78,27 +81,10 @@ "identityMergeApi", "userDeletionApi", "gdprApiToken", - "strictMode" + "strictMode", + "ignoreDnt" ], - "web": [ - "useNativeSDK", - "connectionMode", - "people", - "setAllTraitsByDefault", - "ignoreDnt", - "consolidatedPageCalls", - "trackCategorizedPages", - "trackNamedPages", - "sourceName", - "crossSubdomainCookie", - "persistence", - "persistenceType", - "persistenceName", - "secureCookie", - "superProperties", - "peopleProperties", - "eventIncrements" - ] + "web": ["useNativeSDK"] }, "secretKeys": ["token", "gdprApiToken"] } diff --git a/src/configurations/destinations/mp/schema.json b/src/configurations/destinations/mp/schema.json index 893e303d2..cf9b2c11f 100644 --- a/src/configurations/destinations/mp/schema.json +++ b/src/configurations/destinations/mp/schema.json @@ -1,7 +1,7 @@ { "configSchema": { "$schema": "http://json-schema.org/draft-07/schema#", - "required": ["token", "dataResidency", "identityMergeApi"], + "required": ["token"], "type": "object", "properties": { "token": { @@ -12,104 +12,52 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, - "serviceAccountUserName": { - "type": "string" - }, - "serviceAccountSecret": { - "type": "string" - }, - "projectId": { - "type": "string" - }, - "dataResidency": { - "type": "string", - "enum": ["us", "eu"], - "default": "us" - }, + "serviceAccountUserName": { "type": "string" }, + "serviceAccountSecret": { "type": "string" }, + "projectId": { "type": "string" }, + "dataResidency": { "type": "string", "enum": ["us", "eu"], "default": "us" }, "identityMergeApi": { "type": "string", "enum": ["simplified", "original"], "default": "original" }, - "strictMode": { - "type": "boolean", - "default": false - }, - "ignoreDnt": { - "type": "object", - "properties": { - "web": { - "type": "boolean" - } - } - }, - "userDeletionApi": { - "type": "string", - "enum": ["engage", "task"] - }, - "people": { - "type": "object", - "properties": { - "web": { - "type": "boolean" - } - } - }, - "setAllTraitsByDefault": { - "type": "object", - "properties": { - "web": { - "type": "boolean" - } - } - }, + "userDeletionApi": { "type": "string", "enum": ["engage", "task"], "default": "engage" }, + "strictMode": { "type": "boolean", "default": false }, + "ignoreDnt": { "type": "boolean", "default": false }, + "people": { "type": "boolean", "default": false }, + "setAllTraitsByDefault": { "type": "boolean", "default": false }, "superProperties": { - "type": "object", - "properties": { - "web": { - "type": "array", - "items": { - "type": "object", - "properties": { - "property": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" - } - } + "type": "array", + "items": { + "type": "object", + "properties": { + "property": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" } } } }, "peopleProperties": { - "type": "object", - "properties": { - "web": { - "type": "array", - "items": { - "type": "object", - "properties": { - "property": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" - } - } + "type": "array", + "items": { + "type": "object", + "properties": { + "property": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" } } } }, "eventIncrements": { - "type": "object", - "properties": { - "web": { - "type": "array", - "items": { - "type": "object", - "properties": { - "property": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" - } - } + "type": "array", + "items": { + "type": "object", + "properties": { + "property": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" } } } @@ -126,74 +74,24 @@ } } }, - "consolidatedPageCalls": { - "type": "object", - "properties": { - "web": { - "type": "boolean" - } - } - }, - "trackCategorizedPages": { - "type": "object", - "properties": { - "web": { - "type": "boolean" - } - } - }, - "trackNamedPages": { - "type": "object", - "properties": { - "web": { - "type": "boolean" - } - } - }, + "consolidatedPageCalls": { "type": "boolean", "default": true }, + "trackCategorizedPages": { "type": "boolean", "default": false }, + "trackNamedPages": { "type": "boolean", "default": false }, "sourceName": { - "type": "object", - "properties": { - "web": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" - } - } - }, - "crossSubdomainCookie": { - "type": "object", - "properties": { - "web": { - "type": "boolean" - } - } + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, + "crossSubdomainCookie": { "type": "boolean", "default": false }, "persistenceType": { - "type": "object", - "properties": { - "web": { - "type": "string", - "enum": ["none", "cookie", "localStorage"], - "default": "cookie" - } - } + "type": "string", + "enum": ["none", "cookie", "localStorage"], + "default": "cookie" }, "persistenceName": { - "type": "object", - "properties": { - "web": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" - } - } - }, - "secureCookie": { - "type": "object", - "properties": { - "web": { - "type": "boolean" - } - } + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, + "secureCookie": { "type": "boolean", "default": false }, "groupKeySettings": { "type": "array", "items": { @@ -206,21 +104,12 @@ } } }, - "useNativeSDK": { - "type": "object", - "properties": { - "web": { - "type": "boolean" - } - } - }, - "useNewMapping": { - "type": "boolean", - "default": false - }, + "useNativeSDK": { "type": "object", "properties": { "web": { "type": "boolean" } } }, + "useNewMapping": { "type": "boolean", "default": false }, "eventFilteringOption": { "type": "string", - "enum": ["disable", "whitelistedEvents", "blacklistedEvents"] + "enum": ["disable", "whitelistedEvents", "blacklistedEvents"], + "default": "disable" }, "whitelistedEvents": { "type": "array", @@ -262,23 +151,14 @@ "type": "array", "items": { "type": "object", - "properties": { - "purpose": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" - } - } + "properties": { "purpose": { "type": "string", "pattern": "^(.{0,100})$" } } } } }, "anyOf": [ { "if": { - "properties": { - "userDeletionApi": { - "const": "task" - } - }, + "properties": { "userDeletionApi": { "const": "task" } }, "required": ["userDeletionApi"] }, "then": { diff --git a/src/configurations/destinations/mp/ui-config.json b/src/configurations/destinations/mp/ui-config.json index 9dfe09c9d..276098b5f 100644 --- a/src/configurations/destinations/mp/ui-config.json +++ b/src/configurations/destinations/mp/ui-config.json @@ -1,579 +1,428 @@ { - "uiConfig": { - "baseTemplate": [ - { - "title": "Initial setup", - "note": "Review how this destination is set up", - "sections": [ - { - "groups": [ - { - "title": "Connection settings", - "icon": "settings", - "fields": [ - { - "type": "textInput", - "label": "Project Token", - "configKey": "token", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", - "regexErrorMessage": "Invalid Project Token", - "required": true, - "placeholder": "c24f56ed817221606de5a5f0befe8b92", - "secret": true, - "note": [ - "Obtain the Project Token by navigating to Project > Project Settings > Access Key. For detailed instructions", - { - "text": "Learn more here", - "link": "https://docs.mixpanel.com/docs/tracking/how-tos/api-credentials#project-token" - } - ] - }, - { - "type": "singleSelect", - "label": "Data Residency", - "configKey": "dataResidency", - "options": [ - { - "label": "US", - "value": "us" - }, - { - "label": "EU", - "value": "eu" - } - ], - "default": "us" - }, - { - "type": "singleSelect", - "label": "Identity Merge", - "configKey": "identityMergeApi", - "note": [ - "Select Identity Merge API.", - { - "text": "Learn more", - "link": "https://help.mixpanel.com/hc/en-us/articles/14383975110292" - }, - " about Simplified vs Original ID Merge API." - ], - "options": [ - { - "label": "Simplified ID Merge", - "value": "simplified" - }, - { - "label": "Original ID Merge", - "value": "original" - } - ], - "default": "original" - } - ] - } - ] + "uiConfig": [ + { + "title": "Connection Settings", + "fields": [ + { + "type": "textInput", + "label": "API Token", + "value": "token", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid API Token", + "required": true, + "placeholder": "c24f56ed817221606de5a5f0befe8b92", + "secret": true + }, + { + "type": "textInput", + "label": "API Secret", + "value": "apiSecret", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "regexErrorMessage": "Invalid API Secret", + "required": false, + "placeholder": "f8a911adfbb6546cc43cdfe29e912a90", + "secret": true + }, + { + "type": "textInput", + "label": "Service Account Username", + "value": "serviceAccountUserName", + "required": false + }, + { + "type": "textInput", + "label": "Service Account Secret", + "value": "serviceAccountSecret", + "required": false + }, + { + "type": "textInput", + "label": "Project ID", + "value": "projectId", + "required": false + }, + { + "type": "singleSelect", + "label": "Data Residency", + "value": "dataResidency", + "options": [ + { + "name": "US", + "value": "us" + }, + { + "name": "EU", + "value": "eu" + } + ], + "defaultOption": { + "name": "US", + "value": "us" }, - { - "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": "Mixpanel Fullstack IT", - "fields": [ - { - "type": "textInput", - "label": "API Secret", - "configKey": "apiSecret", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "regexErrorMessage": "Invalid API Secret", - "required": false, - "placeholder": "f8a911adfbb6546cc43cdfe29e912a90", - "secret": true, - "preRequisites": { - "fields": [ - { - "configKey": "connectionModes.cloud", - "value": true - } - ] - }, - "note": [ - "Obtain the API Secret by navigating to Project > Project Settings > Access Key. For detailed instructions", - { - "text": "Learn more here", - "link": "https://docs.mixpanel.com/docs/tracking/how-tos/api-credentials#api-secret" - } - ] - }, - { - "type": "textInput", - "label": "Service Account Username", - "configKey": "serviceAccountUserName", - "preRequisites": { - "fields": [ - { - "configKey": "connectionModes.cloud", - "value": true - } - ] - }, - "note": [ - "Refer to ", - { - "text": "this", - "link": "https://docs.mixpanel.com/docs/tracking/how-tos/api-credentials#api-secret" - }, - " Mixpanel guide for managing service account and obtaining the username." - ] - }, - { - "type": "textInput", - "label": "Service Account Secret", - "configKey": "serviceAccountSecret", - "preRequisites": { - "fields": [ - { - "configKey": "connectionModes.cloud", - "value": true - } - ] - }, - "note": [ - "Refer to ", - { - "text": "this", - "link": "https://docs.mixpanel.com/docs/tracking/how-tos/api-credentials#api-secret" - }, - " Mixpanel guide for managing service account and obtaining the secret." - ] - }, - { - "type": "textInput", - "label": "Project ID", - "configKey": "projectId", - "preRequisites": { - "fields": [ - { - "configKey": "connectionModes.cloud", - "value": true - } - ] - }, - "note": [ - "Obtain the Project ID by navigating to Project > Project Settings > Project Details. For detailed instructions", - { - "text": "Learn more here", - "link": "https://docs.mixpanel.com/docs/admin/organizations-projects/manage-projects#viewing-project-information" - } - ] - }, - { - "type": "checkbox", - "label": "Strict Mode", - "configKey": "strictMode", - "default": false, - "note": "If enabled, Mixpanel will validate the request and return errors per event that failed", - "preRequisites": { - "fields": [ - { - "configKey": "connectionModes.cloud", - "value": true - } - ] - } - }, - { - "type": "tagInput", - "configKey": "propIncrements", - "label": "Properties to increment in People", - "tagKey": "property", - "regex": "^(.{0,100})$", - "regexErrorMessage": "Invalid Property Name", - "placeholder": "e.g: Cart-Value" - } - ] - }, - { - "title": "Event Map Setting", - "fields": [ - { - "type": "checkbox", - "configKey": "useNewMapping", - "label": "Use New Mapping", - "default": false, - "note": "It is recommended to set this to on as we are deprecating support for the old mapping soon.", - "preRequisites": { - "fields": [ - { - "configKey": "connectionModes.cloud", - "value": true - } - ] - } - } - ] - }, - { - "title": "Group Key Settings", - "fields": [ - { - "type": "tagInput", - "configKey": "groupKeySettings", - "tagKey": "groupKey", - "label": "Group Keys", - "placeholder": "e.g: company", - "default": [ - { - "groupKey": "" - } - ] - } - ] - }, - { - "title": "User Deletion Setting", - "fields": [ - { - "type": "singleSelect", - "label": "User Deletion", - "configKey": "userDeletionApi", - "note": [ - "Select Mixpanel User Deletion API.", - { - "text": "Learn more", - "link": "https://www.rudderstack.com/docs/destinations/streaming-destinations/mixpanel/#deleting-a-user" - }, - " about difference between the two APIs" - ], - "options": [ - { - "label": "Delete Profile", - "value": "engage" - }, - { - "label": "Delete Profile and Associated Events", - "value": "task" - } - ], - "default": "engage", - "preRequisites": { - "fields": [ - { - "configKey": "connectionModes.cloud", - "value": true - } - ] - } - }, - { - "type": "textInput", - "preRequisites": { - "fields": [ - { - "configKey": "connectionModes.cloud", - "value": true - }, - { - "configKey": "userDeletionApi", - "value": "task" - } - ], - "condition": "and" - }, - "label": "GDPR API Token", - "configKey": "gdprApiToken", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", - "regexErrorMessage": "Invalid GDPR API Token", - "required": true, - "placeholder": "e.g: 7vwaux7et2tk2ih1o0qtbt1x97n2je", - "secret": true - } - ] - } - ] + "required": false + }, + { + "type": "singleSelect", + "label": "Identity Merge", + "value": "identityMergeApi", + "footerNote": "Select Identity Merge API. For more information about Simplified vs Original ID Merge API refer doc (https://help.mixpanel.com/hc/en-us/articles/14383975110292)", + "options": [ + { + "name": "Simplified ID Merge", + "value": "simplified" + }, + { + "name": "Original ID Merge", + "value": "original" + } + ], + "defaultOption": { + "name": "Original ID Merge", + "value": "original" }, - { - "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 event filtering: ", - "configKey": "eventFilteringOption", - "note": "You must select either allowlist or denylist to enable events filtering", - "options": [ - { - "label": "Disabled", - "value": "disable" - }, - { - "label": "Filter via allowlist", - "value": "whitelistedEvents" - }, - { - "label": "Filter via denylist", - "value": "blacklistedEvents" - } - ], - "default": "disable" - }, - { - "type": "tagInput", - "label": "Allowlisted events", - "note": "Input the events you want to allowlist.\nInput separate events by pressing ‘Enter’.", - "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 the events you want to denylist.\nInput separate events by pressing ‘Enter’.", - "configKey": "blacklistedEvents", - "tagKey": "eventName", - "placeholder": "e.g: Anonymous page visit", - "default": [ - { - "eventName": "" - } - ], - "preRequisites": { - "fields": [ - { - "configKey": "eventFilteringOption", - "value": "blacklistedEvents" - } - ] - } - } - ] - }, - { - "title": "OneTrust cookie consent settings", - "note": [ - "Enter your OneTrust consent category IDs or names if you have them configured. We recommend providing category IDs over names, as the category names only work in the device connection mode. So, you can seamlessly switch between the connection modes.", - { - "text": "Learn more", - "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/onetrust-consent-manager/" - }, - " about RudderStack’s OneTrust Consent Manager feature." - ], - "fields": [ - { - "type": "tagInput", - "label": "Consent categories", - "note": "Input your OneTrust consent category IDs or names by pressing ‘Enter’ after each entry. You should prefer category IDs over names. Refer to this section's note.", - "configKey": "oneTrustCookieCategories", - "tagKey": "oneTrustCookieCategory", - "placeholder": "e.g: C0001", - "default": [ - { - "oneTrustCookieCategory": "" - } - ] - } - ] - }, - { - "title": "Ketch Consent Purposes", - "fields": [ - { - "type": "tagInput", - "label": "Purpose ID", - "configKey": "ketchConsentPurposes", - "tagKey": "purpose", - "regex": "^(.{0,100})$", - "default": [ - { - "purpose": "" - } - ] - } - ] - } - ] - } - ] - } - ], - "sdkTemplate": { - "title": "SDK settings", + "required": false + }, + { + "type": "singleSelect", + "label": "User Deletion", + "value": "userDeletionApi", + "footerNote": "Select Mixpanel User Deletion API. For more information about difference between the two APIs refer doc (https://www.rudderstack.com/docs/destinations/streaming-destinations/mixpanel/#deleting-a-user)", + "options": [ + { + "name": "Delete Profile", + "value": "engage" + }, + { + "name": "Delete Profile and Associated Events", + "value": "task" + } + ], + "defaultOption": { + "name": "Delete Profile", + "value": "engage" + }, + "required": false + }, + { + "type": "textInput", + "preRequisiteField": { + "name": "userDeletionApi", + "selectedValue": "task" + }, + "label": "GDPR API Token", + "value": "gdprApiToken", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid GDPR API Token", + "required": true, + "placeholder": "e.g: 7vwaux7et2tk2ih1o0qtbt1x97n2je", + "secret": true + }, + { + "type": "checkbox", + "label": "Strict Mode", + "value": "strictMode", + "default": false, + "footerNote": "If enabled, Mixpanel will validate the request and return errors per event that failed" + }, + { + "type": "checkbox", + "label": "Ignore \"Do Not Track\"", + "value": "ignoreDnt", + "default": false, + "footerNote": "If enabled, Mixpanel will ignore \"Do Not Track\" setting of browser" + } + ] + }, + { + "title": "Device Mode Settings", "fields": [ { "type": "checkbox", "label": "Use Mixpanel People", - "configKey": "people", + "value": "people", "default": false, - "note": "This will send all of your identify calls to Mixpanel's People feature." + "footerNote": "This will send all of your identify calls to Mixpanel's People feature." }, { "type": "checkbox", "label": "Automatically set all Traits as Super Properties and People Properties", - "configKey": "setAllTraitsByDefault", + "value": "setAllTraitsByDefault", "default": false, - "note": "While this is checked, our integration automatically sets all traits on identify calls as super properties and people properties if Mixpanel People is checked as well." + "footerNote": "While this is checked, our integration automatically sets all traits on identify calls as super properties and people properties if Mixpanel People is checked as well." }, { - "type": "checkbox", - "label": "Ignore \"Do Not Track\"", - "configKey": "ignoreDnt", - "default": false, - "note": "If enabled, Mixpanel will ignore \"Do Not Track\" setting of browser" + "type": "dynamicCustomForm", + "value": "superProperties", + "customFields": [ + { + "type": "textInput", + "label": "Property to send as super Properties", + "value": "property", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid Property Name", + "required": false, + "placeholder": "e.g: residence" + } + ] + }, + { + "type": "dynamicCustomForm", + "value": "peopleProperties", + "customFields": [ + { + "type": "textInput", + "label": "Traits to set as People Properties", + "value": "property", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid Property Name", + "required": false, + "placeholder": "e.g: address" + } + ] + }, + { + "type": "dynamicCustomForm", + "value": "eventIncrements", + "customFields": [ + { + "type": "textInput", + "label": "Events to increment in People", + "value": "property", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid Property Name", + "required": false, + "placeholder": "e.g: Added-to-cart" + } + ] + }, + { + "type": "dynamicCustomForm", + "value": "propIncrements", + "customFields": [ + { + "type": "textInput", + "label": "Properties to increment in People", + "value": "property", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid Property Name", + "required": false, + "placeholder": "e.g: Cart-Value" + } + ] }, { "type": "checkbox", "label": "Track All Pages to Mixpanel with a Consolidated Event Name", - "configKey": "consolidatedPageCalls", + "value": "consolidatedPageCalls", "default": true, - "note": "This will track Loaded a Page events to Mixpanel for all page method calls. We enable this by default as it's how Mixpanel suggests sending these calls." + "footerNote": "This will track Loaded a Page events to Mixpanel for all page method calls. We enable this by default as it's how Mixpanel suggests sending these calls." }, { "type": "checkbox", "label": "Track Categorized Pages to Mixpanel", - "configKey": "trackCategorizedPages", + "value": "trackCategorizedPages", "default": false, - "note": "This will track events to Mixpanel for page method calls that have a category associated with them. For example page('Docs', 'Index') would translate to Viewed Docs Index Page." + "footerNote": "This will track events to Mixpanel for page method calls that have a category associated with them. For example page('Docs', 'Index') would translate to Viewed Docs Index Page." }, { "type": "checkbox", "label": "Track Named Pages to Mixpanel", - "configKey": "trackNamedPages", + "value": "trackNamedPages", "default": false, - "note": "This will track events to Mixpanel for page method calls that have a name associated with them. For example page('Signup') would translate to Viewed Signup Page." + "footerNote": "This will track events to Mixpanel for page method calls that have a name associated with them. For example page('Signup') would translate to Viewed Signup Page." }, { "type": "textInput", "label": "Source Name", - "configKey": "sourceName", + "value": "sourceName", "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", "regexErrorMessage": "Invalid Source Name", "required": false, "placeholder": "e.g: Rudder-JS", - "note": "This value, if it's not blank, will be sent as rudderstack_source_name to Mixpanel for every event/page/screen call." + "footerNote": "This value, if it's not blank, will be sent as rudderstack_source_name to Mixpanel for every event/page/screen call." }, { "type": "checkbox", "label": "Cross Subdomain Cookie", - "configKey": "crossSubdomainCookie", + "value": "crossSubdomainCookie", "default": false, - "note": "This will allow the Mixpanel cookie to persist between different pages of your application." + "footerNote": "This will allow the Mixpanel cookie to persist between different pages of your application." }, { "type": "singleSelect", "label": "Persistence Type", - "configKey": "persistenceType", + "value": "persistenceType", "options": [ { - "label": "None", + "name": "None", "value": "none" }, { - "label": "Cookie", + "name": "Cookie", "value": "cookie" }, { - "label": "Local Storage", + "name": "Local Storage", "value": "localStorage" } ], - "default": "cookie", - "note": "Choose the persistence type for Mixpanel cookie. If 'Local Storage' is selected, then any existing Mixpanel cookie value with the same persistence name will be transferred to 'Local Storage' and deleted." + "defaultOption": { + "name": "Cookie", + "value": "cookie" + }, + "footerNote": "Choose the persistence type for Mixpanel cookie. If 'Local Storage' is selected, then any existing Mixpanel cookie value with the same persistence name will be transferred to 'Local Storage' and deleted." }, { "type": "textInput", "label": "Persistence Name", - "configKey": "persistenceName", + "value": "persistenceName", "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "note": "Enter a persistence name for the Mixpanel cookie." + "footerNote": "Enter a persistence name for the Mixpanel cookie." }, { "type": "checkbox", "label": "Secure Cookie", - "configKey": "secureCookie", + "value": "secureCookie", + "default": false, + "footerNote": "This will mark the Mixpanel cookie as secure, meaning it will only be transmitted over https" + } + ] + }, + { + "title": "Group Key Settings", + "fields": [ + { + "type": "dynamicCustomForm", + "value": "groupKeySettings", + "label": "Group Keys", + "customFields": [ + { + "type": "textInput", + "label": "Group Key", + "value": "groupKey", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "regexErrorMessage": "Invalid Group Key", + "required": false, + "placeholder": "company" + } + ] + } + ] + }, + { + "title": "Native SDK", + "fields": [ + { + "type": "checkbox", + "label": "Use device-mode to send events", + "value": "useNativeSDK", + "default": false + } + ] + }, + { + "title": "Event Map Setting", + "fields": [ + { + "type": "checkbox", + "value": "useNewMapping", + "label": "Use New Mapping", "default": false, - "note": "This will mark the Mixpanel cookie as secure, meaning it will only be transmitted over https" + "footerNote": "It is recomended to set this to on as we are deprecating support for the old mapping soon." + } + ] + }, + { + "title": "Client-side Events Filtering", + "sectionNote": "Applicable only for device-mode integrations. If enabled, it works only with either allowlisted or denylisted events", + "fields": [ + { + "type": "singleSelect", + "value": "eventFilteringOption", + "required": false, + "options": [ + { + "name": "Disable", + "value": "disable" + }, + { + "name": "Allowlist", + "value": "whitelistedEvents" + }, + { + "name": "Denylist", + "value": "blacklistedEvents" + } + ], + "defaultOption": { + "name": "Disable", + "value": "disable" + } }, { - "type": "tagInput", - "configKey": "superProperties", - "label": "Property to send as super Properties", - "tagKey": "property", - "regex": "^(.{0,100})$", - "regexErrorMessage": "Invalid Property Name", - "placeholder": "e.g: residence" + "type": "dynamicCustomForm", + "value": "whitelistedEvents", + "label": "Allowlist", + "customFields": [ + { + "type": "textInput", + "value": "eventName", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false, + "placeholder": "e.g: Anonymous Page Visit" + } + ] }, { - "type": "tagInput", - "configKey": "peopleProperties", - "label": "Traits to set as People Properties", - "tagKey": "property", - "regex": "^(.{0,100})$", - "regexErrorMessage": "Invalid Property Name", - "placeholder": "e.g: address" + "type": "dynamicCustomForm", + "value": "blacklistedEvents", + "label": "Denylist", + "customFields": [ + { + "type": "textInput", + "value": "eventName", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false, + "placeholder": "e.g: Credit Card Added" + } + ] + } + ] + }, + { + "title": "Consent Settings", + "fields": [ + { + "type": "dynamicCustomForm", + "value": "oneTrustCookieCategories", + "label": "OneTrust Cookie Categories", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "oneTrustCookieCategory", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "label": "Category Name/ID", + "required": false + } + ] }, { - "type": "tagInput", - "configKey": "eventIncrements", - "label": "Events to increment in People", - "tagKey": "property", - "regex": "^(.{0,100})$", - "regexErrorMessage": "Invalid Property Name", - "placeholder": "e.g: Added-to-cart" + "type": "dynamicCustomForm", + "value": "ketchConsentPurposes", + "label": "Ketch Consent Purposes", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "purpose", + "label": "Purpose ID", + "regex": "^(.{0,100})$", + "required": false + } + ] } ] } - } + ] } diff --git a/test/data/validation/destinations/mp.json b/test/data/validation/destinations/mp.json index 19b95c333..8bbe40e06 100644 --- a/test/data/validation/destinations/mp.json +++ b/test/data/validation/destinations/mp.json @@ -4,60 +4,32 @@ "token": "2de18c6hf6v45201ab43d2344b0c128x", "apiSecret": "1c078994c2141897ffaf71c36a75v227", "dataResidency": "us", - "people": { - "web": false - }, - "setAllTraitsByDefault": { - "web": false - }, - "consolidatedPageCalls": { - "web": true - }, - "trackCategorizedPages": { - "web": false - }, - "trackNamedPages": { - "web": false - }, - "sourceName": { - "web": "AWS" - }, - "crossSubdomainCookie": { - "web": true - }, - "persistence": { - "web": "cookie" - }, - "persistenceType": { - "web": "cookie" - }, - "persistenceName": { - "web": "cookie" - }, - "secureCookie": { - "web": true - }, - "superProperties": { - "web": [ - { - "property": "super001" - } - ] - }, - "peopleProperties": { - "web": [ - { - "property": "maidenName" - } - ] - }, - "eventIncrements": { - "web": [ - { - "property": "triggerName" - } - ] - }, + "people": false, + "setAllTraitsByDefault": false, + "consolidatedPageCalls": true, + "trackCategorizedPages": false, + "trackNamedPages": false, + "sourceName": "AWS", + "crossSubdomainCookie": true, + "persistence": "cookie", + "persistenceType": "cookie", + "persistenceName": "cookie", + "secureCookie": true, + "superProperties": [ + { + "property": "super001" + } + ], + "peopleProperties": [ + { + "property": "maidenName" + } + ], + "eventIncrements": [ + { + "property": "triggerName" + } + ], "propIncrements": [ { "property": "extraProps" @@ -69,7 +41,7 @@ } ], "useNativeSDK": { - "web": true + "android": false }, "blacklistedEvents": [ { @@ -109,38 +81,20 @@ "config": { "token": "2de18c6hf6v45201ab43d2344b0c128x", "dataResidency": "us", - "people": { - "web": false - }, - "setAllTraitsByDefault": { - "web": false - }, - "consolidatedPageCalls": { - "web": false - }, - "trackCategorizedPages": { - "web": false - }, - "trackNamedPages": { - "web": false - }, - "crossSubdomainCookie": { - "web": false - }, - "persistence": { - "web": "localStorage" - }, - "secureCookie": { - "web": false - }, + "people": false, + "setAllTraitsByDefault": false, + "consolidatedPageCalls": true, + "trackCategorizedPages": false, + "trackNamedPages": false, + "crossSubdomainCookie": false, + "persistence": "localStorage", + "secureCookie": false, "eventFilteringOption": "disable", "useNativeSDK": { "web": false }, "strictMode": false, - "ignoreDnt": { - "web": true - }, + "ignoreDnt": true, "oneTrustCookieCategories": [ { "oneTrustCookieCategory": "Marketing" @@ -153,21 +107,11 @@ "config": { "token": "2de18c6hf6v45201ab43d2344b0c128x", "dataResidency": "us", - "people": { - "web": true - }, - "trackNamedPages": { - "web": false - }, - "crossSubdomainCookie": { - "web": false - }, - "persistence": { - "web": "localStorage" - }, - "secureCookie": { - "web": false - }, + "people": true, + "trackNamedPages": false, + "crossSubdomainCookie": false, + "persistence": "localStorage", + "secureCookie": false, "eventFilteringOption": "disable", "useNativeSDK": { "web": false @@ -184,51 +128,37 @@ "config": { "token": "2de18c6hf6v45201ab43d2344b0c128x", "dataResidency": "us", - "people": { - "web": false - }, - "setAllTraitsByDefault": { - "web": false - }, - "consolidatedPageCalls": { - "web": false - }, - "trackCategorizedPages": { - "web": false - }, + "people": false, + "setAllTraitsByDefault": false, + "consolidatedPageCalls": false, + "trackCategorizedPages": false, "trackNamedPages": { - "web": 123 - }, - "crossSubdomainCookie": { - "web": false - }, - "persistence": { - "web": "localStorage" - }, - "secureCookie": { - "web": false + "name": true }, + "crossSubdomainCookie": false, + "persistence": "localStorage", + "secureCookie": false, "eventFilteringOption": "disable", "useNativeSDK": { "web": false } }, "result": false, - "err": ["trackNamedPages.web must be boolean"] + "err": ["trackNamedPages must be boolean"] }, { "config": { "token": "2de18c6hf6v45201ab43d2344b0c128x", "dataResidency": "us", - "sourceName": { - "web": "qflkmnzhahdgfhdhfe9he9wfhwe9fhweqdwgygqdwiqflkmnzhahdgfhdhfe9he9wfhwe9fhweqdwgygqdwiqflkmnzhahdgfhdhfe9he9wfhwe9fhweqdwgygqdwi" - }, - "persistence": { - "web": "localStorage" - }, - "secureCookie": { - "web": false - }, + "people": false, + "setAllTraitsByDefault": false, + "consolidatedPageCalls": false, + "trackCategorizedPages": false, + "trackNamedPages": false, + "sourceName": "qflkmnzhahdgfhdhfe9he9wfhwe9fhweqdwgygqdwiqflkmnzhahdgfhdhfe9he9wfhwe9fhweqdwgygqdwiqflkmnzhahdgfhdhfe9he9wfhwe9fhweqdwgygqdwi", + "crossSubdomainCookie": false, + "persistence": "localStorage", + "secureCookie": false, "eventFilteringOption": "disable", "useNativeSDK": { "web": false @@ -236,7 +166,7 @@ }, "result": false, "err": [ - "sourceName.web must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"" + "sourceName must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"" ] }, { @@ -258,21 +188,26 @@ "config": { "token": "2de18c6hf6v45201ab43d2344b0c128x", "dataResidency": "us", - "persistenceType": { - "web": "abc" - }, + "people": false, + "setAllTraitsByDefault": false, + "consolidatedPageCalls": false, + "trackCategorizedPages": false, + "trackNamedPages": true, + "crossSubdomainCookie": false, + "persistence": "none", + "persistenceType": "abc", + "persistenceName": "", + "secureCookie": false, "eventFilteringOption": "disable", - "ignoreDnt": { - "web": "true" - }, + "ignoreDnt": "true", "useNativeSDK": { "web": false } }, "result": false, "err": [ - "ignoreDnt.web must be boolean", - "persistenceType.web must be equal to one of the allowed values" + "ignoreDnt must be boolean", + "persistenceType must be equal to one of the allowed values" ] } ] From 263f31e19c942b7a565fcda0ebfe9f4fc4dcefa1 Mon Sep 17 00:00:00 2001 From: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Date: Tue, 14 Nov 2023 19:26:55 +0530 Subject: [PATCH 19/21] chore: format mixpanel schema.json (#1076) --- .../destinations/mp/schema.json | 96 +++++++++++++++---- 1 file changed, 78 insertions(+), 18 deletions(-) diff --git a/src/configurations/destinations/mp/schema.json b/src/configurations/destinations/mp/schema.json index cf9b2c11f..afdf1512f 100644 --- a/src/configurations/destinations/mp/schema.json +++ b/src/configurations/destinations/mp/schema.json @@ -12,20 +12,46 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, - "serviceAccountUserName": { "type": "string" }, - "serviceAccountSecret": { "type": "string" }, - "projectId": { "type": "string" }, - "dataResidency": { "type": "string", "enum": ["us", "eu"], "default": "us" }, + "serviceAccountUserName": { + "type": "string" + }, + "serviceAccountSecret": { + "type": "string" + }, + "dataResidency": { + "type": "string", + "enum": ["us", "eu"], + "default": "us" + }, + "projectId": { + "type": "string" + }, "identityMergeApi": { "type": "string", "enum": ["simplified", "original"], "default": "original" }, - "userDeletionApi": { "type": "string", "enum": ["engage", "task"], "default": "engage" }, - "strictMode": { "type": "boolean", "default": false }, - "ignoreDnt": { "type": "boolean", "default": false }, - "people": { "type": "boolean", "default": false }, - "setAllTraitsByDefault": { "type": "boolean", "default": false }, + "userDeletionApi": { + "type": "string", + "enum": ["engage", "task"], + "default": "engage" + }, + "strictMode": { + "type": "boolean", + "default": false + }, + "ignoreDnt": { + "type": "boolean", + "default": false + }, + "people": { + "type": "boolean", + "default": false + }, + "setAllTraitsByDefault": { + "type": "boolean", + "default": false + }, "superProperties": { "type": "array", "items": { @@ -74,14 +100,26 @@ } } }, - "consolidatedPageCalls": { "type": "boolean", "default": true }, - "trackCategorizedPages": { "type": "boolean", "default": false }, - "trackNamedPages": { "type": "boolean", "default": false }, + "consolidatedPageCalls": { + "type": "boolean", + "default": true + }, + "trackCategorizedPages": { + "type": "boolean", + "default": false + }, + "trackNamedPages": { + "type": "boolean", + "default": false + }, "sourceName": { "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, - "crossSubdomainCookie": { "type": "boolean", "default": false }, + "crossSubdomainCookie": { + "type": "boolean", + "default": false + }, "persistenceType": { "type": "string", "enum": ["none", "cookie", "localStorage"], @@ -91,7 +129,10 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, - "secureCookie": { "type": "boolean", "default": false }, + "secureCookie": { + "type": "boolean", + "default": false + }, "groupKeySettings": { "type": "array", "items": { @@ -104,8 +145,18 @@ } } }, - "useNativeSDK": { "type": "object", "properties": { "web": { "type": "boolean" } } }, - "useNewMapping": { "type": "boolean", "default": false }, + "useNativeSDK": { + "type": "object", + "properties": { + "web": { + "type": "boolean" + } + } + }, + "useNewMapping": { + "type": "boolean", + "default": false + }, "eventFilteringOption": { "type": "string", "enum": ["disable", "whitelistedEvents", "blacklistedEvents"], @@ -151,14 +202,23 @@ "type": "array", "items": { "type": "object", - "properties": { "purpose": { "type": "string", "pattern": "^(.{0,100})$" } } + "properties": { + "purpose": { + "type": "string", + "pattern": "^(.{0,100})$" + } + } } } }, "anyOf": [ { "if": { - "properties": { "userDeletionApi": { "const": "task" } }, + "properties": { + "userDeletionApi": { + "const": "task" + } + }, "required": ["userDeletionApi"] }, "then": { From c10a07ea8b41506b2e94cfcf716cc2cc1f893595 Mon Sep 17 00:00:00 2001 From: shrouti1507 <60211312+shrouti1507@users.noreply.github.com> Date: Tue, 14 Nov 2023 20:20:00 +0530 Subject: [PATCH 20/21] fix: removed shopify from src types of salesforce oauth (#1077) --- CHANGELOG.md | 1 + .../destinations/salesforce_oauth/db-config.json | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2873c915..f0b1e422a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ All notable changes to this project will be documented in this file. See [standa * remove web from Singular supported source ([#1051](https://github.com/rudderlabs/rudder-config-schema/issues/1051)) ([dee78f5](https://github.com/rudderlabs/rudder-config-schema/commit/dee78f54873b00a5802fbc3e34a33e65558b8933)) * schema generator script for updating tagInput fiel schema ([#1066](https://github.com/rudderlabs/rudder-config-schema/issues/1066)) ([688aa0b](https://github.com/rudderlabs/rudder-config-schema/commit/688aa0b67f2c70da37915407bdc7fc6f18281ebb)) + ### [1.58.1](https://github.com/rudderlabs/rudder-config-schema/compare/v1.58.0...v1.58.1) (2023-11-09) diff --git a/src/configurations/destinations/salesforce_oauth/db-config.json b/src/configurations/destinations/salesforce_oauth/db-config.json index 0e7115bb1..f8ce051fc 100644 --- a/src/configurations/destinations/salesforce_oauth/db-config.json +++ b/src/configurations/destinations/salesforce_oauth/db-config.json @@ -26,8 +26,7 @@ "warehouse", "reactnative", "flutter", - "cordova", - "shopify" + "cordova" ], "supportedMessageTypes": ["identify"], "destConfig": { From 721cd350415377fe6717876ee3a7a1c307295c1c Mon Sep 17 00:00:00 2001 From: nidhilashkari17 <108564211+nidhilashkari17@users.noreply.github.com> Date: Wed, 15 Nov 2023 11:42:39 +0530 Subject: [PATCH 21/21] chore: revert google ads image for the release (#1078) --- src/configurations/sources/singer_google_ads/db-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/sources/singer_google_ads/db-config.json b/src/configurations/sources/singer_google_ads/db-config.json index a33ab61f0..d59cd195e 100644 --- a/src/configurations/sources/singer_google_ads/db-config.json +++ b/src/configurations/sources/singer_google_ads/db-config.json @@ -6,7 +6,7 @@ "auth": { "provider": "Google" }, - "image": "rudderstack/source-google-ads:v6.2.0-fix-google-ads-custom-query", + "image": "rudderstack/source-google-ads:v6.2.0-fix-google-ads-error-handling", "isBeta": false }, "type": "cloudSource"