Prerequisites
Running a Messaging campaign in an embedded space requires an API key from MX. If you didn’t obtain one during the onboarding process, contact Support.Create a New Embedded Message
Use the dashboard to add, edit, or delete a space and track performance of an embedded message. To create a campaign for an embedded space, use the Messaging feature’s creation wizard. Note the settings you’ll need for creating an embedded message:- Select Embedded for the Delivery setting
- Select the message space for display
- Select a previously-created space
- Create a new space
- Set the Message type
- Banner ad
- Follow the steps to set priority, add the content and link, and launch the campaign
- Copy the space code
Use the Space Code
Embedded space code is in HTML and JavaScript (see example). The campaign message can be loaded in any location able to access the user’s MXuser_id.
- If a Message is located in multiple places, you will need to maintain the same dimensions across locations.
- If a user is targeted for multiple campaigns, they will be displayed according to the priority set when creating the campaign.
Example Code
Target Fields
| Field name | Requirement | Description |
|---|---|---|
analytics_api_key | Required | Unique API key that authenticates the request on the MX Platform. |
campaign_group_guid | Required | Unique identifier of the campaign space or group that the banner belongs to. |
user_id | Required | Unique ID that identifies the user. This value is created during user creation using MX APIs. |
element_id | Required | Unique ID for a placeholder HTML element that will be replaced with the ad when loaded. |
default_banner_image_url | Optional | The URL of the image banner ad that’s loaded when no campaign is available to load. |
default_banner_url | Optional | The destination URL that a user is directed to when they select the banner ad when no campaign is available to load. |

