Search
Clear search
Close search
Google apps
Main menu
true

Track calls to a phone number on a website

Use phone call conversion tracking to help you see how effectively your ads lead to phone calls from your website. When someone visits your website after clicking one of your AdWords ads, website call conversion tracking can help you identify and measure calls from your site.

This kind of conversion tracking tracks a call as a conversion when it lasts longer than a minimum length you set. This way, you can filter out shorter calls that probably don’t include sales or other valuable actions for your business.

Before you begin

If you use another system to track when calls lead to sales or other conversions, you might want to create an import calls conversion action instead. Or, you can see all call conversion actions in the article on Using phone call conversion tracking.

Website call conversions only work if you have call extensions enabled. The phone number you set in your call extension is used to track calls from your website. Learn how to Use call extensions

Benefits

You can use dynamically-generated Google forwarding numbers that replace your business number on your site, without any cost to you. As a result, you can see which specific keywords, ads, ad groups, and campaigns are leading to call conversions.

Here, we'll show you how to track these phone call conversions using a Google forwarding number on your site.

Requirements

Here's what you'll need before you can set up conversion tracking for calls from a website:

  • An AdWords account: Don't have one yet? Sign up at http://adwords.google.com.
  • An active call extension: You'll need at least one call extension. You can set this up before or after creating a call conversion action.
  • A business in an eligible country: Google forwarding numbers are currently available in these countries.
  • A website: This is where you'll put the conversion tracking code (called a "tag").
  • Ability to edit website: Either you or your webmaster will need to be able to add the conversion tracking tag to your website, and add a JavaScript snippet to replace your business number with a Google forwarding number.

Instructions

There are 2 parts to setting up conversion tracking for calls to a Google forwarding number on your website:

Step 1: Set up your conversion action
  1. Sign in to your AdWords account.
  2. Click the Tools tab, and select Conversions from the drop-down menu.
    Select "Conversions" from the menu
  3. Click the + Conversion button.
    New conversion action
  4. Select the "Phone calls" option.
    New phone call conversion
  5. Select Calls to a phone number on your website.
  6. Click Name. Enter the name of the phone call conversion you'd like to track. This will help you recognize this action later when it shows up in conversion reports. An example might be "Flower phone orders" or "Booking calls." Click Done.
  7. Click Value. Enter a value for each call, or select "Don't assign a value" if you'd prefer not to count one. Click Done.
  8. Click Call length. Enter the minimum length, in seconds, that a phone call needs to last to be counted as a conversion. Click Done.
  9. Click Count. Select whether to count every or one conversion per ad click. "Every" is best for sales; "one" is best for leads. Click Done.
  10. Click Conversion window. Select a conversion window (how long after an ad click or ad impression you want to track conversions) for this conversion action. The window can be as short as one week or as long as 60 days. Click Done.
  11. Click Category. Select the category that best applies to your conversion. Your choice here is used simply to segment your conversion reports. You can always change it later. Click Done.
  12. (Advanced) Click Include in "Conversions." Opting into this setting—selected by default—will include data for this conversion action in your "Conversions" reporting column. If you uncheck this setting, data will still be included in the "All conversions" column.

    Data in the “Conversions” column is used by automated bid strategies like Target return on ad spend, Enhanced cost-per-click, or Target CPA. So, if you use an automated bid strategy to optimize for conversions, and you don’t want to include this particular conversion action in your bid strategy, you can uncheck this setting. Otherwise, leave it checked. Click Done.
  13. Click Save and continue.
Step 2: Install your conversion tracking tag

You’ll now see a screen with next steps to finish setting up conversion tracking.

  1. Under “1. Install your conversion tracking tag,” you’ll see the “Phone number” setting. Select one of the options:
    • Enter your phone number as it appears on your website. Enter the phone number that you want to track calls to. Make sure to enter the exact digits that appear on your website. For example, if the number on your website has a country code, include the country code here. If the number on your website does not have a country code, do not include the country code here. Then, click Create tag. (Note that this option doesn’t work if you want to track multiple phone numbers on your website.)
      • Example: You list the number on your website as 1-650-555-5555. You should enter the number as 1-650-555-5555. If you enter 650-555-5555, or 555-5555, AdWords won’t be able to properly find your number and track your conversions.
    • Don’t enter a number. You’ll need to edit your website code manually. If you select this option, you’ll need to follow the instructions below to edit your website code manually after you install your tag. This option is more advanced, and is recommended only if you’re comfortable using JavaScript. You should use this option if you want to track calls to multiple phone numbers on your website.
  2. You’ll now see your conversion tracking tag in the gray box. Choose an option for saving the tag:
    • Copy the tag from the box.
    • To download the tag, click Save instructions and tag at the bottom of the screen.
    • To email the tag to your webmaster, click Email instructions and tag at the bottom of the screen.
  3. Open up the HTML for the page where the phone number appears on your website.
  4. Between the head tags (<head></head>) of the page, paste the tag you generated in Part I above.

Example

Here are examples of HTML before and after adding the conversion tracking tag:

Sample HTML before conversion tracking code (sample only—don't use in your website's code).

