Optimising webhooks for Shopify's Express Checkout
How to keep your marketing attribution data when customers pay through Shopify's Express Checkout
This guide explains how to keep your marketing attribution data when customers pay through Shopify's Express Checkout options such as Shop Pay, PayPal Express, Google Pay and Apple Pay. It covers what goes wrong during those checkouts, and how to fix it using Shopify order notes.
What happens during Express Checkout
When a customer clicks an Express Checkout button, they skip your normal checkout flow. The order is completed outside the session context where your tracking runs, so the client-side purchase event never fires with the visitor's identifiers attached.

That means the following data does not reach your order:
Client ID
Session ID
Session count
UTM parameters
GCLID, used for Google Ads attribution
How much this costs you depends on how many of your customers use Express Checkout. In practice we see up to 70 percent of orders arriving without any marketing attribution data at all.
The solution: Shopify order notes
AdPage works around this by writing the marketing data into the order itself, so it travels with the order regardless of which checkout the customer used.
It works in three steps:
Data capture. The AdPage tracking code collects the marketing data during the visitor's session.
Order notes. When the order is placed, that data is stored in the
trytagging_datanote attribute on the order.Webhook delivery. The complete marketing data reaches AdPage through the order webhook.
Prerequisite: order notes only work once webhooks are installed. If you have not set up webhook notifications for your Shopify store yet, do that first, see the Shopify webhook notification setup guide. GTM templates are available for WordPress, WooCommerce, Shopify and Lightspeed.
Step 1: remove order notes from anywhere customers can see them
Order notes are now carrying technical tracking data. You do not want customers seeing raw marketing JSON on their checkout page, in their emails, or on invoices and packing slips.
This has to be done in two places. Doing only the first is the single most common mistake.
1A. Adjust your theme and checkout
Go to Online Store → Themes.
Click Customize on your active theme.
Open Settings (the gear icon).
Go to Checkout.
Find the section for Order notes or Additional information.
Remove or hide the order notes field from your checkout.
1B. Adjust your notification templates
This step is essential. Even with order notes removed from your theme, they can still appear on packing slips and invoices, because those are rendered from separate templates.
Go to Settings → Notifications and work through:
Order confirmation (customer email)
Shipping confirmation (customer email)
Packing slips (PDF)
Invoice
Any other order-related notifications you use
Open each template and look for code along these lines:
Or:
Or simply:
You can either delete these blocks or, better, keep them and filter out trytagging_data so any genuine note attributes still show:
For developers: if your theme uses custom code to render order notes on the order confirmation page or in templates, remove or filter snippets like this one as well:
Back up your templates before you edit them.
Step 2: enable order notes in the AdPage app
Go to your Online Store.
Navigate to Themes → Edit theme.
Open App embeds.
Click Tagging Head.
Find the option Use order notes for webhook delivery.
Switch it on.
Click Save.
Verifying it works
Test both halves: that the data arrives, and that customers cannot see it.
Place a test order.
Generate a packing slip: go to Orders, select the order, then More actions → Print packing slips. Check the PDF, no technical JSON should be visible anywhere on it.
Send yourself a test order confirmation email and check it the same way.
Check your invoice template too, if you use one.
If you still see trytagging_data or raw JSON, you have almost certainly missed a notification template in step 1B rather than done something wrong in the app.
Best practices
Do:
Use order notes only for technical tracking data once this is active
Run a complete checkout flow after installation, not just a glance at the settings
Strip order notes from every customer-facing surface: checkout page, order confirmation email, shipping confirmation email, invoice template, packing slip template, and any other notification template
Test the packing slip PDF with a real order after implementation
Keep a backup of your templates before editing them
Re-test the setting after theme updates, since a theme update can restore the original template code
Don't:
Leave order notes visible to customers
Assume the theme change is enough and skip the notification templates
Keep using order notes for actual customer comments once this solution is live
Skip the verification step
Frequently asked questions
Can I still collect customer comments? Not through the order notes field. Add a separate custom field for customer comments, or use Shopify's Customer Notes instead.
What if I already use order notes for something else? AdPage writes to a specific trytagging_data attribute, which does not collide with your other note attributes. Rather than deleting the whole block from your templates, filter on that one attribute name, see the code examples in step 1B.
I still see marketing data on my packing slip. Now what? You have probably only edited your theme, not the notification templates. Go to Settings → Notifications and edit the packing slip template as well. Look for code that renders note_attributes, attributes or note, and remove or filter it.
Does this work for all payment methods? Yes. It covers Shop Pay, PayPal Express, Google Pay, Apple Pay and the standard checkout.
How much difference does this actually make? For one Shopify client, 72 percent of orders were arriving with no UTM data at all. After enabling order notes, marketing attribution came through for orders across every checkout method, including Express Checkout.
Can I control per template what gets shown? Yes. Liquid lets you filter note attributes precisely, so you can show internal notes to your fulfilment team while hiding trytagging_data from customers.
What happens to existing orders? Existing orders keep their current note data. Only orders placed after you enable the setting receive the marketing tracking data.
Still stuck? Get in touch and we will look at your setup with you.
Last updated
Was this helpful?

