What’s the deal with Data Contracts?
And why should I care?
A little about me...
What I’ll talk about today
Why is data quality important?
Data quality can roughly be defined as data that is:
Why is data quality important?
How do companies try to tackle data quality issues?
Dev processes
Sandbox/QA envs
GTM Preview
What tools do companies use to try to tackle data quality issues?
Tag scanners
Data quality & expectation testing tools
Data Contracts
What are Data Contracts?
"A way of defining specific data requirements between data producers and data consumers to ensure that the necessary data required by a downstream consumer or application is always available in the agreed, expected format"
J. Peck, 2023
What actually is a Data Contract?
What actually is a Data Contract?
A Data Contract is technically, generally a file that defines a number of properties about the data in question, the location it was sourced from, the destination it’s being sent to, who owns it, and what the data looks like.
It can contain, but is not limited to…
By the way, Snowplow has used “Data Contracts” for nearly 10 years…
Example - Data extracted from Salesforce for a report
So what does this mean for digital analytics?
Digital analysts have been ahead of the curve on this
Is it time for digital analytics to go all-in on Data Contracts?
Data quality for web/mobile tracking is an obvious starting point, but there are further opportunities here…
Client vs Server-Side Tracking
January 6, 2025
AGENDA
Introduction to Tracking Methods
Client-Side Tracking
Server-Side Tracking
Plus tip:
Consider elaborating on specific examples of each tracking method relevant to your audience's business needs.
Client-Side Tracking Explained
Understanding Client-Side Tracking
Plus tip:
Consider providing real-world examples of client-side tracking tools, such as Google Analytics or Facebook Pixel, to illustrate how this method is commonly implemented.
Server-Side Tracking Explained
What is Server-Side Tracking?
Server-Side Tracking vs. Server-Side Tagging
Plus tip:
Consider adding examples of applications that benefit from server-side tracking, such as e-commerce platforms or APIs, to enhance understanding.
Rise of Server-Side Tracking
The rise of server-side tracking has been driven by a confluence of regulatory changes, heightened user privacy concerns, and advancements in browser privacy features. With regulations like GDPR and CCPA imposing strict guidelines on data collection, organizations are seeking more secure methods to track user behavior without compromising privacy. Additionally, users are increasingly aware of their data rights, leading to demands for transparency and control over personal information. As browsers implement features to block third-party cookies and restrict tracking scripts, server-side tracking has emerged as a robust alternative, allowing businesses to gather insights while ensuring compliance and user trust.
Plus tip:
Consider adding specific examples of regulations or browser features that have influenced the shift towards server-side tracking. This can help contextualize the discussion further.
Applications of Server-Side Tracking
Content Management Systems (CMS)
Web Servers
Server-Side APIs
Server-side tracking can be implemented in popular CMS platforms like WordPress, Drupal, and Shopify to monitor user interactions and content performance.
Frameworks like Flask, Next.js, and Express allow tracking of server-side events, providing insights into application performance and user behavior.
Tracking can also be done through server-side APIs to analyze data exchanges between servers and clients, enhancing data consistency and security.
Plus tip:
Consider including specific examples or case studies of successful server-side tracking implementations in each application type to enhance understanding.
Tracking: When to Use Which
When to Use Server-Side Tracking
When to Use Client-Side Tracking
Hybrid Approach Benefits
Key Considerations
Use server-side tracking when events occur on the server, such as payment processing or when handling sensitive information like PII. Ideal for operations like sign-ups and transaction completions.
Utilize client-side tracking for capturing user interactions on the webpage, such as clicks, pageviews, and video plays. It's essential for tracking client-specific data like UTM parameters.
Adopting a hybrid approach allows for the collection of both server-side and client-side data, ensuring comprehensive insights while maintaining data accuracy and user privacy.
Always assess the type of data needed and the environment. For rich user interaction data, prefer client-side, while for secure and essential backend operations, lean towards server-side tracking.
Plus tip:
Consider comparing the effectiveness of server-side vs client-side tracking based on specific business needs. You can also include examples of industries that benefit from each approach.
Benefits of Client-Side Tracking
Plus tip:
Consider discussing specific tools or platforms that are commonly used for client-side tracking, such as Google Tag Manager or Adobe Analytics, to provide further context.
Benefits of Server-Side Tracking
Challenges of Client-Side Tracking
Cons of Client-Side Tracking
Lowlights of Client-Side Tracking
Plus tip:
Consider customizing this slide by adding specific statistics or case studies to illustrate the impact of these challenges on client-side tracking.
Challenges of Server-Side Tracking
Pros
Cons
Plus tip:
Consider adding specific examples of server-side tracking implementations to illustrate the complexities and costs involved.
Server-Side Use Cases
Tracking Sign-Ups
Monitoring Purchases
Server-to-Server Interactions
Server-side tracking captures user sign-up events directly on the server, ensuring accurate data collection and reducing reliance on client-side interactions.
Purchases can be tracked server-side to provide a more secure and reliable record of transactions, protecting sensitive data from client-side vulnerabilities.
This approach allows for tracking interactions between different servers, such as webhooks, ensuring seamless data exchange and event logging.
Plus tip:
Consider adding real-world examples or case studies to illustrate how companies effectively use server-side tracking in these scenarios.
Integration and Synchronization Tips
Establish a Common Identifier
Implement Session Stitching
Monitor Timestamp Drift
Maintain Data Privacy Compliance
Use a unique user ID that can be tracked across both client-side and server-side environments to ensure data consistency.
Utilize session IDs stored in cookies or headers to connect client-side interactions with corresponding server-side events.
Track multiple timestamps for each event to address potential discrepancies between client-side and server-side recorded times.
Ensure that both client-side and server-side tracking methods adhere to data protection regulations by clearly communicating tracking practices.
Plus tip:
Consider incorporating real-world examples of successful integration strategies from companies in your industry to illustrate these points further.
Practical Application Examples
Node.js Implementation
PHP Implementation
AWS Lambda Function
Using Express, you can set up a route to track events. For example, capturing a purchase event could look like this: app.post('/track/purchase', (req, res) => { const purchaseData = req.body; // process data });
In a PHP environment like WordPress, you could track a user registration event with: add_action('user_register', 'track_user_registration'); function track_user_registration($user_id) { // Send data to tracking server }
Create a Lambda function to handle tracking events. For example, tracking page views could be implemented as: exports.handler = async (event) => { const pageData = JSON.parse(event.body); // log data to a database or analytics service }.
Plus tip:
Consider customizing the code examples to fit your specific analytics needs. You can also include real-world scenarios or additional programming languages relevant to your audience.
Balancing Both Approaches
Utilizing both client-side and server-side tracking is essential for obtaining comprehensive data insights. Client-side tracking excels in capturing user interactions and contextual information, while server-side tracking provides enhanced data security, accuracy, and resilience against privacy regulations. By integrating both methods, organizations can enrich their data collection strategy, ensuring they gather a complete and nuanced understanding of user behavior and system performance. This balanced approach not only maximizes data quality but also fosters a more robust analytics framework that can adapt to evolving digital landscapes.
Plus tip:
Consider exploring specific scenarios where a hybrid approach has led to significant improvements in data quality or insights, and tailor the content to reflect your audience's familiarity with tracking methods.
Final Recommendations
Plus tip:
Consider tailoring the recommendations to your specific industry or sector, highlighting any relevant tools or strategies that may enhance your tracking approach.
Thank you.