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:
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 are special codes that can be appended to links that let the target website know where the traffic came from. For example,
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:
βThe field template can be updated to dynamically include the UTM parameters:
β
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.