To add Embedded Messaging to your Iterable account, talk to your customer success manager.
This article gives a high-level look at how to implement Embedded Messaging in your app or website, without an Iterable SDK.
In this article
- Step 1: Coordinate with your marketing and design teams
- Step 2: Create a Mobile or Web API key
- Step 3: Fetch embedded messages from Iterable
- Step 4: Track message receipt
- Step 5: Track session-related information
- Step 6: Display messages
- Step 7: Track impression-related information
- Step 8: Track clicks
- Step 9: Save sessions and impressions to Iterable
Step 1: Coordinate with your marketing and design teams
First, work with your marketing and design teams to understand:
Where to display embedded messages in your app (where your placements go).
The Iterable-assigned numeric ID for each placement (so you can display the right messages in the right places).
The data to be displayed by each placement's messages. This determines what you can expect to find in the payload of a message associated with that placement.
The message design for each placement.
Step 2: Create a Mobile or Web API key
To make Embedded Messaging–related API calls, you'll need to use a Mobile or Web API key.
Step 3: Fetch embedded messages from Iterable
To fetch embedded messages from Iterable, call:
This endpoint returns the messages for which the signed-in user is eligible,
Fetch messages at key points during your application lifecycle. For example, when a user visits a particular page or screen that displays embedded messages, or when your app comes to the foreground.
Do not poll the API for embedded messages at a regular interval.
Step 4: Track message receipt
For each message you fetch from Iterable, track an
in Iterable. To do this, call (once per message):
Step 5: Track session-related information
A session is a period of time when a user is on a screen in your app or a page in your website where embedded messages can be displayed (for one or more placements). When this happens:
- Create a unique identifier (UUID of your own creation) for the session.
- Track the session start time (Unix timestamp such as
Step 6: Display messages
Use the messages from step 3 to display embedded messages. Display the messages however makes sense in your application, using the message payload to define content and interactions.
Remember, messages are assigned to specific placements. When a user is viewing a particular placement in your app or on your webpage, only display messages assigned to that placement. And be sure to display them in priority order!
Step 7: Track impression-related information
During a session, as embedded messages appear and disappear, track data about message impressions. In step 9, you'll send this information back to Iterable.
For every message that appears, track:
- The total number of times that it appears during the session
- The total visibility time for the message, across all its appearances in the session.
Step 8: Track clicks
When a user clicks on an embedded message or one of its buttons, track an
embeddedClick event in Iterable. To do this, call:
Step 9: Save sessions and impressions to Iterable
When the user navigates away from a page or screen that displays embedded messages:
- Note the session end time (Unix timestamp such as
- Send session and impressions information back to Iterable. To do this, call:
embeddedImpression events in Iterable.