Integration & Setup

  1. Home
  2. Integration & Setup
  3. Plugins & Integration
  4. Shopify

Shopify

The integration into a Shopify webshop is very simple for both etracker Analytics and Signalize and only takes a few minutes.

It is currently not possible to use etracker Analytics and Signalize together in a Shopify webshop.
  1. Integrating etracker Analytics into a Shopify store.
  2. Signalize integration in Shopify.

1. Integrating etracker Analytics into a Shopify store

With just a few clicks, you can integrate the etracker code into a Shopify store and benefit from privacy-compliant and consent-free web analytics with top data quality. The simple integration takes only a few minutes and requires no to little technical knowledge. The installation of a special extension is not necessary. The latest native features of Shopify are used.

Highlights

Native recording of eCommerce events: Product seen, added to cart and purchase with item name, category and price. Cookie-less and consent-free by default: independently verified and confirmed by the ePrivacy seal.

Features

All page views with domain, URL and page title, as well as assignment to areas based on URL structure

  • All external, mailto and telephone link calls as well as downloads as click events
  • Playable media (videos, podcasts, music) as events
  • Scroll events per page 0-9%, 10-24% etc.
  • Internal searches
  • Origin: referrer domain and path, organic search term (if passed), classification of traffic by medium (direct, search, social media, referrer)
  • Geo information
  • Technology details: Device type, device name and manufacturer, operating system and version, browser, version and language.

Guide

To integrate, please follow these steps:

1. Log in to your Shopify account.

2. Open your store settings and select Customer events from the menu:

3. Click on Add custom pixel, give it a name of your choice, e.g. “etracker connector” and confirm by clicking on Add pixel.

4. Insert the following code in the field:

// -- etracker custom pixel code --

// General etracker Code
(function(y,o,d,a){
    s=d.createElement('script');s.async=1;s.type='text/javascript';s.charset='UTF-8';s.id='_etLoader';
    s.src=o;s[a]('data-respect-dnt', 'true');s[a]('data-secure-code',y);
    s[a]('data-block-cookies', 'true');s[a]('data-plugin-version', 'shopify_ce_1.0.0');
    d.getElementsByTagName('head').item(0).appendChild(s);
})('<INSERT_ACCOUNT_KEY_HERE>','//code.etracker.com/code/e.js',document,'setAttribute');	
// etracker eCommerce Events
analytics.subscribe("product_viewed", async (event) => {
	var variant = event.data.productVariant;
	var product = variant.product;

	var productObject = { 
	id : product.id, 
	name : product.title, 
	category : [ product.type ],
	price : variant.price.amount.toString(),
	currency : variant.price.currencyCode,
	};

	window._etrackerOnReady = typeof window._etrackerOnReady === 'object' ? window._etrackerOnReady : [];
	window._etrackerOnReady.push(function() {
	etCommerce.sendEvent('viewProduct', productObject);
	});
});

analytics.subscribe("product_added_to_cart", async (event) => {
	var variant = event.data.cartLine.merchandise;
	var product = variant.product;

	var productObject = {
		id : product.id, 
		name : product.title.replace(' - ' + variant.title, ''), 
		category : [ product.type ],
	variants: { var1: variant.title },
		price : variant.price.amount.toString(),
		currency : variant.price.currencyCode
	};

	window._etrackerOnReady = typeof window._etrackerOnReady === 'object' ? window._etrackerOnReady : [];
	window._etrackerOnReady.push(function() {
	etCommerce.sendEvent('insertToBasket', productObject, 1);
	});
});

analytics.subscribe("checkout_completed", async (event) => {
	var checkout = event.data.checkout;

	var orderObject = {
	orderNumber: checkout.order.id,
	status: 'sale',
	orderPrice: checkout.totalPrice.amount.toString(),
	currency: checkout.totalPrice.currencyCode,
	basket: {
		id: 'basket' + checkout.order.id,
		products: []
	}
	};

	checkout.lineItems.forEach(item => {
	var variant = item.variant;
	var product = variant.product;

	var productObject = {
		id: product.id,
		name: product.title,
		category: [ product.type ],
		variants: { var1: variant.title },
		price: variant.price.amount.toString(),
		currency: variant.price.currencyCode
	};

	orderObject.basket.products.push({
		product: productObject,
		quantity: item.quantity
	});
	});

	window._etrackerOnReady = typeof window._etrackerOnReady === 'object' ? window._etrackerOnReady : [];
	window._etrackerOnReady.push(function() {
	etCommerce.sendEvent('order', orderObject);
	});
});

5. Replace <INSERT_ACCOUNT_KEY_HERE> with your individual etracker account key. You find the key in your etracker account under Settings > Account > Account key.

6. Click on Save in the upper right corner.

That’s it! In the overview of customer events you will now find the custom pixel you just created with the status connected.

2. Signalize Integration in Shopify

To send push messages to your Shopify customers, use the Signalize app at https://apps.shopify.com/signalize.

Follow the instructions after installing the app. An account will automatically be created for you and the code will be integrated into your shop.

It is not possible to use the Signalize app for Shopify with an existing etracker Analytics or Signalize account.