What is this for?
The Terrific Pixel is a small piece of code you add to your store. It tells Terrific what your visitors do: which pages they visit, which products they open, what they add to or remove from their cart, and what they buy.
With that information you can see how much your videos and live shows actually sell, connecting your content to real results.
In this guide we install it with Google Tag Manager (GTM), a free Google tool that lets you add code to a site without changing how it's built.
💡 Not technical? No problem. Sections 1 and 2 explain what's needed and help you gather the right access. Your development team or agency can take care of the steps that involve code.
Which platforms does this guide cover?
This guide is written for WooCommerce stores, using the free GTM4WP plugin. The examples and code are set up for WooCommerce.
You can also use it on other platforms. The Pixel reads the standard GA4 ecommerce events (view_item, add_to_cart, remove_from_cart, begin_checkout, purchase), and many platforms send them, including Shopify, VTEX, Magento and custom-built sites.
If your store runs on WooCommerce: follow the guide from start to finish.
If your store runs on another platform:
Skip sections 1.1 and 1.2, which apply only to WooCommerce. Start at 1.3 and follow the guide from there.
First, check that your site sends those events to the
dataLayerusing theecommerce.items[]structure (section 1.2 shows you how).Adjust these items in the code:
platformType: 'WooCommerce': check with the Terrific team which value to use for your platform.cartContent.totals.total: this variable comes from the WooCommerce plugin. Your platform may store the cart total somewhere else, or not expose it at all.The
/product/pattern in Page View: replace it with the real path of your product pages (for example,/products/or/p/).
1. Before you start: what you need
Make sure these three conditions are met. If any one is missing, the installation won't work correctly.
1.1 GTM4WP plugin installed (WooCommerce only)
Your WordPress site needs the free "GTM4WP – Google Tag Manager for WordPress" plugin.
To install it: WordPress → Plugins → Add New → search for "GTM4WP".
Then go to: Settings → Google Tag Manager for WordPress → General and check two things:
Google Tag Manager ID: your GTM container ID (format
GTM-XXXXXXX).Container code ON/OFF: must be set to On.
⚠️ The most common mistake: if "Container code" is Off, GTM never loads on your site, even when the ID is correct. You also won't see any warning.
1.2 WooCommerce integration in GA4 mode (WooCommerce only)
In the plugin, under the Integration → WooCommerce tab, enable:
Track e-commerce: enabled.
Tracking mode: GA4 (not legacy mode / Universal Analytics).
Cart content in data layer: enabled. This makes the cart contents available on every page.
This is the most important condition. GA4 mode determines the format of each product's data, and the Pixel relies on that format.
🔍 How to check whether it's in GA4 mode: open a product page, open your browser console (F12), and type dataLayer.
✅ It is in GA4 mode if events like
view_itemoradd_to_cartinclude anecommerce.items[]object withitem_id,item_name,price, etc.❌ It is not in GA4 mode if that data appears inside
eventModel. See section 6.2.
1.3 Access to Google Tag Manager
You need access to the store's GTM container with Edit permission (to create tags, triggers, variables and folders).
You do not need Publish or Approve permission. Someone on the store's side does the final publishing, as change control.
If the site has more than one GTM container, first confirm which one is actually installed (see section 6.3).
2. Set up your GTM workspace
2.1 Create the "Terrific" folder
In your GTM container, go to Folders → New Folder and name it Terrific. Put everything you create in this guide inside it.
This keeps the Terrific setup separate from your other tags (Google Ads, GA4, Meta Pixel, etc.) and makes it easy to review later.
2.2 Naming each element
Use these prefixes so anyone can tell at a glance what each element is:
Prefix | What it is | Example |
| Third-party tag |
|
| Custom event trigger |
|
| Data layer variable |
|
| Trigger used as an exception |
|
3. Create the variables
Variables are small "boxes" that each read one specific piece of data from the page, such as a product's ID or price. Create them before the tags, because several tags use them.
All of them are Data Layer Variables, Version 2.
Variable name in GTM | "Data Layer Variable Name" field |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
⚠️ Heads up: in the right-hand field, type the path without the DLV - prefix. If you paste the full variable name, the variable can't find the data and returns undefined.
4. Create the tags (one per event)
There are 7 tags. Create them in this order as Custom HTML tags.
# | Tag | What it tracks |
1 | SDK Loader | Loads the Pixel on the site (always first) |
2 | Page View | Visits to any page except product pages |
3 | Product View | Visits to a product page |
4 | Add to Cart | Products added to the cart |
5 | Remove from Cart | Products removed from the cart |
6 | Checkout Started | The start of checkout |
7 | Purchase | Completed purchases |
4.1 SDK Loader
Name: 3PT - Terrific - SDK Loader
Trigger: All Pages
<script
src="https://live-sdk.terrific.live/analytics-sdk.min.js"
async
></script>
<script>
window.TerrificAnalyticsConfig = {
storeId: "CLIENT_STORE_ID",
eventsUrl: "https://terrific.live/api/customer-shop-event",
};
</script>
✏️ Replace CLIENT_STORE_ID with your store's real Terrific Store ID. If you don't know your Store ID, ask your Customer Success Manager or your Terrific contact.
4.2 Page View
Name: 3PT - Terrific - Page View
Trigger: All Pages
Exception: Exception - Product Detail Pages (Page View type, condition: Page URL contains /product/)
<script>
(function waitForTerrificAnalytics() {
var page = window.location.href;
// Exclude product detail pages (reported via Product View)
if (page.includes('/product/')) {
return;
}
if (window.TerrificAnalytics && typeof TerrificAnalytics.init === 'function') {
TerrificAnalytics.init(window.TerrificAnalyticsConfig);
try {
TerrificAnalytics.trackPageViewed({
platformType: 'WooCommerce',
url: page
});
console.log("Terrific: PageView tracked :: " + page);
} catch (error) {
console.log("Error Terrific: " + error);
}
} else {
setTimeout(waitForTerrificAnalytics, 50);
}
})();
</script>
💡 Why are product pages excluded twice? It's on purpose. Product View already tracks those visits. The GTM exception stops the tag from running on those pages, and the check in the code is a backup. If your product pages use a path other than /product/, change it in both places.
4.3 Product View
Name: 3PT - Terrific - Product View
Trigger: CE - view_item (Custom Event, event name: view_item, fires on all custom events)
<script>
(function waitForTerrificAnalytics() {
if (window.TerrificAnalytics && typeof TerrificAnalytics.init === 'function') {
TerrificAnalytics.init(window.TerrificAnalyticsConfig);
try {
TerrificAnalytics.trackProductViewed({
platformType: 'WooCommerce',
product: {
id: "{{DLV - ecommerce.items.0.item_id}}",
title: "{{DLV - ecommerce.items.0.item_name}}",
price: "{{DLV - ecommerce.items.0.price}}",
sku: "{{DLV - ecommerce.items.0.sku}}",
variant: "{{DLV - ecommerce.items.0.item_variant}}",
category: "{{DLV - ecommerce.items.0.item_category}}",
quantity: 1
}
});
console.log("Terrific: ProductView tracked :: {{DLV - ecommerce.items.0.item_id}}");
} catch (error) {
console.log("Error Terrific ProductView: " + error);
}
} else {
setTimeout(waitForTerrificAnalytics, 50);
}
})();
</script>
4.4 Add to Cart
Name: 3PT - Terrific - addToCart
Trigger: CE - add_to_cart (Custom Event, event name: add_to_cart)
<script>
(function waitForTerrificAnalytics() {
if (window.TerrificAnalytics && typeof TerrificAnalytics.init === 'function') {
TerrificAnalytics.init(window.TerrificAnalyticsConfig);
try {
var variantRaw = "{{DLV - ecommerce.items.0.item_variant}}";
var variantId = (variantRaw === "" || variantRaw === "undefined" || variantRaw === undefined) ? null : variantRaw;
var totalRaw = "{{DLV - cartContent.totals.total}}";
var totalPrice = (totalRaw === "0" || totalRaw === "" || totalRaw === "undefined" || totalRaw === undefined) ? null : totalRaw;
TerrificAnalytics.trackProductAddedToCart({
platformType: 'WooCommerce',
totalPrice: totalPrice,
product: {
id: "{{DLV - ecommerce.items.0.item_id}}",
title: "{{DLV - ecommerce.items.0.item_name}}",
price: "{{DLV - ecommerce.items.0.price}}",
quantity: "{{DLV - ecommerce.items.0.quantity}}",
variantId: variantId,
sku: "{{DLV - ecommerce.items.0.sku}}"
}
});
console.log("Terrific: AddToCart tracked :: {{DLV - ecommerce.items.0.item_id}}");
} catch (error) {
console.log("Error Terrific AddToCart: " + error);
}
} else {
setTimeout(waitForTerrificAnalytics, 50);
}
})();
</script>
💡 When a value is missing, GTM sometimes fills in an empty string or the word "undefined". This code turns those into a real empty value (null) so Terrific receives clean data. Remove from Cart does the same.
4.5 Remove from Cart
Name: 3PT - Terrific - removeToCart
Trigger: CE - remove_from_cart (Custom Event, event name: remove_from_cart)
<script>
(function waitForTerrificAnalytics() {
if (window.TerrificAnalytics && typeof TerrificAnalytics.init === 'function') {
TerrificAnalytics.init(window.TerrificAnalyticsConfig);
try {
var variantRaw = "{{DLV - ecommerce.items.0.item_variant}}";
var variantId = (variantRaw === "" || variantRaw === "undefined" || variantRaw === undefined) ? null : variantRaw;
var totalRaw = "{{DLV - cartContent.totals.total}}";
var totalPrice = (totalRaw === "0" || totalRaw === "" || totalRaw === "undefined" || totalRaw === undefined) ? null : totalRaw;
TerrificAnalytics.trackProductRemovedFromCart({
platformType: 'WooCommerce',
totalPrice: totalPrice,
product: {
id: "{{DLV - ecommerce.items.0.item_id}}",
title: "{{DLV - ecommerce.items.0.item_name}}",
price: "{{DLV - ecommerce.items.0.price}}",
quantity: "{{DLV - ecommerce.items.0.quantity}}",
variantId: variantId,
sku: "{{DLV - ecommerce.items.0.sku}}"
}
});
console.log("Terrific: RemoveFromCart tracked :: {{DLV - ecommerce.items.0.item_id}}");
} catch (error) {
console.log("Error Terrific RemoveFromCart: " + error);
}
} else {
setTimeout(waitForTerrificAnalytics, 50);
}
})();
</script>
⚠️ If the plugin isn't in GA4 mode, this event may arrive without product data. That isn't a problem with the tag. It's a limitation of how WooCommerce and GTM4WP send this event when they aren't configured correctly.
4.6 Checkout Started
Name: 3PT - Terrific - checkoutStarted
Trigger: CE - begin_checkout (Custom Event, event name: begin_checkout)
At checkout the cart usually holds several products, so this code goes through the full product list instead of reading just one.
<script>
(function waitForTerrificAnalytics() {
if (window.TerrificAnalytics && typeof TerrificAnalytics.init === 'function') {
TerrificAnalytics.init(window.TerrificAnalyticsConfig);
var cartId = new Date().getTime();
var productsArray = [];
var totalRaw = "{{DLV - cartContent.totals.total}}";
var totalPrice = (totalRaw === "0" || totalRaw === "" || totalRaw === "undefined" || totalRaw === undefined) ? null : totalRaw;
// Read items directly from dataLayer
var dlEvent = window.dataLayer.filter(function(d) {
return d.event === 'begin_checkout';
}).pop();
var items = dlEvent && dlEvent.ecommerce && dlEvent.ecommerce.items ? dlEvent.ecommerce.items : [];
if (Array.isArray(items) && items.length > 0) {
for (var i = 0; i < items.length; i++) {
var item = items[i];
productsArray.push({
id: item.item_id || '',
title: item.item_name || 'Unknown Product',
price: item.price || 0,
variantId: item.item_variant || null,
sku: item.sku || '',
quantity: item.quantity || 1
});
}
}
try {
TerrificAnalytics.trackCheckoutStarted({
platformType: 'WooCommerce',
cartId: cartId,
totalPrice: totalPrice,
products: productsArray
});
console.log("Terrific: CheckoutStarted tracked :: " + cartId);
} catch (error) {
console.log("Error Terrific CheckoutStarted: " + error);
}
} else {
setTimeout(waitForTerrificAnalytics, 50);
}
})();
</script>
💡 The cartId is built from the current date and time because no order number exists yet at this point.
4.7 Purchase (completed order)
Name: 3PT - Terrific - Purchase
Trigger: CE - purchase (Custom Event, event name: purchase)
<script>
(function waitForTerrificAnalytics() {
if (window.TerrificAnalytics && typeof TerrificAnalytics.init === 'function') {
TerrificAnalytics.init(window.TerrificAnalyticsConfig);
var productsArray = [];
var dlEvent = window.dataLayer.filter(function(d) {
return d.event === 'purchase';
}).pop();
var transId = dlEvent && dlEvent.ecommerce ? dlEvent.ecommerce.transaction_id : null;
var orderValue = dlEvent && dlEvent.ecommerce ? dlEvent.ecommerce.value : null;
var items = dlEvent && dlEvent.ecommerce && dlEvent.ecommerce.items ? dlEvent.ecommerce.items : [];
if (Array.isArray(items) && items.length > 0) {
for (var i = 0; i < items.length; i++) {
var item = items[i];
productsArray.push({
id: item.item_id || '',
title: item.item_name || 'Unknown Product',
price: item.price || 0,
variantId: item.item_variant || null,
sku: item.sku || '',
quantity: item.quantity || 1
});
}
}
try {
TerrificAnalytics.trackCheckoutCompleted({
platformType: 'WooCommerce',
cartId: transId,
totalPrice: orderValue,
products: productsArray
});
console.log("Terrific: CheckoutCompleted tracked :: " + transId);
} catch (error) {
console.log("Error Terrific Conversion: " + error);
}
} else {
setTimeout(waitForTerrificAnalytics, 50);
}
})();
</script>
💡 Here the cartId is the real order number (transaction_id), because the order has already been created. To test this event you need to place a complete test order.
5. Quick reference: which data goes where
Data in the dataLayer (GA4) | Terrific field | Note |
|
| Unique product identifier |
|
|
|
|
| Arrives as text and is sent as-is |
|
| In WooCommerce it's usually the same as |
|
| Empty if the product has no variants |
|
| Used only in Product View |
|
|
|
|
| A 0 is treated as "no value" ( |
|
| Real order number |
|
| Final order total |
6. Check that everything works
6.1 How to validate each tag
GTM Preview mode: in the container, click Preview and enter your store's URL. Browse the site and repeat each action (view a product, add to cart, etc.). In the tags panel, check that each tag shows up under "Tags Fired" for its event.
Browser console: each tag writes a message, for example
Terrific: ProductView tracked :: 123. Filter the console by "terrific" to see only those messages.Confirm with Terrific: once your tags are live, contact the Terrific team to confirm events are arriving correctly.
6.2 My site isn't in GA4 mode (I see eventModel)
If the product data in the dataLayer shows up inside eventModel instead of ecommerce, it looks like this:
eventModel: {
currency: "USD",
value: 100.00,
items: [
{ item_id: "...", item_name: "...", price: ..., item_variant: "..." }
]
}
That means the plugin isn't in GA4 mode, and the ecommerce.items.0.* variables will return undefined.
What to do:
Switch the plugin to GA4 mode (Integration → WooCommerce → GA4). This is the recommended setup.
Until you switch, events can't be measured reliably, and some (especially Remove from Cart) may arrive without product data.
If you can't switch for now, contact the Terrific team so we can review your case.
6.3 My site has more than one GTM container
Some sites run two containers (for example, an old one from marketing and a new one). Before you start:
Use Google's Tag Assistant on your site to see which containers are active.
If a container shows as "not found", it exists in your GTM account but isn't installed on the site. Install it (with GTM4WP or the manual snippet) before you continue.
When possible, consolidate everything into a single container to avoid conflicts and duplicate events.
6.4 My site has a Content Security Policy (CSP)
If your site uses a Content Security Policy, it may block the Pixel. Make sure these domains are allowed:
live-sdk.terrific.live(loads the Pixel)terrific.live(receives the events)
Need help? Reach out to the Terrific team to: [email protected] and we'll guide you through the setup.
