This section covers best practices for managing push tokens, tracking delivery metrics, and personalizing campaigns in the iOS SDK. Follow these practices to improve token reliability, maximize delivery visibility, and optimize campaign performance.
Before starting Personalization, make sure that Firebase is fully configured and the Messaging delegate is set.
During the first app launch, token callbacks frequently fire before the user accepts the notification permission prompt. To resolve this, either retrigger the callbacks after the permission is granted or set the token directly from the FCMToken property.
When a token changes, during an app reinstallation or a new token issuance by Firebase, the SDK captures both the previous and new tokens and forwards them to the platform. The platform then deactivates the deprecated token and activates the new one.
Tokens are associated with the most recent user set using [Evergage userId]. As a result, push campaigns target only the most recent user for each token.
To view a user’s registered push endpoints such as their platform, status, and last update timestamp, use the user profile page in the Personalization UI.
Token Validation and Send-Time Behavior
The SDK doesn’t send empty or null tokens to the server. The SDK ignores duplicate tokens.
Tokens are accepted only when the user grants notification permissions at the OS level.
During send time, the platform automatically skips users without a valid, enabled token.
The platform discards empty token updates.
If a device switches between multiple users, the push token is automatically transferred. The token is deactivated on the previous user profile and activated on the new user profile.
Each user can have up to 10 push endpoints per app per platform combination.
There is no pre-send API to check token coverage. To evaluate token availability, track campaign send metrics by comparing the number of eligible endpoints against actual sends.
Push Delivery Feedback and Campaign Metrics
Immediate Feedback
The platform detects invalid or disabled tokens at send time, prompting the system to automatically disable the endpoint for all future sends.
An expired Firebase server key or APNS certificate causes immediate campaign failures that are reflected in the campaign’s error count.
Asynchronous Feedback
When Firebase or APNS reports that a message wasn’t delivered (due to an invalid token or an unregistered device), the platform logs the event and increments the campaign’s delivery failure count.
Campaign Performance Metrics
The Personalization UI surfaces the following metrics to track campaign delivery and engagement:
Send requests
Sends by platform/channel
Send errors
Delivery failures and delivery failure rate
Clickthroughs and clickthrough rate
Clickthrough Tracking
When swizzling is enabled, clickthrough tracking is automatic.
Delivery Validation Limitation
Firebase and APNS doesn’t acknowledge a successful message delivery. The platform infers successful delivery only when no upstream gateway failure is returned. To measure confirmed delivery, monitor the clickthrough Rate.
Push Message Personalization
Send-Time Personalization
Contextualize push message titles and bodies per recipient at send time using dynamic variables. Supported data types include:
User Attributes: ${user.attributes.firstName}
Account Data: ${account.attributes.companyName}
Location Data: ${user.location.city}
Product or Item Data: ${item.name}, ${item.price}, ${item.imageUrl}
Advanced Experimentation & Targeting
Use automatic user assignments in a campaign to deploy multiple experiences.
User Percentage (A/B Testing): Splits audiences by percentage with sticky assignments to make sure that the user experience stays consistent.
Rules-Based Targeting: Evaluates segment and attribute criteria to match users to specific experiences.
Multivariate Testing (MVT): Allocates traffic to percentage-based test groups across dimensions.
Dynamic Product Recommendations
Automatically select tailored product recommendations for your users based on user behavior. This feature is powered by the recommendations engine, custom query-based selections, or contextual algorithms, and includes a configurable lookback window for historical behavioral data.
Platform-Specific Payloads
Configure distinct JSON data payloads for iOS and Android within a single unified campaign. These payload configurations support the ingestion of dynamic variables.
Control Groups
Use built-in holdout groups to isolate target segments and accurately measure the incremental impact and lift of your push campaigns.
iOS-Specific Consideration Guidance
Swizzling mode handles token capture and notification tracking automatically. Without swizzling, the app manually forwards tokens and notification interactions.
If both APNS and Firebase credentials are configured, to prevent duplicates, each campaign sends through one channel only.