Partner Nook · Go-Live Roadmap

What's left — Trackier, pixel & webhooks, in the right order

Everything remaining to take Partner Nook from a working prototype to a live Shopify app: what to get, what to build, and the sequence that avoids doing things twice.

Ready
App UI, commissions, coupons, payouts, branding — demoable now (coupon-based attribution)
1 unlock
Public OAuth app — the gate that enables pixel, webhooks & install detection
6 phases
Trackier · pixel · webhooks · email · PayPal · App-Store listing

01 Read this first — the one dependency

Three of the biggest remaining items — storefront pixel, webhooks, and knowing when a store installs — all need the same thing first: the app must become a public / embedded OAuth app, not the current custom app. Build that once; it unlocks all three.

Public OAuth App install flow · token · webhooks Install detectionOAuth callback → Merchant row Storefront pixelScriptTag + Web Pixel Webhooksorders · refunds · uninstall
Order matters: if you build the Trackier pixel or webhooks before the OAuth app exists, there's no install event to attach them to — you'd redo the wiring. So Phase 1 = public OAuth app.

02 The phase sequence

Do them in this order. Each phase is expandable — click to see the exact tasks. GET = get from client/vendor · BUILD = we code it · CONFIG = setup step.

0
Phase 0 · Present the prototype (ready now)
No dependencies — demo the working app to the client today
App works end-to-end — signup → approve → coupon → order sync → commission → payout → invoice.
Attribution is coupon + Shopify-order based (matches GoAffPro day-to-day).
BUILDDemo seed data — a few affiliates, sales, payouts so the demo looks full.
CONFIGDemo delivery — screen-share live local, or record a Loom walkthrough.
1
Phase 1 · Public OAuth app (the unlock)
Convert custom app → public embedded app. Enables install, pixel, webhooks.
GETShopify Partner account + create the app in the Partner dashboard.
BUILDOAuth endpointsGET /auth (start install) + GET /auth/callback (exchange code → access token).
BUILDOn callback: upsert Merchant (shop + token) — this row is your "new install" signal.
BUILDMulti-tenant — change getMerchant() to resolve by the request's shop (schema already has shop @unique).
CONFIGScopesread_orders, write_discounts, read_products, write_script_tags.
2
Phase 2 · Trackier integration
The PRD's tracking backbone (§6.2). Needs Trackier creds — see section 03.
GETTrackier account, API key/secret, API docs, tracking domain, campaign ID.
BUILDTrackierServicecreatePublisher · createTrackingLink · postConversion · getStats.
BUILDWire approval → create publisher, save trackierId, generate tracking link → referralLink.
BUILDConversions → on order, post conversion to Trackier · Stats → dashboard pulls from Trackier.
3
Phase 3 · Storefront pixel (auto on install)
Inject tracking on every page + capture checkout — see section 04.
BUILDOn install, call ScriptTag API → inject track.js on all storefront pages.
BUILDtrack.js — capture ?ref=, set cookie, send click to Trackier/API.
BUILDWeb Pixel (Customer Events) → on checkout_completed, fire conversion.
4
Phase 4 · Webhooks (replace manual sync)
Real-time orders, refunds, uninstall — see section 05.
BUILDRegister webhooks on install: orders/paid · refunds/create · app/uninstalled.
BUILDWebhook endpoints with HMAC verification → attribute/refund automatically.
5
Phase 5 · Email · PayPal · polish
External services + PRD polish items
GETSendGrid/Mailgun key · BUILD real email send (replace logging).
GETPayPal Payouts credentials · BUILD auto-payout (PRD Phase 2).
BUILDPolish: enforce cookie-duration & conflict-resolution, performance-bonus auto-eval, signup-page templates, secure JWT auth.
6
Phase 6 · Shopify App Store listing
Optional — to sell it to many brands
BUILDBilling API (subscription pricing) · CONFIG listing, privacy policy, review submission.

03 Trackier — get & build

PRD §6.2 is explicit: "Tracking engine = Trackier API. We will NOT build a new tracking system." So Trackier is required, not optional.

What to GET from the client / Trackier

