Understanding network_userid and domain_userid in Snowplow
User tracking is a cornerstone of effective digital analytics. Snowplow offers two key identifiers — network_userid and domain_userid — that play a critical role in identifying users and mapping their journeys across web sessions. But how do these identifiers work, and how can they be leveraged for multi-touch attribution? In this post, we clarify the purpose and application of these identifiers in Snowplow.
Q: What is domain_userid in Snowplow?
The domain_userid is a UUID generated by the Snowplow JavaScript tracker and stored in a first-party cookie. It identifies users within a specific domain and persists across sessions unless the user clears cookies or the cookie expires. However, if a user accesses the same site from a different browser or device, a new domain_userid is generated, which may fragment user data across multiple identifiers.
Key points about domain_userid:
- Generated by the JavaScript tracker
- Stored in a first-party cookie
- Resets if cookies are cleared or expire
- Unique per domain, not cross-domain
Q: What is network_userid in Snowplow?
The network_userid is a UUID set as a third-party cookie by the Snowplow collector. It is used to track users across multiple domains, making it ideal for cross-domain tracking and user stitching. However, as third-party cookies face increasing restrictions (e.g., Safari, Firefox), the reliability of network_userid has diminished in recent years.
Key points about network_userid:
- Set by the Snowplow collector
- Stored in a third-party cookie
- Enables cross-domain tracking
- Susceptible to cookie blocking by modern browsers
Q: Why do I see multiple domain_userid values for the same network_userid?
This scenario is common and often occurs due to multiple reasons:
- Cookie Clearing: If a user clears their cookies, a new domain_userid is generated, while the network_userid remains unchanged.
- Multi-Device Access: If a user accesses the website from different browsers or devices, each may generate a new domain_userid, while the network_userid persists.
- Improper Cookie Configuration: Misconfigured cookies, such as setting paths inconsistently, may cause multiple domain_userid values for the same network_userid.
Q: How can I use network_userid and domain_userid for multi-touch attribution?
For effective multi-touch attribution, Snowplow users can:
- Stitch User Data: Create a mapping between network_userid and domain_userid values to associate user actions across sessions and devices.
- Identify Single vs. Multi-Device Users: By analyzing occurrences of the same network_userid with different domain_userid values, users can identify instances of cross-device or cross-browser interactions.
- Handle Edge Cases: Implement logic to handle scenarios where users clear cookies or use multiple devices, ensuring that identity stitching accounts for such variations.
Q: What are the best practices for using these identifiers?
- Prioritize First-Party Data: Given the increasing restrictions on third-party cookies, consider implementing user login IDs or other first-party identifiers to supplement network_userid.
- Centralize Data Processing: Use data warehouses or platforms like dbt to consolidate and stitch user identifiers effectively.
- Leverage Snowplow’s Data Models: Utilize Snowplow’s dbt models for consistent, structured data processing and user stitching logic.
Final Thoughts
Understanding the differences between network_userid and domain_userid is crucial for accurate user tracking and attribution in Snowplow. By leveraging both identifiers and implementing best practices for data stitching, data teams can gain a comprehensive view of user journeys across sessions and devices, improving campaign measurement and multi-touch attribution.