Skip to main content
Explanation

In this article we’ll discuss how UltraCart collects, stores, and presents UTM parameter information.

What are UTM parameters?

Before we dive into the topic, let’s cover what UTM parameters are and their usage. UTM parameters are attributes you append to hyperlinks (destination URLs) for marketing campaigns sending traffic to your website. When the link is clicked and the visitor arrives on your site, UTM parameters are collected by UltraCart Analytics. UltraCart will collect six different UTM parameters:

  • utm_source

  • utm_medium

  • utm_campaign

  • utm_term

  • utm_content

  • utm_id

How are UTM parameters collected?​

The UltraCart Analytics system automatically collects the UTM parameters that it observes. Analytics sessions process asynchronously several minutes after the order is placed. UTM campaign hits across all sessions since customer first visited or their last order. UltraCart Analytics is automatically running on your StoreFront and checkout. If you’re utilizing a website in front of UltraCart, such as a WordPress site for your WWW, a product review site, etc. then you will want to deploy UltraCart Analytics to this external site using the documentation located here.

Customer ID on email links

Every link in a StoreFront Communications campaign or flow email carries UTM parameters. The utm_content value ends with a pipe character (|) followed by a unique customer ID. In a raw link the pipe may appear URL-encoded as %7C.

  • The ID identifies the recipient. It is the same for that customer on every email you send, so you can use it to tie a click on any email back to the same person.
  • The ID is added whether or not Magic Login Links is turned on in the Send Email step. Magic Login Links controls whether the click logs the customer in. It does not create this ID.
  • This applies to campaign and flow emails only.

Match the ID to a customer in BigQuery​

In the Data Warehouse (BigQuery), the ID is the esp_customer_uuid column of the uc_storefront_customer_lists table. That table has one row per list a customer is on, with the customer's email and the list's ID (list_uuid). Join on esp_customer_uuid to get the email for an ID from your links.

Use uc_storefront_customer_lists rather than uc_storefront_customers for this lookup. It holds the same list memberships in a much smaller, flatter form, so queries run faster and cost less.

Customer emails are readable only in the ultracart_dw_medium and ultracart_dw_high datasets. See Data Sets & Streaming for the access levels.

This query looks up the customer for each ID taken from the end of an email link's utm_content. Replace the project name and the IDs with your own:

SELECT DISTINCT
LOWER(email) AS email,
esp_customer_uuid
FROM `my-data-warehouse.ultracart_dw_medium.uc_storefront_customer_lists`
WHERE esp_customer_uuid IN ('CUSTOMER_ID_FROM_LINK_1', 'CUSTOMER_ID_FROM_LINK_2')

This query finds customers who are on two required lists. It matches on list ID, so renaming a list does not break it:

SELECT
LOWER(email) AS email,
ANY_VALUE(esp_customer_uuid) AS esp_customer_uuid
FROM `my-data-warehouse.ultracart_dw_medium.uc_storefront_customer_lists`
WHERE list_uuid IN ('LIST_UUID_1', 'LIST_UUID_2')
GROUP BY LOWER(email)
HAVING COUNT(DISTINCT list_uuid) = 2

Where are UTM parameters stored?

The UltraCart Analytics information is processed shortly after the session is finished. If the data contains UTM parameters then the first set of UTM parameters will be stored on the UltraCart order as properties. The names of the properties are:

  • ucasource

  • ucacampaign

  • ucaUtmMedium

  • ucaUtmTerm

  • ucaUtmContent

  • ucaUtmId

How can I access the UTM parameters stored?

There are several different ways to see the UTM data that is collected. Here are the current list of ways:

  • Order Management → View All Orders has result columns for “UTM Source” and “UTM campaign”. Adding these columns to your result display is a good way to keep your finger on the pulse when looking at search results.

  • Order Management → View All Orders → Individual Order will display the UTM details down below the order as another quick way to see where an individual order came from.

  • Order Management > (Tools section) Export Orders has all six of the UTM parameters available to the export mapping.

  • REST API / Webhooks for the order object will contain the UTM properties mentioned above within the JSON object.

  • Data Warehouse for BigQuery - the order objects will contain the properties. Using BigQuery is a great way to build custom dashboards and match up other marketing information sources for reporting. More and more we are seeing merchants dump ad spend data from various platforms using products like Funnel.io into BigQuery and then matching up their marketing spend with order flow.

  • StoreFront Screen Recording - The screen recordings will contain the parameter information within the timeline. It can also be searched on to find sessions that originated from a particular traffic source.

What if a customer encounters multiple UTM parameters on different URLs?

UltraCart is going to consider the original UTM parameters as the definitive ones for the order. If you have intermediate URLs that are also passing UTM parameters, there is one option for unlocking that information. First you need to deploy StoreFront Screen Recording both internally and externally to wherever UTM parameters are on URLs. Once that is done, you’ll want to configure the Data Warehouse for BigQuery solution. UltraCart will drive down all the meta data for screen recording down into BigQuery where you can do analysis and reporting.

Related Documentation:
Using UltraCart Analytics
Data Warehouse (BigQuery)
Attribution Analysis
Google Integration

Was this page helpful?