#ItemWhy
1Trackier account access / loginthe tracking backbone
2API key + secretserver-to-server calls
3API documentation (base URL, endpoints, auth)PRD: "developer needs to review Trackier's API docs"
4Tracking domainthe domain referral links point to (records clicks)
5Campaign / Offer ID (if already created)to attach affiliates as publishers

What we BUILD once creds arrive

The 4 PRD jobsHow we wire itSchema field (already exists)
Create tracking linkson approve → Trackier createPublisher + createTrackingLinkAffiliate.trackierId · referralLink
Record clicksreferral link → Trackier domain records click; id capturedClick.trackierClickId
Record conversionson order → postConversion to TrackierReferralOrder
Pull statsdashboard reads clicks/conversions via getStatsdashboard / analytics
The two trackier* columns are already in the schema as placeholders — the wiring is a focused add, not a rebuild, once the API docs are in hand.

04 Pixel / storefront tracking

Goal: track on every store page automatically, without the merchant editing their theme. Two Shopify mechanisms, added automatically on install.

MechanismCoversHow it's addedNote
ScriptTag APIall storefront pageson install, POST a script_tag → Shopify injects track.js everywhereneeds scope write_script_tags
Web Pixel (Customer Events)checkout / conversionregister via webPixel API on install; runs in a sandboxonly way to catch checkout_completed

What track.js does (we build it)

  1. Reads the referral param (?ref=CODE) or Trackier click-id
  2. Sets an attribution cookie (honours the admin's cookie-duration)
  3. Sends the click to Trackier / our API
  4. On checkout (via Web Pixel) → sends the conversion
Gotchas: ScriptTag does not run on the checkout page (use the Web Pixel there). Shopify is slowly deprecating ScriptTag in favour of Theme App Embed blocks — those work too but need the merchant to toggle them on once. For zero-touch, Web Pixel + ScriptTag is the pragmatic combo today.

05 Webhooks — real-time instead of manual

Today the admin clicks "Sync orders". Webhooks make orders, refunds and uninstalls flow in automatically. Requires the public app (Phase 1) + a public HTTPS URL.

Webhook topicOn receive, we…Replaces
orders/paidmatch coupon → affiliate → run commission → write ReferralOrder + credit balancemanual "Sync orders"
refunds/createreverse the commission, mark order REFUNDEDmanual refund (PRD 4.4)
app/uninstalledmark the Merchant inactive / clean up

Build steps

  1. On install, register the webhooks (via Admin API) pointing to your API URL
  2. Build webhook endpoints in NestJS — verify the HMAC signature on every request (using the app's webhook secret) so they can't be spoofed
  3. Process the event → the same commission / refund logic you already have, now triggered automatically
Keep the manual sync too as a safety net / backfill — webhooks can occasionally miss, and the Admin-API order pull is a reliable reconcile.

06 Email · PayPal · polish

ItemGETBUILDPRD
Real email sendingSendGrid / Mailgun API keyEmailService → replace the current logging with real sends (welcome, sale, payout)4.9 / §6.3
PayPal auto-payoutPayPal business + Payouts API credsPayoutService → pay affiliates from the app4.8 (Phase 2)
Tracking rulesactually enforce cookie-duration & first/last-click conflict resolution4.4
Performance bonusauto-evaluate targets & pay the bonus4.5
Signup templates + secure authsignup-page styles; move affiliate login to JWT4.10 / hardening

07 One list to send the client

Everything to request, so nothing blocks the build. Trackier items are the top priority (they gate the tracking backbone).

Trackier (tracking backbone — PRD §6.2)
  1. Trackier account access / login
  2. API key + secret
  3. API documentation (base URL, endpoints, auth)
  4. Tracking domain for referral links
  5. Campaign / Offer ID (if set up)
Other integrations
  1. Shopify: permission to make/install a public app on the store (or a dev store), scopes read_orders, write_discounts, read_products, write_script_tags
  2. Email service (SendGrid / Mailgun) API key
  3. PayPal Payouts credentials (Phase 2)
Branding & rules
  1. Final logo, brand colours (hex), Terms & Conditions text
  2. Commission structure (%, tiers, product-level) + payout policy (min amount, hold time, methods)
  3. MVP priority — which features are needed at launch vs later