Ad UTM tagging
Find the Meta ads in a client's campaigns that are missing UTMs or carry the wrong ones, and have Mythic set them.
Overview
Attribution, channel grouping and the Constraint finder read the UTMs a paid click arrives with. Ads launched without them lose that attribution. Ad UTM tagging checks the ads in the campaigns you choose, shows which ones need URL parameters, and sets them for you.
Open a client and choose Automate, then Ad UTM tagging. A new client starts with two steps: connect Meta, then choose what to tag. After that the screen shows:
- Automatic tagging: one switch, how often Mythic checks, and the result of the last check.
- Settings: what Mythic tags and the URL parameters it writes, in plain words. Edit opens the full form.
- Activity: Check now and the history of changes.
- The Meta connection, on one line at the bottom, with Manage.
Until Mythic switches on live Meta writes, the screen says Meta writes aren't on yet. Checks work, but applying is blocked. You can turn on automatic tagging now. The status reads Approved. Starts when Mythic turns on Meta writes., and no ads change until then.
The client chat on the right can read and change these settings too, for example "check every 30 minutes" or "add a campaign name condition". Every change it makes asks for your approval in the chat first.
If the client's plan no longer includes ad tagging, the screen shows Stop ad tagging instead of settings, checks or history. You can Turn off automatic tagging, Turn off ad tagging, or enter a known run UUID under Run ID to cancel and click Cancel run. Turning off automatic tagging cancels automatic runs only. Turning off tagging cancels queued and running writes. Already-written ads are not reverted. Read-only clients cannot use these controls.
1. Connect Meta
Ad tagging needs a Meta Marketing API token for the client's ad account. Use a system-user token, so it doesn't expire when someone leaves:
Create the token
In Meta Business Settings, open Users, then System users. Pick or add a system user and click Generate token.
Give it the permissions
Select ads_read and ads_management.
Assign the ad account
In Accounts, then Ad accounts, assign the system user this client's ad account.
Connect it in Mythic
Paste the token into Connect Meta and click Connect. Mythic keeps it and never shows it again. How to get a token on the card repeats these steps.
Later, Manage at the bottom of the screen opens the Meta connection. Test token lists the ad accounts the token can see. If Meta rejects it, the screen shows Meta's reason and the fix, such as regenerating the token or assigning the ad account. Replace token swaps in a new one. Remove token also removes this client's ad tagging settings and frees the ad account for another client. Run history stays. If an ad account is already in use, the message names the client that holds it when that client is in your agency.
2. Choose what to tag
The first time, the form appears on the screen as Choose what to tag. The defaults work for most clients: click Set up ad tagging. Afterwards, Settings shows the saved choices and Edit opens the same form.
| Setting | What it does |
|---|---|
| Ad account | The account to tag. One ad account can belong to one client. |
| Campaigns | Filter by name contains, name doesn't contain, created on or after a UTC date, or campaign status. Status choices are active, paused and archived. Choose Match all or Match any. No conditions includes every campaign. |
| Ads | Active, Paused and In review. All three are selected by default. Paused includes ads paused by their campaign or ad set. In review includes Meta's PENDING_REVIEW and IN_PROCESS states. |
| URL parameters | The parameters to set, laid out like Meta's Build a URL parameter dialog. Campaign source, Campaign medium, Campaign name and Campaign content are utm_source, utm_medium, utm_campaign and utm_content. Anything else goes under Custom parameters as a name and a value. Values may use letters, digits, _ . - and Meta's macros, such as {{campaign.id}}. |
| Existing values | Keep adds the parameters an ad lacks and keeps its values. Replace sets every parameter above to its value here. |
| Current names | On by default. Writes each ad's current campaign, ad set and ad names instead of Meta's name macros, and keeps them current after renames and duplicates. |
| Short links | Off by default. Sends each tagged ad's clicks through one of this client's short links. The short link passes the UTMs to the page. |
The Edit dialog also holds Turn off tagging, which stops tagging and cancels queued runs. It always works, even if the client's plan changes. Automatic tagging then reads Tagging is off, with Turn on. Remove deletes the settings.
Name conditions accept 1 to 200 characters. They ignore case unless you choose case-sensitive matching. Use at most 20 conditions. Every field referenced by a condition must be readable. Missing campaign data excludes the campaign, even with Match any or a negative name condition.
The template allows at most 20 unique keys and 1000 characters. Keys match
^[a-z][a-z0-9_]{0,63}$. Values must be non-empty. The allowed macros are
{{campaign.id}}, {{campaign.name}}, {{adset.id}}, {{adset.name}},
{{ad.id}}, {{ad.name}}, {{placement}}, {{site_source_name}} and
Mythic's {{mythic.bid_suffix}}.
The default template ends utm_campaign with the campaign's bid structure,
filled by Mythic: HC | Leads reports as HC | Leads | cbo.hv. cbo means a
campaign budget and abo ad set budgets. The strategy is hv (highest
volume), cc (cost per result goal), bc (bid cap), roas (ROAS goal) or
tc (retired target cost). Switching strategy updates the tag like a rename.
Cap amounts are left out so tuning a cap doesn't rewrite your ads. Delete
{{mythic.bid_suffix}} from the template to leave it out.
For example, to tag only campaigns named "XYZ" that were created this year,
add Campaign name contains XYZ and Campaign created on or after
1 January, with Match all. Settings reads the rules back in plain
language.
To add one of Meta's macros, put the cursor where it goes and click the value under Insert, such as Campaign ID or Bid structure. Hover a value to see the macro it inserts. Reset to default restores the default parameters.
Mythic manages only the parameters listed here. Any other parameter an
ad already has is kept. The default template sets utm_source=facebook and
utm_medium=paid, so the clicks group as Paid Social, plus the ids
attribution joins on. The screen warns you if your template drops
utm_id={{campaign.id}} or ad_id={{ad.id}}, or wouldn't group as Paid
Social.
Meta fills {{campaign.name}}, {{adset.name}} and {{ad.name}} with the
name an ad had when it was first published. A renamed or duplicated ad keeps
reporting the old name. With Current names on, Mythic writes the
current names into the URL instead, such as utm_campaign=Spring%20Sale, and
rewrites them when a name changes. ID macros stay macros. A parameter that uses
a name macro is always kept current, even under Keep, so a value
you set by hand on that parameter is replaced. A rename means a new creative
and a swap, which restarts Meta review. Automatic checks fix names only on
paused, in-review and scheduled ads (Active, but the ad set hasn't started),
where new duplicates are. A delivering ad with an
outdated name shows Name outdated, ad delivering: apply it manually to
update it.
With Short links on, Mythic keeps a link that already is one of this client's short links. It reuses an enabled, unexpired short link to the same page if UTM passthrough is on, or creates one during apply or auto mode. New links appear in the client's Links. Checks never create links. Existing-post ads marked Link not verified only get tags. Their links are not shortened. Call-to-action and carousel card links are shortened too.
Before each swap, Mythic checks that every short link the ad will use is still enabled and sends clicks to this client. If a check fails, the ad keeps its current creative.
Click Save. Cancel or closing the dialog discards your edits. Changing only how often Mythic checks preserves the revision, checks, runs and automatic tagging. Other setting changes make earlier checks unusable and cancel queued or running runs. Changes to the ad account, parameters, existing values, ads, campaigns, current names or short links also turn automatic tagging off, and the dialog says so before you save. An unchanged save leaves the check valid. Turning off automatic tagging alone does not invalidate a check.
Checks and approvals bind to the saved settings' generation, revision and fingerprint. Disconnecting and reconnecting creates a new generation, so an old check cannot be reused even if the settings look identical.
3. Check
Under Activity, click Check now. Mythic reads the matching campaigns and their ads from Meta and decides what to do with each ad. Nothing is written to Meta. The API calls this a preview.
The result is one line, such as 3 of 11 ads need tags. or All 11 ads are up to date. Up to date means Already correct or Nothing to add. Ads skipped for any other reason are counted separately, as in No ads need tags. 8 are up to date and 3 were skipped. When ads need tags or were skipped, a table lists them. Needs tags, Skipped and All filter it, and Skipped shows each ad's reason. Done closes the check.
| Decision | Meaning |
|---|---|
| Will set | The ad needs URL parameters or a short link. Mythic will make those changes. |
| Link not verified | The ad uses an existing post, so Meta doesn't show Mythic its link. You can apply it by hand after checking the link in Ads Manager. Automatic tagging skips these ads. |
| Already correct | Every parameter already has the template's value. |
| Nothing to add | Keep has nothing to add. Some values differ from your settings. Replace would overwrite them. |
| UTMs in link | The ad's link already has one of your parameters, so Mythic leaves it alone rather than duplicate it. |
| Unsupported creative | Catalog, template URL and dynamic creatives aren't supported yet. |
| No link | The ad has no destination link. |
| Key parameter | Short links are on and the URL parameters include key. Short links use key to pick the client, so Mythic leaves the ad alone. |
Results are grouped by campaign. Click a campaign's row to collapse it. The URL parameters and links column shows each parameter Mythic would add in green and each it would change in yellow, with the old value struck through. Parameters that stay the same are listed as Unchanged.
The same column shows each destination link change:
- Short link kept shows the URL already on the ad. If that link is disabled, expired or doesn't pass URL parameters, the line says so and the apply will fail that ad instead of setting tags the page would never get.
- Reuses shows an existing short URL Mythic plans to use.
- Creates a short link for shows the destination page. The short URL is chosen during apply or automatic tagging. Run details show Created and the short URL once it is resolved.
An ad can be Will set even when its URL parameters are unchanged. Its destination link may still need shortening. A resolved link in run details does not by itself confirm the ad swap. Check the ad's state.
A check lasts 24 hours. The label at the top right counts down and turns orange in the last hour. If it stopped early on a very large account, a banner says so. You can still apply what it lists.
4. Apply
Select the ads (every Will set ad starts selected) and click Apply selected.
Meta doesn't allow editing a creative's URL parameters. For each ad, Mythic creates a copy of the creative with the new parameters and swaps it onto the ad. Meta may treat that as a significant edit. Delivering ads can return to learning. In-review ads have no delivery or learning history yet, but tagging restarts their review. The confirmation shows how many selected ads are running. Tick the acknowledgement to continue.
Mythic starts right away and works through the ads one at a time, each taking several seconds of Meta calls. A batch that doesn't finish in the first minute continues every 5 minutes, about 4 minutes at a time. Watch progress under History. One apply or auto run can be in progress per ad account.
Before creating a copy and again before swapping it onto the ad, Mythic checks fresh account, ad status, campaign rules and creative data. Ads no longer eligible, or missing required eligibility data, are left alone. Before the swap, Mythic reads back the copy and checks the full story content and creative settings against a fresh original. This includes text, media, calls to action, carousel content and the new URL parameters. Shared or recovered copies are checked too. Missing or changed content fails verification. Mythic does not swap an unverified copy.
5. Automatic tagging
The switch on Automatic tagging turns it on and off. While it's on, the menu next to it sets how often Mythic checks, and the line under the title shows the last check, such as Last check 9 minutes ago · No changes needed.
The default interval is 15 minutes. The menu offers every 15 minutes, every 30 minutes, every hour and daily. The API and the client chat accept any multiple of 5 from 5 to 1440 minutes, and the menu then shows that value too. Cron checks due accounts every five minutes. It takes up to 10 configs per tick, oldest due first, within a time budget. Busy, skipped and failed checks consume capacity too. Large rosters or Meta cooldowns can stretch the interval.
Changing only the interval keeps checks, runs and automatic tagging on.
An in-review ad can be IN_PROCESS after a swap. The next check still sees
it when in-review ads are selected. Correct tags are skipped, so it is not
swapped again unless its destination still needs shortening.
Turning it on needs a complete, unexpired check of the saved settings. If there isn't one on screen, the switch runs it first, then asks you to confirm the creative swap. While writes are off, the approval is saved and no ads change until global activation. Changing what a run would do turns automatic tagging off again. Automatic tagging skips ads whose links Mythic cannot inspect and uses the same fresh eligibility and copy checks as manual apply.
The last automatic check is separate from run history. It reports queued,
no_changes, incomplete, skipped_busy or an error code. A queued check has
a run to follow. No-change or failed scans do not create runs. An incomplete
check did not cover the full account. A busy check found other reserved work.
Errors can report missing or invalid tokens, permissions, Meta timeouts or
throttling, short-link setup problems or storage failures. Check the error
detail and fix the cause.
For API clients, the read-only config fields are last_auto_at,
last_auto_status and last_auto_error. Auto runs use a run_slot timestamp
instead of run_date. last_auto_date is removed. These are not editable settings.
History
History lists applies and automatic runs. Checks write nothing, so they
aren't listed. Automatic runs contain only ads marked set. Skips are counted in ads_skipped
but do not have auto journal rows. Run a check to inspect skipped ads.
Click Details to see each ad:
| State | Meaning |
|---|---|
| Waiting | Queued for the next batch. |
| Writing | Mythic is creating the creative or swapping it onto the ad. |
| Applied | The ad uses the new creative. |
| Uncertain | Meta didn't confirm the write. Mythic reads it back before considering at most one write retry. Exhausted read retries or cancellation can leave it unresolved. Check the ad in Ads Manager. |
| Failed | Meta refused the write. The reason is shown. |
| Changed in Meta | The creative, ad status, campaign eligibility or tagging plan changed, or required eligibility data was missing, so Mythic left it alone. |
| Cancelled | The run was cancelled or the settings changed first. |
Failed reads have a budget of three retryable failures with increasing backoff. A permanent read failure exhausts it immediately. If reads cannot resolve a sent write, the ad stays Uncertain and automatic retries stop. The run finishes Partial once its other work is done. Check those ads in Ads Manager and resolve them manually. An uncertain write may have succeeded.
Cancel run stops a queued or running run and prevents subsequent swaps. Ads already written keep their new creative. Writes already sent to Meta cannot be recalled: they may take effect and remain Uncertain. The account stays reserved until the worker has stopped and released it, or its lease expires plus a 30-second grace period. You may need to wait before starting a replacement run.
If Meta rate-limits the ad account, Mythic persists the cooldown and continues eligible work automatically afterward. A delayed or shorter rate-limit response cannot shorten an existing cooldown.
Short link failures show a plain explanation. short_link_unavailable
means a short link could not be created, is disabled, expired or not passing
URL parameters, doesn't send clicks to this client, or the link store stayed
unreachable after three tries. Mythic does not swap the ad onto it. short_links_unavailable
means the client needs an active custom hostname or a publishable key before
Mythic can build short URLs.
For developers
See the Ad UTM tagging API. Its Options and filters reference includes the full settings, decision reasons, run and change statuses, history filters, automatic-check outcomes and error codes. HTTP errors and per-ad journal errors are listed separately.