diff --git a/src/configurations/destinations/customerio/db-config.json b/src/configurations/destinations/customerio/db-config.json index b1c28b50f..7f15f692a 100644 --- a/src/configurations/destinations/customerio/db-config.json +++ b/src/configurations/destinations/customerio/db-config.json @@ -41,7 +41,7 @@ "eventFilteringOption", "oneTrustCookieCategories" ], - "web": ["useNativeSDK"] + "web": ["useNativeSDK", "sendPageNameInSDK"] }, "secretKeys": [] } diff --git a/src/configurations/destinations/customerio/schema.json b/src/configurations/destinations/customerio/schema.json index 4c496e046..c0a5a2883 100644 --- a/src/configurations/destinations/customerio/schema.json +++ b/src/configurations/destinations/customerio/schema.json @@ -1,7 +1,10 @@ { "configSchema": { "$schema": "http://json-schema.org/draft-07/schema#", - "required": ["siteID", "apiKey"], + "required": [ + "siteID", + "apiKey" + ], "type": "object", "properties": { "siteID": { @@ -16,11 +19,33 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, - "datacenterEU": { "type": "boolean", "default": false }, - "useNativeSDK": { "type": "object", "properties": { "web": { "type": "boolean" } } }, + "datacenterEU": { + "type": "boolean", + "default": false + }, + "sendPageNameInSDK": { + "type": "object", + "properties": { + "web": { + "type": "boolean" + } + } + }, + "useNativeSDK": { + "type": "object", + "properties": { + "web": { + "type": "boolean" + } + } + }, "eventFilteringOption": { "type": "string", - "enum": ["disable", "whitelistedEvents", "blacklistedEvents"], + "enum": [ + "disable", + "whitelistedEvents", + "blacklistedEvents" + ], "default": "disable" }, "whitelistedEvents": { @@ -61,4 +86,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/configurations/destinations/customerio/ui-config.json b/src/configurations/destinations/customerio/ui-config.json index ed1a2f987..58ecda6b1 100644 --- a/src/configurations/destinations/customerio/ui-config.json +++ b/src/configurations/destinations/customerio/ui-config.json @@ -36,6 +36,13 @@ "value": "datacenterEU", "default": false, "footerNote": "Turn it ON if you want to send data to EU servers" + }, + { + "type": "checkbox", + "label": "Send Page Name in SDK mode", + "value": "sendPageNameInSDK", + "default": true, + "footerNote": "Turn it OFF if you don't want to send the page name when connected in device mode. If OFF page name will automatically be captured by CustomerIo." } ] }, @@ -125,4 +132,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/test/data/validation/destinations/customerio.json b/test/data/validation/destinations/customerio.json index 4d2c584e9..3e95eafc4 100644 --- a/test/data/validation/destinations/customerio.json +++ b/test/data/validation/destinations/customerio.json @@ -6,10 +6,27 @@ "deviceTokenEventName": "device_token_registered", "datacenterEU": false, "eventFilteringOption": "disable", - "whitelistedEvents": [{ "eventName": "eventmodel" }], - "blacklistedEvents": [{ "eventName": "taxmodel" }], - "useNativeSDK": { "web": false }, - "oneTrustCookieCategories": [{ "oneTrustCookieCategory": "Marketing" }] + "whitelistedEvents": [ + { + "eventName": "eventmodel" + } + ], + "blacklistedEvents": [ + { + "eventName": "taxmodel" + } + ], + "useNativeSDK": { + "web": false + }, + "sendPageNameInSDK": { + "web": true + }, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "Marketing" + } + ] }, "result": true }, @@ -19,13 +36,32 @@ "deviceTokenEventName": "device_token_registered", "datacenterEU": false, "eventFilteringOption": "whitelistedEvents", - "whitelistedEvents": [{ "eventName": "eventmodel" }], - "blacklistedEvents": [{ "eventName": "taxmodel" }], - "useNativeSDK": { "web": false }, - "oneTrustCookieCategories": [{ "oneTrustCookieCategory": "" }] + "whitelistedEvents": [ + { + "eventName": "eventmodel" + } + ], + "blacklistedEvents": [ + { + "eventName": "taxmodel" + } + ], + "useNativeSDK": { + "web": false + }, + "sendPageNameInSDK": { + "web": false + }, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "" + } + ] }, "result": false, - "err": [" must have required property 'siteID'"] + "err": [ + " must have required property 'siteID'" + ] }, { "config": { @@ -33,10 +69,27 @@ "apiKey": "95bd1330072974f0ff9b", "deviceTokenEventName": "device_location_registered", "datacenterEU": true, - "whitelistedEvents": [{ "eventName": "practice" }], - "blacklistedEvents": [{ "eventName": "spam_listings" }], - "useNativeSDK": { "web": false }, - "oneTrustCookieCategories": [{ "oneTrustCookieCategory": "Sales" }] + "whitelistedEvents": [ + { + "eventName": "practice" + } + ], + "blacklistedEvents": [ + { + "eventName": "spam_listings" + } + ], + "useNativeSDK": { + "web": false + }, + "sendPageNameInSDK": { + "web": false + }, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "Sales" + } + ] }, "result": true }, @@ -47,13 +100,35 @@ "deviceTokenEventName": "device_id_removed", "datacenterEU": false, "eventFilteringOption": "disable", - "whitelistedEvents": [{ "eventName": ["e1", "v1"] }], - "blacklistedEvents": [{ "eventName": "taxmodel" }], - "useNativeSDK": { "web": false }, - "oneTrustCookieCategories": [{ "oneTrustCookieCategory": "Pitch" }] + "whitelistedEvents": [ + { + "eventName": [ + "e1", + "v1" + ] + } + ], + "blacklistedEvents": [ + { + "eventName": "taxmodel" + } + ], + "useNativeSDK": { + "web": false + }, + "sendPageNameInSDK": { + "web": true + }, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "Pitch" + } + ] }, "result": false, - "err": ["whitelistedEvents.0.eventName must be string"] + "err": [ + "whitelistedEvents.0.eventName must be string" + ] }, { "config": { @@ -62,11 +137,22 @@ "deviceTokenEventName": "device_token_registered", "datacenterEU": "Germany", "eventFilteringOption": "disable", - "useNativeSDK": { "web": false }, - "oneTrustCookieCategories": [{ "oneTrustCookieCategory": "Marketing" }] + "useNativeSDK": { + "web": false + }, + "sendPageNameInSDK": { + "web": false + }, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "Marketing" + } + ] }, "result": false, - "err": ["datacenterEU must be boolean"] + "err": [ + "datacenterEU must be boolean" + ] }, { "config": { @@ -75,12 +161,21 @@ "deviceTokenEventName": "qwsafpmznjhbfjhchdgeiuudhwgvdfkzxuiookaghhrytedhgfgjslalapooiqnbvemixuhevvsjklodjdokhuijghqwnvzxccdwsalkijediwhfwibkjnkji", "datacenterEU": true, "eventFilteringOption": "disable", - "useNativeSDK": { "web": false }, - "oneTrustCookieCategories": [{ "oneTrustCookieCategory": "Marketing" }] + "useNativeSDK": { + "web": false + }, + "sendPageNameInSDK": { + "web": false + }, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "Marketing" + } + ] }, "result": false, "err": [ "deviceTokenEventName must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"" ] } -] +] \ No newline at end of file