Subscribe contacts to push notification campaigns
When push notifications is properly configured, and SDKs are integrated in your application, the push notification token will be added to the contact. This enables you to build user Journeys that include sending push notifications.
In order to include the contact in push notification Campaigns, it's important to get the consent of the user to receive marketing push notifications. When the user gives their consent, you can reflect that on the contact by setting the subscribedPush attribute.
Esempio di codice
val attributes = Attributes()
.put("displayName", "Roy Glass")
.put("subscribedPush", true)
bird?.contact?.putAttributes(attributes) Esempio di codice
let attributes = Attributes()
.put("displayName", "Roy Glass")
.put("subscribedPush", true)
bird?.contact.putAttributes(attributes: attributes)Esempio di codice
Bird.eventTarget.addEventListener('bird-sdk-initialized', async () => {
await Bird.contact.putAttributes({
displayName: "Roy Glass",
subscribedPush: true,
});
});