Dynamic number replacement

Show every visitor the virtual number of the source they came from – Google, Facebook, TikTok – and know exactly which campaign brought each call.

How it works

  • The script replaces the number in the site’s text, in tel: and sms: links and, when enabled, in WhatsApp links.
  • The source is determined by a URL parameter (e.g. utm_source). If the parameter value is itself a phone number, it is displayed directly.
  • The chosen number is kept for the whole visit, across pages.
  • Content loaded later (popups, forms) is replaced too.
  • Numbers inside input, textarea, select and elements with data-no-replace are never replaced.

Code generator

Options

data-*URLGTMDescription
data-old-number requiredoldoldNumberThe number currently shown on the site, to be replaced.
data-new-numbernewnewNumberThe default number to display. Required unless numbers per source are set.
data-utm-paramutmutmParamURL parameters that determine the source, comma-separated. E.g. utm_source,source.
data-source-mapsourcessourceMapsource:number pairs, comma-separated. E.g. google:051-1111111,facebook:052-2222222.
data-whatsappwhatsappwhatsappyes – also replace in WhatsApp links (auto-converts to the 972 prefix). Default: no.
data-excludeexcludeexcludeSelectors of elements to skip, comma-separated.

Three ways to embed

  • data-* – for most websites.
  • Script URL parameters – for plugins that strip data attributes.
  • GTM – configure via window.ExsilePhoneConfig before the script loads.