Skip to main content
Shopify Integration

Learn how to setup your Shopify store with Cometly.

Updated this week

Start Here 👋

Ready to get Cometly marketing attribution installed on your Shopify store? In this article we will walk you through step-by-step for how to implement the tracking setup. Please start by watching the video below so you can learn more about how the integration works and decide the events you would like to setup for tracking.

Important:

If you have the Cometly app installed on your Shopify store you have until September 1, 2024 to update your Shopify integration.


Step 1: Install the Cometly base code pixel on your store

To install the Cometly base code pixel in your Shopify store:

  • Navigate to Setup in your Cometly space

  • Copy the Cometly base code pixel

  • Paste base code pixel before the </head> in the theme.liquid file

If you would like to install the Add To Cart and Initiate Checkout events, you will need to setup the Cometly base code pixel using Google Tag Manager.

Step-by-Step Instructions

Login to your Shopify store and under Sales Channels, click Online Store > Themes

Next to Customize button, click the three dots and then click Edit code as shown in the image below to access your code editor:

On the left panel, choose theme.liquid

Navigate to the Setup section inside your Cometly space and copy the Cometly base code pixel from Step 1:

Important: Each Cometly space has a unique pixel. If you have multiple stores and have created different spaces, ensure that you are placing the code from the correct space.

Search the theme.liquid for </head>. You want to ensure that you place the Cometly base code pixel before the </head>.

Click Save after you have placed the base code pixel.


Step 2: Connect Shopify to Cometly

Connecting your Shopify store to Cometly will enable you to automatically send all purchases to Cometly.

Watch the video below for how to setup the Shopify integration:

Use the following Admin API access scopes:

  • read_orders

  • read_customers

  • read_products

  • read_draft_orders

Ensure the webhook version is set to: 2024-07

Important: When entering your Shopify Store URL into Cometly, make sure you are using the XXXXXXX.myshopify.com URL so that purchases track properly. You can find this by navigating to the Shopify dashboard, clicking on "Settings" and then clicking on "Domains".


When new orders come in, you will see purchase events in the Events Log in your Cometly account.


Step 3: Connect your integrations

To connect your Shopify store to your space, login to Cometly and click Space Settings > Integrations. Find the Shopify integration and paste your myshopify store URL and click Connect.

The video below explains exactly how to do this step-by-step:

Step-by-Step Instructions

Connect to ad channels

To connect your integrations, simply navigate to the Space Settings page to view all your connected integrations. To connect to your ad channels, click the "Manage Connections" link to go to the profile integrations page. From this page you can connect to your different ad channels by clicking the blue "connect" button next to the Ad Channel that you need to connect. You will be redirected to the ad channel platform where you will just need to click "Accept" before being redirected back into Cometly.

Connect your ad accounts to the Workspace

Once your Ad Channels have been connected, navigate back to the Space Settings Page

and click the green "Connect" button next to the ad account that you want to connect to the workspace for this specific Shopify store.


Step 4: Setup UTM Parameters on your Ads

Follow the URL parameter article to configure parameters on your ads by channel:


Step 5: Import existing ad campaigns and turn on tracking

The Import Campaigns page is a tool that allows Cometly to track existing campaigns that were created before you had Cometly. Cometly cannot track retroactively, so all metrics will be tracked starting at the moment that you turn tracking “ON”.

After turning tracking on, you will see your campaigns in Ads Manager. It will take between 30-60 minutes to start receiving data.


Step 6: Activate Cometly Conversion API For Shopify

Considerations for using Cometly's Meta Conversion API:

  • You can only use ONE conversion API with Meta. If you want to use Cometly's Meta conversion API, you need to ensure you DO NOT have any other conversion API's enabled.

  • Cometly's Meta conversion API will NOT send page view events. You need to ensure you have your Meta pixel in the <head> across all pages of your site so the Meta pixel will track browser page view events.

  • When the Cometly Meta conversion API is enabled, Cometly will automatically send any tracked events back to the pixel associated to the ad that we tracked the event to.

Example Best Setup:

  • Meta pixel in the <head> of all pages of your site sending page view events to Meta.

  • Cometly sending all other events back to Meta's server for your pixel.

If you want to use the Cometly's Meta Conversion API, you will have to turn off data sharing for the native Meta Shopify Conversion API.

  • If you turn off data sharing, you must install the Meta pixel in the <head> of all pages of your site so you will still send page view events to Meta.

Did this answer your question?