Skip to content

Commit

Permalink
feat: added device-mode support for customer.io (#1430)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnab-p authored Jun 13, 2024
1 parent 15eaa2d commit 1e7545a
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 9 deletions.
18 changes: 14 additions & 4 deletions src/configurations/destinations/customerio/db-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"apiKey",
"siteID",
"datacenter",
"autoTrackDeviceAttributes",
"backgroundQueueMinNumberOfTasks",
"backgroundQueueSecondsDelay",
"blacklistedEvents",
"whitelistedEvents",
"oneTrustCookieCategories",
Expand Down Expand Up @@ -39,8 +42,8 @@
},
"supportedConnectionModes": {
"web": ["cloud", "device"],
"android": ["cloud"],
"ios": ["cloud"],
"android": ["cloud", "device"],
"ios": ["cloud", "device"],
"unity": ["cloud"],
"amp": ["cloud"],
"cloud": ["cloud"],
Expand All @@ -62,8 +65,15 @@
"oneTrustCookieCategories",
"ketchConsentPurposes"
],
"android": ["consentManagement", "connectionMode"],
"ios": ["consentManagement", "connectionMode"],
"android": [
"useNativeSDK",
"autoTrackDeviceAttributes",
"backgroundQueueMinNumberOfTasks",
"backgroundQueueSecondsDelay",
"consentManagement",
"connectionMode"
],
"ios": ["useNativeSDK", "autoTrackDeviceAttributes", "consentManagement", "connectionMode"],
"web": [
"connectionMode",
"dataUseInApp",
Expand Down
48 changes: 43 additions & 5 deletions src/configurations/destinations/customerio/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,52 @@
"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" } } },
"sendPageNameInSDK": {
"type": "object",
"properties": {
"web": { "type": "boolean" }
}
},
"backgroundQueueMinNumberOfTasks": {
"type": "object",
"properties": {
"android": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
}
}
},
"backgroundQueueSecondsDelay": {
"type": "object",
"properties": {
"android": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
}
}
},
"autoTrackDeviceAttributes": {
"type": "object",
"properties": {
"android": { "type": "boolean" },
"ios": { "type": "boolean" }
}
},
"useNativeSDK": {
"type": "object",
"properties": {
"web": { "type": "boolean" },
"android": { "type": "boolean" },
"ios": { "type": "boolean" }
}
},
"dataUseInApp": { "type": "object", "properties": { "web": { "type": "boolean" } } },
"connectionMode": {
"type": "object",
"properties": {
"web": { "type": "string", "enum": ["cloud", "device"] },
"android": { "type": "string", "enum": ["cloud"] },
"ios": { "type": "string", "enum": ["cloud"] },
"android": { "type": "string", "enum": ["cloud", "device"] },
"ios": { "type": "string", "enum": ["cloud", "device"] },
"unity": { "type": "string", "enum": ["cloud"] },
"amp": { "type": "string", "enum": ["cloud"] },
"cloud": { "type": "string", "enum": ["cloud"] },
Expand Down Expand Up @@ -523,6 +560,7 @@
}
}
}
}
},
"additionalProperties": false
}
}
29 changes: 29 additions & 0 deletions src/configurations/destinations/customerio/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,35 @@
"note": "Turn it ON if you want to send in-app messages to your website.",
"configKey": "dataUseInApp",
"default": false
},
{
"type": "checkbox",
"label": "Automatically track device attributes in SDK mode",
"note": "Turn it OFF if you don't want Customer.io to track device attributes automatically.",
"configKey": "autoTrackDeviceAttributes",
"default": true
},
{
"type": "textInput",
"label": "Minimum number of tasks in Background Queue",
"configKey": "backgroundQueueMinNumberOfTasks",
"regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$",
"regexErrorMessage": "Invalid value. Must be neumeric",
"secret": false,
"default": 10,
"note": ["The number of tasks kept in Background Queue"],
"placeholder": "e.g: 10"
},
{
"type": "textInput",
"label": "Delay in seconds for Background Queue",
"configKey": "backgroundQueueSecondsDelay",
"regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$",
"regexErrorMessage": "Invalid value. Must be neumeric",
"secret": false,
"default": 30,
"note": ["Amount of delay for events to keep in Background Queue"],
"placeholder": "e.g: 30"
}
]
},
Expand Down

0 comments on commit 1e7545a

Please sign in to comment.