Beware of fake job offers using our name. Our only domain is midsummer.agency.Important: we are aware of fraudulent websites impersonating Midsummer Agency. Our only official domain is midsummer.agency.Read more

Book a Call

Shopify server-side tracking for every step of a fresh dog food subscription

Dog Heroes delivers fresh food portioned for each dog, mostly by subscription, across Italy. When it moved its store to Shopify Plus, Midsummer Agency built server-side tracking for the new site from the data layer up, so every quiz step, order and renewal reaches 6 platforms.

Analytics

The Dog Heroes founders with a corgi and Dog Heroes boxes

About the client

Dog Heroes is an Italian direct-to-consumer brand of fresh dog food, cooked from quality ingredients and portioned to each dog’s needs. Owners answer a short quiz about their dog’s weight, age and activity, pick recipes, and receive a box on a regular schedule. Pantry food and snacks are also sold one-off, and a cat line, Cat Heroes, has since joined.

Measuring that business means following 3 different journeys.

  • The quiz-to-subscription flow. 10 to 15 steps that build a plan for one dog, or for several
  • The ecommerce. Classic one-off purchases of pantry food, snacks and Cat Heroes products
  • The account area. Where customers change portions, recipes and delivery dates, or pause

When Dog Heroes rebuilt its store on Shopify Plus with Nebulab, the development agency behind the new site, Nebulab brought us in for the tracking.

Industry

Pet Food · Subscription Ecommerce

Market

Italy

Services

Web Analytics

Platform

Shopify Plus

The challenge

Dog Heroes came to us weeks before its move from WooCommerce to Shopify Plus. The new store was a chance to start measuring properly, and the team had written down exactly what it needed.

  • See where customers really come from. On the old site, only around a third of sessions could be tied back to a source, so much of the advertising was hard to judge
  • Keep subscriptions and one-off orders apart, and new customers apart from returning ones, in every report
  • Follow the subscription after the first order: renewals, pauses, portion changes, the signals that describe a customer’s lifetime value
  • Feed the same data to the ad platforms and to Klaviyo, Dog Heroes’ email platform, so campaigns and emails learn from it
  • Be ready for the cat line without rebuilding anything when it launched

Everything had to land on a site Nebulab was still building, with a launch date already set.

The solution

We wrote the measurement plan with Dog Heroes, agreed the data layer with Nebulab, then built the tracking in 2 containers, one in the browser and one on Dog Heroes’ own server.

Web Analytics

Tracking a quiz, a subscription and a shop in one setup

ServicesMeasurement Plan · Server-Side Tracking · Conversions API · Consent Management · GA4 · Google Tag Manager

Stape over Elevar

Dog Heroes was already weighing Elevar, a plug-and-play tracking app for Shopify. We compared it with Stape side by side and recommended Stape: harder to set up, but flexible enough to build events around a funnel no app had anticipated, at a fraction of the monthly cost. Dog Heroes went with Stape, and we started on the standard ecommerce tracking while the custom parts of the site were still in development.

A shared language with Nebulab

Nebulab’s developers write the data layer, the messages the site sends whenever a visitor does something. We specified every one of them in a shared task list and tested each release on the staging store. A few decisions shaped the whole setup:

  • One set of ecommerce events for both paths. Subscription and one-off orders share the same events, told apart by Shopify’s selling plan, so reports can split them without 2 parallel funnels to maintain
  • Every quiz step counted. Each step reaches GA4 with its number, so Dog Heroes can see exactly where people drop out, and completing the first step goes to Google Ads and Meta as an early signal
  • Each lead belongs to whoever fills in the quiz. We record the name and email typed into the quiz, not the Shopify account that happens to be logged in, so if someone fills it in for a friend’s dog, the lead goes to the friend
  • One message per dog for Klaviyo. A customer with 2 dogs, Fido and Bobby, sends Klaviyo 2 separate updates, one for each dog’s recipes, so an email can talk about Fido’s food without mixing it up with Bobby’s

3 roads for the data

Most events travel through the browser and the server at the same time, and each platform gets the treatment it needs.

  • GA4 never hears from the browser directly. Every hit relays through Dog Heroes’ tracking subdomain first, so nothing is counted twice
  • Meta gets the Pixel and the Conversions API in parallel, matched by a shared event ID
  • Google Ads receives the key conversions from both sides as separate actions, so Dog Heroes can compare them over a full month and keep the stronger one as primary
  • Klaviyo receives the quiz and account events from the server only

Renewals and refunds happen without the customer visiting the site, so browser tracking never sees them. We connected Loop, the subscription platform, and Shopify straight to Dog Heroes’ tracking server: every time a renewal is charged or an order is refunded, they report it there automatically. The server marks each renewal as a renewal, so it is counted as subscription revenue, not as a new sale. On top of that, Stape’s add-ons load the container from Dog Heroes’ own domain so ad blockers let it through, extend cookies that Safari would cut short, restore the Google Ads click ID when the browser strips it, and filter out bot traffic.

We moved consent to Pandectes, a Shopify-native app, connected to Google’s Advanced Consent Mode, so GA4 and Google Ads still receive anonymous signals for modeling when a visitor declines. Accept and Reject carry the same color and weight, as European guidance expects. Accept sits on the left, and a single Preferences button replaces a wall of toggles.

