Knowledge Base

Shopify LiveConnect Implementation

The LiveConnect Tag is a web tag that powers LiveIntent’s People Based Marketing solutions. The intent captured onsite enhances campaign performance, conversion tracking and audience segmentation. Below are instructions on how to implement the LiveIntent Tag on your Shopify store. 

💡 Please Note: For any conversion events other than product purchase, please reach out to your LiveIntent account team. 

 

LiveConnect Tag 

  1. Under Sales Channels, select "Themes"
  2. Under Themes, select the "Layout" folder
  3. Within the Layout folder, select theme.liquid

Place the following script directly into the head of the theme.liquid layout 

<script type="text/javascript" src="//b-code.liadm.com/a-00xx.min.js" async="true" charset="utf-8"></script>

 

Event: Product View

  1. Under Sales Channels, select "Themes"
  2. Under Themes, select the “Sections” folder
  3. Within the Section folder, select product.liquid

Copy and paste the following into the product.liquid section 


  <script>
    window.liQ = window.liQ || [];
    window.liQ.push
        {
          event: "viewContent",
          email: "{{ customer.email }}",
          contentType: "Product",
          name: "{{ product.type }}",
          contentId: "{{ current_variant.sku }}"
        };
  </script>

 

Event: Product Purchase Conversion 

  1. From your Shopify admin, go to Settings > Checkout.
  2. In the Order processing section, find the additional scripts text box:

AdditionScript_screenshot.jpg

3. Paste your tracking code from your clipboard with cmd + v on a Mac or ctrl + v on a PC.

4. In that text box, you are able to use the shop Liquid object, the order Liquid object, and the OrderStatus JavaScript asset.

{% if first_time_accessed %}
<!-- LiveConnect Conversion Extension Script -->
<script type="text/javascript">
window.liQ = window.liQ || [];
window.liQ.push(
{"event": "conversion",
"name":"product_purchase",
"email": "{{ checkout.email }}",
"conversionId": "{{ checkout.order_id }}",
"amount":{{ checkout.total_price | money_without_currency }},
"currency": "{{ shop.currency }}",
"items": [{% for line_item in checkout.line_items %}{
"id": "{{ line_item.variant_id }}",
"price":{{ line_item.price | money_without_currency }},
"quantity":{{ line_item.quantity }}}
{% unless forloop.last %},{% endunless %}
{% endfor %}]});
</script>
{% endif %}

 

To prevent your analytics from counting the same customers more than once, we've added the first_time_accessed property around this script. With the first_time_accessed code in place, Shopify will run this script only the first time your customers see their order thank you and status page.

 

Additional Resources  

For more in-depth details, visit these Shopify documents: 


Was this article helpful?
0 out of 0 found this helpful
Powered by Zendesk