Logo

How can we help?

How to Test Phone Number Swapping with the NinjaTrack Dynamic Number Insertion (DNI) Script

Now that you've got your tracking numbers purchased and the Dynamic Number Insertion (DNI) script placed on your client's website you want to see the magic of number replacement happen yourself! The NinjaTrack Dynamic Number Insertion Script is designed to replace phone numbers on your client's websites only when the website visitor comes through from a source that is being tracked. This article walks through a general process for how to test that your tracking script has been installed correctly and that number swapping is working.

 

Section Links

Test Swapping for Google Paid Sources

Test Swapping for Custom Parameters 

Test Swapping from Specific Referring Websites 

Other Source-tracking Requirements

 

Test Swapping for Google Paid Sources

After the google paid phone numbers have been set up for an account and the script tag has been installed on their website, the following steps will allow you to test the number swapping without having to click on your advertisement.

1. Clear your web browser cookies.  From the top-right corner of Chrome, click on the three dots in the top-right corner of the browser, then select More Tools >- Clear Browsing Data -> Clear Data.

2. Visit the landing page of your client's website. When typing in the URL for this page, append "?gclid=test" to the end of the URL. For example, if your client's web address is https://www.yoursite.com, then the URL you will want to type into the address bar is https://www.yoursite.com?gclid=test.

NinjaNote: If your tracking number also has custom required or restricted utm parameters, you can also append those to the url to test both to see if the script only swaps the number when the correct parameter is included.  For example, if you had a required parameter of utm_custom=required then the URL used for testing might look something like this:  https://www.yoursite.com?gclid=test&utm_custom=required.  Remember to always clear your cookies between each test.

3. The phone number on the website should swap to the Google Paid tracking number after a brief second.  If it does not, visit our help article for Troubleshooting Common Number Swapping Issues.

 

Test Swapping for Custom Parameters

Make sure to clear your web browser cookies between each test:  From the top-right corner of Chrome, click on the three dots in the top-right corner of the browser, then select More Tools >- Clear Browsing Data -> Clear Data.

1. To test parameters, in the address bar of your web browser, type in the URL of the landing page where the NinjaTrack script is installed and append a question mark plus your required UTM parameter to the end of the URL. For example, if you have a UTM parameter set up such as "utm_location=newyork", then your URL for your landing page might look something like this:  https://www.yourlandingpage.com/?utm_location=newyork.

 2. Test parameters using this sequence

  • When using a required parameter, test visiting the landing page when:
    • The required parameter is present in the URL
    • The required parameter is not present in the URL
  • When using a restricted parameter, test visiting the landing page when:
    • The restricted parameter is not present in the URL
    • The restricted parameter is present in the URL

NinjaNote: You may use more than one restricted or required parameter for a tracking number, but this will only work if the exact string entered in your NinjaTrack settings matches the string after the question mark in the link to your landing pages.

 

Test Swapping from Specific Referring Websites

To test a link back from a referring website to see if the tracking number swaps, the easiest thing to try would be to click on the link.  Make sure to clear your browser cookies prior to performing this test.

However, in some cases, you may wish to test the number swapping without clicking on a link from the referring website. Using a web browser extension such as Referer Control, you can test referring websites without clicking on the link to your landing pages. Here's how:

1.  Add the Referer Control extension to your chrome browser extensions by clicking on the blue "Add to Chrome" button: 

mceclip1.png

 

2. Click on the blue world icon in the top-right corner of Chrome in order to modify the referring website:

mceclip0.png

 

3. Click on the "Custom" referer setting.  Enter in your landing page as the site filter in the first text box. In the second text box, enter in the website of the referring page that you are trying to mimic. 

mceclip0.png

 

4.  Once the custom referer is set up from the above steps, type in the landing page of your websites to test that the tracking number is swapping on the page correctly.

 

Other Source-tracking Requirements

The following table lists some other common sources that can be tracked with NinjaTrack, as well as the requirements for swapping to the tracking number for each unique source.

Tracking Source Requirements for a Swap
Search - Google Paid contains a URL parameter of a Google click id (gclid), or has a referer of google and contains campaign parameters in the URL.
Search - Bing Paid has utm_source=bing or source=bing in the URL parameters, or has referer of bing and contains campaign parameters in the URL
Search - Yahoo Paid has utm_source=yahoo or source=yahoo in URL parameters, or has referer of yahoo and contains campaign parameters in the URL
Facebook has utm_source=facebook or source=facebook in URL parameters, or has a referer of Facebook
YouTube has utm_source=youtube or source=youtube in the URL parameters
Linked Page the referer of the website visitor contains the string specified in this setting
Offline  a number specified with this source will NEVER swap on the website
Ad Extensions a number specified with this source will NEVER swap on the website
Specific Page will only swap the tracking number if the user arrives at the website from this specific landing page
Custom Parameters  will only swap the number if values entered in the "required" box are present in the URL and values entered in the "restricted" box are not present.
Required URL parameters the number will not swap unless the landing page URL contains the exact string specified in this setting after the ? in the website URL.
Restricted URL parameters the number will not swap if the restricted URL parameter is present in the landing page URL.
Direct swaps the number in all other cases not tracked by other call tracking numbers. (This number will swap even if the visitor was referred from another website)
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request