How to create a Tagging Plan?

This guide will walk you through the steps and best practices for creating an effective tagging plan tailored to your Customer Engagement goals.

The tagging plan lists the data you pass to Batch and the origin of each field. With a well-designed plan, you can segment users, personalize communications, and run impactful automations.

Step 1: Define Your Objectives

Before sending any data, you must define clear goals. Every piece of data collected must be actionable and tied to a specific engagement scenario. The main objectives for collecting data in Batch are:

  • Segmentation: Targeting users based on the information available about them.

    • Example Use Case: Re-engaging customers who like a certain brand (favorite_brands) but haven't made a purchase recently (last_purchase_date).

  • Personalization: Customizing the content of your communications by integrating user-specific information.

    • Example Use Case: Greeting a user by their firstname in an email.

  • Triggering Automation: Launching automated workflows based on user events.

    • Example Use Case: Triggering an abandoned cart reminder via push if a user performs an add_to_cart event but does not follow up with a validated_cart event.

Step 2: Understand Batch's Data Types

Batch organizes data into three main families:

Native Data

User-centric data, automatically collected or calculated by the Batch SDK (e.g., country, language, push opt-in status, last visit date). You should not send a custom attribute for data that Batch already collects natively.

Read more: What kind of data is collected via Batch SDKs by default?

Custom Data

User-centric data you choose to send from your app, website, or backend via the SDK or API to enrich user profiles. They can be of two types:

👉 Attributes: A key-value pair that describes a user or installation, helping you qualify them (e.g., birthdate, user_city, is_premium).

👉 Events: Actions a user performs at a specific time (e.g., visited_page, added_to_cart). Events natively include the date of the last occurrence and a counter tracking the total number of occurrences. They can also carry event attributes, expressed as key-value pairs or JSON objects.

Catalogs Data

Non-user-centric data stored in collections that can be used directly within messages to power advanced personalization scenarios.

Step 3: Structure and Specify Your Custom Data

These tables provide concrete examples of recommended attribute names and event structures that follow Batch’s tagging best practices.

Attributes

Type
Convention
Attribute name (example)
Value (example)

String

The attribute name

favorite_city

"Paris"

Integer

The attribute name prefixed by "nb_" or "count_"

nb_visits count_items

4 18

Float

The attribute name

total_price distance_km

135.79 4.0

Boolean

The attribute name prefixed by "is_" or "has_"

is_premium has_children

true false

Date

The attribute name prefixed by "date_"

date_signup

"2025-01-28T15:58:02+01Z"

URL

The attribute name prefixed by "url_"

url_page url_homepage

"https://batch.com" "myapp://path/to/homepage"

Array

The attribute name

thematic_optins

["tech", "sport", "music"]

Object

The attribute name

delivery_address

{
      "number": 43,
      "street": "Rue Beaubourg",
      "zip_code": 75003,
      "city": "Paris",
      "country": "France"
}

Events

Event name (example)
Trigger
Events attributes (example)
Event attributes type

validated_cart

A user makes a purchase.

  • item_list

  • delivery_address

  • Array

  • Object

visited_page

A user visits a page.

  • title

  • url_page

  • category

  • is_premium

  • String

  • URL

  • String

  • Boolean

Technical Specifications

👉 Please refer to our APIs and SDKs documentation for limitations.

Follow Best Practices

To keep your tagging plan clean, maintainable, and effective, make sure to follow these naming best practices:

  • Follow Naming Rules:

    • Use English and lowercase.

    • Use snake_case, with underscores (_) to separate words.

    • Use nouns for attributes and past-tense verbs for events.

  • Ensure Data Consistency: Values must be sent in a consistent format and language across all sources (Mobile SDK, Web SDK, APIs)

  • Aggregate Data: Consolidate similar events. For example, instead of tracking

    visited_homepage, visited_settings ... create a single visited_page event and use an event attribute page_name to store the page name.

  • Don't Overdo It: Avoid collecting attributes or events that won't be used for your campaigns. Also, avoid excessive detail; focus on general, relevant data (e.g., track which page category a user visits, not every single click on a button).

Step 4: Choose Your Data Source

Data can be sent to Batch via the SDK, the Profile API or the Catalogs API.

  • Use the Profile API for:

    • User-centric data ;

    • All data related to a logged-in user, whenever possible. This makes your backend the single source of truth.

  • Use the SDK for:

    • User-centric data

    • Data related to anonymous users.

    • Data tied to a specific device/installation.

    • Events that will trigger In-App messages. In-App messages can only be triggered by events coming from the SDK.

  • Use the Catalogs API for:

    • Non-user-centric data (e.g., product catalogs, media articles).

Step 5: Implement and Test Your Plan

Once your plan is defined, your team can implement the data collection by following the technical documentation.

  1. When a new data type is sent, it automatically appears in the Batch dashboard under the Data management section.

  2. From this screen, you must toggle the data on to make it available for use in your campaigns and automations. You can also rename it for display purposes.

The goal of testing is to verify that all data is being received correctly and that it supports all of your planned use cases.

Step 6: Ensure GDPR Compliance

As the Data Controller, you are responsible for ensuring that any data collection complies with regulations such as the GDPR, in particular:

  • Data Minimization: Collect only the data that is strictly necessary for the purposes you have defined. Batch strongly advises against sending data that will not be used in the platform.

  • Explicit Consent: The user must be clearly informed and give their consent via an explicit action before any data is collected. You can integrate Batch with your Consent Management Platform (CMP) to manage this.

  • Transparency: Your privacy policy must precisely describe what categories of data are collected, why they are collected, and how they are used.

Last updated