Content types
A subset of content-aware events are based on the content_type of the affected content. These events are documented with their tracking key templates at Action events and View events, but not with their possible occurrences.
A tracking key template itself includes a placeholder for the content_type. The content_type is determined at runtime (e.g. in the app) and used instead of the placeholder in the respective tracking key template.
The content_types are described in the following paragraph Content types. An example for finding and configuring a corresponding event is described in the paragraph Content type based event.
The content type can have the following values:
- issue
- post
- bundle
All content that is available in an app, for example, is assigned to one of these content_types. The content_types are passed for the placeholders in the tracking key template uppercased before they are used for tracking.
For example, "issue" becomes "ISSUE".
In order to configure a content_type based event, three steps are necessary.
- What usecase to track and how to find your event
- How to find which content_type your content has
- How to create a corresponding entry in your tracking_config.json
Step 1: What usecase to track and how to find your event
As an example, a user's tap on the bookmark button of an issue in the storefront of an app should be tracked. This is an action event and the corresponding event documentation can be found here. The event consists of the following tracking key template: STOREFRONT_<content_type>_BOOKMARK_ADD_CLICKED
Step 2: How to find which content_type your content has
This step depends on how your content comes to your app. For this example we assume that the user taps on bookmark button for an issue. So that case results in a content_type "ISSUE".
Step 3: How to create a corresponding entry in your tracking_config.json
Now we simply replace the placeholder "content_type" within the tracking key template by "ISSUE" and then get the final tracking key:
STOREFRONT_ISSUE_BOOKMARK_ADD_CLICKED
Now compose your event configuration and add it to your tracking_config.json. So your event configuration may look as follows:
Note:
The code sample above is used for Firebase. Depending on your tracking service that configuration may differ.