Skip to main content
All CollectionsFor WebTag Implementation
Installing Webtrends Optimize into a Shopify Plus store
Installing Webtrends Optimize into a Shopify Plus store
Updated over 11 months ago

This document describes how to install Webtrends Optimize into a Shopify Plus store.

While we don't yet have a plugin, installation should only take 2-3 minutes with these details to hand. Please also note - if you're not on Shopify Plus, you can only install Webtrends Optimize outside of the checkout funnel. Only Shopify Plus supports inserting code into the checkout.

Get your tag from the Webtrends Optimize UI

1. Enter the Tagging Guide from the top nav:

2. Copy the tag script

Login to your Shopify Admin area

You should know how to do this. Typically accessed through storename.myshopify.com.

Find the liquid template

Paste in the Webtrends Optimize tag

This should already be in your clipboard. Paste it into the area shown below.

1. Find and click on theme.liquid

2. Paste in the code from your clipboard before the close head tag

3. Hit the Save button.

checkout.liquid – checkout tagging

Note: This only applies if you’re using Shopify’s own checkout – 3rd party checkouts may not work using this method and you should reach out to your consultant for help if so.

If you have access to your checkout.liquid file, head there next. Paste this code into the HEAD tag.

{% unless order_number == undefined %}
<script>
{% assign wt_qty = 0 %}
{% for i in order.line_items %}
{% assign wt_qty = wt_qty | plus: i.quantity %}
{% endfor %}
window.opt_confirmation_data = {
orderid: "{{ order_number }}",
revenue: {{ total_price | money_without_currency }},
units: {{wt_qty}}
};
</script>
{% endunless %}
<script type="text/javascript" src="https://c.webtrends-optimize.com/acs/accounts/MY_GUID_HERE/js/wt.js"></script>

This code:

  • Creates a small data object on your thank-you page, allowing us to reliably capture the order id, revenue and units purchased.

  • Writes your Webtrends Optimize tag to the page, so we can run tests and perform conversion tracking in the funnel.

  • Covers tagging for the checkout and thank-you pages.

It is similar to the code inserted into theme.liquid, except that we take the opportunity to reliably capture some order-related metrics – one of the benefits of liquid templates and the Shopify platform.

Your conversion package will read this data and capture it into every test by default once set up – your consultant will help ensure this.

Did this answer your question?