hello@newnorth.nl+31 (0) 85 401 31 62
/Journal

Marketing analytics: the chain from tag to decision

ReferenceAnalytics2023.01.30
Freek Kampen
Freek KampenCo-founder, New North Digital

Measuring what marketing returns runs through five links. What each one does, and where it quietly breaks in practice.

What marketing analytics covers

Marketing analytics is measuring what your marketing returns and steering on that. In practice it runs through five links: a measurement plan, tagging, collection, joining the data, and reporting.

Each link breaks in its own way. Break one and everything behind it is wrong too, while the dashboard keeps showing tidy numbers. A wrong figure looks exactly like a right one.

What follows walks the chain front to back, with the failure we meet most often at each link.

The measurement plan decides the rest

A measurement plan is a document listing the questions you want answered, the events and parameters needed for them, and the owner of each definition. A spreadsheet is enough.

Where it breaks: without one, every tag becomes a private arrangement between a marketer and whoever had time that week. One developer sends purchase, the next sends order_complete. A form on the contact page fires lead, the same form in the footer fires submit_form.

You notice a year later, when someone asks how many leads a campaign produced and three answers are defensible. So write down what a conversion is, edge cases included: does a quote request from an existing customer count, and does a cancelled order still count?

Tagging and collection

Tagging turns behaviour into events. Google Tag Manager in the browser, often with a server-side container alongside it. From there the events travel to GA4 and to the ad platforms.

Where it breaks: ad blockers and browsers remove part of the client-side measurement. Safari shortens the lifetime of cookies set by JavaScript, so returning visitors keep arriving as new ones. Without consent, a share of your tags never fires at all.

A server-side container solves part of this by serving tags from your own domain. It does need hosting and maintenance: see Cloud Run or Stape and Taggrs or Stape.

In ecommerce the second trap sits in the items array. Leave out item_id or the price and your revenue still lands, but your product reporting does not.

Joining it in a warehouse

GA4 knows behaviour, the ad platforms know their spend, and your shop or ERP knows the orders, the returns and the cost of goods. Only when all three sit in one place can you put spend next to margin.

Switch on the GA4 BigQuery export and load your ad spend and order lines in daily. Then this becomes a query instead of an argument:

SELECT
  s.date,
  s.campaign,
  SUM(s.cost) AS cost,
  SUM(o.revenue_ex_vat) AS revenue,
  SUM(o.margin) AS margin,
  SAFE_DIVIDE(SUM(o.margin), SUM(s.cost)) AS margin_per_euro
FROM `my-project.marketing.ad_spend` s
LEFT JOIN `my-project.shop.orders_attributed` o
  ON o.date = s.date AND o.campaign = s.campaign
WHERE s.date >= DATE_SUB(CURRENT_DATE(), INTERVAL 28 DAY)
GROUP BY 1, 2
ORDER BY cost DESC

Where it breaks: orders arrive without returns and without cost of goods, so you calculate on revenue and call it return. In categories with high return rates, a campaign that wins on ROAS can lose on margin.

Reporting and the decision

A report is finished when someone makes a call on it: more budget, less budget, or switch the campaign off.

Where it breaks: platform numbers get added together. Google Ads claims the conversion, Meta claims the same conversion, and between them they report more orders than your shop actually shipped. Lookback windows differ, each platform only sees its own clicks and impressions, and Meta counts view-through by default.

Use one source for the total, usually your order system, and keep the platform numbers for steering inside that platform. Watch the ratio between the two. When it jumps, something in your measurement changed.

In GA4 explorations, watch for sampling. A number from a sampled exploration is an estimate, and GA4 does not exactly shout about it.

Where to start

  • Write the measurement plan before touching a single tag. Fifteen events everyone understands beat eighty nobody can explain.
  • Put the conversion definition in writing, edge cases included, and name who is allowed to change it.
  • Turn on the GA4 BigQuery export. It only fills from the day you enable it, so do not wait until you need it.
  • Load orders with returns and cost of goods into the same warehouse as your ad spend.
  • Steer on margin. Revenue is the easy version and it picks the wrong winners consistently.
  • Stop adding platform numbers together. Pick one source for the total.
  • Build the dashboard last, and build only what gets used at a decision moment.

Want to talk about this?

Let's talk data.

Tell us about your stack, your goals, the data you wish you had.

Takes 1 minute