Shopify

How to use and install the Shopify integration

The Woopra + Shopify Integration enables you to import order data for use in your customer analytics.

Since this integration uses our Dataloader connection, this means you can import historical data from Shopify. This also means that we have access to certain tables in Shopify where you can customize what data you want to import to Woopra.

This integration makes it easy to do reporting on revenue and sales. With the right setup, it’s possible to see your customer’s complete journey from marketing campaigns all the way to checking out.

Installation

Navigate to the integration section and search for Shopify. Click the connect tab and create a new connection. You'll be prompted to enter your connection details.

Updating the Tracking Code in Shopify

Before you start importing, it's important to update your tracking code for Shopify. To do this, you'll need to edit the Shopify theme files. This will be used to link identify users on your shop and tag them with a Shopify ID in Woopra.

  1. From your Shopify admin, go to Online Store > Themes.

  2. Find the theme you want to edit, and then click Actions > Edit code.

  1. Add the following code inside of the .
<!-- Start of Woopra Code -->
<script>
  (function(){
    var t,i,e,n=window,o=document,a=arguments,s="script",r=["config","track","identify","visit","push","call","trackForm","trackClick"],c=function(){var t,i=this;for(i._e=[],t=0;r.length>t;t++)(function(t){i[t]=function(){return i._e.push([t].concat(Array.prototype.slice.call(arguments,0))),i}})(r[t])};for(n._w=n._w||{},t=0;a.length>t;t++)n._w[a[t]]=n[a[t]]=n[a[t]]||new c;i=o.createElement(s),i.async=1,i.src="//static.woopra.com/js/w.js",e=o.getElementsByTagName(s)[0],e.parentNode.insertBefore(i,e)
  })("woopra");
  woopra.config({
      domain: '<YOUR PROJECT DOMAIN HERE>'
  });
  
  {% if customer %}
  woopra.identify('shopify_id', '{{customer.id}}');
  {% endif %}
  woopra.track();
</script>
<!-- End of Woopra Code -->

Setting up the Task

The Task is used to pull in selected data from Shopify. You can create a new Task if one wasn't added by navigating to the Task section under Data Loader.

  1. From there configure the Task by selecting the Order table. You will also select the data type as "Track" and add a condition where the customer.id exists.
Add any additional conditions if you want to limit the orders to a specific timeframe. Use the created_at timestamp to filter the data.Add any additional conditions if you want to limit the orders to a specific timeframe. Use the created_at timestamp to filter the data.

Add any additional conditions if you want to limit the orders to a specific timeframe. Use the created_at timestamp to filter the data.

  1. Map User Action. First Map the customer.id to "Shopify ID" in Woopra.
  1. Tag Visitor Properties. This is data about the user that you want to import. You can select any Visitor properties you'd like but be sure to add email.

📘

Important!

Be sure to map the email from the orders to the email visitor property in Woopra. All the other visitor properties are optional.

  1. Name your Action and add Action Properties. Important fields would be total_price, order_id, checkout_id. Also, add any additional fields that are important to you.
  1. Select the Timestamp as created_at.
  1. Save, Preview, and Activate. The import will start to bring in records. This may take some time to complete depending on the amount of data.