HTC Dynamic Number Swap (WP Plugin)

Hometown Contractors needed a reliable way to display the right phone number based on the ad campaign that drove a visitor to a landing page. We built a custom WordPress plugin that swaps the header number dynamically using UTM parameters, helping improve attribution and keep campaign tracking cleaner. In short: fewer “which number did they call?” mysteries.

The Goal

Improve campaign attribution and call routing by dynamically displaying a campaign-specific phone number for visitors arriving from paid ads.

The Challenge

  • Phone number needed to change based on UTM campaign data.

  • The solution had to work cleanly within WordPress and the site header.

  • Consistency mattered across page navigation and sessions for accurate tracking.

What We Did

  • Built a custom WordPress plugin to read UTM parameters and apply rule-based number swapping.

  • Implemented stable logic for matching campaigns and setting the correct display/tel values.

  • Designed the system to be maintainable and scalable as new campaigns are added.

The Outcome

A more reliable attribution workflow for paid traffic, clearer insight into which campaigns drove calls, and a smoother visitor experience (the number appears “normally”—no weird flicker or jank).

Contact Us

Want to get in touch for a project? Use this form to submit your info and message and we will get right back to you!