Revenue Connectors · Shopify
Connect Shopify to Admaxxer
Forward Shopify's orders/create and orders/paid webhooks to Admaxxer so every order — physical, digital, subscription — shows up in your revenue attribution, blended MER, and cohort LTV. Five-minute setup using Shopify's native admin (no custom app required), signed via the X-Shopify-Hmac-Sha256 header (base64 HMAC-SHA256), visitors stitched via note_attributes.admaxxer_visitor_id.
1. Prerequisites
- An active Shopify store on any plan (Basic, Shopify, Advanced, Plus).
- The Admaxxer pixel installed on your storefront. Use the Shopify install guide for the exact theme.liquid steps.
- An Admaxxer workspace with the website registered. Your Website ID is at Revenue Settings.
- Permission to manage Shopify admin (Notifications + theme code). Owner or staff with the right scope.
2. Install the Admaxxer pixel snippet
The Shopify install guide places the pixel <script> tag in theme.liquid and adds the visitor-stamping snippet. The visitor-stamping snippet is what writes admaxxer_visitor_id into the order's note_attributes:
{% comment %}
Admaxxer Shopify visitor stamping — paste inside theme.liquid <head>.
Documented in /documentation/install/shopify
{% endcomment %}
<script>
(function () {
function stampNote(input) {
if (!input) return;
var vid = (window.admx && window.admx.getVisitorId()) || '';
if (!vid) return;
var existing = input.value || '[]';
try {
var arr = JSON.parse(existing);
arr.push({ name: 'admaxxer_visitor_id', value: vid });
input.value = JSON.stringify(arr);
} catch (e) {}
}
document.addEventListener('DOMContentLoaded', function () {
var input = document.querySelector('input[name="checkout[note_attributes]"]');
stampNote(input);
});
})();
</script>
If you completed the Shopify install guide already, this snippet is in place — skip to step 3.
3. Add the Shopify webhook
Shopify will send signed webhooks to a single Admaxxer URL. Replace <YOUR_WEBSITE_ID> with the UUID shown in Revenue Settings.
https://admaxxer.com/api/pixel/webhooks/shopify/<YOUR_WEBSITE_ID>
- In Shopify admin, go to Settings › Notifications › Webhooks.
- Click Create webhook.
- Event: select Order creation (this is
orders/create). - Format: JSON.
- URL: paste your Admaxxer webhook URL.
- API version: latest stable.
- Save. Repeat for Order payment (
orders/paid) using the same Admaxxer URL. - At the bottom of the Webhooks page, click Reveal webhook secret. Copy the secret (starts with
shpss_...). - Paste the secret into Admaxxer Revenue Settings › Shopify › Webhook signing secret.
The signing secret is what makes the X-Shopify-Hmac-Sha256 header verifiable. Without it, Admaxxer rejects every inbound webhook with 401 invalid_signature.
Recommended: also subscribe to Refund creation (refunds/create) on the same Admaxxer URL so refunds correctly subtract from MER and cohort LTV.
4. How visitor stamping works on Shopify
Once the pixel snippet from step 2 is installed:
- The Admaxxer pixel runs on every page view and writes the visitor ID to
localStorage+ a 1p cookie. - When a customer enters checkout, the snippet finds the hidden
checkout[note_attributes]input on the cart form and appends an entry:{ "name": "admaxxer_visitor_id", "value": "<visitor-id>" }. - Shopify carries note attributes through checkout to the resulting Order. The Order JSON in the webhook payload includes the entry under
note_attributes. - Admaxxer reads
note_attributes.admaxxer_visitor_idfrom the webhook payload and joins to the visitor's session graph.
This works for every checkout flow Shopify supports, including Shop Pay, accelerated checkout buttons, and Cart API. It does not require a Shopify custom app.
5. Verify the connection
- In Shopify admin, go to Settings › Notifications › Webhooks, find your
orders/createwebhook, and click Send test notification. - In Admaxxer, open Revenue Settings. The "Last 50 webhook deliveries" panel shows the test with status
ok. - Place a real test order. After the order completes, inspect it in Shopify admin (Orders › click the order › scroll to Additional details or check the order JSON via Shopify's API). Confirm
note_attributescontains{ "name": "admaxxer_visitor_id", "value": "..." }. - Within 3 seconds of the order completing, it appears in the Admaxxer attribution dashboard, joined to the visitor's acquisition source.
6. Troubleshooting
- Webhook returns
401 invalid_signature - Signing secret mismatch. Re-copy the
shpss_...value from Shopify Settings › Notifications › Reveal into Admaxxer Revenue Settings. Note: Shopify HMAC is base64-encoded, not hex. Admaxxer handles base64 automatically; you don't have to convert. - Order appears as unattributed
- The visitor-stamping snippet didn't fire. Open browser devtools on the cart page and inspect the
input[name="checkout[note_attributes]"]hidden input — its value should containadmaxxer_visitor_id. If not, the pixel didn't load before checkout opened (consent banner, theme caching, or the pixel snippet is in the wrong template). - Theme uses Shop Pay Checkout (Shopify's accelerated checkout)
- Shop Pay still respects
note_attributesset on the cart form. The snippet from step 2 covers this case. For headless storefronts using the Cart API directly, setnoteAttributeson yourcartCreatemutation manually. - Refunds not subtracting from MER
- Subscribe to
refunds/createon the same Admaxxer endpoint. Admaxxer treats refunds as negative revenue events linked to the original order via order ID.
Frequently asked
- Why does Shopify use note_attributes instead of metadata?
- Shopify orders don't have a generic metadata field — instead, every order has a note_attributes array, where each entry is { name, value }. The Admaxxer Shopify pixel snippet appends a note attribute named admaxxer_visitor_id with the visitor ID before checkout submits, and the resulting Order JSON includes it in note_attributes. The Admaxxer webhook handler reads it from note_attributes (the entry whose name === 'admaxxer_visitor_id').
- Should I use orders/create or orders/paid?
- Subscribe to both. orders/create fires the moment the customer completes checkout — that's when revenue should be recognized for most stores. orders/paid fires when payment finalizes (relevant for delayed-payment methods like Shop Pay Installments or manual capture). Admaxxer dedupes on order ID, so subscribing to both doesn't double-count — the second event simply confirms payment status.
- Does this need a Shopify custom app?
- No — these are native Shopify admin webhooks (Settings › Notifications › Webhooks), not custom-app webhooks. You don't need to create a Shopify custom app, request scopes, or go through the partner-app submission process. Just paste the Admaxxer webhook URL into the native admin screen and Shopify handles signing automatically.
- How does X-Shopify-Hmac-Sha256 verification work?
- Shopify computes HMAC-SHA256 of the raw POST body using your store's webhook signing secret (visible in Settings › Notifications › Webhooks › Reveal). The HMAC is base64-encoded (NOT hex) and sent in the X-Shopify-Hmac-Sha256 header. Admaxxer recomputes the HMAC, base64-encodes it, and compares constant-time. Mismatches return 401.
- What about cart abandonment and discount-code attribution?
- The Admaxxer pixel writes the visitor ID to a 1p cookie and to localStorage on every page view. When checkout opens, our snippet copies the visitor ID into note_attributes — so even cart abandonment recovery emails (which create the order later from a saved cart) carry the original visitor ID. Discount codes don't affect attribution; the visitor ID is the link, not the code.
Next steps
- All revenue connectors — back to the hub.
- Stripe, Paddle, Lemon Squeezy, Polar, Dodo, WooCommerce.
- Shopify pixel install guide — required for visitor stamping.
- Analytics docs — how Tinybird pipes consume revenue events.