Cleverpush
24 min
summary official websites site url website https //cleverpush com/ https //cleverpush com/de/ documentation https //developers cleverpush com/ https //developers cleverpush com/ developer integrations platform url android https //github com/cleverpush/cleverpush android sdk https //github com/cleverpush/cleverpush android sdk ios https //github com/cleverpush/cleverpush ios sdk https //github com/cleverpush/cleverpush ios sdk web \<font color="#ff6900">not supported by purple \</font> web integration may be done via widget component docid\ h1jhhes1y7unru3wv6smd tracking service event support matrix overview of the supported events and their configuration templates parameter \<font color="#2166ae">actions\</font> \<font color="#3b9f0f">action\</font> \<font color="#ff6900">not supported\</font> \<font color="#2166ae">views\</font> \<font color="#3b9f0f">name\</font> \<font color="#3b9f0f">supported\</font> \<font color="#2166ae">purchases\</font> \<font color="#3b9f0f">action\</font> \<font color="#ff6900">not supported\</font> \<font color="#2166ae">attributes\</font> \<font color="#9900ef"> \</font> \<font color="#3b9f0f">name\</font> \<font color="#ff6900">not supported\</font> \<font color="#9900ef">( )\</font> tracking of \<font color="#2166ae">attributes\</font> 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 " \<font color="#2166ae">cleverpush\</font> " general structure { "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 "action event key" { "templates" { "action" "value of template" } } example "issue downloaded" { "templates" { "action" "issue downloaded" } } action events have to be configured in the cleverpush frontend first views cleverpush supports view events view event "view event key" { "templates" { "name" "value of template" }, "parameters" { "parameter key 1" "value of parameter", // your configured list of parameters } } example 1 "storefront feed" { "templates" { "name" "/feed" } } example 2 "app menu" { "templates" { "name" "/app/menu" } } example 3 "issue content" { "templates" { "name" "/issue/{{issue id}}" }, "parameters" { "issue name" "{{issue name}}" } } purchases cleverpush supports purchase events purchase event "purchase event key" { "templates" { "action" "value of template" } } example "storefront subscription purchased" { "templates" { "action" "subscription purchased {{product id}}" } } 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 attribute "attribute key" { "templates" { "name" "value of template" } } example boolean value "has active subscription" { "templates" { "name" "ffgfgt6zjzffg4bfm" } } example string value "my string attribute" { "templates" { "name" "my string attribute" } } templates cleverpush distinguish between tags and attributes purple's implementation uses that as follows boolean attributes will set \<font color="#2166ae">tags\</font> in cleverpush while string attributes are saved as \<font color="#2166ae">attribute\</font> 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 \<font color="#3b9f0f">name\</font> the value has to be the id of the tag string value \<font color="#3b9f0f">name\</font> the value has to be the key of the attribute additional supported functionality topics topics android https //developers cleverpush com/docs/sdks/android/methods#topics https //developers cleverpush com/docs/sdks/android/methods#topics ios https //developers cleverpush com/docs/sdks/ios/methods#topics https //developers cleverpush com/docs/sdks/ios/methods#topics to enhance this feature an action url is provided by purple action url description \<font color="#2166ae">purple //app/cleverpush/topics/open\</font> 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 \<font color="#2166ae">purple manager \</font> enable sdk settings location " \<font color="#2166ae">your app\</font> " => " \<font color="#2166ae">consent/push/analytics\</font> " => " \<font color="#2166ae">analytics (general/ios/android/web)\</font> " 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 " \<font color="#2166ae">your app\</font> " => " \<font color="#2166ae">consent/push/analytics\</font> " => " \<font color="#2166ae">privacy\</font> " consent management settings location " \<font color="#2166ae">your app\</font> " => " \<font color="#2166ae">consent/push/analytics\</font> " => " \<font color="#2166ae">consent management\</font> " 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()`