Skip to main content

Sensor docs

Add the Foglift pixel to Shopify

Shopify keeps your storefront's head code in a file called theme.liquid. You will paste Foglift's one-line pixel just above the closing </head> tag, save, and make sure the theme is published. No coding is required — you are adding one line to one file. Foglift has not yet certified Shopify, so the final step is confirming the pixel actually loads and reports.

The line you will paste

Open AI Traffic while signed in to copy this with your workspace identifier already filled in. It is safe in page source and cannot access your account.

<script async src="https://foglift.io/pixel.js" data-foglift-brand="YOUR_WORKSPACE_ID"></script>

Step by step in Shopify

  1. Copy your pixel from Foglift

    Open AI Traffic in Foglift while signed in and copy the one-line snippet. Your workspace identifier is already filled in, and it is safe to have in page source.

  2. Open Online Store → Themes in Shopify

    In your Shopify admin, click Online Store in the left sidebar, then Themes. This lists your published live theme and any drafts.

  3. Open the theme code editor

    Next to your live theme, click the three-dot (…) button and choose Edit code. This opens the file browser for your theme.

  4. Open theme.liquid

    In the Layout folder on the left, click theme.liquid. This file wraps every storefront page, so code here loads site-wide.

  5. Paste just above </head> and Save

    Scroll to the line that reads </head> near the top of the file, click just before it, paste the snippet, then click Save in the top-right. Do not paste it into a single template or a checkout field.

  6. Make sure this theme is published

    Custom code only reaches shoppers on the live theme. If you edited a draft, go back to Themes and click Publish so the change goes live on your storefront.

  7. Verify it loads and reports

    Open a published product or collection page in a private browser window, open the Network panel, and confirm pixel.js loads with a successful response. Then confirm a recognized test referral sends a successful cross-origin POST to Foglift. Because Shopify is still being verified, treat a working GET and POST as your proof before relying on it. Then watch AI Traffic for the first recognized referral.

A successful pixel.js load proves the placement is live. It does not create a referral event and does not prove that an AI engine cited, indexed, or recommended your site.

Open AI Traffic

Need AI crawler-request visibility?

The pixel measures human referral clicks. To also see AI crawlers, install a server-side Sensor where HTTP requests are visible.