Install Website Tracking with Shopify App
Watch a video walkthrough:
Step 1: Create Tracklution Account
First, get started at www.tracklution.com by creating an account and providing your store URL. Tracklution will check if your site operates with Shopify, and if it does, it will suggest you install the Shopify App.
Step 2: Install Tracklution to Your eCommerce Store with Shopify App
- Sign in to your Shopify store and navigate to Settings → Customer Events → Add Custom Pixel.
- Create a new pixel and give it a name such as "Tracklution App".
- Configure the following settings for Customer Privacy:
- Permission: Not required (Tracklution reads consents automatically). If you want the pixel not be loaded at all before consent is granted, you can select "Required". In that case Tracklution will be installed with Basic consent mode. Read more from here: Compatibility with Cookie Banners and Consent Mode (v2)
- Data Sale: Data collected does not qualify as a data sale.
- In your Tracklution onboarding guide, you will see a script window with a copy button. Copy the script and add it to the newly created Customer Event code field.

- Click Save (top right corner) and Connect (bottom right).
Step 3: Add Webhook
- Go to Shopify Settings → Notifications → Webhooks → Create Webhook.
- Configure the webhook settings as follows:
- Event: Order creation
- Format: JSON
- Webhook API version: Use the version labeled “latest”
- URL: Copy and paste the URL from Tracklution into the URL box.
Voilá! You’re done with the installation!
You will now start seeing session data populating in real time in your Tracking Container within the “Processed Data” table. This allows you to easily verify that your setup is successful and that all desired events are being correctly recorded.
Step 4: Set DNS for First Party Data Collection
Setting up the DNS CNAME allows Tracklution to load scripts under your own domain, enabling the use of First Party Cookies. This improves data accuracy, ensures more reliable tracking, and helps you get the most out of your tracking setup. See instructions from here: First-Party Mode (DNS)
Installing Other (Custom) Events
You can use Google Tag Manager simultaneously. If you want to configure other events, you need to install the Tracklution Main script without PageViews (found from the "Google Tag Manager (custom HTML)" installation instructions inside your container, in Step 1). To remove the PageView tracking from the main script, delete the highlighted row from the Main Tag script that you find from your installation instructions:
After this, you can use the custom HTML tags or Template tags in GTM to install the desired events (Note! PageViews are already installed with the Shopify App):
Shopify Markets with Multiple Domains
If your Shopify store uses Shopify Markets with multiple domains (for example, .fi, .de, and .com), and each market has its own ad account, the tracking should be kept separate. Create a separate Tracklution container for each market, perform a separate Shopify installation for each container, and connect each container to its respective ad account. This ensures that events from each domain are correctly routed to the right Tracklution Domain ID and ad account.
If you want to track multiple stores in one container, read our article about cross-domain tracking from here: Cross-Domain Tracking
Editing the Shopify Installation Script
The standard Shopify customer events code can be edited and customised to match your use case by simply editing the code that you see in Step 1 of the installation instructions.
Removing PII or Sensitive Data from Being Collected
In some cases, such as when advertising health-related or other regulated products, you may want to prevent Tracklution from collecting or sending personally identifiable information (PII) or product details that could be considered sensitive by ad platforms like Meta. You can customize your installation to remove any fields you don’t want to collect by removing the collection of PII by editing your Customer Events script:
- If you already have Tracklution installed, go to Shopify admin, go to Settings → Customer events and find the script from there. If you don't have it already installed you find it from the Step 1 in Shopify installation instructions.
- Locate the ContactInfo section near the end of the script and delete it. This section includes fields such as email, phone number, name, and address.
- Go to Settings → Notifications → Webhooks and delete the Tracklution webhook, as it would otherwise continue sending contact data.
- If needed, you can also remove product-related fields (like item_name or url) from the event payloads - for example, if product titles or URLs contain sensitive medical or personal information.
Below is an example of the default Purchase event tracking tag, followed by an edited version that removes all PII and product details.
Default script - (example only! the script contains an example value LS-12345678-9 that needs to be your unique Tracklution ID):
tlq('track', 'Purchase', {
target: 'LS-12345678-9',
url: event.context?.document?.location?.href,
currency: event.data?.checkout?.currencyCode,
value: event.data?.checkout?.totalPrice?.amount,
tax: event.data?.checkout?.totalTax?.amount,
shipping: event.data?.checkout?.shippingLine?.price?.amount,
items: lineItems,
});
const billingAddress = event.data?.checkout?.billingAddress;
tlq('set', 'ContactInfo', {
target: 'LS-12345678-9',
url: event.context?.document?.location?.href,
email: event.data?.checkout?.email,
phoneNumber: event.data?.checkout?.phone || billingAddress?.phone,
firstName: billingAddress?.firstName,
lastName: billingAddress?.lastName,
address: billingAddress?.address1,
postCode: billingAddress?.zip,
city: billingAddress?.city,
country: billingAddress?.country,
isFirstOrder: event.data?.checkout?.order?.customer?.isFirstOrder,
});tlq('track', 'Purchase', {
target: 'LS-12345678-9',
url: event.context?.document?.location?.href,
currency: event.data?.checkout?.currencyCode,
value: event.data?.checkout?.totalPrice?.amount,
});Tracking Product ID together with Variant ID
By default, Tracklution’s Shopify installation sends the variant ID as the product identifier, since it provides the most specific reference to the purchased product. If the variant ID is not available, Tracklution automatically falls back to the product ID. If you prefer to include both the product ID and variant ID (for example, to match your product feed structure), you can customise this through the Customer Events installation by editing the event structure.
Edit the script from this:
{
item_id: productVariant?.sku,
item_name: productVariant?.product?.title,
item_variant: productVariant?.title,
item_brand: productVariant?.product?.vendor,
sku: productVariant?.sku,
variant_id: productVariant?.id,
product_id: productVariant?.product?.id,
price: productVariant?.price?.amount,
currency: productVariant?.price?.currencyCode,
}
To this:
{
item_id: productVariant?.sku,
item_name: productVariant?.product?.title,
item_variant: productVariant?.title,
item_brand: productVariant?.product?.vendor,
sku: productVariant?.sku,
variant_id: productVariant?.product?.id,
product_id: productVariant?.product?.id,
price: productVariant?.price?.amount,
currency: productVariant?.price?.currencyCode,
}