Skip to content
Bach.ai

How do I build UTM links for Meta and Google ads?

Pick the platform, check the values and copy. The page runs in your browser; your URL is never sent anywhere.

Free · no sign-up · no email · nothing stored

Build your tagged URL

Your numbers

The page people land on. Include https://.

Switching resets the values below to that platform’s starter set.

Where the traffic comes from. Lowercase, no spaces.

The channel type, for example cpc or paid_social.

The campaign. A macro fills it in automatically.

Tells creatives apart.

Paid keyword, mainly for Google Search.

This tool runs in your browser. The URL you type is never sent anywhere.

Your tagged URL

Paste into Ads Manager, URL parameters field
utm_source=facebook&utm_medium=paid_social&utm_campaign={{campaign.name}}&utm_content={{ad.name}}
Full tagged URL (for checking or other tools)
https://www.example.com/products/ring?utm_source=facebook&utm_medium=paid_social&utm_campaign={{campaign.name}}&utm_content={{ad.name}}

A planning estimate from the numbers you type, not a forecast or a promise of results.

Which dynamic parameters can I use?

Dynamic parameters let the platform fill in values when the ad serves, so one setting works for every ad. Meta and Google use different forms. The builder warns you if you paste one from the wrong platform.

Meta dynamic URL parameters
ParameterWhat it fills in
{{campaign.name}}Campaign name
{{campaign.id}}Campaign ID
{{adset.name}}Ad set name
{{adset.id}}Ad set ID
{{ad.name}}Ad name
{{ad.id}}Ad ID
{{placement}}Placement
{{site_source_name}}Site or app the ad appeared on
{{media_type}}Media type (Advantage+ catalog ads only)

Source: Meta Business Help Center: Specifications for URL dynamic parameters (checked 24 Nov 2026)

Google Ads ValueTrack parameters
ParameterWhat it fills in
{campaignid}Campaign ID
{adgroupid}Ad group ID
{creative}A unique ID for the ad
{keyword}Matched keyword (Search Network)
{matchtype}Keyword match type
{network}Where the click came from: search, search partners, Display and others
{device}Device type
{placement}Content site where the ad was clicked

Source: Google Ads Help: Set up tracking with ValueTrack parameters (checked 24 Nov 2026)

Meta’s name-based parameters use the name the campaign, ad set or ad had when first published. Rename it later and the parameter still sends the original. Meta also says changing URL parameters after publishing can restart learning for the ad set, so set them before launch.

Where do I paste each result?

For Meta, paste the first result into the URL parameters field in the ad’s Tracking section; Meta appends it to your website URL, and if the same parameter is in both, the one in the URL parameters field wins. Meta also says that since 1 January 2024 it may add some parameters on its own, such as a campaign source of Facebook or Instagram, so check your analytics for clashes. For Google, open URL options (Google suggests the account level, and you can set it lower) and paste the tracking template, which begins with {lpurl}, the parameter Google replaces with your final URL.

Source: Meta: Add URL parameters to your ads; Google Ads Help: About ValueTrack parameters (checked 24 Nov 2026)

How should I name UTM values?

Google Analytics treats values as case-sensitive, so Meta and meta become two sources. Pick lowercase, avoid spaces, and use the same words every time. Google also recommends setting all the key UTM fields once you set one. The builder flags capitals and spaces in typed values, but not in dynamic parameters, where the platform sends whatever your campaign names say.

Source: Google Analytics Help: URL builders and campaign URLs (checked 24 Nov 2026)

Worked example: a Meta ad

Illustrative

Illustrative URL, not a customer link.

Worked example: a Meta ad
StepValue
Website URLhttps://www.example.com/products/ring
Meta URL parametersutm_source=facebook&utm_medium=paid_social&utm_campaign={{campaign.name}}&utm_content={{ad.name}}
What a visitor lands on (campaign “prospecting-2026”, ad “holiday”)https://www.example.com/products/ring?utm_source=facebook&utm_medium=paid_social&utm_campaign=prospecting-2026&utm_content=holiday

Meta URL-encodes spaces in names as %20, so a campaign called “Prospecting 2026” arrives as Prospecting%202026.

UTM Builder FAQ

Do I still need UTMs if Meta reports the conversions?

Yes, for your own analytics. UTMs let Google Analytics and your store see which campaign and ad a visit came from, so you can compare it with what Meta reports.

Should utm_source be facebook or meta?

Either works if you stay consistent. Mixing both splits your Meta traffic into two rows. Pick one and write it into your naming guide.

Can I use macros in Google Ads utm_campaign?

Yes. Put ValueTrack parameters such as {campaignid} in the tracking template. Google replaces them when the ad is clicked. They return IDs, not names, so keep a lookup from ID to campaign name.

Why does my URL already have parameters?

A website URL can have its own query string. The builder appends with & in that case and puts the UTM values before any #fragment. If the URL already carries utm_ values, remove them so they do not clash.

More free tools: Break-even ROAS Calculator · CAC Payback Calculator · MER vs ROAS Calculator · Creative Testing Budget Calculator · Facebook Ad Cost Calculator · Target CPA Calculator · LTV:CAC Calculator · Ad Spend Calculator · Learning Phase Calculator

Sources: Meta Business Help Center: Specifications for URL dynamic parameters; Meta Business Help Center: Add URL parameters to your Meta ads; Google Ads Help: Set up tracking with ValueTrack parameters; Google Analytics Help: URL builders (all checked 24 Nov 2026). Drafted with AI; every outside fact checked against these pages on 24 Nov 2026. The arithmetic is ours.

Who made this calculator?

Bach.ai is our product. It connects to your Meta and Google Ads accounts, audits them and proposes fixes; on a paid plan it applies a change, by default, only after you approve it. Free is a 7-day trial with no card. Start the free trial.

Last updated

See what your Meta ads are really costing you.

Connect your account and Bach ranks potential revenue leaks with estimates and actions you can review. Free for 7 days, no credit card.

Start Free Audit
Start your free audit