> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codeqr.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Shopify

> How to add @codeqr/analytics to your Shopify store

With `@codeqr/analytics`, you can track lead and sale conversions on your Shopify store, enabling you to measure the effectiveness of your marketing campaigns.

You can add the `@codeqr/analytics` script to your Shopify store simply by installing the [CodeQR Shopify App](https://d.to/shopify/app) from the App Store.

<Frame>
  <img src="https://mintcdn.com/codeqr/Dit-PkrrSHQLOViA/images/shopify/shopify-app.png?fit=max&auto=format&n=Dit-PkrrSHQLOViA&q=85&s=f50dff178b821e8f528e069bab713c19" alt="The connection status in the CodeQR Conversions app" width="2462" height="1470" data-path="images/shopify/shopify-app.png" />
</Frame>

Then, make sure to activate the `@codeqr/analytics` script by following these steps:

1. Navigate to your Shopify admin panel.
2. Go to **Online Store** > **Themes**.
3. Click on **Customize** for your current theme.
4. In the theme editor, select the **App embeds** tab.
5. Locate the **Analytics Script** for the CodeQR Conversions app and toggle it to activate.

<Frame>
  <img src="https://mintcdn.com/codeqr/Dit-PkrrSHQLOViA/images/shopify/shopify-enable-tracking-script.png?fit=max&auto=format&n=Dit-PkrrSHQLOViA&q=85&s=f038112ff6fa16ea34eaff0a2d6652b6" alt="Enable the CodeQR Analytics script in your Shopify theme" width="1412" height="983" data-path="images/shopify/shopify-enable-tracking-script.png" />
</Frame>

<Check>
  You can **verify the installation** with the following tests:

  1. Open the browser console and type in `CodeQRAnalytics` – if the script is installed correctly, you should see the `CodeQRAnalytics` object in the console.
  2. Add the `?cq_id=test` query parameter to your website URL and make sure that the `cq_id` cookie is being set in your browser.

  If both of these checks pass, the script is installed correctly. Otherwise, please make sure:

  * The analytics script was added to the `<head>` section of the page
  * If you're using a content delivery network (CDN), make sure to purge any cached content
</Check>

## Installation video

Here's a video showing how to install and activate the `@codeqr/analytics` script in your Shopify store:

<iframe width="100%" height="469px" className="rounded-xl" src="https://www.loom.com/embed/936970b8db5b41488657fa92ffec384a?sid=04030975-6d7e-4126-8487-a1d9a3095efc" title="Loom video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />
