12.9. Parameter Example: UTM Generator
A practical use case for text parameters is creating a mini-tool like a UTM link generator. This can be useful for marketing teams who want to generate UTM links for their campaigns.
- Understand the use case and benefits of creating a UTM link generator tool.
- Learn how to set up text-based parameters for UTM source, medium, and campaign.
- Create a custom UTM link based on user inputs.
- Differentiate between labels and values for text-based parameters.
- Apply real-life examples to demonstrate the practical application of the UTM generator.
UTM Generator Setup
Suppose we have a base link, such as
datastudio.com, and we want to get the values for the UTM parameters from the user. For example, they might input a UTM source like
Since we're familiar with the business and know there are only a few campaigns they run, we can create a text-based parameter with a list of allowed values, like
product A and
product B. Users can then select the value using a dropdown menu rather than an input box.
Creating the UTM Link
The UTM link will be constructed by appending the UTM source, UTM medium, and UTM campaign values to the base link. For instance, it might look like
Let's examine the UTM parameters:
- UTM source: Text with any value.
- UTM medium: Text with any value.
- UTM campaign: Text with a limited set of allowed values (e.g.,
The label displayed in the dropdown menu represents the user-friendly product name, while the value used in calculations can be something more technical, like an SKU. This way, the marketing manager sees familiar product names, but the UTM link includes the SKU.
For example, the user interface displays "Product A" and "Product B," but when the user selects "Product B," the UTM campaign shows the SKU for that product. The generated link can then be clicked on to navigate directly to the UTM link.
By providing this UTM generator tool, you can make it easier for your marketing team to create custom UTM links for their campaigns, without having to deal with the technical details themselves.