Before you start
- You need edit access to Relay in the company.
- Every company has the built-in Standard UTM template:
utm_source,utm_mediumandutm_campaignrequired,utm_contentandutm_termoptional, lower case, underscore separator, no vocabularies bound. It cannot be edited or deleted. To change the rules, add your own template and make it the default. - To check values against an approved list, the list must exist as a Terrain definition. See Taxonomy.
Add a template
- Go to Relay > Templates and click Add Template.
- Enter a Name, for example "Paid social", and a Description. The description is shown in the builder when someone picks the template.
- Optional: pick a Channel. It is a label only and does not change what the template enforces.
- Optional: turn on Default ("Offer this template first in the builder"). This moves the default off whichever template has it now.
- Under Rules, set Casing (lower case, UPPER CASE or Leave as typed) and Separator (underscore, hyphen or dot).
- Optional: enter a Campaign name pattern, for example
{region}_{objective}_{yyyymm}. Tokens in braces are filled from the field with the same parameter key.yyyymm,yyyyandyyyymmddcome from the campaign start date and are never typed. Example output previews the result. - Under Fields, click Add field for each parameter, in the order it should appear in the URL. For each field set:
| Setting | What it does |
|---|---|
| Parameter key | Required. The query parameter, for example utm_source |
| Required | A link without a value is refused |
| Label | The field name shown in the builder |
| Vocabulary | Free text, or an approved-value list from Terrain |
| Default value | Prefilled in the builder |
| Max length | A longer value is refused |
| Help text | Shown under the field in the builder |
Use the arrows to move a field up or down and the cross to remove it.
- Click Save Template.
The Summary panel shows whether the template applies to every property in the company (new templates do) or one property only, how many fields it has and how many are governed by a vocabulary.
What a template checks
Rules are enforced when a link is built, not audited afterwards.
| Check | Result |
|---|---|
| Required field empty | Refused |
| Value longer than Max length | Refused |
| Value not on a closed vocabulary | Refused, with the nearest approved value suggested |
| New value on an open vocabulary | Allowed with a warning |
| Value in the wrong case | Warning, with the corrected value. GA4 treats Paid_Social and paid_social as two values |
| Value contains a space | Warning |
A utm_ parameter the template does not define | Warning: it is sent, but nothing governs it |
| Same destination and parameters as an existing link | Refused as a duplicate |
Change or delete a template
On Relay > Templates, each template shows its fields (required ones marked *, each with its vocabulary or "free"), the number of links it governs, channel, casing, separator and who modified it last. Click the name or the edit icon to change it.
Changing a live template does not rewrite existing links. They keep the values they were created with, and links that no longer conform are flagged. If someone else saved the template after you opened it, your save is refused; reload and make your change again.
Click the delete icon to delete. A template that still governs links cannot be deleted until those links use another template.