UTM tracking & ad attribution

Set up dynamic campaign and ad tracking in Meta and Google Ads for order-level contribution margin.

Order source attribution allows Natium to link every Shopify order directly to the ad campaign, creative, and channel that acquired it. This lets you calculate real contribution margin after forward shipping, return losses (RTO), and payment processing costs.

To achieve ≥ 90% attribution coverage across your orders, configure dynamic URL parameters in your advertising accounts.

Why dynamic URL parameters matter

Static links (such as utm_campaign=summer_sale) require manual updating for every ad set and ad, leading to unlinked orders and missing data.

Dynamic parameters automatically populate the exact campaign name, ad set ID, and ad ID from Meta and Google into Shopify's landing_site URL when a shopper clicks your ad.

1. Meta Ads (Facebook & Instagram)

Configure the tracking parameters at the Ad level in Meta Ads Manager.

Where to paste

  1. Open Meta Ads Manager.
  2. Select your active campaigns and navigate to the Ads tab.
  3. Edit your ad, scroll to the Tracking section at the bottom, and locate URL parameters.
  4. Paste the following snippet into the URL parameters box (do not include the leading ?):
utm_source=meta&utm_medium=cpc&utm_campaign={{campaign.name}}&utm_content={{adset.name}}&utm_term={{ad.id}}&fbclid={{fbclid}}&adset_id={{adset.id}}&ad_id={{ad.id}}

What these placeholders do

  • {{campaign.name}}: Injects your exact campaign name (e.g. TOF_Broad_Scale_April).
  • {{adset.id}}: Injects the unique numerical ID of the ad set for granular targeting attribution.
  • {{ad.id}}: Injects the creative ID to track winning vs losing video/image variations.
  • fbclid: Captured by Shopify and stored with the order to verify click authenticity.

Tip: You can bulk-select all ads across your account in Ads Manager and paste this snippet into the URL parameters field once.

2. Google Ads (Search, Shopping & Performance Max)

In Google Ads, configure the Tracking Template at the account or campaign level so it automatically applies to every ad and site link.

Where to paste

  1. Open Google Ads.
  2. Navigate to Admin › Account Settings (or select a Campaign › Settings › Additional Settings › Campaign URL options).
  3. In the Tracking template field, enter:
{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&utm_content={adgroupid}&utm_term={keyword}&gclid={gclid}

What these placeholders do

  • {lpurl}: Represents your store landing page URL.
  • {campaignid}: The unique numerical ID of your Google campaign.
  • {adgroupid}: The ad group identifier.
  • {gclid}: Google Click Identifier, passed automatically into Shopify.

3. How Natium reads your orders

When an order is created on Shopify, Natium inspects two distinct fields in the webhook payload:

  1. landing_site: The URL path the customer arrived on during their session, including query parameters.
  2. note_attributes: Custom tracking tags passed through apps or custom theme scripts (e.g. utm_campaign, utm_source, _fbc).

Natium parses these values deterministically. If an order arrived through a tracked ad, Natium associates it with the appropriate channel (Meta Ads, Google Ads, YouTube) and stores the campaign ID in the order ledger.

Common pitfalls that break attribution

ProblemCauseHow to fix
All orders show "Direct / Organic"Landing URL redirects (e.g., http to https or trailing slash redirects) strip URL query parameters.Ensure your destination URLs in Meta Ads match your exact final URL (e.g., https://brand.com/products/item with no intermediary redirect).
Missing parameters on catalog adsAdvantage+ Catalog Ads / DPA ads sometimes omit URL parameters if set only on individual product feed URLs.Add the URL parameter string directly in the Deep link to website or Tracking box in the catalog ad setup.
Missing UTMs on influencer / WhatsApp linksLinks shared in bio, newsletters, or WhatsApp messages have no query parameters.Use standard UTM tags: ?utm_source=whatsapp&utm_medium=broadcast&utm_campaign=festive_vip.

Verification checklist

Once configured:

  • Place a test order after clicking one of your tracked Meta preview ads.
  • Check the order in your Shopify admin under Conversion summary to confirm the campaign source is detected.
  • In Natium, navigate to Orders. Your orders will reflect the channel name, campaign, and attribution tags.