Documentation

Tracking in Google Analytics

Tracking campaigns with UTM parameters#

ShopMagic's UTM builder adds campaign parameters to links generated by supported placeholders. These parameters help you identify visits from your messages in Google Analytics.

Your destination website must have Google Analytics configured separately. Adding UTM parameters does not install Analytics or automatically measure email opens.

UTM parameters are optional. If you do not need campaign tagging, leave the UTM fields empty and click Copy placeholder and close. Configure any other parameters required by the placeholder.

Placeholders that support UTM parameters#

Availability depends on the selected event and active integrations.

ShopMagic Core#

  • {{ shop.url }}
  • {{ order.payment_url }}
  • {{ order.cross_sells }}
  • {{ order.related_products }}
  • {{ order.products_ordered }}
  • {{ order.quantity_products }}
  • {{ product.link }}

ShopMagic Abandoned Carts#

  • {{ cart.link }}
  • {{ cart.items }}

ShopMagic Review Requests#

  • {{ order.products_ordered_links }}
  • {{ order.products_ordered_review_links }}

ShopMagic for WooCommerce Memberships#

  • {{ membership.renewal_url }}

ShopMagic for WooCommerce Subscriptions#

  • {{ subscription.view_url }}
  • {{ subscription.early_renewal_url }}

Note: UTM parameters apply to generated links. For product-list placeholders, select a template that outputs links. For example, the default comma-separated template for {{ order.products_ordered }} displays product names without links, so it provides no clickable destination to tag.

{{ customer.unsubscribe_url }} does not expose UTM fields or process UTM parameters in ShopMagic 4.9.3.

How to add UTM parameters#

  1. Open your automation and select its event.
  2. Click a supported placeholder in the placeholder list.
  3. Complete the UTM fields and any other placeholder settings.
  4. Click Copy placeholder and close.
  5. Paste the generated placeholder into the appropriate action field. For a URL placeholder, use it as the destination of a link or button in your email.
  6. Save the automation and test the resulting link.

ShopMagic placeholder dialog containing UTM campaign fields

UTM fields#

  • UTM Source (utm_source) — identifies the traffic source, such as shopmagic or newsletter.
  • UTM Medium (utm_medium) — identifies the marketing channel, such as email.
  • UTM Campaign (utm_campaign) — identifies the campaign, such as cart_recovery.
  • UTM Content (utm_content) — distinguishes links or message variants within a campaign, such as restore_cart_button.
  • UTM Term (utm_term) — identifies campaign keywords. It is usually unnecessary for a standard recovery email.

For campaign tagging, consistently provide Source, Medium, and Campaign. ShopMagic marks these fields with an asterisk, but its builder does not enforce completion. Missing values can produce incomplete Analytics reporting.

Use consistent spelling and capitalization. UTM values are case-sensitive, so Newsletter and newsletter can appear as different sources.

Example UTM values entered for a ShopMagic cart recovery link

For an Abandoned Cart automation, you could use:

{{ cart.link | utm_source: 'shopmagic', utm_medium: 'email', utm_campaign: 'cart_recovery', utm_content: 'restore_cart_button' }}

ShopMagic adds these parameters to the generated restoration URL while retaining the parameters needed to restore the cart.

Reusing UTM values#

In the ShopMagic 4.9.3 editor, opening a placeholder resets its parameter fields. Values are not automatically carried over between placeholder dialogs.

To reuse campaign values, copy an already configured placeholder or enter the same values in another supported placeholder. Change utm_content when you want to distinguish individual links.

Checking campaign results#

Send a test message and follow the generated link. Check that the final destination retains the UTM parameters, especially if the link passes through redirects.

In Google Analytics 4, campaign information is available in Reports → Acquisition → Traffic acquisition, using dimensions such as Session source/medium and Session campaign.

The screenshots show an earlier interface. Field labels and layout may differ in your version.

Not the solution you are looking for?

Please check other articles or open a support ticket.