📌 This article covers the tracking script only — the JavaScript snippet that goes on your website so Retention.com can identify visitors. This is separate from connecting your email platform (Klaviyo, HubSpot, etc.) in Settings → Integrations. If you're looking to set up your email integration instead, see Connect Your Email Platform.
Install the Retention.com script on your Shopify store to start identifying visitors and capturing leads.
Which installation method do I need?
New Shopify stores (created recently on Shopify's latest platform) have the Retention.com web pixel installed automatically — no manual steps required. If you signed up through the Shopify App Store, skip to verifying your script in Retention.com.
Older Shopify stores using a custom theme should follow the manual installation steps below.
Not sure which applies to you? Use the chat icon below and our team can confirm.
Before you begin (manual install)
You'll need your .myshopify.com store URL to get started.
Example: acme-store.myshopify.com
→ Not sure where to find it? Where to Find Your Shopify Store URL
Manual installation steps
1. Copy your tracking script
In the Retention.com app, go to Settings → Script. Copy your unique tracking script — you'll paste it into your Shopify theme in the next steps.
2. Open Themes
In your Shopify admin, go to Online Store > Themes.
3. Click "..." and Edit Code
Click the three dots (...) next to your current theme and select "Edit Code".
4. Find theme.liquid and paste your script
Open theme.liquid (found under Layout) and paste your script on the line right above </head>. Similar to the sample below:
<head>
<meta charset="utf-8">
<title>{{ shop.name }}</title>
<link rel="stylesheet" href=..>
<meta name="viewport" ...>
...
...
{{ PASTE YOUR SCRIPT HERE}}
</head>
<body>
<header></header>
5. Save
Click "Save" at the top right of the editor. You're all set!
What to expect
Once saved, the script fires on every page of your store. Verify the install on the next step in Retention.com.
What to do next
→ Connect your email platform: How to Connect Your Email Platform
→ Learn how contacts sync: How Contacts Sync to Your Email Platform
