Setting up conversion tracking

If you'd like to know which of your keywords best leads to clicks and conversions (such as sales), conversion tracking can help you.

This free tool in AdWords can show you what happens after customers click on your ad (for example, whether they purchased your product, called from a mobile phone or downloaded your app).

By knowing this, you'll also know which of your keywords, ads, ad groups and campaigns are good for your business, allowing you to invest more wisely and help boost your return on investment (ROI).

In this article we'll tell you how to set up conversion tracking for conversions that happen online, such as website purchases and sign-ups, mobile app downloads and calls to your business from mobile phones. To learn how to track conversions that happen offline, in the real world, see our article on importing offline conversions.

Note: Video instructions are up-to-date, but don't show the latest AdWords design. Track conversions on a website

To use conversion tracking, you'll need to put a small snippet of HTML and JavaScript code on the page that customers see after they've completed a valuable action on your site. For example, you could add the code to your purchase confirmation page, which is the page that people see after they've made a purchase. Before you can set this up, you'll need:

  • An AdWords account: Haven't got one yet? Sign up at https://adwords.google.co.uk.
  • A website: This is where you'll put the snippet of code.
  • Ability to edit website: If you don't know any HTML and JavaScript, don't worry – you can still generate the code snippet in AdWords and send it to the person who makes changes to your website.

If you've got these three things, you're ready to set up conversion tracking. Here's how you do it:

