Define Your Mobile App Event Schema

An app event requires a name and can optionally contain many attributes. Depending on your app and use cases, you can capture events or attributes that are more descriptive than others.

Important
Important The name of both the event and the attributes defined within Marketing Cloud Engagement must match the name tracked by the MobilePush SDK. This naming allows Journey Builder to react to app events.

Event and Attribute Naming Conventions

  • Use only alphanumeric characters and underscores and spaces.
    • Acceptable: Added_to_Cart or Added To Cart
    • Acceptable: product_ID or product ID
    • Unacceptable: Added-to-Cart or Added to [emoji]
  • Unicode and double-byte characters, such as emoji and kanji, aren’t supported.
  • Leading and trailing whitespaces in names are automatically trimmed.
  • Names aren’t case-sensitive.
    • MyEvent is equal to myevent
    • ViewScreen is equal to viewscreen
    • View Screen ! isn’t equal to ViewScreen

Event and Attribute Naming Conventions

Make sure that your organization uses a consistent event and attribute naming convention across your app. This action keeps your account’s data clean while avoiding the confusion that can result in triggering the wrong campaign based on a misunderstood event. We recommend starting by brainstorming the most important high-level actions that users perform in your app.

Mobile app events track user actions and aren’t objects. As a result, we recommend applying a verb-first naming convention for your events.

Example
Example User made a purchase: Purchase
Example
Example User registered for an account: Registered

For events with more than two words, we recommend using spaces or underscores.

Example
Example User viewed a specific screen: Viewed Screen
Example
Example User added a product to a cart: Added_to_cart
Example
Example User used a new feature: Used [X] feature

When creating an event name, make it generic and use attributes to capture the specific details or metadata about the event.

Sometimes, more detailed event names are required such as specific campaigns, such as onboarding or first-time user action.

Example
Example First Order Completed
Example
Example First App Open
Example
Example First used [X] feature

Example .csv File

Use the example template to collaborate with your development team and define the event schema that you want to track with the MobilePush SDK and use throughout Journey Builder. Then create a .csv and upload the file through the App Event Management page in Journey Builder.

Important Notes

  • Values must be text, number, or boolean.
  • Template fields are mapped by ordinal.
  • Values aren’t case-sensitive.
  • Event Description is needed only once.
    Note
    Note Event Description limit is 250 characters.
  • The description is pulled from the first row where the event name occurs.
  • Attribute Data Type is a required field for every attribute name.
  • If not defined, Attribute Required is an optional field that defaults to FALSE.
  • Assigned Data Type is required: text, number, or boolean.
  • Marketing Cloud Engagement doesn’t limit the number of event names or event attributes in MobilePush apps. Salesforce recommends using up to 20 event names and 10 event attributes. The maximum length for an attribute value can either be blank or a number.
    Note
    Note If you don’t specify a maximum length, the default is 50. The maximum allowed value is 100 characters.
Example .csv
Event Name Event Description Attribute Name Attribute Data Type Attribute Required Attribute Value Length
Installed App User installs the app        
Viewed Screen User views a specific screen in the app Screen Name Text TRUE 50
Signed Up User registers for an account Username Text   100
Favorited User adds item to their list of favorites Item Name Text   100
Favorited User adds an item from a specific category to their list of favorites Item Category Text   100
Started Checkout User began the checkout process Order ID Text TRUE  
Started Checkout   Order Total Number TRUE  
Started Checkout   Currency Type Text TRUE  
Completed Checkout User completes an order Order ID Text TRUE  
Completed Checkout User completes an order Order Total Text TRUE  
Completed Checkout User completes the checkout with a coupon Used Coupon Boolean TRUE