Skip to main content
All CollectionsTroubleshooting
How to remove legacy Cometly tracking code for Shopify & update to new base code
How to remove legacy Cometly tracking code for Shopify & update to new base code

Learn how to remove legacy Cometly tracking code for your Shopify store and install the new base code installation setup.

Updated over 10 months ago

👋 Start Here

In this article we will show you step-by-step how to remove the legacy Cometly tracking code and install the new Cometly base code on your Shopify store. If you wish to setup add to cart and initiate checkout events, you will need to first remove the old code and when you get to the section for 'How to add new Cometly base code', choose the option for installing add to cart and initiate checkout events. First start by removing the legacy Cometly code below.

Removing Legacy Code

Follow the steps below to remove the legacy Cometly code from your Shopify store.

Step 1: Navigate to "Online Store" in Shopify

Step 2: Navigate to "Edit Code"

Step 3: Navigate to "theme.liquid" file

Step 4: Navigate to the </body> area and delete the existing Cometly code entirely

Step 5: Navigate to "Settings" and then "Checkout"

Step 6: Remove all Cometly code from the "Additional Scripts" area in Shopify and click "Save"

Congrats! You've removed the old Cometly code! Now it's time to add the new code to your store. You have two options below.

How to add new Cometly base code

You have two options for installing the new Cometly base code. If you wish to setup add to cart and initiate checkout events, please choose option 1.

Option 1: (Advanced) Install new Cometly base code and set up Add To Cart & Initiate Checkout events using Google Tag Manager

Option 2: (Easy) Follow the steps below in this article to install the Cometly base code to your Shopify store

Step 1: Navigate back to the liquid.theme area of your store

Step 2: Copy the NEW Cometly code from your Cometly account under 'Setup'

Step 3: Paste the new code inside the </head> in Shopify and click "Save"

Step 4: Use Cometly Pixel Helper Google Chrome browser extension plugin to confirm installation

Did this answer your question?