How to Enforce Cross-Parameter Dependencies
When building tracking URLs, team members might accidentally select combinations of parameters that are illogical or inconsistent, such as pairing a utm_medium of cpc with a utm_source of newsletter. These mistakes lead to messy analytics data, making campaign reporting inaccurate and difficult to trust. Manually enforcing the correct combinations across a team is prone to human error.
To solve this, Terminus.app allows you to create cross-parameter dependencies within a Convention. This advanced feature lets you build intelligent rules that control the available options for one parameter based on the value selected in another. For example, you can configure your Convention so that the available options for UTM Content change depending on which UTM Source is selected.
This article explains how to set up these dependencies using Fields, Parameter Formats, and the Field Mode option within a Convention.
Use Case Examples
Here are a few common scenarios where this feature is incredibly useful:
1. Source → Content Dependency
- Goal: Control the available ad content options based on the social media source.
- Rule:
- When UTM Source = Twitter, then UTM Content options are Tweet, Reply, or DM.
- When UTM Source = Facebook, then UTM Content options are Post, Sponsor, or Wall.
2. Medium → Source Dependency
- Goal: Ensure the selected UTM Source is always appropriate for the chosen UTM Medium.
- Rule:
- When UTM Medium = cpc, then UTM Source options are google, linkedin, or bing.
- When UTM Medium = social, then UTM Source options are facebook, twitter, or linkedin.
3. Campaign → Ad Content Dependency
- Goal: Ensure the UTM Content (the specific ad creative) is always relevant to the overarching UTM Campaign.
- Rule:
- When UTM Campaign = q4-holiday-sale, then UTM Content options are 25-off-banner-ad, free-shipping-video, or gift-guide-email.
- When UTM Campaign = new-feature-launch, then UTM Content options are feature-announcement-post, live-demo-webinar, or product-tour-video.
Now, let's set up the first example (Source → Content) to see in detail how you can enforce cross-parameter dependencies in Terminus.app.
Part 1: Create Dependent Fields
First, create separate fields for each set of content options and link them to the desired source.
- Navigate to Tools > Conventions and select the Fields tab and click Create New Field.
- Enter a field Name (e.g., "Twitter UTM Content").
- In the Only applicable when section, set the dependency rule. Specify that these values should only apply when Social Source is Twitter.
- Choose Option as Type.
- Add the values you want to be available when Twitter is the source: Tweet, Reply, and DM. You have two methods for adding them:
- Single Value: Click the Add value button to enter each option one by one.
- Bulk Update: For multiple values, click the Bulk update button. A text box will appear where you can add each value on a new line.
- Click Update values to add them all at once.
6. Click Save.
- Repeat steps 2-6 to create a field for Facebook. Name it "Facebook UTM Content," add the values Post, Sponsor, and Wall, and set the dependency to Social Source is Facebook.
Part 2: Create a Combined Parameter Format
Next, create a new Parameter Format that contains both of the fields you just created.
- Navigate to the Parameter Formats tab and click Create New Format.
- Give it a descriptive name, like "Social UTM Content Format." and click Next.
- Move both the Twitter UTM Content field and the Facebook UTM Content field from Available Fields to Configured Fields.
- A warning may appear because the dependency field (Social sources) is not part of this specific format. This is expected.
- To resolve this, check the box for Allow fields to be dependent across different parameters.
- Click Save.
Part 3: Configure the Convention
Finally, update your Convention to use the new format and enable Field Mode.
- Navigate to the Conventions tab and click the Edit icon next to the Convention you want to modify.
- Enable the Field Mode by checking the box. This is a critical step that allows the cross-parameter logic to work.
- Locate the Content parameter, choose Enforce Format and select Social UTM Content Format from the dropdown list.
- Click Save.
How it Works in the URL Builder
You can now test your new configuration.
- Navigate to URLs> Build Tracking URLs.
- Select your Social Convention. The builder will now show each individual field.
- In the Social sources field, select Twitter.
- The field for UTM Content will automatically update to show only the options you defined for Twitter: Tweet, Reply, and DM.
- If you select Facebook, it will show the Facebook-specific options instead.
- Save these settings and you will have the cross parameter dependency with this Convention.
Best Practices
- Field Mode is Essential: This cross-parameter logic will only function if Field Mode is enabled for the Convention. If your dependencies aren't working as expected, this should be the first setting you check.
- Use Clear Naming: Give your dependent fields descriptive names (e.g., "Twitter Content Options," "Facebook Ad Content"). This makes them much easier to manage later, especially in complex Conventions with many rules.
- Understand the Dependency Warning: The warning you see when creating the Parameter Format is a helpful safeguard. As long as you ensure the controlling field (like Social sources in our example) is included in the final Convention, you can safely check the box to allow the dependency and save.