Start Here 👋
Cometly can track Shopify purchases using webhooks, so your conversion events are sent automatically when an order is paid. This guide shows you how to install the Cometly pixel, create a Shopify webhook, and map the webhook payload into a Purchase event in Cometly.
Overview
Here’s the idea in plain terms:
You install the Cometly pixel on your Shopify store so Cometly can identify each visitor using a unique token called
comet_token(plus a fingerprint).When someone places an order and payment is captured, Shopify sends a webhook (a message) to Cometly with the order details.
Inside Cometly, you map the Shopify data (name, email, amount,
comet_token, etc.) into your Purchase event.That gives you accurate attribution and also lets you power server-side tracking like the Meta Conversion API (CAPI) and Google Conversion API if you want.
⚠️ Note: The comet_token and fingerprint only show up in the webhook payload when the Cometly pixel was installed at the time the customer placed the order.
Why This Matters
Shopify webhooks give Cometly a reliable “order paid” signal.
When you also pass comet_token, fingerprint, and IP, Cometly can match purchases back to the exact visitor journey, which improves attribution accuracy and match rates in ad platforms.
Step 1: Install the Cometly Pixel in Shopify
You must install the Cometly pixel first so Shopify orders contain the visitor identity data needed for accurate matching.
What to do
Add the Cometly pixel before the closing
</head>tag in yourtheme.liquid.
What this does
The Cometly pixel automatically generates and stores the following tracking attributes on your orders:
comet_tokenfingerprint
These become available later when you map your Shopify webhook into Cometly.
💡 Pro Tip: Install the pixel first, then place a fresh test order after installation. Older orders will not contain the correct visitor identity fields.
Step 2: Create a Purchase Webhook in Cometly
Now you’ll create a webhook endpoint in Cometly and copy the Webhook URL you will paste into Shopify.
What to do
In Cometly, navigate to Integrations.
Choose Webhooks.
Create a new webhook.
Select the event you want to send, choose Purchase.
Click Create Event
Copy the Webhook URL generated by Cometly.
⚠️ Note: Keep this tab open. You’ll paste this URL into Shopify in the next step.
Step 3: Create the Webhook in Shopify
You are going to tell Shopify to send an event to Cometly whenever an order payment happens.
What to do in Shopify
In Shopify, click Settings (bottom left).
Click Notifications.
Click Webhooks.
Click Create webhook.
Configure the webhook like this:
Save the webhook.
Step 4: Map Shopify Webhook Data Into Your Cometly Purchase Event
Now that Shopify is sending the payload, you need to map the payload fields into the right Cometly fields so attribution and match rates are strong.
Required mappings for accurate tracking
Inside your Cometly webhook mapping screen, ensure you map all of the following:
First Name
Last Name
Email
Phone
Amount *this is the purchase amount, you can use formatting to configure the amount how you would like if you prefer.
(Example: you can use formatting to deduct taxes and shipping if you wish.)IP
comet_token
Fingerprint
Why these fields matter
Email + phone + name + IP help with identity matching and conversion quality.
comet_token + fingerprint connect the purchase back to the exact visitor tracked by the Cometly pixel.
Amount powers accurate revenue attribution and ROAS reporting.
⚠️ Note: If comet_token and fingerprint are missing from the payload, it usually means the Cometly pixel was not installed when the order was placed, or the customer completed checkout on a path where the pixel was not firing.
Step 5: Test the Webhook End-to-End
Do a real test so you know Shopify is sending data and Cometly is receiving it.
Test checklist
Open a new browser window.
Visit your Shopify store and browse at least 1 to 2 pages.
Complete a test purchase (use a real payment method or a test method based on your store setup).
Confirm in Shopify that the order status reflects paid.
In Cometly:
Check your webhook logs (or webhook activity)
Confirm the Purchase event arrived
Confirm the mapped fields are populated (especially
comet_token, fingerprint, and amount)
💡 Pro Tip: If the event arrives but attribution looks wrong, it is almost always a missing comet_token, missing fingerprint, or a value mapping issue.
Check the Event Log in Cometly:
Navigate to the Event Log in your Cometly dashboard, select Webhooks, and see if your order has a comet_token, fingerprint, and ip.
Step 6: Shopify Meta CAPI vs Cometly Meta CAPI
You can use either Shopify’s native Meta Conversion API integration or Cometly’s Meta Conversion API, but you can only run one Meta CAPI connection for the same pixel setup.
What to choose
Use Cometly Meta CAPI if you want server-side events aligned to Cometly attribution, plus deeper visibility and control over mapping, match signals, and event definitions.
Use Shopify’s native Meta CAPI if you want a basic Shopify-managed connection and you do not need Cometly controlling the event stream.
⚠️ Important: Do not run both conversion API's at the same time. Double sending can inflate conversions and create reporting discrepancies. You can only have one conversion API configured for Meta or you will have duplicate events.
Step 7: Google Conversion API Setup (Recommended if you want server-side Google tracking)
For Google, you can create separate conversion actions specifically for events coming from Cometly.
Common Issues and Fixes
⚠️ Issue: comet_token is missing in the webhook payload
Confirm the Cometly pixel is installed before
</head>intheme.liquidMake sure the customer completed the order after the pixel was installed
Ensure the pixel loads on all storefront pages involved in the checkout flow
⚠️ Issue: Purchase amount is wrong
Make sure you mapped the correct value field (total paid, not subtotal)
Confirm currency formatting matches what Cometly expects
⚠️ Issue: Webhook not firing
Re-check the Shopify webhook event selection (must be order paid / payment captured)
Confirm the webhook URL is pasted correctly
Place a new paid test order and check Shopify webhook delivery logs if available.
Tracking Add to Cart & Initiate Checkout Events For Your Shopify Store
If you would like to track Add to Cart and Initiate Checkout events, you will need to follow the guide below.
Troubleshooting
Cometly is Not Tracking All Orders
Cometly is designed to track all your Shopify orders. For example, if you see 10 orders in Shopify for a given day, you should see 10 orders in Cometly—provided that the timezones in your Cometly and Shopify account settings are aligned.
If the numbers do not match, follow these steps:
Check the Event Log in Cometly: Navigate to the Event Log in your Cometly dashboard and look for any errors.
Common Issue - Missing Email: One of the most common errors occurs when the "Email" field is not passed through for certain orders. Cometly relies on email addresses to track orders and build customer journeys. If an email is missing, the order cannot be tracked.
Orders Created by Third-Party Apps: If you're using third-party apps that generate orders and pass them into your Shopify store, these apps may not share customer email addresses with Shopify. As a result, Cometly cannot track these orders, and you will see them flagged as errors in the Event Log.
To resolve these issues, ensure that all orders passing through your Shopify store include the required data, particularly customer email addresses.




