You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 7 Next »
The method gives the system an understanding that the user clicked the campaign message: bulk, chain, transactional.
sdk.notificationClicked(code, type)
Unique campaign code
The "src.id" value in the "payload" of the campaign should be used to define the value for this parameter. See Payload Examples.
Campaign Type
The "src.type" value in the "payload" of the campaign should be used to define the value for this parameter. See Payload Examples.
sdk.notificationClicked(code: "i7ykuagkjgfs", type: "mobile_push_transactional")
sdk.setPushTokenNotification(token: "TOKEN_STRING") { (tokenResponse) in print("Token set response") }
{ "aps": { "alert": { "title": "...", "subtitle": "...", "body": "...", "badge": 1 }, "mutable-content": 1 }, "image_url": "...", "event": { "type": "...", "uri": "..." }, "src": { "type": "...", "id": "..." } }
{ "aps": { "alert": { "title": "Welcome aboard!", "subtitle": "Greeting message.", "body": "Hey, it's nice to know you're with us now. Check new updates in our application.", "badge": 1 }, "mutable-content": 1 }, "image_url": "...", "src": { "type": "bulk", "id": "33631" } }
{ "aps": { "alert": { "title": "Only today", "subtitle": "Special Offer", "body": "This special offer for Dyson products only for you!", "badge": 1 }, "mutable-content": 1 }, "image_url": "...", "event": { "type": "web", "uri": "https://example.com/landing/promo" }, "src": { "type": "bulk", "id": "XFMjM4VAF4" } }
{ "aps": { "alert": { "title": "Black Friday!", "subtitle": "Discount", "body": "Check our big sale from this category", "badge": 1 }, "mutable-content": 1 }, "image_url": "...", "event": { "type": "category", "uri": "BFRIDAY_CATEGORY_ID" }, "src": { "type": "chain", "id": "72CONd54uF" } }
{ "aps": { "alert": { "title": "...", "subtitle": "...", "body": "...", "badge": 1 }, "mutable-content": 1 }, "image_url": "...", "event": { "type": "product", "uri": "PRODUCT123" }, "src": { "type": "chain", "id": "ugLxQ7KrnL" } }
{ "aps": { "alert": { "title": "...", "subtitle": "...", "body": "...", "badge": 1 }, "mutable-content": 1 }, "image_url": "...", "event": { "type": "custom", "uri": "order/status/36", "payload": {} }, "src": { "type": "transactional", "id": "order_delivered" } }
Page Navigation
Related Pages