Docs / Shopify

Shopify Integration

Protect your Shopify store from click fraud in under two minutes.

Option 1: Install from the Shopify App Store (recommended)

The ClickLens app is the easiest way to add click fraud detection to your Shopify store. It includes a built-in dashboard, automatic tag installation via Theme App Extension, and Shopify-native billing.

  1. Visit the ClickLens app in the Shopify App Store.
  2. Click Install and authorize the app.
  3. Select a plan (all plans include a 14-day free trial).
  4. The app will automatically create your ClickLens site and configure the tracking tag.
  5. Enable the ClickLens block in your theme — go to Online Store → Themes → Customize, then toggle the ClickLens app block on.

Sessions will start appearing in your ClickLens dashboard within a few minutes of receiving traffic.

Option 2: Theme App Extension

If you've installed the ClickLens Shopify app, the Theme App Extension is already available. This injects the tag without editing theme code.

  1. Go to Online Store → Themes in your Shopify admin.
  2. Click Customize on your active theme.
  3. In the theme editor, find the App embeds section (usually in the left sidebar under the theme settings icon).
  4. Toggle ClickLens Tracking Tag on.
  5. Enter your Site Key if not pre-filled (found in the ClickLens app under Settings).
  6. Click Save.

Option 3: Manual theme code installation

If you prefer not to install the app, you can add the tracking tag directly to your theme code. This works with any Shopify plan.

  1. Go to Online Store → Themes → Edit Code.
  2. Open theme.liquid from the Layout section.
  3. Paste the following snippet just before the closing </head> tag:
<script defer src="https://app.clicklens.com/t.js"
  data-site="YOUR_SITE_KEY"
  data-endpoint="https://app.clicklens.com/api/v1/beacon">
</script>

Replace YOUR_SITE_KEY with the site key from your ClickLens dashboard (Settings → Site Settings).

Site key configuration

Your site key uniquely identifies your store in ClickLens. You can find it in two places:

  • ClickLens Shopify app: Open the app in your Shopify admin and go to Settings. Your site key is displayed on the page.
  • ClickLens dashboard: Log in at app.clicklens.com, go to Settings → Site Settings.

Verifying the installation

  1. Visit your store in a browser (use an incognito window for best results).
  2. Right-click and select View Page Source.
  3. Search for t.js — you should see the ClickLens script tag in the <head>.
  4. In ClickLens, go to Sessions. Your visit should appear as a new session within a few minutes.

Shopify app features

The ClickLens Shopify app provides a native experience within your Shopify admin:

  • Dashboard: View traffic quality metrics, human/suspect/bot breakdowns, and trends over time.
  • Sessions: Browse individual sessions with detailed scoring breakdowns.
  • Traffic Sources: See which UTM sources and mediums are sending the most bot traffic.
  • Exclusions: Manage IP and fingerprint exclusion rules to block repeat offenders (Growth plan and above).
  • Automatic tag installation: Theme App Extension installs the tag without editing theme code.

Pricing

All plans include a 14-day free trial. Billing is handled natively through Shopify.

Plan Price Sessions/month
Starter $49/month 10,000
Growth $149/month 50,000
Pro $399/month 200,000

FAQ

Will the tag slow down my store?

No. The tracking tag is under 5 KB gzipped, loads asynchronously with the defer attribute, and has zero impact on your store's page speed or Core Web Vitals.

Does it work with all Shopify themes?

Yes. The Theme App Extension works with all Online Store 2.0 themes. For older themes, use the manual installation method by editing theme.liquid.

Can I use ClickLens without the Shopify app?

Yes. You can sign up at app.clicklens.com and add the tag manually to your theme code. The Shopify app provides a more integrated experience with native billing and one-click tag installation.

What data does ClickLens collect?

ClickLens collects browser signals (canvas fingerprint, WebGL data, automation markers, mouse/keyboard patterns) to detect bots. It does not collect personal information, form contents, or payment details. See our Tag Security page for details.