> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.metalocator.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Adding UTM parameters to outbound links

In the results card, when presenting a link to a partner, it's as easy as including the Link field in the display, as shown below:

[![](https://storage.crisp.chat/users/helpdesk/website/-/6/1/6/2/61624cdb3c55880/0cba15ba-1a27-45af-bb2b-9b45e9_1t2u495.png)](https://downloads.intercomcdn.com/i/o/823457366/3f5d7c4a0cedd02509c5bbca/image.png?expires=1794512700&signature=a87f8fefcd8b06cb8cc1335ac441537d4ee944eee2f52ea25004e58c19daa2c0&req=fCIkEsx5nodZFb4f3HP0gNoemEI%2F1SrtvBeGzMubSGI6Qsk3KwDEp2Jp6wTb%0AKNm52vKZ5F2%2B3vVPkQ%3D%3D%0A)

When a visitor clicks the link, (metalocator.com in the example above), they'll be redirected to the target Web site to continue their journey. Using UTM parameters, you can let the owners of metalocator.com know the traffic came from your locator.

## What are UTM Parameters?

[UTM Parameters](https://en.wikipedia.org/wiki/UTM_parameters) are special codes that can be appended to links that let the target website know where the traffic came from. For example,

[https://www.example.com/?utm_source=customer&utm_medium=web&utm_campaign=map_attribution](https://www.example.com/?utm_source=customer&utm_medium=web&utm_campaign=map_attribution)

This tells example.com the source of the incoming traffic based on the special codes above.

## Why include UTM Parameters?

When your partners are reviewing their Website statistics, they will see your UTM codes in their list of traffic sources. This can help support the value your partnership brings to the businesses in your locator.

## Including UTM Parameters in locator links

Adding UTM codes to your links is a matter of appending these special codes to your links, so

`https://www.example.com/`

becomes

`https://www.example.com/?utm_source=customer&utm_medium=web&utm_campaign=map_attribution`

There are a few strategies to accomplish this, depending on your requirements:

This can be done directly in the data, by manually updating the incoming location as shown below:  
​

[![](https://storage.crisp.chat/users/helpdesk/website/-/5/0/d/8/50d8337eebb37400/e1fec13a-b792-4dce-bb4b-aa9722_slw00o.png)](https://downloads.intercomcdn.com/i/o/823570123/19410b6d1b666f053c6057e1/image.png?expires=1794512700&signature=5d237700e3a2716aef4402269f8be94759df254bb2028fe56ae2a91a43acf0cc&req=fCIkE85%2BnINcFb4f3HP0gJFf2IgbR4LaljtYcumeJacbR579%2BuqWdQ6VpKqm%0AiBk%3D%0A)

The [field template](https://support.metalocator.com/en/articles/3817982-field-templates) can be updated to dynamically include the UTM parameters:  
​

[![](https://storage.crisp.chat/users/helpdesk/website/-/c/9/f/3/c9f3bee29b1d8000/92fd209b-90bd-481c-b642-f3dcb1_15wd389.png)](https://downloads.intercomcdn.com/i/o/823581044/9c89430407253796fdcc5ec4/image.png?expires=1794512700&signature=9489982a077e0335fa213199da77a44cea2fdac3e4bae24577675209e2f53438&req=fCIkE8F%2FnYVbFb4f3HP0gGKZMVDJ9jAzxnkUk3vFSYXKDdRBm%2BfQWPg8TaCx%0A4qU%3D%0A)

In this second example, we use the following Handlebars helper:  
​

```
{{formatUrl (replaceUrlParam (replaceUrlParam link 'utm_medium' 'web') 'utm_source' 'mylocator')}}
```

**formatUrl** is the normal MetaLocator URL handler which accounts for basic syntax issues we commonly encounter, such as missing protocol information, or other formatting problems. The two nested calls to **replaceUrlParam** insert the **utm_medium** and **utm_source** values. We use **replaceUrlParam** to account for the cases where links have pre-existing UTM values, so this function will replace them instead of appending a duplicate.