How to Create and Manage Custom URL Parameters?
Tracking campaigns often require capturing data that doesn't fit within standard UTM parameters, such as affiliate IDs or specific coupon codes. To handle this, you can add custom parameters to your tracking URLs. Custom parameters help you track more information beyond standard UTMs, giving you better insights in your analytics. They can be used in addition to the normal UTMs, or even instead of them, for maximum flexibility. This additional information can then be captured as Custom Dimensions in tools like Google Analytics for more detailed analysis.
1. Creating a New Custom Parameter
Follow these steps to set up your first custom parameter.
- Navigate to the Custom Parameters page by going to Parameters > Custom.
- Click the Create a new Custom Parameter button to open the configuration form.
- Fill in the basic details for your parameter:
- Name: Enter the parameter name as it will appear in the URL (e.g., coupon, cid, affiliate_id).
- Description: Add a brief, helpful description. This will be shown in the URL builder to guide your team.
- Ensure the Active box is checked. This makes the parameter available in the URL builder.
- Configure the optional settings as needed:
- Required: Check this box if every tracking URL must include this parameter. The URL builder will not allow users to save a link without it.
- Maximum # of characters: Enter a number to limit the length of the parameter's value. Leave it empty for no limit.
- Auto-generated: Select this checkbox to have a unique random value automatically created for each link. You can also add a Prefix that will be prepended to the value.
- For example, an auto-generated parameter named cid with a prefix of id_ would look like this in a URL: ...&cid=id_1234567890
- Generate using an expression: Select this to dynamically create a value based on other parameters using an expression. Use the provided guidelines to build your expression.
For example, an expression like
{{utm.campaign.tag}}-{{utm.medium.tag}}
could dynamically generate a value like
summer_sale-social
6. Click Save to create the custom parameter.
2. Managing Your Custom Parameters
From the Parameters > Custom page, you can edit or delete any existing custom parameter.
- To Edit: Select the parameter you wish to change and click the Edit (pencil icon) next to it. You can update its name, description, and any advanced settings. Click Save to apply your changes.
- To Delete: Select the parameter you want to remove and click the Delete (trash can icon) next to it.
- You will be asked to confirm this action, as it cannot be undone.
Note: You cannot delete a custom parameter if it still has values assigned to it. You must first delete all of its values before you can delete the parameter itself.
3. Adding and Managing Pre-defined Values
For consistency, you can create a list of pre-defined values for your team to select from in the URL builder.
3.1. To Add a Value:
- From the Custom Parameters page, click on the name of the parameter you want to add value to.
- Click Add a new value.
- Enter the Parameter Value (e.g., earlybird, save20) and an optional description in the Notes.
- Ensure the Active box is checked and click Save.
3.2. To Manage Existing Values:
On the parameter's details page, you can manage all of its associated values.
- Hide/Show: Click the eye icon to hide or show a value in the URL builder dropdown.
- Edit: Click the pencil icon to change the value or its description.
- Clone: Click the clone icon (two pages) to duplicate a value, which is useful for making minor variations quickly.
- Delete: Click the trash can icon to permanently remove a value.
4. Using Custom Parameters in the URL Builder
Once created, your custom parameter will appear as a new field in the URL builder, alongside the standard UTM parameters. Users can either select a pre-defined value from the dropdown or, if permissions allow, enter a new custom value.
A finished URL with a custom parameter might look like this:
www.example.com?coupon=earlybird&utm_campaign=summer_sale&utm_source=twitter&utm_medium =social
For a detailed guide on different ways to use custom parameters, please see our article: Use Custom Parameters to Implement UTM Parameters.
Note: It is possible to restrict team members to only use existing, pre-defined values and prevent them from creating new ones on the fly. This is managed in your project's user permission settings.
4.1. How to Restrict User Permissions
To ensure data consistency, you can require users to select values only from the pre-defined list. You can set this restriction for individual users or for entire groups.
Note: Only users with Admin rights can configure this permission.
Method 1: Via Project Settings (Individual User)
- Navigate to Project Settings > Users.
- Find the user you want to update and click the Edit icon.
- Go to the Params in the Project Permissions section.
- Check the box for the Custom Parameters you wish to restrict.
- Click the Update User Permissions button.
This is just one of many permissions you can set, as detailed in our guide on managing users at the project level.
Method 2: Via Manage Users (Individual User)
- Navigate to Manage Users > Users.
- Find the user you want to update and click the Edit icon.
- Go to the Params section of their Project Permissions.
- Check the box for the Custom Parameters you wish to restrict.
- Click Save.
Method 3: Via Manage Users (Group Level)
This method updates the permission for all members of a user group.
- Navigate to Manage Users > Groups.
- Click the Edit icon next to the group you want to update.
- Go to the Project Permissions section and click on the Add Project Permission to choose the relevant project.
- In the Params permissions, check the box for the Custom Parameters you wish to restrict.
- Click Save.
To learn more about user and group permissions, you can refer to our complete guide: Manage Users.
Best Practices
- Use Consistent Naming: Use clear and consistent names for your parameters and values (e.g., use snake_case or camelCase but don't mix them).
- Leverage Descriptions: Always add descriptions to explain the purpose of a parameter or value. This is especially helpful for larger teams.
- Limit Auto-Generated Parameters: It's best practice to use only one auto-generated custom parameter per project to ensure the unique ID is easy to track.
- Restrict Permissions: For better data governance, consider restricting team members to only use pre-defined values for certain parameters.