<html>
<head>
<title>Sample HTML File</title>
</head>
<body>
This is the body of your web page.
</body>
</html>

Sample HTML after conversion tracking code (sample only—don't use in your website's code).

<html>
<head>
<title>Sample HTML File</title>
<script type="text/javascript">
(function(a,e,c,f,g,b,d){var h={ak:"123456789",cl:"_ABcDEFg12hI34567jK"};a[c]=a[c]||function(){(a[c].q=a[c].q||[]).push(arguments)};a[f]||(a[f]=h.ak);b=e.createElement(g);b.async=1;b.src="//www.gstatic.com/wcm/loader.js";d=e.getElementsByTagName(g)[0];d.parentNode.insertBefore(b,d);a._googWcmGet=function(b,d,e){a[c](2,b,h,d,null,new Date,e)}})(window,document,"_googWcmImpl","_googWcmAk","script");
</script> 

Tip: Google Tag Manager

Google Tag Manager is a tag management system that allows you to quickly and easily update tags and code snippets on your website. You can use Google Tag Manager to install your conversion tracking tag.

Edit website code manually to display a Google forwarding number

If you entered your phone number for the “Phone number” setting in step 2 above, you don’t need to follow the steps below. If you selected “Don’t enter a number,” you or your webmaster now need to do the following:

On the same page you pasted the conversion tracking tag above, add a JavaScript snippet that will replace your phone number with a Google forwarding number using the _googWcmGet function. The function has these parameters: _googWcmGet(target, business_number, options)

  • target: Either a CSS class name or a callback function.
    • If target is a CSS class name, all elements of that class will have their contents replaced with a formatted telephone number.
    • If target is a function, it will be invoked with two arguments. The first argument is the formatted telephone number (in the same format as the business_number parameter) The second argument is the telephone number in a plain format (Example: '18001234567').
    The target element needs to show your business number by default so that customers see a usable phone number when a Google forwarding number isn't displayed.
  • business_number: Your business phone number.
  • options: An optional object with the following options:
    • timeout: Maximum time in milliseconds that is allowed for retrieving a number. If a number cannot be fetched within this time, no number is sent to the target. The default timeout is 5000 milliseconds.
    • cache: Set to false to disable caching of the retrieved number in a cookie.

The examples below show how to implement this code snippet in 3 different use cases.

Example 1: Replace your static phone number with a Google forwarding number

This function gets a telephone number and replaces the contents of all spans of the given class. In this example, the phone number "1-800-123-4567" inside the span tag will be replaced with the dynamically generated, formatted forwarding number:

		<body onload="_googWcmGet('number', '1-800-123-4567')">
		  <span class="number">1-800-123-4567</span>
		</body>
		

Example 2: Pass the Google forwarding number to a custom callback function

Gets a telephone number and sends it to a callback function. The example callback function will replace contents of an element with the id "number" with the formatted forwarding number.

		<head> 
		  <script type="text/javascript">
		    var callback = function(formatted_number, mobile_number) {
		      // formatted_number: number to display, in the same format as
		      //        the number passed to _googWcmGet().
		      //        (in this case, '1-800-123-4567')
		      // mobile_number: number formatted for use in a clickable link
		      //        with tel:-URI (in this case, '+18001234567')
		      var e = document.getElementById("number");
		      e.innerHTML = "";
		      e.appendChild(document.createTextNode(formatted_number));
		    };
		  </script>
		</head>
		<body onload="_googWcmGet(callback, '1-800-123-4567')">
		  <span id="number">1-800-123-4567</span>
		</body>
		 

To allow people viewing your website on a mobile phone to call your business easily, you can make the Google forwarding number clickable.

Example 3: Pass the Google forwarding number to a custom callback function on your mobile site

On mobile web pages with a clickable phone number, replace both the number that is displayed and the number that is called when clicked. This requires use of the callback function.

		<head>
		  <script type="text/javascript">
		    var callback = function(formatted_number, mobile_number) {
		      // formatted_number: number to display, in the same format as
		      //        the number passed to _googWcmGet().
		      //        (in this case, '1-800-123-4567')
		      // mobile_number: number formatted for use in a clickable link
		      //        with tel:-URI (in this case, '+18001234567')
		      var e = document.getElementById("number_link");
		      e.href = "tel:" + mobile_number;
		      e.innerHTML = "";
		      e.appendChild(document.createTextNode(formatted_number));
		    };
		  </script>
		</head>
		<body onload="_googWcmGet(callback, '1-800-123-4567')">
			  <a href="tel:18001234567" id="number_link">
				1-800-123-4567</a>
		</body>
		

Checking your code

It can take up to an hour for your ads to be enabled for this conversion action. If you'd like to make sure it's working, you can do a search that brings up your ad, then click the ad to visit your website (you'll be charged for the click). Your regular phone number should now be replaced with a Google forwarding number.

If you're doing repeated tests, delete the "gwcm" cookie from your browser before clicking on an ad again.

Was this article helpful?
How can we improve it?
Reach more customers with an online ad

With AdWords, you can run ads on Google to stand out on local searches. Only pay when your ad is clicked. [Learn more]

Sign Up for AdWords