Step 1: Get the code snippet
  1. Sign in to your AdWords account at https://adwords.google.co.uk.
  2. Click the Tools tab, and select Conversions from the drop-down menu. Conversions
  3. Under the Conversions tab, click the +Conversion button.
  4. In the “Conversion name” field, enter the name of the conversion that you’d like to track on your website. This will help you to recognise the action later when it shows up in conversion reports. An example might be "newsletter sign-up" or "wedding bouquet purchase". New conversion
  5. From the "Source" menu, select where your customers will complete the conversion. For example, if customers will order your cupcakes on your website, you'll select "Web page".
  6. Click the Save and continue button.
  7. In the "Conversion category" field, select the category that best applies to your conversion. If you're tracking newsletter sign ups, you'll pick "Sign up". For purchases, you'll pick "Purchase/Sale". If your conversion doesn't fall into a listed category, select "Other". Your choice here won't impact the way that your conversions are recorded.
  8. From the "Conversion window" menu, choose how long after an ad click you want to track conversions for this conversion action. You can select a window as short as one week or as long as 90 days.
  9. From the "Count" menu, choose whether to count either all or unique conversions. "All" is best for sales; "unique" is best for leads.
  10. In the "Conversion value" field, choose whether each conversion has the same value, varying values or if you'd prefer not to count a value.
  11. In the "Tracking indicator" field, choose whether you want to let your customers know that you're using conversion tracking by putting a Google Sites Stats notification on your page.
    • If you'd like to add a notification, select "Add a 'Google Site Stats' notification to the code generated for my page". Then select whether you'd like your Google Site Stats to be one or two lines, the language of the notification and the background colour of the web page that it'll be displayed on.

      Tracking indicator

    • If you prefer not to use a notification, select "Don't add a notification to the code generated for my page". But we require that you inform your customers that you're using AdWords' free conversion tracking feature (such as through your privacy policy). This creates trust and protects their privacy.
  12. Choose from two advanced options or skip to the next step.
    View-through conversion tracking (Display Network campaigns only)

    A View-through Conversion happens when a customer views (but doesn't click) an image or rich media ad, then later completes a conversion on your site. This is different from a Click-through Conversion, which happens when a customer has previously clicked an ad (such as on the Google Search or the Google Display Network) and then completed a conversion on your site.

    If you'd like to track View-through conversions, too, just pick a time frame in the View-through conversion window field. If, for example, you pick a window of three days, your conversion count might include customers who see your rich media ad on Monday and complete a conversion on Wednesday. But it won't include customers who see your ad on Monday and complete a conversion on Friday.

    Advanced options

    Bear in mind: View-through conversions automatically exclude conversions from people who've also clicked your search ads.

    Conversions for optimisation

    Select this option if you'd like AdWords bid strategies (such as Target return on ad spend, Enhanced cost-per-click or Conversion Optimiser) to optimise for this conversion action. This means AdWords will take these conversions into account when setting bids.

    Example

    Let's say you set up conversion actions to track the number of times a product is placed in a shopping basket on your site and the number of completed online sales. You select the "Optimisation" tickbox only for online sales, not for shopping basket usage. Then you turn on the Target CPA flexible bid strategy for an ad group. AdWords will set bids to get you as many online sales as possible while meeting a target CPA for online sales, but will ignore shopping basket usage. You can track the performance of bid automation for online sales in the "Conv. opt." columns, because they're the conversions resulting from the "Optimisation" setting you've selected.

    If you're using manual bidding, no bid automation will occur, but you'll see data for the "Optimisation" conversion actions in the "Conv. opt" columns. Learn how to enable the columns.

  13. Click Save and continue.
  14. Select either "Someone else makes changes to the code" or "I make changes to the code", depending on which applies to you.
    • If you chose "Someone else makes changes to the code", just fill in the email form that pops up and click Send email. The code snippet will be sent to the person who edits your website.
    • If you chose "I make changes to the code", a window will open up below with your code snippet. Congratulations! You've generated the code. Copy it and you'll be ready for the next step.
Step 2: Paste the code in your website's HTML

Now that you or the person in charge of your website has the snippet of code, you're ready to paste. Here's how you do this:

AdWords code snippet

  1. Open up the HTML for the page that your customers reach on your website after they've completed a conversion – the "thank you for your order!" page, for example. This is called the conversion page.
  2. Between the body tags (<body></body>) of the page, paste the code snippet that you generated in AdWords.
  3. Save the changes to your web page. And that's it!

Here's some sample code close up:

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>
	</head>
	<body> This is the body of your web page.
	<!-- Google Code for Purchase Conversion Page -->
	<script type="text/javascript"> 
	/* <![CDATA[ */
	var google_conversion_id = 1234567890;
	var google_conversion_language = "en_US";
	var google_conversion_format = "1";
	var google_conversion_color = "666666";
	var google_conversion_label = "Purchase";
	if (10.0) {
		var google_conversion_value = 10.0;
		var google_conversion_currency = "USD"
	}
	/* ]]> */ 
	</script>
	<script type="text/javascript" 
	src="//www.googleadservices.com/pagead/
	conversion.js">
	</script>
	<noscript>
	<img height=1 width=1 border=0 
	src="//www.googleadservices.com/pagead/
	conversion/1234567890/
	?value=10.0&label=Purchase&script=0">
	</noscript>
	</body>
	</html>
			
Track transaction-specific values

When setting up a new conversion action, you can assign the same conversion value to all conversions (static values), or different values to reflect transaction-specific values. The following information only applies to transaction-specific (also called "dynamic") values.

You might be using more than one technology to create and manage your web pages. Conversion tracking works just as well on these kinds of pages, known as dynamically-generated pages. Just make sure that the page that you put the code snippet on is the one that your customer sees after a conversion.

When inserting the code snippet, you'll place it on the static portion of the page, found within the <body> section. See the sections below for detailed instructions on modifying the conversion tag to support transaction-specific values for specific technologies used to generate your web pages:

Active Server Pages (ASP)

If you'd like to add conversion tracking code to ASP pages using your ASP editor, refer to the code below, then remove from your own code the lines that are crossed out, and manually add the areas that are highlighted.

	<body>
	...
	<!-- Google Code for Purchase Conversion Page -->
	<script type="text/javascript">
	/* <![CDATA[ */
	var google_conversion_id = 1234567890;
	var google_conversion_language = "en_US";
	var google_conversion_format = "1";
	var google_conversion_color = "666666";
	var google_conversion_label = "Purchase";
	var google_conversion_value = 10;
	if (<%= totalValue %>) {
	var google_conversion_value = <%= totalValue %>;
	}
	var google_conversion_currency = "USD";
	/* ]]> */
	</script>
	<script type="text/javascript" 
	src="//www.googleadservices.com/pagead/conversion.js">
	</script>
	<noscript>
	<img height=1 width=1 border=0 
	src="//www.googleadservices.com/pagead/
	conversion/1234567890/
	?value=<%=totalValue
	%>&label=Purchase&script=0">
	</noscript>
	</body>
		

If your web server supports Server Side Includes (SSI) you can use an #include statement to insert the conversion tracking code onto your site. After you generate your conversion code snippet, save it to a file on your web server – we recommend using the filename googleconversion.html.

Search for the </body> tag and place the #include statement with the location of the file directly above it. If the </body> tag is not located within the static portion of the HTML page, add the code snippet so that it appears within the body section of the page.

	<head>
	<title>Thank You for Shopping</title>
	</head>
	<body>
	...
	<!-- #include file=".../googleconversion.html" -->
	</body>
		

Bear in mind

Make sure that you do not place the #include statement in the footer or header of the file. This will cause Google to record a conversion every time that a customer visits any page on your site.

The #include statement will be evaluated before the rest of the ASP pages so you're able to use an ASP expression as the dynamic value of the conversion.

  1. Open your conversion confirmation page ASP file. If multiple pages are generated from the same file, find the section in the ASP file that generates your conversion page.
  2. If your site has a variable conversion value, determine the ASP expression which calculates that value. For example: <%= totalValue %>.
  3. Choose the "Purchase/Sale" conversion category while going through the conversion tracking setup.
  4. Enter a default numeric value in the “Conversion value” field, then replace the line “var google_conversion_value = …” manually with the following:
    	if (<%= totalValue %) {
    	var google_conversion_value = <%= totalValue %>;
    	}
    				
    You'll also need to replace the default numeric value with "<%= totalValue%>" in the <noscript> section of the tag highlighted above.
  5. Copy and save the resulting code snippet.
  6. Insert the conversion tracking code on to the conversion confirmation page. Make sure that the code appears within a static HTML section, not contained within an ASP code section (delineated by <%= and %> markers).
  7. Insert the conversion tracking code directly into the body of the conversion confirmation page. Search for the </body> tag and place the code immediately above it. If the </body> tag is not located within the static portion of the HTML page, make sure that the code snippet is added so that it appears within the body section of the page.
  8. Save your conversion confirmation file and upload it to your web server, if necessary. If you'd like to test the placement of your conversion tracking code, visit your conversion page by completing a conversion on your site.
  9. In your web browser, view the source of the web page (in most browsers, right-click on the page and select View source). You should see the conversion tracking code between the <body> and </body> tags on your page. The ASP expression will be replaced by the actual conversion value when you view the source.
Sun® Java Server Pages (JSP)

To add conversion tracking code to JSP pages using your JSP editor, look to the code below, then remove from your own code the lines that are crossed out and manually add the areas that are highlighted.

		
	<!-- Google Code for Purchase Conversion Page -->
	<script type="text/javascript">
	/* <![CDATA[ */
	var google_conversion_id = 1234567890;
	var google_conversion_language = "en_US";
	var google_conversion_format = "1";
	var google_conversion_color = "666666";
	var google_conversion_label = "Purchase";
	var google_conversion_value = 10;
	 if (<%= totalValue %>) {
		var google_conversion_value = <%= totalValue %>;
	}
	var google_conversion_currency = "USD";
	/* ]]> */ 
	</script>
	<script type="text/javascript"
	src="//www.googleadservices.com/pagead/conversion.js">
	</script>
	<noscript>
	<img height=1 width=1 border=0	
	src="//www.googleadservices.com/pagead/
	conversion/1234567890/?value=<%=totalValue %>&label=
	Purchase&script=0">
	</noscript>
	</body>
		

You can also insert the conversion tracking code onto your site using a server-side jsp:include statement. After you generate your conversion code snippet, save it to a file on your web server – we recommend using the filename googleconversion.html. Search for the </body> tag and place the jsp:include statement with the location of the file directly above it. If the </body> tag is not located within the static portion of the HTML page, make sure that you add the code snippet so that it appears within the <body> section of the page.

		
	<html>
	<head>
	<title>Thank You for Shopping</title>
	</head>
	<body>
	...
	<jsp:include src=".../googleconversion.html"/>
	</body>
	</html>
		

Bear in mind

Make sure that you don't place the jsp:include statement in the footer or header of the file, as is sometimes common. This will cause Google to record a conversion every time that a customer visits any page on your site.

The jsp:include statement will be evaluated before the rest of the JSP pages so that you're able to use a JSP expression as the dynamic value of the conversion.

If your web server supports Server Side Includes (SSI) you can use an #include statement to insert the conversion tracking code onto your site. After you generate your conversion code snippet, save it to a file on your web server. We recommend using the filename googleconversion.html. Search for the </body> tag and place the #include statement with the location of the file directly above it. If the </body> tag is not located within the static portion of the HTML page, make sure that you add the code snippet so that it appears within the <body> section of the page.

		
	<head>
	<title>Thank You for Shopping</title>
	</head>
	<body>
	...
	#include file=".../googleconversion.html"
	</body>
		

The #include statement will be evaluated before the rest of the JSP pages so that you're able to use a JSP expression as the dynamic value of the conversion.

Bear in mind

Make sure that you do not place the #include statement in the footer or header of the file, as is sometimes common. This will cause Google to record a conversion every time that a customer visits any page on your site.

  1. Open your conversion confirmation page JSP file. If multiple pages are generated from the same file, find the section in the JSP file which generates your conversion page.
  2. If your site has a variable conversion value, determine the JSP expression which calculates that value. For example: <%= totalValue %>, ${totalValue}
  3. Choose the "Purchase/Sale" conversion category while going through the conversion tracking setup.
  4. Enter a default numeric value in the "Conversion value" field, then replace the line var google_conversion_value = … manually with the following:
    	if (<%= totalValue %) {
    		var google_conversion_value = <%= totalValue %>;
    	}
    				
    You'll also need to replace the default numeric value with <%= totalValue%> in the <noscript> section of the tag highlighted above.
  5. Copy and save the resulting code snippet.
  6. Insert the conversion tracking code snippet on to the conversion confirmation page. Make sure that the code appears within a static HTML section, not contained within a JSP code section (delineated by <%@ and %> markers).
  7. Insert the conversion tracking code directly into the body of the conversion confirmation page. Search for the </body> tag and place the code immediately above it. If the </body> tag is not located within the static portion of the HTML page, make sure that you add the code snippet within the body section of the page.
  8. Save your conversion confirmation file and upload to your web server if necessary. If you'd like to test the placement of your conversion tracking code, go to your conversion page by completing a conversion on your site. In your web browser, view the source of the web page (in most browsers, right-click on the page and select View source). You should see the conversion tracking code between the <body> and </body> tags on your page. The JSP expression will be replaced by the actual conversion value when you view the source.
PHP: Hypertext Preprocessor (PHP)

To add conversion tracking code to PHP pages using your web page editor, look to the code below, then remove from your own code the lines that are crossed out and manually add the areas that are highlighted.

		
	<!-- Google Code for Purchase Conversion Page -->
	<script type="text/javascript">
	/* <![CDATA[ */
	var google_conversion_id = 1234567890;
	var google_conversion_language = "en_US";
	var google_conversion_format = "1";
	var google_conversion_color = "666666";
	var google_conversion_label = "Purchase";
	var google_conversion_value = 10;
	if (<? echo $totalValue ?>) {
		var google_conversion_value = <? echo $totalValue ?>
	}
	var google_conversion_currency = "USD";
	/* ]]> */ 
	</script>
	<script type="text/javascript"
	src="//www.googleadservices.com/pagead/conversion.js">
	</script>
	<noscript>
	<img height=1 width=1 border=0
	src="//www.googleadservices.com/pagead/
	conversion/1234567890/?value=
	<? echo $totalValue ?>&label=Purchase&script=0">
	</noscript>
	</body>
		
  1. Open your conversion confirmation page PHP file. If multiple pages are generated from the same file, find the section in the PHP file which generates your conversion page.
  2. If your site has a variable conversion value, determine the PHP expression that displays that value, for example, <?php echo $totalValue ?>, <? echo totalValue ?>
  3. Choose the "Purchase/Sale" conversion category while going through the conversion tracking setup.
  4. Enter a default numeric value in the "Conversion value" field, then replace the line var google_conversion_value = … manually with the following:
    	if (<%= totalValue %) {
    		var google_conversion_value = <%= totalValue %>;
    	}
    You'll also need to replace the default numeric value with <%= totalValue%> in the <noscript> section of the tag highlighted above.
  5. Copy and save the resulting code snippet.
  6. Insert the conversion tracking code on to the conversion confirmation page. Make sure that the code appears within a static HTML section, not contained within a PHP code section (delineated by <? and ?> markers). As you insert the code snippet, make sure that you place it directly into the body of the conversion confirmation page. To make sure that you do, search for the </body> tag and place the code immediately above it. Or, if the </body> tag is not located within the static portion of the HTML page, make sure that you add the code snippet so that it appears within the <body> section of the page as shown below.
  7. Save your conversion confirmation file and upload to your web server if necessary. If you'd like to test the placement of your conversion tracking code, go to your conversion page by completing a conversion on your site. In your web browser, view the source of the web page (in most browsers, right-click on the page and select View source). You should see the conversion tracking code between the <body> and </body> tags on your page. The PHP expression will be replaced by the actual conversion value when you view the source.
Web pages containing frames

In cases where frames are used, it's best to insert the code snippet only within the HTML of the frame containing the conversion page.

Secure and non-secure pages

The code snippet can be used safely on both secure (https://) and non-secure (http://) pages.

Track conversions on a mobile site with a phone number

If your mobile website displays a phone number, customers with mobile devices can click and call that number. You can track those calls in AdWords and assign a monetary value to them.

Tracking calls is a helpful feature if your company does a lot of business over the phone, or if you don't take orders through your website.

Example

You sell car insurance on your website. But many customers who search for "car insurance" want to talk to an insurance agent before they purchase. So, they visit your website on their mobile phone, see a phone number, and call. With conversion tracking, this call could be tracked and measured in AdWords. Without it, this important customer segment isn't counted.

Sound like it could be helpful to your business? Here's how you can set it up:

Step 1: Get the code snippet
  1. Sign in to your AdWords account at https://adwords.google.co.uk.
  2. Click the Tools tab, then select Conversions from the drop-down menu. Conversions
  3. Under the Conversions tab, click the +Conversion button.
  4. In the "Conversion name" field, enter the name of the conversion that you'd like to track on your mobile site. This will help you recognise this conversion later when it shows up in reports. For phone calls, you might want to list the number as a title, followed by "from mobile site". New conversion
  5. From the "Source" menu, select "Clicks on a number on your mobile website".
  6. Click the Save and continue button.
  7. In the "Conversion value" field, choose whether each conversion has the same value, varying values or if you'd prefer not to count a value.
  8. From the "Count" menu, choose whether to count either all or unique conversions. "All" is best for sales; "unique" is best for leads.
  9. From the "Conversion window" menu, choose how long after an ad click you want to track conversions for this conversion action. You can select a window as short as one week or as long as 90 days.
  10. From the "Conversion category" menu, select the category that best applies to your conversion.
  11. Choose from two advanced options or skip to the next step.
    View-through conversion tracking (Display Network campaigns only)

    A View-through Conversion happens when a customer views (but doesn't click) an image or rich media ad, then later completes a conversion on your site. This is different from a Click-through Conversion, which happens when a customer has previously clicked an ad (such as on the Google Search or the Google Display Network) and then completed a conversion on your site.

    If you'd like to track View-through conversions, too, just pick a time frame in the View-through conversion window field. If, for example, you pick a window of three days, your conversion count might include customers who see your rich media ad on Monday and complete a conversion on Wednesday. But it won't include customers who see your ad on Monday and complete a conversion on Friday.

    Advanced options

    Bear in mind: View-through conversions automatically exclude conversions from people who've also clicked your search ads.

    Conversions for optimisation

    Select this option if you'd like AdWords bid strategies (such as Target return on ad spend, Enhanced cost-per-click or Conversion Optimiser) to optimise for this conversion action. This means AdWords will take these conversions into account when setting bids.

    Example

    Let's say you set up conversion actions to track the number of times a product is placed in a shopping basket on your site and the number of completed online sales. You select the "Optimisation" tickbox only for online sales, not for shopping basket usage. Then you turn on the Target CPA flexible bid strategy for an ad group. AdWords will set bids to get you as many online sales as possible while meeting a target CPA for online sales, but will ignore shopping basket usage. You can track the performance of bid automation for online sales in the "Conv. opt." columns, because they're the conversions resulting from the "Optimisation" setting you've selected.

    If you're using manual bidding, no bid automation will occur, but you'll see data for the "Optimisation" conversion actions in the "Conv. opt" columns. Learn how to enable the columns.

  12. Click Save and continue.
  13. Select either "Someone else makes changes to the code" or "I make changes to the code", depending on which applies to you.
    • If you chose "Someone else makes changes to the code", just fill in the email form with the address of the person who maintains your mobile website code, then click Send email. The code will be sent to your website manager.
    • If you chose "I make changes to the code", a window will open up below with your code snippet. Congratulations! You've generated the code. Copy it and you'll be ready for the next step.
Step 2: Apply snippet using correct HTML and JavaScript code (examples below)

Now that you or the person in charge of your website has the snippet of code, you're ready to paste. Here's how you do this:

AdWords code snippet
  1. Go to the page on your website that shows the clickable phone number. Then open up the HTML code so that you can edit it.
  2. Find the body tags (<body></body>) of the page, then paste the code snippet that you generated in AdWords between those two tags.
  3. Now adjust the HTML code using a command called "onclick". The particular "onclick" command you use will depend on how the phone number on your mobile website is displayed: text link, image or button.

Here's some sample code close up:

Simple 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>
		

Use the following command if the phone number is shown as:

a text link:

	<body>
	<!-- Below is sample text link with a phone number. You need to replace the number with your own phone number and the CALL NOW text with the text you want to hyperlink. -->
	<a onclick="goog_report_conversion('tel:949-555-1234')" href="#" >CALL NOW</a>
	</body>
	</html>
			

an image:

	<!-- Below is sample image dialling a phone number. Replace my_phone_button.gif with your button image and the phone numbers with your phone number-->
	<body>
	<img src="my_phone_button.gif" alt="Call: 949-555-1234" width="32" height="32" onClick="goog_report_conversion('tel:949-555-1234')"/>
	</body>
</html>

a button:

	<body>
	<!-- Below is sample button with a phone number. Replace all call buttons in your page with the code below and replace the phone number with yours. -->
	<button onclick="goog_report_conversion('tel:949-555-1234')">Call 949-555-1234</button>
	</body>
</html>

For the tracking to work, you'll need to make sure that you include both the code snippet and the appropriate onclick tags from one of the examples above. This tells AdWords to record a conversion only when the customer clicks on a specific phone number. Without it, no conversion will be recorded.

Tip

If you want to track the same conversion page using two different AdWords accounts, just generate a code from each account and paste it into the HTML of your conversion page. Just bear in mind that the Google Site Stats box only shows for the first conversion code that you've created, not both.

Track calls from ads

If you use call extensions to allow customers to reach you by phone, you can enable conversion tracking when creating a new extension or by editing an existing one. This requires using Google forwarding numbers, which are available in the U.S., Australia, France, Germany, Spain, Sweden and the UK only.

Creating a new extension and enabling conversion tracking

  1. Sign in to AdWords at https://adwords.google.co.uk.
  2. Click the Ad extensions tab.
  3. At the campaign level or ad group level, click +Extension to create a new call extension.
  4. Click +New phone number.
  5. In the "Phone number" field, enter your business phone number.
  6. Select "A Google forwarding number and use call reporting".
  7. Select whether you'd like to show either "Both my website and the phone number" or "Just the phone number" with your ads.
  8. If you want this number to only be shown on mobile devices, select the box next to "Mobile".
  9. Click Advanced.
  10. Select the box next to "Count calls as phone call conversions".
  11. Select the conversion action that you'd like to link to this extension. If you haven't already created one, we'll create one with a default call length of 60 seconds once we record at least 1 conversion. See instructions for creating a new conversion action below.
  12. Click Save.

Enabling conversion tracking for an existing call extension

  1. Sign in to AdWords at https://adwords.google.co.uk.
  2. Click the Ad extensions tab, then choose "View: Call extensions" from the drop-down menu.
  3. At the campaign level or ad group level, click the name of the extension that you want to edit.
  4. Click the pencil icon.
  5. Select the box next to "Count calls as phone call conversions".
  6. Select the conversion action that you'd like to link to this extension. If you haven't already created one, we'll create one with a default call length of 60 seconds once we record at least 1 conversion. See instructions for creating a new conversion action below.
  7. Click Save.

Creating a new conversion action for calls from ads

  1. Sign in to AdWords at https://adwords.google.co.uk.
  2. Click the Tools tab and select Conversions from the drop-down menu.
  3. Under the Conversions tab, click the +Conversion button.
  4. In the “Conversion name” field, enter the name of the conversion that you’d like to track on your website. This will help you to recognise the action later when it shows up in conversion reports. An example might be "Flower phone orders" or "Booking calls".
  5. From the "Source" menu, select "Calls from ads using call extensions".
  6. Click the Save and continue button.
  7. In the "Conversion value" field, enter a conversion value, or choose if you'd prefer not to count a value.
  8. In the "Call length" field, enter the minimum call length that you want to track as a conversion.
  9. From the "Count" menu, choose whether to count either all or unique conversions. "All" is best for sales; "unique" is best for leads.
  10. From the "Conversion window" menu, choose how long after an ad click you want to track conversions for this conversion action. You can select a window as short as one week or as long as 90 days.
  11. From the "Conversion category" menu, select the category that best applies to your conversion.
  12. Next to "Optimisation", leave this box ticked if you want to let automated bid strategies (such as Target return on ad spend, Enhanced cost-per-click or Conversion Optimiser) optimise your bids for this conversion action.

    Example

    Let's say you set up conversion actions to track the number of times a product is placed in a shopping basket on your site and the number of completed online sales. You select the "Optimisation" tickbox only for online sales, not for shopping basket usage. Then you turn on the Target CPA flexible bid strategy for an ad group. AdWords will set bids to get you as many online sales as possible while meeting a target CPA for online sales, but will ignore shopping basket usage. You can track the performance of bid automation for online sales in the "Conv. opt." columns, because they're the conversions resulting from the "Optimisation" setting you've selected.

  13. Click Save and continue. This conversion action will now be available as an option when creating or editing call extensions.

Track calls from a website

You can use free Google forwarding numbers to track calls people make from your website after clicking your ad (available in the U.S., Australia, France, Germany, Spain, Sweden and the UK only). After setting up conversion tracking for calls from your website, we'll replace your business phone number on your site with a Google forwarding number for people who have clicked your ad. This number will not be the same every time someone views your site, but calls will still be tracked correctly even after the number displayed changes.

You'll need to put two code snippets on any page of your site with a phone number: a small snippet of HTML and JavaScript with the conversion tracking code, and a JavaScript snippet that you'll need to customise that replaces your phone number with a Google forwarding number. Before you can set this up, you'll need:

  • An AdWords account: Haven't got one yet? Sign up at https://adwords.google.co.uk.
  • A website: This is where you'll put the snippets of code.
  • Ability to edit website: You or the person who makes changes to your website will need to be able to edit the HTML code of your site.
  • JavaScript coding skills: Tracking calls on your website requires creating a customised JavaScript snippet that can have a number of different options suited to your website and needs. You or the person who makes changes to your site will need to be comfortable creating this snippet based on our guidelines below.
  • Call extensions: You'll need an active call extension for all campaigns driving traffic to pages where the Google forwarding number will be displayed.
  • If you've got these things, you're ready to set up conversion tracking for calls from your website. Here's how you do it:

    Step 1: Get the conversion tracking code snippet
    1. Sign in to your AdWords account at https://adwords.google.co.uk.
    2. Click the Tools tab and select Conversions from the drop-down menu.
    3. Under the "Conversions" tab, click the +Conversion button.
    4. In the “Conversion name” field, enter the name of the conversion that you’d like to track on your website. This will help you to recognise the action later when it shows up in conversion reports. An example might be "Flower phone orders" or "Booking calls".
    5. From the "Source" menu, select "Calls to a Google forwarding number on your website".
    6. Click the Save and continue button.
    7. In the "Conversion value" field, enter a conversion value, or choose if you'd prefer not to count a value.
    8. In the "Call length" field, enter the minimum call length that you want to track as a conversion.
    9. From the "Count" menu, choose whether to count either all or unique conversions. "All" is best for sales; "unique" is best for leads.
    10. From the "Conversion window" menu, choose how long after an ad click you want to track conversions for this conversion action. You can select a window as short as one week or as long as 90 days.
    11. From the "Conversion category" menu, select the category that best applies to your conversion.
    12. Next to "Optimisation", leave this box ticked if you want to let automated bid strategies (such as Target return on ad spend, Enhanced cost-per-click or Conversion Optimiser) optimise your bids for this conversion action.

      Example

      Let's say you set up conversion actions to track the number of times a product is placed in a shopping basket on your site and the number of completed online sales. You select the "Optimisation" tickbox only for online sales, not for shopping basket usage. Then you turn on the Target CPA flexible bid strategy for an ad group. AdWords will set bids to get you as many online sales as possible while meeting a target CPA for online sales, but will ignore shopping basket usage. You can track the performance of bid automation for online sales in the "Conv. opt." columns, because they're the conversions resulting from the "Optimisation" setting you've selected.

    13. Click Save and continue.
    14. Select either "Someone else makes changes to the code" or "I make changes to the code", depending on which applies to you.
      • If you chose "Someone else makes changes to the code", just fill in the email form that pops up and click Send email. The code snippet will be sent to the person who edits your website.
      • If you chose "I make changes to the code", a window will open up below with your code snippet. Congratulations! You've generated the code. Copy it and you'll be ready for the next step.
    Step 2: Generate a JavaScript code snippet to display a Google forwarding number

    Using a source code editor of your choice, generate a code snippet to 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

    Get a telephone number and replace 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 formatted forwarding number:

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

    Example

    Get a telephone number and send 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

    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>
    		
    		

    Step 3: Paste the code into your website's HTML

    You need to add 2 JavaScript code snippets on every page where you want to use a Google forwarding number: the tracking snippet that was generated in Step 1 above, and the snippet with the _googWcmGet function that you generated in Step 2.

    1. Open up the HTML for the page on which you want your phone number to be displayed.
    2. Between the head tags (<head></head>) of the page, paste the code snippet that you generated in Step 1 above.
    3. Within the body tags (<body></body>) of the page, add the second code snippet that you generated in Step 2 above. You’ll want to put the call to _googWcmGet() in the onload handler of the <body> tag (see examples in Step 2). If you put the _googWcmGet() call within a <script> tag, make sure that it’s placed after all the target elements.
    4. 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 that 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 an ad again.

Track downloads of iOS mobile applications

Currently, you're able to track only iOS app downloads driven by ads served within other apps on the Display Network, not those driven by ads served on mobile websites (such as Google Search or partner sites).

Follow the steps below to track downloads of an iOS application.

  1. Sign in to your AdWords account at https://adwords.google.co.uk.
  2. Click the Tools tab and select Conversions.
  3. Click the +Conversion button.
  4. Name your conversion, select "App download" and click Save and continue.
  5. Choose the "iOS" mobile platform and click Save and continue.
  6. Choose whether someone else makes changes to your code, you do it or you use an app analytics software to track downloads. Depending on your choice, you'll be given technical instructions.

See detailed technical instructions for either installing tracking code or setting up a server-to-server conversion feed in our conversion tracking for iOS guide.

Getting instant confirmation of iOS app downloads

If you enable instant confirmation of iOS app downloads, AdWords can also provide confirmation to your app analytics system about whether or not each new download was driven by AdWords ads.

Here are some benefits of this feature:

  • Label the app downloads that come from AdWords in your own analytics tool.
  • Understand the lifetime value ("LTV") of the app downloads you acquire from AdWords advertising.
  • Use this data to optimise your campaigns and improve your return-on-investment.

If you already have conversion tracking set up and you'd like to set up your analytics server to receive instant confirmation of iOS app downloads, you'll need to do the following:

  1. Make sure that your analytics system is configured to receive instant confirmation of iOS app downloads from AdWords. Speak to your analytics provider to confirm – they may want to take a look at our technical integration guide.
  2. Set up a Postback URL in your AdWords account. To do so, follow these steps:
    1. Click the Tools tab, then select Conversions.
    2. Click the name of your iOS app download conversion.
    3. Click Edit Settings.
    4. Click the + next to "Advanced options" and add the Postback URL in the field below "Post this conversion to my analytics". You should obtain this Postback URL from your analytics provider.
    5. Click Save.
  3. Set up your ads with destination or final URLs as normal. For example, if using a direct link to the App Store, your Destination or final URL might look like this:

    http://itunes.apple.com/us/app/line-up!-2/id476954712?mt=8

    If using a third-party click-tracking URL, your destination or tracking template could look like this:

    http://my-click-tracker.com/endpoint?action=click&publisher_id=2908558&channel_id=034908345

Using ValueTrack for advanced ROI analytics

If you use ValueTrack parameters in your landing page URLs or tracking templates, you can track ROI at an even more granular level.

For example, if your ads point here:

http://itunes.apple.com/us/app/line-up!-2/id476954712?mt=8&publisher_app={placement}&creative_id={creative}&mobile_device={devicemodel}

... you'll be able to track which ad creatives, publisher placements and mobile devices led to the highest-value downloads of your app. With app download feedback, Google provides the full details of the ad click that drove an app download to you instantly, at the time that the app is installed. Later, you can adjust your bids on those specific creatives, placements or mobile devices to acquire more high-value customers.

Track in-app conversions in iOS mobile applications

There may be actions within your mobile application that you want to track as conversions. Follow the instructions below to enable tracking of in-app conversions for your iOS mobile application.

  1. Sign in to your AdWords account at https://adwords.google.co.uk
  2. Click the Tools tab and select Conversions.
  3. Click the +Conversion button.
  4. Name your conversion, select "Mobile or tablet app" and click Save and continue.
  5. Choose the "iOS" mobile platform, select a conversion category other than "Download" and click Save and continue.
  6. Choose whether someone else makes changes to your code, you do it or you use an app analytics software to track conversions. Depending on your choice, you'll be given technical instructions.
Track downloads of Android mobile applications

Tracking app downloads from Google Play doesn't require adding a code snippet. It can be done with no changes to your app's code. Simply follow the steps below.

  1. Sign in to your AdWords account at https://adwords.google.co.uk
  2. Click the Tools tab and select Conversions.
  3. Click the +Conversion button.
  4. Name your conversion, select "Mobile or tablet app" and click Save and continue.
  5. Next to "Conversion value", enter the value of one download of your application, or select "Don't assign a value".
  6. Enter the package name.

    Tip

    You can find your package name by looking up your app in Google Play. It's the part of the base URL that identifies your application:

    https://play.google.com/store/apps/details?id=<package_name>

  7. (Optional) If you want to change whether or not automated bid strategies (such as Target return on ad spend, Enhanced cost-per-click or Conversion Optimiser) optimise your bids for this conversion action, click "Advanced options". If not, skip to the next step.

    Example

    Let's say you set up conversion actions to track the number of times a product is placed in a shopping basket on your site and the number of completed online sales. You select the "Optimisation" tickbox only for online sales, not for shopping basket usage. Then you turn on the Target CPA flexible bid strategy for an ad group. AdWords will set bids to get you as many online sales as possible while meeting a target CPA for online sales, but will ignore shopping basket usage. You can track the performance of bid automation for online sales in the "Conv. opt." columns, because they're the conversions resulting from the "Optimisation" setting you've selected.

    If you're using manual bidding, no bid automation will occur, but you'll see data for the "Optimisation" conversion actions in the "Conv. opt" columns. Learn how to enable the columns.
  8. Click Save and continue.
  9. On the next screen, click Done. Your app downloads conversion data will now start showing up with the rest of your conversion data within 48 hours.

Using third-party conversion tracking

If you're using a third-party conversion tracking method, we can still automatically count downloads as conversions if you enable auto-tagging in your account. Here's how you do this:

  1. In your AdWords account, open the settings menu and select Account settings from the drop-down menu.
  2. Under "Account preferences", in the "Tracking" section, look for an "Auto-tagging" setting. It will either say "Yes" or "No".
    • If it says "Yes", auto-tagging is already enabled and you can skip steps 3 and 4.
    • If it says "No", click Edit next to "Auto-tagging" and continue to step 3.
  3. Check the box next to "Destination URL Auto-tagging".
  4. Click Save changes.

After you enable auto-tagging, additional code called the "referrer" CGI parameter will be added to the end of your Destination URL. It contains more conversion tracking information, and should look like this, where www.exampletracker.com is replaced with the URL of your 3rd-party tracking provider:

	www.exampletracker.com/?referrer=gclid%3D123xyz
	

To track additional referrer values, or if there was a referrer value already in the Destination URL, the Google conversion tracking information can be appended to that referrer value using %26. The new or additional information will be added after the existing referrer, like this:

	play.google.com/store?id=abcd.com&referrer=gclid%3D123xyz
	

Before enabling your campaign, test the Destination URL with the added referrer parameter and make sure that it redirects to the correct Play Store URL.

Track in-app conversions in Android mobile applications

There may be actions within your mobile application that you want to track as conversions. Follow the instructions below to enable tracking of in-app conversions for your Android mobile application.

  1. Sign in to your AdWords account at https://adwords.google.co.uk
  2. Click the Tools tab and select Conversions.
  3. Click the +Conversion button.
  4. Name your conversion, select "Mobile or tablet app" and click Save and continue.
  5. Choose the "Android" mobile platform, select a conversion category other than "Download" and click Save and continue.
  6. Choose whether someone else makes changes to your code or you do it. Depending on your choice, you'll be given technical instructions. Once it's set up, your in-app conversion data will start showing up with the rest of your conversion data within 48 hours.
Track conversions across devices

Customers do their shopping on many devices. And they might prefer certain devices at different stages of their purchase – say, a mobile phone or tablet for research, and a desktop computer for the final purchase.

AdWords can estimate how many customers clicked your ad on one device, and then converted on another. This information can help you see the impact your ads have on your business, better target your customers, and improve your revenue.

Example

You sell gourmet baby food online. You see from your conversion reports that many of your customers do their baby food research on your website from their mobile phone during the day, and then purchase your food online from their desktop at night. In this case, you might want to bid higher so that your ads can appear on mobile devices during those daytime hours.

Cross-device conversion tracking is readily available in AdWords, if you've already set up conversion tracking. Just look at the Estimated Total Conversions column on the Campaigns tab of your AdWords account.