Number Replacement Rules

For Dynamic Number Insertion (DNI) to occur, a visitor to your landing page/website must meet the criteria defined within the replacement rules for a Tracking Number / Number Pool

When configuring DNI, you will need to take the following into consideration:

  • The numbers on the website that you want to replace with a Tracking Number
  • What sources (Google, Facebook, Bing) you want to gain attribution for

1. Choosing Numbers to Replace

When configuring your replacement rules, you will need to specify what numbers should be dynamically replaced on your website.

When specifying these numbers, you will need to supply an array of at leaste one 10 alphanumeric characters that represents a phone number. Any of the following examples are acceptable:

  • 4045553333
  • 8005559343
  • 800444CARS

Please note that Marchex will retain all phone number formatting (font, size, color, parentheses, dashes, etc) that has been applied on the target website

When configuring your Tracking Number or Number Pool, you will pass these values in the 'numbers_to_replace' field within the 'replacement_configuration' portion of your Number/NumberPool configuration. See the code snippet below for an example as to how to pass this information:

//... Number/NumberPool configuration
"replacement_configuration": {
  "numbers_to_replace": [
    "4045553333",
    "8005559343",
    "800444CARS"
  ],
  "tracking_sources": [
    {
      "referrer_domain": "any",
      "url_triggers": [
        "gclid=%"
      ]
    }
  ]
}

2. Choosing Sources to Track

The 'Tracking Source' setting allows you to specify a source that you want to attribute calls and texts to. This setting is used to decide when to trigger a replacement on your website/landing page and dynamically insert a number. Number replacement will only occur when the visitor arrives at your landing-page/website from one or more of the specified sources.

The following sources may be tracked:

  • Google
  • Facebook
  • Bing
  • Yahoo
  • Twitter
  • LinkedIn
  • Yelp
  • Any (this option will match all visitors to your website)

To access the complete list of Tracking Sources, please refer to the DNI Referrers portion of this documentation. If there is a source that you want to track that is not listed, please contact your Customer Success representative.

Number replacement can also be further refined by supplying a URL trigger. A URL trigger is a key/value pair within the landing page URL. The value can be set to be an exact match: http://abccompany.com/?utm_campaign=paidsearch, or can use a wild card where only the presence of the parameter will be used when determining if number replacement should occur: http://abccompany.com/?utm_campaign=%

When this value is present, the Marketing Edge JavaScript will check the landing page URL to determine if number replacement should occur.

When configuring your Tracking Number or Number Pool, you will pass this value in the 'url_triggers' field within the 'replacement_configuration' portion of your Number/NumberPool configuration. In the example below, we're creating a number replacement configuration that will replace the phone number 800444CARS with a tracking number when the user arrives via a Google paid search campaign, or a Facebook ad campaign:

//... Number/NumberPool configuration
"replacement_configuration": {
  "numbers_to_replace": [
    "800444CARS"
  ],
  "tracking_sources": [
    {
      "referrer_domain": "google",
      "url_triggers": [
        "gclid=%"
      ]
    },
    {
      "referrer_domain": "facebook",
      "url_triggers": [
        "utm_source=summerTires"
      ]
    }   
  ]
}

In the example above, number replacement will occur when the website visitor arrives from:

  • Google and the google click id (gclid) URL parameter is present in the landing page URL

or

  • Facebook and the URL parameter utm_source equals 'summerTires'