Testing Number Swapping


Last Updated: 10/03/2017 Back to Topic All Articles

In order to test dynamic number insertion (number swapping) on your site, you will need to imitate a web visit that matches the kind of visitor that you want to track.

Before you test your number swapping, make sure the following steps are complete:

  • The correct dynamic tracking code must be installed on your website.
  • You must have at least one on-site tracking source in your account that is associated with at least one tracking number in your account.
  • At least one target number must be associated to the tracking number that will swap on your site.

 

Steps for Testing

1) In your browser, open a new private browsing window (such as Chrome Incognito) with no other private windows or tabs open.

2) Imitate a web visit to your site the same way a real visitor would for this source.

  • If your tracking source is based on the visitor’s landing URL, you’ll use a test link.  Paste or fully type in your test URL.  Do not let the URL bar auto-complete for you.  For help finding the correct test URL to use, see the testing sections below.
  • If your tracking source triggers based on the referring URL, you’ll need to go to the page you want to track visitors from and click the link to go to your website from there.

3) Wait for the page to fully load.  If the internet connection or web server is slow, or if the script is at the bottom of the page (causing it to load later), it might take a second or two for the swapping to occur.

4) Check to see if your tracking number is displayed. If your phone number is in multiple places on the page, check all locations to make sure the right number is showing.

  • If you have hard-coded a tracking number on your page so that it will swap for itself, the tracking number will show even if the swapping did not work.  You will need to use the console in your browser to confirm that the script is working on your website.  See the console section below.

 

Testing Preset Sources

If you are testing one of the sources available as a preset in your account, use the following methods to check number swapping (replace www.yoursite.com with your site’s domain or the location of your landing page):

  • Google AdWords: www.yoursite.com/?gclid=test
  • Google Organic: do a Google search and click on the result for your website
  • Facebook: click the link to your website from your company’s Facebook page
  • Twitter: clink the link to your website from your company’s Twitter page
  • Youtube: click the link for your website from your company’s Youtube page
  • Bing Paid: www.yoursite.com/?utm_source=bing&utm_medium=cpc or www.yoursite.com/?msclkid=test
  • Bing Local: do a search from bing.com/local and click the result for your website
  • Bing Organic: do a Bing search and click on the result for your website
  • Yahoo Local: do a search from local.yahoo.com and click the result for your website
  • Yahoo Organic: do a Yahoo search and click the result for your website
  • Direct: www.yoursite.com
  • Referral: click a link to your website from any page that has a link to it (such as Craigslist)
  • CAKE: www.yoursite.com/?ctreqid=test
  • Website: click any link to your site or navigate directly to it (this source triggers for all visitors, but gives preference to any other source you may be tracking)
  • Facebook Paid: www.yoursite.com/?utm_source=facebook

If you need to test for Google Organic on a dev server, use the following steps (replace yourdevsite with your domain):

1) Navigate to google.com.

2) Open a javascript console and enter: window.location=”http://yourdevsite.com/”

 

Testing Custom Sources

Your test URL will change depending on the source you’re testing for.  It will need to meet the conditions in the Source Trigger fields found on the tracking source setup page.

To find your source triggers, go to Numbers → Tracking Sources, then click edit next to the name of the source you want to test.  Scroll to the Source Triggers section and click the Referring and Landing URL tabs to see what triggers are set for this source.

If your source is based on a Referring URL, you will need to test by clicking a link on that website.

If your source is based on a Landing URL, you will need to build a test link.  Your test link will need to include your domain or the full link to a specific landing page, plus any tags or strings specified in your source triggers.

In the above example, the source is configured to trigger for visitors who have utm_source=pinterest in their landing URL.  The test URL for this source would be www.yoursite.com/?utm_source=pinterest.

 

Using the Console to Confirm Swapping

Your browser’s development console is the best way to confirm the tracking script is working correctly on your site.  Click here to learn how to access the developer console in Chrome.

1) After running your test, right-click anywhere on the page and select “Inspect.”

2) Click the Console tab in the panel that appears.

3) Click in the white space in the Console tab and type out __ctm_tracked_numbers, and hit enter (there are two underscores at the beginning of the command).

4) If the number has swapped, it will return “true” along with the number that the script displayed on the page.  If not, it will return “false.”


Cookies

When you first go to your site to see if the dynamic number swapping is working, you will be cookied. The dynamic tracking code will remember the first source you used to reach your site. If you first came to the site from a source that matches one of your tracking numbers, you will see it swap. However, if you first came to the site from a source that did not match, you will not see the number swap.

By default, the script associates a visitor with their original tracking source for 30 days. This is done to keep the number swapping consistent. If preferred, you can adjust this time in the Tracking Code settings in your account.


Realtime Reports

You can also check in your realtime reports page to see realtime visits coming to your site. You can filter this page by tracking number to see the last few instances of your number being viewed by a web visitor.

If your swapping doesn’t appear to be working, please follow our troubleshooting guide or contact the support team for assistance.


Was this article helpful?
0 0