The custom data field allows you to attach metadata to push messages and act on this data after a message is delivered. These data fields will be available for every message you send with the Mobile Engage application.

The data is sent in the u parameter of a push message. You can find the documentation of our delivery partner here, and this is the relevant part from it:

"data": {"key":"value"}, // JSON string or JSON object, will be passed as "u" parameter in the payload (converted to JSON string).

Contents

Creating custom data fields

You can create data fields for every Mobile Engage App in the Apps settings:

apps-settings

Click Create New, and fill in the fields:

create-data-field

  • String ID – This is the key which will be included in the push message. Do not use spaces in string IDs.
  • Name – This is what is displayed on the Emarsys interface.
  • Default value – You can add default values for every field, which will appear in the Custom Data section of the Content Creation page of your push message. If you do not edit them, these values will be sent with the message.
  • Hint – You can add a hint for every field to describe what it does when you edit the field. This will appear in gray when the value field is empty.

Note: If you do not define a default value for a field and you do not add one manually, the field will be sent out as empty.

Viewing and editing custom data fields

You can see all your custom data fields, and edit their default values, on the Apps tab:

data-field-overview

For each push message, you can edit the actual values in the Custom Data section of the Content Creation page.

custom-data

Using custom fields for deep links and parameters

Deep links are links which point to a certain screen within your application. For example, if you receive a message from a friend, the application will be opened at the message thread, or if you leave something in your cart, the application will be opened at your cart. Without deep links, the applications open at their main pages.

  • Create a field called Deep link with a string ID deep_link, and without a default value.
  • Create the following fields if you are using Google Analytics:
    • utm_source
    • utm_medium
    • utm_campaign
  • Use default values for your push campaign. Change the campaign value only if the defaults do not suite your needs.