Cleverpush
Summary
Official websites
Site | URL |
|---|---|
Website | |
Documentation |
Developer integrations
Platform | URL |
|---|---|
Android | |
iOS | |
Web | not supported by Purple. Web integration may be done via Widget Component. |
Tracking service
Event support matrix
Overview of the supported events and their configuration.
| Templates | Parameter |
|---|---|---|
Actions | action | not supported |
Views | name | supported |
Purchases | action | not supported |
Attributes* | name | not supported |
(*) Tracking of Attributes follows a special handling. More detailed information can be found below in the description of the configuration for attributes.
General structure in tracking_config.json
Tracking service key name in "tracking_config.json" is: "cleverpush"
{
"cleverpush": {
"eventsEnabledByDefault": true,
"viewsEnabledByDefault": true,
"purchasesEnabledByDefault": true,
"attributesEnabledByDefault": true,
"events": {
// your configured list of events
},
"views": {
// your configured list of events
},
"purchases": {
// your configured list of events
},
"attributes": {
// your configured list of attributes
}
}
}Event configuration
Actions
Cleverpush supports action events.
"action_event_key": {
"templates": {
"action": "value of template"
}
}Action events have to be configured in the Cleverpush frontend first.
Views
Cleverpush supports view events.
"view_event_key": {
"templates": {
"name": "value of template"
},
"parameters": {
"parameter_key_1": "value of parameter",
// your configured list of parameters
}
}Purchases
Cleverpush supports purchase events.
"purchase_event_key": {
"templates": {
"action": "value of template"
}
}Purchase events are tracked by using the same API as action events. Except for one difference:
The amount of the product price is added automatically to this event.
Purchase events have to be configured in the Cleverpush frontend first.
Attributes
Cleverpush supports attributes.
"HAS_ACTIVE_SUBSCRIPTION": {
"templates": {
"name": "FfgfGT6ZJzffg4Bfm"
}
}Templates
Cleverpush distinguish between tags and attributes. Purple's implementation uses that as follows:
Boolean attributes will set tags in Cleverpush while string attributes are saved as attribute. Both variants have its own requirements to its template value.
Attributes and tags both have to be configured in the Cleverpush frontend first.
Variant | Template key | Template value |
|---|---|---|
Boolean-value | name | The value has to be the id of the tag. |
String-value | name | The value has to be the key of the attribute. |
Additional supported functionality
Topics
To enhance this feature an action URL is provided by Purple:
Action URL | Description |
|---|---|
purple://app/cleverpush/topics/open | Open the topics view. |
This action URL is filtered from the app menu when Cleverpush is not enabled.
How to configure
Native Purple App
Any native Tracking Service is configured in the Purple Manager.
Enable SDK
Settings location
"Your app" => "Consent/Push/Analytics" => "Analytics (General/iOS/Android/Web)"
Setting | Description |
|---|---|
Enable Cleverpush | To enable the Cleverpush SDK in your app, activate this checkbox. |
CleverPush Channel ID | The Cleverpush channel id. |
Apple privacy / ATT
Settings location
"Your app" => "Consent/Push/Analytics" => "Privacy"
Consent management
Settings location:
"Your app" => "Consent/Push/Analytics" => "Consent Management"
Setting | Description |
|---|---|
Vendor-ID for Cleverpush | The Vendor-ID is provided by the consent management platform. |
Web integration
Purple does not support Cleverpush web integration.
Experimental Support can be achieved by adding cleverpushes loaderscript and cleverpush service worker via dynamic resources:
Insert loader script
as generic widget (recommended)
... todo
via experience.config.json
"scripts": {
"head": [
{
"src": "https://static.cleverpush.com/channel/loader/[channel_id].js",
"type": "text/javascript",
"async": true
}
]
}via custom.js
function loadCleverPushSnippet() {
const cleverpushSnippet = document.createElement('script');
cleverpushSnippet.src = 'https://static.cleverpush.com/channel/loader/[channel_id].js';
cleverpushSnippet.async = true;
cleverpushSnippet.dataset.clientSideAppended = true;
document.head.appendChild(cleverpushSnippet);
}
loadCleverPushSnippet();
Add cleverpush service worker entry point file
in a public accessible dir create a file `cleverpush-worker.js` with these contents
importScripts('https://static.cleverpush.com/channel/worker/[channel_id].js' + self.location.search);one possible location is in dynamic resources:
/default/storefront/assets/cleverpush-worker.js
the public adress of this file will be:
`https://[webroot-of-purple-app]/delivery/web/dynamicResources/[purple-app-id]/storefront/assets/cleverpush-worker.js[?preview=true]`
this path needs to be configured in cleverpush admin (https://app.cleverpush.com)
find settings platform -> web push -> general -> operation mode
there is an input Set own file paths
insert above public path (starting with /delivery...
Test Integration
After completed integration steps, in frontend of the app look for push notification permission prompt (e.g. "your website wants to send you notifications. Allow?")

Go to cleverpush admin
find settings platform -> web push -> analyzation -> subscriptions
Troubleshooting
Cleverpush does no accept the worker file path (e.g. cannot find file at the path or similar error)
Make sure cleverpush services does not access a cached version of the purple app (e.g. cloudeflare), clear cloudfront cache in manager settings of the app (experience settings)
Cleverpush UI does not show in frontend
if ui does not show, in browser console try
`[window.]CleverPush.CleverPush.triggerOptIn()`