Custom Event

To capture user-defined attributes in the mobile SDK, define the source properties in a custom event. You can then map the fields to a Custom Event Schema using the Mobile Schema naming conventions.

Custom Event Example

iOS
1CustomEvent(
2    name: "Custom Event",
3    attributes: [
4        "giftWrap" : true,
5        "giftMessage" : "Happy Birthday",
6        "giftWrapOptions": [
7            "paperColor": "green",
8            "ribbon": false
9  ]
10    ]
11)
Android
1EventManager.customEvent(
2    name = "Custom Event",
3    attributes = mapOf(
4        "gift" to mapOf(
5            "message" to "Happy Birthday",
6            "wrap" to true,
7            "wrapOptions" to mapOf(
8                "paper-color" to "green",
9                "ribbon" to false
10            )
11        )
12    )
13)