Ensure effective data collection in your product by adhering to best practices, using standards and thinking about use cases beforehand.
Define product data use cases with your organization before collecting any data in the product.
When defining the use cases with your internal stakeholders:
- Gather one or two relevant stakeholders from all departments/areas of your organization.
- Brainstorm the top three things each person would like to achieve using product data in the next 12 months. (Product data in this context is both behavioral data from users interacting with your product and associated metadata about your product itself).
Examples of use cases:
- Create a recommendation engine to suggest products to purchase for the user in a weekly newsletter.
- When opening your product, show a user a different layout of the main start page.
- Have a dashboard available showing the usage of each feature relating (to) customer churn.
Rank and prioritize the use cases with a system like MoSCoW or Fibonacci numbers.
Use a system such as Fibonacci numbers to estimate business value or something like MoSCoW to determine more of a hierarchy.
Frame the data collection requirements needed for the most important, urgent, or valuable use cases.
Pick 5 to 10 top-ranked use cases and determine the data collection requirements for each by asking framing questions, like:
- Does it operate in real-time?
- Does it involve user-level, segmentations/groupings or the entire user base data?
- Is it customer-focused or for internal stakeholders?
- Is it directly revenue-generating?
Specify product data collection requirements in the data layer.
For the data layer in your product, based on the framing questions in the previous steps, you can now define what data will be absolutely necessary to capture and at what granularity.
For example, for an ecommerce product, one of your top use cases is to create a recommendation engine to suggest products for the user to purchase in a weekly newsletter. Therefore, in the data layer, you will need to capture information like:
- Product impressions (lists or similar)
- Product detail pages
- Product purchases
- Promotional offers or internal campaigns.
Without this information, you will not be able to make recommendations to your users.
Define data collection and orchestration for user interactions with your product.
If not already defined, you will define the orchestration of how the events/interactions with your product are sent to your data stack. These are the main paths you can take:
- Introduce a Tag Management System (TMS) and a vendor like Adobe Analytics, Mixpanel, or Plausible.io. Using a TMS, you will be able to selectively decide, with a relatively low-code solution, what interactions with your product are measured and where the data is sent to. Each vendor will offer different solutions and methods for sending data to their endpoint. Many vendors support the use of a TMS.
- Use a standalone vendor with no TMS. You can integrate a vendor on its own without using a Tag Management System, by having your developers hardcode it into your product/apps.
- Adapt or develop your analytics collector. Using open-source solutions such as Snowplow or developing your collector is also possible.
Detail product data collection requirements in the frontend HTML using data attributes.
Based on the framing questions in the previous steps, the data layer will not be enough to capture the interactions that the user has with your product. These events need to also be specified. In the vast majority of cases, the HTML markup syntax is vital for understanding what interaction occurred and with which element on the page.
Which events need to be captured are defined based on your use cases, but it should use HTML5 data attributes and follow a strict set of rules governing:
- The number of data attributes.
- The naming of each data attribute.
- The value syntax of each data attribute.