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

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