# Shopify

UTMSimple / UTM Tracker  
How to collect and track UTM variables via Shopify step by step

# Collect UTMs after Shopify Purchase (Zapier)

Click Settings and Checkout

And copy paste the following script in "Order Status Page"

[![](https://docs.utmsimple.com/uploads/images/gallery/2022-07/scaled-1680-/image-1657495720062.png)](https://docs.utmsimple.com/uploads/images/gallery/2022-07/image-1657495720062.png)

**Don't forget to replace `<license>` with your license key and `https://hooks.zapier.com/hooks/catch/111111/aaaaaaa/` with your Zapier URL.**

```
<!-- Global site UTM Simple Tracking Start-->
<script>
handl_custom_params=[];var handl_js=document.createElement("script");handl_js.setAttribute("src","https://track.utmsimple.com/utm.js?license=<licensekey>"),document.head.appendChild(handl_js),
handl_js.onload=function(){

{% if first_time_accessed %}

  setTimeout(function(){
          all_params = HandL.getAll()
          all_params.checkout_order_unmber = "{{ checkout.order_number }}"
          all_params.checkout_id = "{{ checkout.id }}"
          all_params.checkout_email = "{{ checkout.email}}"
          all_params.checkout_total_price = "{{ checkout.total_price}}"
          all_params.checkout_customer_address1= "{{ checkout.shipping_address.address1}}"
          all_params.checkout_customer_address2= "{{ checkout.shipping_address.address2}}"
          all_params.checkout_customer_city= "{{ checkout.shipping_address.city}}"
          all_params.checkout_customer_country=" {{ checkout.shipping_address.country}}"
          all_params.checkout_customer_country_code= "{{ checkout.shipping_address.country_code}}"
          all_params.checkout_customer_first_name = "{{ checkout.shipping_address.first_name}}"
          all_params.checkout_customer_last_name = "{{ checkout.shipping_address.last_name}}"
          all_params.checkout_customer_province = "{{ checkout.shipping_address.province}}"
          all_params.checkout_customer_province_code = "{{ checkout.shipping_address.province_code}}"
          all_params.checkout_customer_street = "{{ checkout.shipping_address.street}}"
          all_params.checkout_customer_zip ="{{ checkout.shipping_address.zip}}"
          all_params.checkout_customer_phone ="{{ checkout.shipping_address.phone}}"

          {% for line in checkout.line_items %}
          all_params.checkout_product_{{ forloop.index }} ="{{ line.title }}"

          {% if line.title == 'Product Name' %}
          {% endif %}
          {% endfor %}

      Object.keys(all_params).map(function(x,y){console.log(all_params[x] = decodeURIComponent(all_params[x]))})
      var data = handlj.param(all_params)
      var xmlHttp = new XMLHttpRequest();
      xmlHttp.open( "GET", 'https://hooks.zapier.com/hooks/catch/111111/aaaaaaa/?'+data, false );
          xmlHttp.send( null );
      }, 500);
{% endif %}
};
</script>
<!-- Global site UTM Simple Tracking End-->

```

# Getting Started with UTM Simple Shopify Extension

UTM Simple is a free Shopify app that automatically captures UTM parameters from your store visitors, tracks conversions, and helps you understand which marketing campaigns are driving sales.

[Click Here to check our Shopify App](https://apps.shopify.com/utm-simple?search_id=1ef9a548-5ca8-4dd9-8ab4-50bfd0fba74f&surface_detail=utmsimple&surface_inter_position=1&surface_intra_position=2&surface_type=search)

[![](https://docs.utmsimple.com/uploads/images/gallery/2026-03/scaled-1680-/image-1773755789893.png)](https://docs.utmsimple.com/uploads/images/gallery/2026-03/image-1773755789893.png)

## What UTM Simple Does

- **Captures UTM parameters** (source, medium, campaign, term, content) from every visitor
- **Tracks conversions** across orders, checkouts, and customer signups
- **Sends data to Facebook Conversions API** via webhooks for better ad optimization
- **Provides monthly analytics** with charts and AI-generated insights
- **100% free** for all Shopify merchants — no paid plans, no hidden fees

## Prerequisites

- A Shopify store with an active theme
- A free UTM Simple license key (see Step 1 below)

## Setup (5 Steps)

### Step 1: Get Your Free License Key

1. Visit [utmsimple.com/utmsimple-with-shopify](https://utmsimple.com/utmsimple-with-shopify)
2. Sign up and get your free license key
3. Your key will look like this: `XXXX-XXXX-XXXX-XXXX`

### Step 2: Activate Your License

1. Open the UTM Simple app in your Shopify admin
2. Click **License** in the left sidebar
3. Paste your license key into the input field
4. Click **Activate License**
5. You'll see a success message once your license is activated

Your license key is stored securely in your shop's metafields and linked to your store's domain.

### Step 3: Install the Theme Extension

1. Click **Setup** in the left sidebar
2. Click the **Install UTM Simple Tracking** button — this opens your Shopify theme editor
3. In the theme editor, find the **UTM Simple Tracking** block in the app blocks section
4. Drag it into your theme's **Header** or **Footer** section (so it loads on every page)
5. Click **Save** in the theme editor

> **Tip:** Installing in the Header or Footer ensures tracking runs on every page of your store, giving you the most complete data.

### Step 4: Configure Webhooks

Webhooks allow UTM Simple to receive real-time data when orders are placed, checkouts are started, and customers sign up.

1. Click **Webhooks** in the left sidebar
2. (Optional) Enter a custom webhook endpoint URL if you want to receive data at your own server
3. Click **Subscribe to All Webhooks**
4. You'll see a confirmation that all webhook subscriptions were created

UTM Simple subscribes to the following Shopify events:

<table id="bkmrk-event-description-or"><thead><tr><th>Event</th><th>Description</th></tr></thead><tbody><tr><td>Orders Created</td><td>When a new order is placed</td></tr><tr><td>Orders Paid</td><td>When an order payment is confirmed</td></tr><tr><td>Orders Updated</td><td>When order details change</td></tr><tr><td>Orders Cancelled</td><td>When an order is cancelled</td></tr><tr><td>Orders Fulfilled</td><td>When an order is shipped/fulfilled</td></tr><tr><td>Checkouts Created</td><td>When a customer starts checkout</td></tr><tr><td>Checkouts Updated</td><td>When checkout details change</td></tr><tr><td>Customers Created</td><td>When a new customer account is created</td></tr></tbody></table>

### Step 5: View Your Analytics

1. Click **Analytics** in the left sidebar
2. Select a month and year using the date picker
3. Click **Get Report** to load your analytics
4. Review your traffic and conversion data in the charts and AI-generated summary

That's it! UTM Simple is now tracking your store visitors and their UTM data.

---

## Next Steps

- [Understanding Your Analytics](./analytics.md) — How to read your reports
- [Webhook Configuration](./webhooks.md) — Advanced webhook setup
- [Troubleshooting](./troubleshooting.md) — Common issues and fixes