Skip to content
Back to all articles

Guides & Best Practices

How to automate Google Analytics data with APIs in 5 steps

Automation is no longer optional for digital analytics teams trying to scale their impact. In this step-by-step breakdown, Erik Driessen shares how his team used APIs and cloud services to automate over 22,000 Google Analytics data checks and free up valuable analyst time.

Erik DriessenErik Driessen25 May 2024 · 3 min read

How to Automate Google Analytics Data With APIs in 5 Steps

Manual data monitoring is one of the least scalable aspects of an analyst’s workflow, and one of the most error-prone. In this article, Erik Driessen, former Head of Digital Analytics at Greenhouse and now a Business Analyst at Belastingdienst, outlines how his team automated their Google Analytics monitoring system using APIs, Slack, and cloud computing.

The result? A process that has already completed more than 22,000 automated checks, and saved countless hours of repetitive work.

Why automation matters in analytics

At its core, analytics is about enabling better decision-making. But when analysts spend their time repeating the same checks day after day, they lose the capacity to focus on more strategic work.

That’s where APIs come in. By connecting directly to analytics platforms, APIs make it possible to programmatically run checks, extract metrics, and trigger alerts. For Driessen and his team, this meant turning repetitive “if this then that” decisions, like identifying flatlines or funnel issues, into automated workflows that could scale with the business.

Step 1: Start simple

Driessen recommends thinking like a startup: What’s the minimum viable product (MVP) that validates your idea?

For his team, the MVP was a flatline monitor. If a key metric showed zero values, the system would flag it. No need to track anomaly thresholds or detect gradual trends: the logic was simple. Zero is bad. Not zero is good.

This flatline logic became the foundation for their automation project. It targeted one of the most basic yet overlooked issues in analytics setups: broken tracking.

Step 2: Build the technical foundation

The initial prototype was a local Python script that pulled data from Google Analytics and sent a Slack notification if a flatline was detected. The alert would tag the relevant analyst based on the setup.

Once validated, the team moved the system to the cloud using AWS Lambda to run the script automatically. This removed the need for manual intervention and made the checks truly scalable.

To make the system accessible across the team, they added a Google Sheets interface. Now, analysts could simply enter a row of information, such as the view ID, metric, filters, and Slack channel, and the monitoring system would handle the rest. No Python skills needed.

Step 3: Expand beyond flatlines

With a working MVP in place, the team began building additional capabilities. These included:

  • Funnel checks (e.g. ensuring there are more cart adds than purchases)
  • A/B test monitoring (e.g. detecting if reporting dimensions are missing)
  • Anomaly detection (e.g. tracking deviations from historical norms)

Each new check was added to the same Google Sheets interface, making it easy for analysts to adopt and customize.

Step 4: Measure the automation itself

A core principle in analytics is measurement, and the team applied this to their automation system as well. Using Google’s Measurement Protocol, they tracked how often their system ran checks and how many issues were flagged.

To date, their system has completed over 22,000 checks. That’s 22,000 times an analyst didn’t have to manually dig through reports or dashboards to confirm something was working.

Step 5: Scale and maintain

Once the automation system was up and running, the focus shifted to scale and maintenance. Because the system was modular and built on APIs, it was easy to adapt to new use cases or tools. And because it was simple enough for any analyst to use, it helped democratize monitoring across the organization.

Driessen’s advice: Start small, automate early, and measure continuously.

What will you automate?

The key to sustainable analytics is efficiency. By using APIs and cloud tools, Driessen’s team turned one of the most tedious tasks in analytics into a scalable, transparent system. It’s a reminder that automation doesn’t need to be complex: it just needs to be useful.

About Erik Driessen:
Erik Driessen is a data analyst with nearly a decade of experience in digital marketing. Formerly Head of Digital Analytics at Greenhouse, he now works as a Business Analyst at Belastingdienst. Erik specializes in data automation, campaign tracking, and simplifying analytics workflows for scale.

FAQ

Automation helps marketers avoid repetitive manual tasks and ensures faster detection of issues like broken tracking or data flatlines. By using APIs, you can scale quality assurance across campaigns and focus on high-impact analysis.

Newsletter

Get the latest marketing analytics insights

Practical insights on marketing data governance, measurement, and AI readiness from Accutics experts and industry leaders. Delivered straight to your inbox.

  1. Access to free webinars and industry events
  2. Interviews and use cases from marketing and analytics leaders
  3. Practical tips and new perspectives on marketing measurement

Stay connected

Get monthly insights, customer stories, and event invitations from Accutics. Relevant ideas, straight to your inbox.