Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Clicks Tracking

Method Objective

The method gives the system an understanding that the user clicked the campaign message: bulk, chain, transactional.

Syntax and parameters

Code Block
languageapplescript
themeFadeToGrey
sdk.notificationClicked(code, type)


NameTypeRequirementDescription
codestringrequired

Unique campaign code

Tip

The "src.id" value in the "payload" of the campaign should be used to define the value for this parameter. See Payload Examples.


typestringrequired

Campaign Type

Tip

The "src.type" value in the "payload" of the campaign should be used to define the value for this parameter. See Payload Examples.


Example of use

Code Block
languageapplescript
themeFadeToGrey
sdk.notificationClicked(code: "i7ykuagkjgfs", type: "mobile_push_transactional")


Anchor
tokensendios
tokensendios
Token Send

Method Objective

The method allows sending an iOS push notification token to the system.

Syntax and parameters

Code Block
languageapplescript
themeFadeToGrey
sdk.setPushTokenNotification(token: "TOKEN_STRINGios_token) { (tokenResponse) in
  print("Token set response")
}


NameTypeRequirementDescription
ios_tokenstringrequired

iOS push notification token

Example of use

Code Block
languageapplescript
themeFadeToGrey
sdk.setPushTokenNotification(token: "93b033a394da31b3160b8e0a35b80b6c16eb99a22ed34e88afe2a117dd4bc601") { (tokenResponse) in
  print("Token set response")
}



Payloads

Default Structure

Code Block
languagejs
themeFadeToGrey
{
  "aps": {
    "alert": {
      "title": "...",
      "subtitle": "...",
      "body": "...",
      "badge": 1
    },
    "mutable-content": 1
  },
  "image_url": "...",
  "event": {
    "type": "...",
    "uri": "..."
  },
  "src": {
    "type": "...",
    "id": "..."
  }
}



Anchor
basic
basic
Basic Message

Code Block
languagejs
themeFadeToGrey
{
  "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"
  }
}



Code Block
languagejs
themeFadeToGrey
{
  "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"
  }
}



Open Category

Code Block
languagejs
themeFadeToGrey
{
  "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"
  }
}



Open Product

Code Block
languagejs
themeFadeToGrey
{
  "aps": {
    "alert": {
      "title": "...",
      "subtitle": "...",
      "body": "...",
      "badge": 1
    },
    "mutable-content": 1
  },
  "image_url": "...",
  "event": {
    "type": "product",
    "uri": "PRODUCT123"
  },
  "src": {
    "type": "chain",
    "id": "ugLxQ7KrnL"
  }
}



Open Custom Page

Code Block
languagejs
themeFadeToGrey
{
  "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"
  }
}



Column

Page Navigation

Table of Contents
maxLevel1
indent0px
stylenone




Related Pages

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
cqllabel in ( "notifications" , "apppush" )