The gap
ValueTrack is the mechanism Google Ads uses to stamp click context into your URLs: {campaignid}, {adgroupid}, {keyword}, {device}, and a few dozen more. What it has never offered is {campaignname}. The click arrives knowing exactly which campaign sent it, as a number nobody downstream can read.
That gap matters the moment names carry meaning your other systems need. A utm_campaign that says what the campaign is, rather than an ID you have to look up. Call tracking, where platforms such as Infinity attribute a phone call to the campaign name they find in the landing page URL (the architecture in the call-based conversion piece depends on exactly this). A hidden field on a lead form, so the CRM shows sales a campaign name instead of a number. A warehouse join that arrives pre-joined because the name landed with the click.
The usual answers both depend on people remembering. Hand-editing URLs per campaign rots the day someone launches a campaign and skips the edit. A lookup table from ID to name, kept by hand, rots the first time someone renames a campaign, which in a well-run account is routine hygiene. An automated join from the Google Ads API keeps up with renames, but only inside the warehouse: a call tracker or a form's hidden field sees only the URL.
The injection mechanism
Google Ads custom parameters are user-defined ValueTrack slots. Set campaign = MY_CAMPAIGN_NAME on a campaign and {_campaign} resolves to that value in any tracking template, final URL suffix, or final URL. They cascade: a parameter defined at a lower level overrides the same key defined above it. So the whole pattern is one tracking template, set once at account level, that references two parameters the entities themselves carry:
# self-maintaining UTMs {lpurl}?utm_source=google&utm_medium=cpc&utm_campaign={_campaign}&utm_content={_adgroup} # call-tracking payload (Infinity-style) {lpurl}?infinity=ict2~net~gaw~cmp~{_campaign}~ag~{_adgroup}~ar~{creative}
Once it's set, the template doesn't need to change when campaigns launch or get renamed. What has to stay true is the parameters themselves: every campaign carrying its own name in {_campaign}, every ad group in {_adgroup}, through launches and renames alike. That's a synchronisation job, and synchronisation jobs belong to software, not to checklists.
A script keeps the names true
The tool is a single Google Ads Script, open source at google-ads-campaign-name-sync. On every run it walks each enabled campaign (Search, Display, Performance Max and Shopping) and each ad group inside enabled campaigns, standard and Shopping alike. For each entity it compares the stored parameter against the entity's current URL-encoded name and rewrites it on any mismatch. That comparison is the point: it catches missing parameters, blanked values, and renames with the same check, so an account that renames campaigns weekly stays as clean as one that never does.
It merges rather than replaces. setCustomParameters() overwrites an entity's whole parameter set, so the script reads the existing set, updates its own two keys, and writes the merged result back; parameters owned by other tools survive. Google's limits are guarded rather than tripped over: entities hold at most 8 custom parameters and values cap at 200 bytes in Scripts. An entity that would breach either limit is skipped with a logged warning instead of failing the run.
Account: Example Account (123-456-7890) Mode: LIVE [Search/Display campaigns] scanned=3 updated=0 unchanged=3 skipped=0 errors=0 [Performance Max campaigns] scanned=4 updated=1 unchanged=3 skipped=0 errors=0 [Shopping campaigns] scanned=0 updated=0 unchanged=0 skipped=0 errors=0 [Ad groups] scanned=36 updated=0 unchanged=36 skipped=0 errors=0 ---------------------------------------- TOTAL scanned=43 updated=1 unchanged=42 skipped=0 errors=0
The logging is half the tool. One line per change, a summary per entity type, a grand total, and a thrown error if any entity failed, which flips a scheduled run to Failed and triggers Google's script-failure email. A sync job that cannot tell you what it did is a sync job you will eventually distrust for good reason.
The Performance Max trap
This script exists because the version of the same idea that a call-tracking vendor gave its customers had a silent failure mode when I found it. It updated campaigns through AdsApp.bulkUploads(), a CSV bulk upload, and bulk uploads don't apply custom parameter edits to Performance Max (PMax) campaigns. The upload reports nothing back to the script, so the logs look healthy while every PMax campaign in the account carries no name at all.
I found this on a live account where every Search campaign carried its name and all four PMax campaigns carried nothing. Nothing in the account was misconfigured; the bulk upload quietly skips custom parameter edits on that campaign type. The tracker showed nameless PMax traffic for as long as the script had appeared to work.
Don't sync custom parameters through bulk uploads. The upload silently skips custom parameter edits on Performance Max campaigns and gives the script no per-row feedback, so the failure is invisible in the logs. Set parameters directly on each entity instead.
The fix is structural. Google Ads Scripts exposes Performance Max behind its own selector, and AdsApp.performanceMaxCampaigns() supports urls().setCustomParameters() exactly as Search and Display campaigns do. Set the parameter on the entity, skip the upload entirely, and PMax behaves like Search and Shopping. The same structure is why the script covers Shopping: it's one more selector in a list, not a special case. Demand Gen and Video campaigns aren't covered: Scripts has no Demand Gen selector, and AdsApp.VideoCampaign has no urls() method.
Asset groups
PMax has asset groups instead of ad groups, so {_adgroup} is empty on PMax traffic by default. That used to be final: asset groups had a final URL but no tracking fields. Google has since added asset group URL options (campaign, then Asset groups, then Edit assets, then Asset group URL options): a tracking template, a final URL suffix, and custom parameters, per asset group.
Because custom parameters resolve lowest-level-first, that enables a neat trick: add adgroup = ASSET_GROUP_NAME as a custom parameter on each asset group, and the existing account-level template's {_adgroup} resolves per asset group. No template changes, and the tracker receives asset group names in the same field ad group names arrive in.
The caveat: this is a manual step per asset group for now. Scripts' AssetGroupUrls object can't set it (it only exposes final URL and path methods). The Google Ads API added the field in v25.2, in September 2026, so the script should be able to set it through AdsApp.mutate(). Until I've tested that, set it by hand whenever you create or rename an asset group. If numeric IDs are enough for your reporting, {assetgroupid} is also a valid ValueTrack parameter in PMax tracking templates.
Set it up
Three minutes, four steps. In Google Ads, go to Tools, then Bulk actions, then Scripts, create a new script and paste in sync-custom-parameters.gs. Authorise it when prompted. Click Preview first: preview saves nothing, and the log shows exactly what a live run would change, which is also a quick way to audit how many of your entities are currently nameless. Then run it live and schedule it hourly or daily; new and renamed entities are picked up on the next run.
Reference {_campaign} and {_adgroup} in your tracking template, and the names look after themselves from there. MIT licensed; the README carries the Infinity-specific notes and the asset group walkthrough.