Handing over the keys

Before go-live we cleared out tags from older tools that were still firing, and kept the names of existing conversions so the ad accounts didn’t lose their history. After it we built the remarketing audiences in GA4 and Meta, and wrote 2 handover documents: a plain-language guide for the Dog Heroes team, and a full technical reference designed to be loaded into an AI assistant, so anyone can ask it how the setup works.

The results

The tracking went live with the new store, about 10 weeks after kickoff. Dog Heroes now follows 33 distinct events, from the first quiz step to the latest renewal, in GA4, Google Ads, Meta, Klaviyo, TikTok and TradeTracker.

  • Site purchases recorded in GA4 up 87% a month, compared with the months before the migration
  • Subscription and one-off revenue split in every report, renewals included
  • Account events that let Klaviyo email the customer who just increased their dog’s portion
  • Meta cookies on Safari lasting up to 90 days instead of 7

Purchases recorded in GA4, day by day

  • Each day
  • Trend
0100200300400500Server-side tracking liveBeforeAfterBefore go-live · day index 83Before go-live · day index 104Before go-live · day index 66Before go-live · day index 126Before go-live · day index 112Before go-live · day index 75Before go-live · day index 87Before go-live · day index 104Before go-live · day index 108Before go-live · day index 124Before go-live · day index 124Before go-live · day index 108Before go-live · day index 91Before go-live · day index 83Before go-live · day index 62Before go-live · day index 50Before go-live · day index 79Before go-live · day index 112Before go-live · day index 114Before go-live · day index 81Before go-live · day index 77Before go-live · day index 108Before go-live · day index 95Before go-live · day index 75Before go-live · day index 64Before go-live · day index 64Before go-live · day index 46Before go-live · day index 116Before go-live · day index 70Before go-live · day index 91Before go-live · day index 54Before go-live · day index 120Before go-live · day index 70Before go-live · day index 75Before go-live · day index 77Before go-live · day index 158Before go-live · day index 108Before go-live · day index 120Before go-live · day index 211Before go-live · day index 114Before go-live · day index 135Before go-live · day index 100Before go-live · day index 120Before go-live · day index 120Before go-live · day index 75Before go-live · day index 139Before go-live · day index 133Before go-live · day index 89Before go-live · day index 137Before go-live · day index 120Before go-live · day index 116Before go-live · day index 110After go-live · day index 120After go-live · day index 95After go-live · day index 137After go-live · day index 149After go-live · day index 124After go-live · day index 54After go-live · day index 131After go-live · day index 145After go-live · day index 172After go-live · day index 166After go-live · day index 97After go-live · day index 158After go-live · day index 131After go-live · day index 131After go-live · day index 232After go-live · day index 166After go-live · day index 193After go-live · day index 164After go-live · day index 149After go-live · day index 137After go-live · day index 118After go-live · day index 172After go-live · day index 211After go-live · day index 211After go-live · day index 211After go-live · day index 207After go-live · day index 182After go-live · day index 137After go-live · day index 203After go-live · day index 261After go-live · day index 241After go-live · day index 265After go-live · day index 236After go-live · day index 199After go-live · day index 112After go-live · day index 174After go-live · day index 236After go-live · day index 238After go-live · day index 282After go-live · day index 361After go-live · day index 365After go-live · day index 313After go-live · day index 323After go-live · day index 400After go-live · day index 301After go-live · day index 195After go-live · day index 191After go-live · day index 203After go-live · day index 174After go-live · day index 174After go-live · day index 191After go-live · day index 166After go-live · day index 137After go-live · day index 170After go-live · day index 191After go-live · day index 133After go-live · day index 100After go-live · day index 168After go-live · day index 182After go-live · day index 133After go-live · day index 176After go-live · day index 185After go-live · day index 180After go-live · day index 143After go-live · day index 149After go-live · day index 282After go-live · day index 261After go-live · day index 249After go-live · day index 257After go-live · day index 209After go-live · day index 166After go-live · day index 145After go-live · day index 232

Index: average day before go-live = 100

Daily purchases in GA4 before and after the new store and its server-side tracking went live.

When Cat Heroes arrived, its first products needed no new tracking work. Later, Dog Heroes came back to us to track conversions for its first ChatGPT Ads, in the browser and on the server.

33
Events tracked · from the first quiz step to the latest renewal
6
Platforms fed · GA4, Google Ads, Meta, Klaviyo, TikTok, TradeTracker
90 days
Meta cookie on Safari · up from 7 with browser tracking only
+87%
Tracked orders · monthly GA4 purchases, after the migration vs before

Timeline

The team

Marco

Marco

Marco

Web Analytics

Led the project. Specified the data layer with Nebulab, built both containers and the webhooks, and wrote the handover documents.

Marouscha

Marouscha

Marouscha

Web Analytics

Set up the Pandectes consent banner, tested the consent behavior before go-live and reviewed the documentation.

Micky

Micky

Micky

Account Manager

Managed the relationship with Dog Heroes from the first call, handled the contract and admin side, and kept the project moving between Dog Heroes, Nebulab and our team.

Your business could be the next story.

Ecommerce plus physical stores? B2B and B2C under one roof? One market or eleven? The businesses other agencies find too complex are the ones we make shine.

Book a Call