Dynamic phone number insertion

Configure conditional phone numbers based on UTM parameters, user location, or other conditions.
dynamic phone number

About the dynamic phone number insertion

Configure dynamic phone numbers based on UTM parameters, user location, or other conditions.

Ensure consistency by displaying the same number when users return to the site or browse different pages.

Commonly used for:

  • Displaying regional phone numbers based on the user’s location
  • Tracking which campaigns or marketing channels drive the most phone calls.
  • Measure campaign-specific lead generation.

Step-by-step: Setting up a dynamic phone number

The following step-by-step guide explains how to set a dynamic phone number based on the UTM Parameter condition. You can follow the steps while using any other If-So condition.

*Elementor or Gutenberg user? This condition can be used to set up a conditional element or block (Learn more: Gutenberg | Elementor).

  1. On your WordPress dashboard, go to “If-So → Add New Trigger
  2. Click on “Select a condition” and select “UTM“.
  3. Select a UTM parameter: “Source” / “medium” / “campaign” / “term” / “content”.
  4. Select an operator: “is” / “contains” / “is not”.
  5. Type in a UTM variable (without the ‘=’ sign).
  6. In the content field, set the phone number to be displayed if the UTM condition you have set is met.
  7. In the default content field, set the phone number to be displayed if the condition is not met (optional, can be left blank).
  8. Press “Publish” and paste the shortcode generated by If-So wherever you wish to display the phone number.

Displaying the dynamic phone number on subsequent pages that do not include the UTMs

If-So provides the capability to ensure consistent phone number display as users navigate through different site pages.

To achieve this, simply activate the recurrence option. This feature operates on cookies. Consequently, the same dynamic version seen initially will persist across subsequent page visits, irrespective of whether the condition is met again.

Displaying the dynamic phone number based on a sequence of UTM parameters

If you want to display the dynamic number based on more than one UTM parameter, for example ?utm_source=facebook&utm_medium=paid_social, you can use the Page URL > Contains condition as follows:

If: Page URL > Contains > ?utm_source=facebook&utm_medium=paid_social ; Then: Your dynamic content….

The condition allows you to display dynamic phone numbers based on any string in the static part of the URL or the dynamic part (the query parameters).

Categories

Goal

Conversions

Topic

Advertising Campaigns, Promotions

Conditions

Advertising Platforms, Dynamic Link, Geolocation, Google Ads, Page URL

Realated templates and examples