How to Use Downloaded Legacy Snippets

If you are not using our install via Shopify's App Theme extensions, follow this guide to download and utilize your legacy snippets in your theme files

Some situations may require you to manually install your existing scripts on your theme before upgrading to our unified Shopify source that will use App Theme Embeds. Learn more about these features in our article, Introducing the New Shopify Source.

Previously you could simply click a button and we could reinstall your data layer and data listener, however with Shopify retiring the API we used to do so you'll need to manually install these files or upgrade to our latest version to which uses App Theme Embeds and you'll stay automatically updated in the future!

Started by finding you files in the Elevar App.

Download your legacy snippets

When you log into the Elevar App you'll see the following introduction to our Simplified source. Click Continue to My Tracking

In the Sources column click Go to Upgrade button.

In the New Source click the Download Legacy Snippets

Select Download

This will download a .zip file containing the files you'll need for your site based on your current settings. You'll only see the files you'll need which may include these:

elevar-body-end.liquid
elevar-checkout-additional-scripts.liquid
elevar-checkout-end.liquid
elevar-head.liquid
elevar-head-listener.liquid
non-shopify-subdomains.html

Add your snippets to your store

Not all the files downloaded will be added to your theme. You'll want to copy the code from these files and add ad snippets by the same name in Shopify.

elevar-body-end.liquid
elevar-checkout-end.liquid
elevar-head.liquid
elevar-head-listener.liquid

In your Shopify theme Add a new snippet

Name your snippet with the name of file, example: elevar-body-end

Paste the code from the file and Save

Repeat for the remaining snippets until you have all four named below:

elevar-body-end.liquid
elevar-checkout-end.liquid
elevar-head.liquid
elevar-head-listener.liquid

Render your snippets in your theme

Update the theme.liquid

In your theme.liquid file you'll add the following code directly below the opening tag.

  {% render 'elevar-head-listener' %}
  {% render 'elevar-head' %}

Placement in your theme.liquid file should look like this

Next, add code to the body. Add the following code directly below your opening tag

{% render 'elevar-body-end' %}

Placement in your theme.liquid file should look like this:

Save the theme.liquid file.

Update the checkout.liquid

🚧

Only update the checkout.liquid if you are a plus store NOT using checkout extensibility

The checkout.liquid file is only available for Shopify Plus stores. Some Shopify Plus stores may not be using the checkout.liquid or are using checkout extensibility. If you are a non-plus store or using checkout extensbility you can jump ahead to Add checkout additional scripts

In your checkout.liquid file you'll add the following code directly below the opening tag.

  {% render 'elevar-head-listener' %}
  {% render 'elevar-head' %}

Placement in your checkout.liquid file should look like this

Next, add code to the body. Add the following code directly below your opening tag

 {% render 'elevar-checkout-end' %}

Placement in your checkout.liquid file should look like this

Save the checkout.liquid file.

Add checkout additional scripts

🚧

Only update these additional scripts if your store is Non-Plus Shopify store, or for Shopify Plus Stores using checkout extensibility

Navigate to the checkout additional scripts.

Go to Settings in your Shopify Store

Select Checkout from the left navigation of your Settings

Scroll through the Checkout settings and find the additional scripts box in the Order status page section.

Next you'll want to add the scripts from both files:

  • elevar-checkout-additional-scripts.html
  • elevar-head-listener.liquid

Review your existing scripts within the Additional scripts box to see if Elevar's scripts are in place, if they are you are good to move on. If you do not see Elevar's scripts, copy and paste the code from your two files into the Additional scripts box.

Save your updates from the top or bottom of the page.

Add Non-Shopify Sub Domain Script

If you downloaded files include a file named non-shopify-subdomains.html you'll need to add this file to your non-shopify subdomain pages. If you do not have this file you are done!

  1. Copy the code from the non-shopify-subdomains.html file
  2. Open your subdomain codebase.
  3. Paste the code from above into the section on every non-shopify subdomain page that you want to track (e.g. the header of your wordpress blog or a non-shopify landing page).
  4. Be sure to save your changes!

You're Done!

Your Elevar tracking is now back in place. We recommend upgrading to the new Shopify Source when you are ready. Follow this guide for upgrading, How to Update to the Shopify Source and Theme App Embed</a.