What UTM parameters are
UTM parameters are tags added after the ? in a link, such as ?utm_source=facebook&utm_medium=paid. They do not change the page. They tell analytics tools where the visit came from: which source, which campaign, which ad.
Google's guide to URL builders says to always use utm_source, utm_medium and utm_campaign, and recommends setting every other parameter that applies: utm_term for the paid keyword and utm_content to tell two links or creatives apart. It also defines utm_id for a campaign ID and newer parameters such as utm_source_platform. Values are case sensitive in Google Analytics 4: utm_source=google and utm_source=Google are two different sources.
WeProfit reads the five standard parameters and utm_id from the landing URL, but a link whose only tag is utm_id does not count as a tagged visit.
| Parameter | What it identifies | Example value |
|---|---|---|
| utm_source | Where the visit came from | facebook, google |
| utm_medium | The type of traffic | paid, cpc, email |
| utm_campaign | The campaign | spring_sale |
| utm_term | The keyword, or in social ads often the ad set | rain jacket |
| utm_content | The ad or creative, to tell two links apart | video_15s |
Meta ads URL parameters: copy-paste template
Meta's dynamic URL parameters are placeholders that Meta fills in with your ad's details: {{campaign.name}}, {{adset.name}} and {{ad.name}} for names; {{campaign.id}}, {{adset.id}} and {{ad.id}} for IDs; {{placement}} for the placement, such as instagram_stories; and {{site_source_name}} for the platform: fb for Facebook, ig for Instagram, msg for Messenger, an for Audience Network and th for Threads.
This is WeProfit's Meta template. It sends readable names in utm_campaign, utm_term and utm_content, and the matching IDs, the placement and the source in WeProfit's own keys:
utm_source=facebook&utm_medium=paid&utm_campaign={{campaign.name}}&utm_term={{adset.name}}&utm_content={{ad.name}}&wpcid={{campaign.id}}&wpasid={{adset.id}}&wpadid={{ad.id}}&wpplc={{placement}}&wpsrc={{site_source_name}}Where to paste Meta URL parameters, and what to check
Meta takes URL parameters at the ad level, in the Tracking part of the ad. Meta also says it may add some URL parameters to ad traffic by itself: a source, a paid medium and IDs such as the campaign and ad IDs. WeProfit reads those too when they are on the click, so Meta campaigns can resolve without the template, down to the ad set and ad when Meta adds its full set of automatic parameters. For Shopify stores, Meta lists only the campaign and ad IDs, so WeProfit gets the campaign but not the ad set or ad. The template adds names, the placement, the ad set and ad IDs and, if you enter it, the ad account.
- In WeProfit, copy the Meta template from the URL template card on Ad Networks > Meta, or from URL templates on the Attribution page. To route events per ad account, enter your ad account ID there first: the copied template then carries wpacid with that ID.
- In Meta Ads Manager, open the ad you want to tag, at the ad level.
- Under Tracking, paste the template into the URL parameters field, then publish the ad.
- Click the live ad once and check that the address of the landing page shows the filled-in values, not the {{...}} placeholders.
- Add the parameters before you publish. Meta says changing URL parameters on a published ad may send its ad set back into the learning phase.
- Name values are fixed at publishing. Meta's name parameters keep the original campaign, ad set and ad names, even if you rename them later.
- Spaces in names arrive as %20. That is normal URL encoding.
- Templates affect new clicks only. Visits from earlier clicks keep the URLs they had.
- Keep one copy of each key. If an ad already carries a utm_source, replace it rather than adding a second one.
- Instagram collection ads are the exception: Meta does not support dynamic URL parameters for ads in collection format on Instagram placements.
Google Ads: Final URL suffix vs tracking template
Google Ads, formerly AdWords, has two URL fields that are easy to confuse. The Final URL suffix holds parameters that Google attaches to the end of your landing page URL. The tracking template holds tracking information and can send the click through intermediate tracking servers before it reaches your page. A tracking template set on the account, a campaign or an ad group must include a parameter that inserts your final URL, such as {lpurl}, for example {lpurl}?campaignid={campaignid}. For UTM parameters and WeProfit's IDs, use the Final URL suffix.
Google fills in ValueTrack parameters at the click: {campaignid} is the campaign ID, {adgroupid} the ad group ID, {creative} a unique ID for your ad, {keyword} the keyword that matched on the Search Network, and {placement} the site where the ad was clicked, when there is one. Google has no ValueTrack parameter for the campaign name, so WeProfit's suffix puts the campaign ID in utm_campaign; campaign names appear in WeProfit once the Google Ads account is connected for ad spend.
This is WeProfit's Google Ads Final URL suffix:
utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&utm_term={keyword}&utm_content={creative}&wpcid={campaignid}&wpasid={adgroupid}&wpadid={creative}&wpplc={placement}Where to set the Final URL suffix, with auto-tagging on
Auto-tagging and the suffix do different jobs, so keep both. Auto-tagging adds Google's click ID, gclid, to each ad click, and it is on by default for new accounts. Google calls it a required feature for tracking website conversions on all browsers and for importing Google Analytics key events into Google Ads. In Google Analytics 4, auto-tagged values take priority over manual source and medium, while your utm_term and utm_content still fill its manual term and manual ad content.
WeProfit reads Google's click IDs, gclid, gbraid and wbraid, and Google's gad_campaignid from the landing URL, not from Google's cookies. With auto-tagging on, Google's own tagging gives WeProfit the campaign; the suffix adds the ad group, the ad and the placement. With auto-tagging off, purchases uploaded to Google Ads can only be matched by email or phone.
- In Google Ads, open Admin, then Account settings.
- Select Tracking template, paste the suffix into the Final URL suffix field and save. Set at account level, it covers the whole account, so you set it once. If a campaign, ad group or ad has a Final URL suffix of its own, check that it carries the same parameters.
- In the Auto-tagging section of the same page, check that Tag the URL that people click through from my ad is ticked.
- Click a live ad and check the address of the landing page: the suffix values and Google's click ID should both be there.
UTM parameter examples: landing URLs after a click
Illustrative values only: the IDs, names and click IDs below are invented, not customer data. The first URL is a click on a Meta ad with the template, the second a click on a Google Search ad with the suffix and auto-tagging. A value Google has nothing to fill in can arrive empty, as wpplc does in the second example.
https://example.com/products/rain-jacket?utm_source=facebook&utm_medium=paid&utm_campaign=Spring%20launch&utm_term=Prospecting%20US&utm_content=Video%2015s&wpcid=120210000000000001&wpasid=120210000000000002&wpadid=120210000000000003&wpplc=instagram_stories&wpsrc=ig&fbclid=EXAMPLE_CLICK_ID
https://example.com/products/rain-jacket?utm_source=google&utm_medium=cpc&utm_campaign=21000000001&utm_term=rain%20jacket&utm_content=700000000001&wpcid=21000000001&wpasid=160000000001&wpadid=700000000001&wpplc=&gad_campaignid=21000000001&gclid=EXAMPLE_CLICK_IDWhat each parameter carries
WeProfit's templates carry names in the standard UTM keys and IDs in WeProfit's own wp keys. An ID stays the same when you rename a campaign, so the IDs are what ties a visit to its campaign, ad set and ad:
| Key | What it carries |
|---|---|
| utm_source, utm_medium | Source and medium; together with click IDs they decide the channel |
| utm_campaign, utm_term, utm_content | Names where the network has name macros, such as Meta's campaign, ad set and ad names; IDs and the keyword in the Google suffix |
| wpcid | Campaign ID |
| wpasid | Ad set or ad group ID |
| wpadid | Ad ID ({creative} on Google) |
| wpacid | Ad account ID, when you add it |
| wpplc | Placement, in the Meta, Google and TikTok templates |
| wpsrc | Meta's {{site_source_name}}: fb, ig, msg, an or th (Meta template only) |
| fbclid, gclid, gbraid, wbraid, gad_campaignid | Ad click IDs and Google's campaign parameter, read from the landing URL |
UTM parameters on Shopify: keep them through redirects
WeProfit's storefront script reads the parameters on the page where the visit lands, and Shopify records that landing URL on the order. If a redirect drops the query string on the way, the parameters are gone before either one can read them.
Point each ad at the final address of the page, not at an old URL, a shortened link or a page that forwards visitors somewhere else. If a redirect cannot be avoided, test it: open the ad's link and check the address bar on the page you land on. Google asks the same for its own parameters: if your site uses redirects, pass the gclid and the gad_* parameters through to the final landing page.
Parameters that survive also help when the browser carries no WeProfit identity, for example a shopper on a fresh browser who buys straight away. WeProfit reads the click IDs and UTM tags in the landing URL Shopify recorded, links the order with inferred confidence, and uses those click IDs in the purchase it sends to ad networks.
- Use the product's or collection's own URL in each ad.
- Avoid link shorteners and redirects in front of your store unless you have tested that they keep the full query string.
- Keep values consistent. WeProfit's channel rules ignore case, hyphens and spaces in utm_medium, so paid-social and Paid Social both count as paid_social, but Google Analytics 4 treats google and Google as different sources.
- Switch on the WeProfit app embed in your theme. As the dashboard puts it, visits, add to cart and attribution start only after the app embed is switched on.
How WeProfit uses campaign, ad set and ad IDs
Channel reports need no URL template. Campaign detail also works from the default tagging of Meta, Google, TikTok, Pinterest and Snapchat: WeProfit reads the campaign IDs in the tracking parameters these networks can add to ad links themselves. The WeProfit URL template adds names and the levels default tagging leaves out, and it is needed for campaign detail on X Ads, Microsoft (pilot), Reddit, LinkedIn and Taboola, whose own tagging gives only the channel.
With these IDs, WeProfit reports orders by campaign, ad set and ad, and pixel conditions can route events by campaign, ad set, ad or ad account. Campaign names come from the connected ad account, or from a UTM value that is not an ID; a number is never shown as a name. Ad spend is matched to orders by campaign ID or name, so profit after ads and POAS go down to campaign level, and spend that matches no order stays visible as its own row, marked No matched orders.
An unexpanded macro, such as a literal {{campaign.id}}, or a value such as null or (not set), counts as missing, and IDs are checked against each network's format. Each network's template is ready to copy on that network's page in WeProfit, in the URL template card, and in the URL templates dialog on the Attribution page.
| Network | From the network's own tagging | Added by the WeProfit template |
|---|---|---|
| Meta | The campaign, and the ad set and ad when Meta adds its full set of automatic parameters. For Shopify stores, Meta lists only the campaign and ad IDs, so WeProfit gets the campaign only. | Names, placement, the ad set and ad IDs, and the ad account if you add it |
| The campaign, with auto-tagging on | Ad group, ad and placement | |
| TikTok | The campaign, when TikTok adds its own URL parameters | Ad group, ad, names and placement |
| Campaign and ad group, when Pinterest adds its own URL parameters | Names and the ad | |
| Snapchat | Campaign and ad, when Snapchat adds its own URL parameters | Names and the ad set |
| X Ads, Microsoft (pilot), Reddit, LinkedIn, Taboola | The channel only | Campaign, ad set or ad group, and ad IDs, with names where the network offers them |
Related platform documentation
- Meta: add URL parameters to your Meta ads
- Meta: specifications for URL dynamic parameters
- Google Ads: about Final URL suffix
- Google Ads: ValueTrack parameters
- Google Ads: about auto-tagging
- Google Analytics: URL builders and UTM parameters
- Google Ads: set up your tracking template
- Google: gad_* URL parameters