Part 1: Installation process of Elevar scripts

Elevar Version 3.9+

Add GTM and Elevar’s Non-Shopify Attribution Script to all Site Pages

The steps below will have you install GTM and Elevar's scripts to your headless and Shopify portions of your site.

Elevar will be responsible for adding GTM to all (Shopify based) checkout pages. You are responsible for adding the GTM script to all headless site pages.

To do this you’ll need your web container GTM ID (don’t use a server side container ID here).


Step 1: Install Google Tag Manager (GTM)

  • Paste the following code as high in the<head> tags as possible, making sure to replaceGTM-XXXXXX with your web container ID. [How to find Web Container ID?].
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXX');</script>
<!-- End Google Tag Manager -->

Step 2: Install the Shopify Source on Checkout Pages


Step 3: Install Elevar’s Non-Shopify Attribution script on the headless portion of your website.

Untitled

❗️

Warnings:

  1. The Non-Shopify Attribution Tracking script noted above will give a 404 error unless your Shopify source is fully installed.

  2. In order for the Non-Shopify Attribution Tracking script to work as intended, you must be using the Cart Object when using the Storefront API. If you are using the Checkout Object, Shopify’s Web Pixel API will not fire it’s checkout_started event (which will affect the Non-Shopify Attribution Tracking script).

  3. Do not add a “http” in the Main Overarching Domain section. The format should be “website.com”.