All articles
Getting started
Planning
Links
Guides
- UTM naming conventions for teams and agencies
- UTM parameters explained
- Campaign launch without broken links
- Planning QR codes for print
- Switch agencies without losing data
- Google Campaign URL Builder or a UTM builder for teams
- UTM links for agencies: running client campaigns cleanly
- UTM management: what it is and when a team needs it
- UTM parameters in Google Ads, Meta and LinkedIn
- Why UTM parameters get lost: redirects, consent and scripts
- GA4 Unassigned traffic: why campaigns land there and how to fix it
- UTM template for Excel and Google Sheets: structure, formula, common mistakes
UTM template for Excel and Google Sheets: structure, formula, common mistakes
Anyone who builds campaign links regularly ends up with a spreadsheet: one row per link, one column per parameter, the finished link at the end. A good template makes sure everyone on the team uses the same values and the links are technically correct. A bad one spreads typos across hundreds of links.
This guide shows the structure, a formula that works in Excel and Google Sheets, and the common mistakes. If you would rather not build it yourself: the free naming convention generator creates a ready Excel template with your allowed values, and the bulk UTM builder turns existing rows into checked links.
The structure
Two sheets are enough:
- Links: one row per link with the columns target page (A), source (B), medium (C), campaign (D), content (E) and finished link (F). If you build search ads, add a column for the term.
- Values: the allowed values, sources in column A, mediums in column B. All lowercase, without spaces or special characters, for example
newsletter,facebook,paid-social.
The values belong on a sheet of their own because they change. A new channel is then a new row on the values sheet, not a change in every formula. Which values fit which GA4 channel is explained in UTM parameters explained.
Dropdown lists instead of free typing
For GA4, Facebook, facebook and fb are three different sources. A dropdown list stops that before it happens:
- Excel: select column B, then Data › Data Validation › Allow: List, with the source
=Values!$A$2:$A$50. Do the same for column C with=Values!$B$2:$B$50. - Google Sheets: select column B and add a data validation rule from the Data menu: a dropdown from the range
Values!A2:A50.
Campaign and content usually stay free text because they change with every campaign. A fixed pattern still helps, for example 2026_autumn_sale. The guide Naming convention for teams and agencies shows how to set one.
The formula
The simplest formula appends the values to the target page:
=A2&"?utm_source="&B2&"&utm_medium="&C2&"&utm_campaign="&D2
It goes wrong as soon as the target page already has a question mark or an anchor with #. This version handles both, adds the content only when it is filled in, and leaves the row empty while no target page is entered:
=IF(A2="","",IFERROR(LEFT(A2,FIND("#",A2)-1),A2)&IF(ISNUMBER(FIND("?",IFERROR(LEFT(A2,FIND("#",A2)-1),A2))),"&","?")&"utm_source="&B2&"&utm_medium="&C2&"&utm_campaign="&D2&IF(E2="","","&utm_content="&E2)&IFERROR(MID(A2,FIND("#",A2),2000),""))
The same formula works in Excel and Google Sheets. If your spreadsheet uses a comma as the decimal separator (as in German or French settings), separate the arguments with semicolons instead of commas.
With it, https://www.lindenholz.example/kitchens?id=3#offer becomes https://www.lindenholz.example/kitchens?id=3&utm_source=newsletter&utm_medium=email&utm_campaign=2026_autumn_sale#offer. The parameters stand before the #, where every analytics tool reads them.
Special characters in free values
If the campaign or content contains a space, an & or a #, the link breaks at that point. The safest way is to avoid such characters altogether: autumn_2026 instead of Autumn 2026. If free typing has to be allowed, replace the critical characters in the formula, for example for column D:
SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(TRIM(D2),"%","%25")," ","%20"),"&","%26")
Excel also has the function ENCODEURL, which does everything at once. But it only runs in Excel for Windows; on a Mac and in Excel for the web the cell shows an error. Google Sheets has ENCODEURL as well. If you share the spreadsheet with others, SUBSTITUTE is the safer choice. The template from the naming convention generator replaces %, spaces, &, #, ?, = and + this way.
Common mistakes
- Several copies of the spreadsheet. Every agency works with a different version, and new values appear in three places. Share one file and protect the values sheet so only one person changes the lists.
- Values typed over. Whoever gets around the dropdown, for example by pasting from another file, writes free values again. Check the spreadsheet before the launch with the campaign link checker, which also reports capital letters and spaces.
- The target page never opened. The spreadsheet does not know whether the page can be reached and whether the parameters survive a redirect. The redirect checker shows that for a single link.
- Formula shown as text. If the column is formatted as text, Excel shows the formula instead of the link. Set the column to General and enter the formula again.
- The same values for different links. Two ads of the same campaign with the same content cannot be told apart in the report. Give every link its own content, for example
banner_topandbanner_bottom.
When the spreadsheet is no longer enough
A spreadsheet is a good start as long as one team maintains it. With several agencies, many campaigns and links in print, ads and newsletters, its limits show: it checks no target pages, it shows no results, and nobody can see which link is in use where. The guide Google Campaign URL Builder or a team UTM builder compares the options.
Feinwerk Campaigns turns the naming convention into a fixed choice for everyone involved, builds every link by it, checks the target page and shows the results from Matomo or GA4 per link. You bring the links from your existing spreadsheet over with a CSV import. More in the features and on the pilot page.