# Shopify Attribution Tracking

**Recovering the journeys that crossed devices.**

Customers discovered the brand on their phone and bought on their laptop days later. Shopify credited the last click and threw the rest of the journey away, so the client could not tell which channels actually drove revenue.

Canonical: https://technologiesninja.com/project-shopify-attribution.html

- Category: eCommerce · Analytics
- Result: 94% UTM coverage
- Scope: Cross-device
- Status: In production

## The problem — Last click, and nothing else.

Attribution collapsed the whole journey into whatever channel happened to send the final click, which was very often direct or organic and told the client nothing.

Journeys that started on an ad, moved to another device and finished days later were being credited to the wrong source entirely.

With most orders showing an unknown or misleading source, the client was making budget decisions on numbers they knew were wrong.

## The hard parts — Why attribution breaks.

- The same customer appears as different visitors on phone, laptop and tablet
- Cookies expire and are cleared, cutting journeys into disconnected fragments
- Traffic parameters are lost the moment a customer navigates or comes back later
- Shopify's own reporting only keeps the last touch, discarding everything before it
- Stitching identities together has to happen without breaking customer privacy

## Architecture — Capture, stitch, reconcile.

01. **capture** — A script records traffic source and journey events from the first visit
02. **persist** — Source data is stored durably so it survives navigation and return visits
03. **event** — Cart, checkout and quote events are captured with their context attached
04. **stitch** — Signals link a customer's sessions across devices into one journey
05. **attribute** — Each order is attributed across the touches that led to it, not just the last
06. **reconcile** — Captured journeys are reconciled against Shopify's own order records
07. **report** — Channel and journey performance is surfaced for real budget decisions

**Stack:** Shopify · Laravel · JavaScript · MongoDB · GA4 · Redis

## What shipped — What shipped.

- Captures the traffic source of every visit and holds it through to purchase
- Stitches sessions across devices into a single customer journey
- Records cart, checkout and quote events with full context
- Attributes each order across its touchpoints, not just the last click
- Reconciles captured journeys against real Shopify orders
- Reports channel performance the marketing team can actually trust

## Result — Budget decisions on evidence.

**94%** — Of orders with a resolved traffic source

94% of orders now carry a resolved traffic source, up from a majority that were previously unknown or misattributed.

The marketing team can see which channels start journeys, not just which ones close them, and move budget accordingly.

Because captured journeys are reconciled against real orders, the numbers hold up when someone asks where the revenue actually came from.

## Read next

- Case study: [Click Fraud Detection Platform](/project-click-fraud-detection)
- Case study: [Google Ads Analytics Dashboard](/project-google-ads-dashboard)
- Service: [Shopify & eCommerce](/service-shopify-ecommerce)
- Article: [Shopify Attribution: Capturing the Full Journey](/blog-shopify-attribution)
- Case studies: [All case studies](/projects)

## Next step

Where does your revenue actually come from?

- Book a consultation → /contact

---
© 2026 TechnologiesNinja · Built and maintained in-house
