• iOS
  • Android
  • Windows
  • Cordova
  • Web
  • Unity
  • Adobe Air
  • Dashboard
  • API
  • Guides
  • FAQ
  • Documentation > Guides

    Creating a tagging plan

    Tagging plan

    Batch can collect custom data to improve your targeting and send better messages to your users. There are three types of custom data you can gather: Attributes, tags or events.

    Before tagging your app, you need to take some time to consider what information you really need in order to target your users. The preparation of the tagging plan is fundamental in building your push strategy and getting the most out of Batch.

    IMPORTANT
    Anything related with your users IDs should be managed using our Custom user ID implementation (iOS / Android).

    Introduction

    Attributes

    Example attributes

    Attributes are useful as they provide information on who your users are (1 value per attribute). You can collect different kind of values:

    • String: City, gender, currency, etc (E.g. user_city="London").
    • Number: Monthly spend, player level, etc (E.g. user_age=23).
    • Date: End of trial, expected birth date, etc (E.g. signup_date="2016-01-24T11:00:00").
    • Boolean: Features activated, premium subscription, etc (E.g. is_premium=false).

    You can also use attributes to customise the content of your push notifications.
    E.g. John, you're only on level 4, come back and play !

    Tags

    A tag is a collection of strings. You can add/remove strings to your tag collection and clear the strings list at any moment. There are two things you can do with tags:

    Tags may be called Channels or Topics with other push providers. The difference is that Batch attaches a "tag" to your user and will only make the list of users once you have created your campaign on the dashboard or from the API.

    Multiple interests

    If you have a shopping app, you can use a tag collection to know what our users' favorite brands are and send them contextual notifications. The tag collection would look like this: favorite_brands=["nike", "adidas", "reebok"].

    Users can then come back later and change their choices to add or remove brands. The tag collection will be updated accordingly: favorite_brands=["adidas", "puma", "lacoste"]

    User interests

    Thematic opt-in

    You can also use tags to manage your users’ push options (e.g. user_optins). The tag collection would look like this: user_optins=["sports", "culture"]. You will only have to target the tag "sports" when you send a push on this topic.

    User optins

    Events

    Events track information on what, when and how many times a user does something in your app. Use them exclusively for meaningful interactions: Item purchased, read/shared content, page visited, etc.

    Example events

    You can get the following information from an event:

    • Date: Date of the first and last occurrence.
    • Count: Total number of times an event occurred.
    • Label: Extra information on the event. This can be anything you want (name of an item, category visited, etc).

    E.g. item_purchase. Label: "Nike shoes". Last occurrence was 30 days ago.

    You can also use events as a trigger to display an In-App message.
    E.g. Display an In-App message when users trigger the event "added_to_cart" with the label "shoes".

    Creating your tagging Plan

    Step 1. Define your objectives

    The very first step is to list a maximum of 10 questions you have on your users. Here are a few recommendations you can use.

    Here is an example for an mcommerce app. We have only selected questions that may have an interest to target users, customise the content of the notifications or trigger In-App messages:

    • What is my user's first name?
    • Where do my user live?
    • What is my user’s gender?
    • Do they have a Premium subscription?
    • What/when was their last purchase?
    • What is the last item they checked?
    • Do they have any items on their wishlist?
    • Did they abandon an item in their cart?

    Do not track sensitive data

    You should not track data on racial or ethnic origin, political opinions, religious or philosophical beliefs, trade-union membership and health or sex life unless users have the option not to provide that kind of information.

    Do not go into too much details

    Try to write generic questions and delete the ones that are not 100% necessary.

    E.g. Does my user visit the sunglasses section? And the pants sections?
    → Which sections does my user visit?

    Do not track information you cannot leverage

    There are two information you should not track with an attribute:

    • ID, email address, etc: They have no value for creating coherent segments (E.g. “Push all users who’s email address is mike@batch.com”). If you want to use Batch to target users using their ID, you need to implement Batch Custom IDs (iOS/Android) and the transactional API.
    • Country / language: If your app allows your users to choose their own language or region for localization purposes, you can overwrite the country/language Batch detects automatically. You will find more information here (iOS/Android).

    Do not track unimportant events

    Don’t use Batch to do path analytics (Did my user tap on the “OK” button of the welcome screen?). This information is not significant when segmenting your base and sending contextual notifications.

    Track exclusively meaningful events: purchase, consulted categories, comment, etc.

    Step 2. Choose the right format to send the information

    All you have to do now is to choose an attribute, a tag or an event for each question. Read the introduction again if you have trouble understanding the differences.

    What is my user's first name?

    Attribute (string): John.

    Where do my user live?

    Attribute (string): Paris/Rome/etc.

    What is my user's gender?

    Attribute (string): male/female/not specified.

    Do they have a premium subscription?

    Attribute (boolean): true/false.

    What/when was their last purchase?

    Event. An event will allow you to see:

    • Date: The date of the first/last purchase.
    • Count: The total number of purchases.
    • Label: The name of the purchased item.

    Always use events when you want to know something about an action (purchase, read content, etc).

    What is the last item they checked?

    Event. In addition to the date, you’ll be able to find out which article they checked and in turn their interests.

    Do they have any items on their wishlist?

    Event. This event will give information on both the total number of items added to the wishlist and on the last item added.

    Did they abandon an item in their cart?

    Attribute (boolean). Allows you to send a notification each time your user abandons an item in their cart.

    Step 3. Name your attributes, tags and events

    The last step consists in finding the right name for your attributes and events. You can use the letters a-z, underscores and hyphens. Here are our recommendations:

    Attributes

    • String: xxxx_xxxx (E.g. user_gender).
    • Numbers: nb_xxxx (E.g. nb_friends).
    • Date: xxxx_date (E.g. signup_date).
    • Boolean: is_xxxx / has_xxxx (E.g. is_premium).

    Events

    We recommend you use a past tense verb at the beginning + additional information (E.g. purchased_item).

    Example

    Here is how we could name our 7 attributes and events:

    • First name of the user (string): user_firstname
    • City of the user (string): user_city
    • Gender of the user (string): user_gender
    • Premium subscription (boolean):is_premium
    • Items purchased (event): purchased_item
    • Visited items (event): visited_item
    • Item added to the wishlist (event): added_wishlist
    • Items abandoned in the cart (boolean): has_item_cart

    Editing your tagging plan

    We recommend you put all the information in a spreadsheet:

    Tagging plan

    This will help you to modify your tagging plan over time and share it with your team.

    All you have to do now is to tag your app using our technical documentation:

    You can also use the Debug tool from Settings → Debug at any moment to test the integration of the SDK and the data collection (iOS / Android / Cordova).

    Using your custom data

    Once your tagging plan is integrated, you will need to go to the dashboard settings > "Custom data" tab to manually enable every attributes, tags or events sent to Batch.

    Custom data

    Then you will be able to use the custom data to: