Conversion tracking involves placing a cookie on a user's computer when he or she clicks on an ad. Then, if the user clicks on your ad and reaches one of your conversion pages, the user's browser sends the cookie to a Google server, and a small conversion tracking image is displayed on your site. When such a match is made, Google records a successful conversion for you. This information is presented within the "Campaigns," "Conversion Tracking," or "Report Center" sections in your AdWords account.
Please click on the steps below to get started with AdWords Conversion Tracking.
1) Overview
Implementing conversion tracking is simple: place a few lines of code, referred to in this guide as a code snippet, on to your website. As a prerequisite, you or someone in your organization must have a working knowledge of HTML or web tools in order to successfully place the conversion tracking code snippet. You'll also need to have access to your website's code and the Google AdWords account that corresponds to the site.
This guide takes you through the code snippet insertion instructions. We recommend that you completely review these setup instructions prior to starting the installation. Additionally, this guide offers specific snippet insertion instructions for static and dynamically generated sites.
Once you have successfully installed your code snippet, you can access your conversion tracking reports from the Campaignsstrong> page, Conversions page and the Report Center at least one hour after the first conversion from your AdWords account. You will even be able to see conversion reports down to the keyword level.
AdWords Conversion Tracking allows great flexibility in setting up your tracking preferences. You'll be able to start tracking aggregate data immediately with the initial code snippet we provide.
Note: If you believe that you do not have the requisite knowledge to successfully implement our conversion tracking procedures, refer this guide to your webmaster or web developer, as the modification of the code snippet may result in malfunction of the snippet (including data loss or inaccurate data collection). Remember that site owners are solely responsible for the performance and maintenance of their website code.
If you have any questions about the setup of conversion tracking not covered in this guide, please visit our Help Center.
When the code snippet is placed on the conversion page of your website, statistics on users who click on a Google AdWords ad and complete a conversion (purchase, sign-up, page view, or lead) can be collected and viewed in your reports.
The Google code snippet will be provided when you sign up from the Conversions page located under the Reporting tab in your AdWords account. This code snippet can successfully track conversions when placed on the conversion page(s) of your site.
|
Purchase Conversion Default: Sample code snippet only - DO NOT USE <!-- Google Code for Purchase Conversion Page --> |
|
Advanced Option |
Requirements
The only requirements for installing conversion tracking on your website are as follows:
- AdWords ads that are approved and running
- Placement of the Google code snippet on the conversion page
There are no specific system requirements for your customers. For AdWords Conversion Tracking to properly track conversions from clicks on your ad, customers must be able to download images and enable the "cookies" feature in their browsers. Although this is the default setting for most web browsers, users who don't accept the conversion tracking cookies won't be included in your conversion statistics.
3) Inserting the code snippet on to your website
To properly track a conversion, you should place the code snippet on your conversion page(s), as
in Figure 1 below.
Figure 1: Copy-and-paste the code snippet
Placing the code snippet into your website code will not affect your site unless a click on your AdWords ad leads to a conversion. If you opted in to place the Site Stats text on your conversion page, you should see the text block appear. While it is possible to opt out of this feature, you may want to consider telling users that you are using AdWords' free conversion tracking feature (e.g. through your privacy policy) in order to maintain their trust and privacy.
The code snippet should be placed between the <body> tags, closer to the </body> tag so that the image appears further down the page. You should NOT place the code in the header or footer of your page. This could overstate your conversion statistics and defeat the purpose of tracking.
|
Examples - Do NOT Use |
|
Simple HTML document with conversion tracking 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 language="JavaScript" type="text/javascript"> <!-- 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 (1) { var google_conversion_value = 1 } </script> <script language="JavaScript" src="http://www.googleadservices.com/pagead/conversion.js"> </script> <noscript> <img height=1 width=1 border=0 src="http://www.googleadservices.com/pagead/conversion/1234567890/?value=1.0&label=Pur chase&script=0"> </noscript> </body> </html> |
4) Different scenarios for inserting the code snippet
Your website(s) may use more than one technology to create and manage webpages.
Conversion tracking will perform equally well on either a static or dynamically generated
conversion page, provided the snippet is displayed in a page the user sees after a conversion.
Dynamically generated pages
The Google code snippet should be inserted into a static portion of the page. This may be done using an include statement if your web server offers server-side includes or by simply inserting
the code snippet within the <body> section of the page.
This setup guide provides examples for the following web programming languages:
· Active Server Pages (ASP)
· Sun® Java Server Pages (JSP)
· PHP: Hypertext Preprocessor (PHP)
I. Conversion tracking & Active Server Pages (ASP)
Follow these instructions to insert the conversion tracking code to a website created using
dynamically generated Active Server Pages (ASP).
To add conversion tracking code to ASP pages using your ASP editor, complete the following tasks:
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 %>
Choose the Purchase/Sale conversion type while going through the conversion tracking setup. Insert the full string (<%= totalValue %>) into the "Revenue for your action" field and click OK when you see a prompt about using an unrecognized value. Copy and save the resulting code snippet.
3. Insert the conversion tracking code onto 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).
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 the code snippet is added so it appears within the body section of the page.
|
Example: |
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 webserver - we recommend using the filename googleconversion.asp.
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 it appears within the body section of the page.
|
Example: <head> <body> |
Note: Be 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 a user visits any page on your site.
The #include statement will be evaluated before the rest of the of the ASP pages so you are able to use an ASP expression as the dynamic value of the conversion.
4. Save your conversion confirmation file and upload to your webserver if necessary. If you would like to test the placement of your conversion tracking code, go to your conversion page by completing a conversion on your site. View the source of the page (in Internet Explorer choose View > View Source). You should see the conversion tracking code between the <body> and </body> tags on your page. Note that the ASP expression will be replaced by the actual conversion value when you view the source.
II. Conversion tracking & Java Server Pages (JSP)
Follow these instructions to insert the conversion tracking code into a website created using
dynamically generated Java Server Pages (JSP).
To add conversion tracking code to JSP pages using your JSP editor, complete the following tasks:
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}
Choose the Purchase/Sale conversion type while going through the conversion tracking setup. Insert the full string (<%= totalValue %>) into the "Revenue for your action" field and click Save Changes & Get Code to generate the final tracking code. Click 'OK' when you're prompted about using an unrecognized value. Copy and save the resulting code snippet .
3. Insert the conversion tracking code snippet onto the conversion confirmation page. Make sure that the code appears within a static HTML section, not contained within an JSP code section (delineated by <%@ and %> markers).
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, be sure you add the code snippet so within the body section of the page.
|
Example: <!-- Google Code for Purchase Conversion Page --> |
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 webserver - 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.
|
Example: <html> |
Note: Be sure you do not 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 a user visits any page on your site.
The jsp:include statement will be evaluated before the rest of the of the JSP pages so you are 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 webserver - 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.
|
Example: <head> |
Note: Be sure 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 a
user visits any page on your site.
The #include statement will be evaluated before the rest of the of the JSP pages so you are able to use a JSP expression as the dynamic value of the conversion.
4. Save your conversion confirmation file and upload to your webserver if necessary. If you would like to test the placement of your conversion tracking code, go to your conversion page by completing a conversion on your site. View the source of the page (in Internet Explorer choose View > View Source). You should see the conversion tracking code between the <body> and </body> tags on your page. Note that the JSP expression will be replaced by the actual conversion value when you view the source.
III. Conversion tracking & Hypertext Preprocessor (PHP)
Follow these instructions to insert the conversion tracking code to a website created using dynamically-generated PHP: Hypertext Preprocessor (PHP) pages.
To add conversion tracking code to PHP pages using your web page editor, complete the following tasks:
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 ?>
Choose the Purchase/Sale conversion type while going through the conversion tracking setup. Insert the full string (<? echo $totalValue ?>) into the "Revenue for your action" field and click Save Changes & Get Code to generate the final tracking code. Click 'OK' when you're prompted about using an unrecognized value. Copy and save the resulting code snippet .
3. Insert the conversion tracking code onto the conversion confirmation page. Make sure that the code appears within a static HTML section, not contained within an PHP code section (delineated by <? and ?> markers).
Insert the conversion tracking code snippet 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 so that it appears within the <body> section of the page.
|
Example: <!-- Google Code for Purchase Conversion Page --> |
4. Save your conversion confirmation file and upload to your web server if necessary. If you would like to test the placement of your conversion tracking code, go to your conversion page by completing a conversion on your site. View the source of the page (in Internet Explorer choose View > View Source). You should see the conversion tracking code between the <body> and </body> tags on your page. Note that 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 is recommended 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 (security level is https://) and non-secure
pages (security level is http://). You will be asked to select the security level of your pages when
signing up, to ensure the code snippet uses the correct protocol (https:// or http://) on your conversion pages.
How to confirm AdWords Conversion Tracking code snippet
You can verify if the code is working by waiting for a conversion to occur or completing a test
conversion yourself. If you know that a conversion has occurred on your site from an AdWords
ad, check the conversion column in your reports to see that the conversion registered. Please note that updates to your account reports take up to 24 hours.
You can also run through the process yourself by searching on Google, clicking on one of your ads and completing a conversion on your site.
Note: We recommend that you wait for a conversion to occur, though, because this method costs you an ad click.
If you opted in to place the Site Stats text block on your conversion page, you should see the text appear. While it is possible to opt out of this feature, you may want to consider telling users that you are using AdWords' free conversion tracking feature (e.g. through your privacy policy) in order to maintain their trust and privacy.
HTML editors
Please follow the basic instructions and apply them to the editors you use.
5) Additional tracking options
Tracking options
When using conversion tracking, you can categorize different actions by applying labels when you define an action.
Learn more about the different tracking categories available for AdWords Conversion Tracking.
Google Analytics and AdWords Conversion Tracking
AdWords advertisers can link their accounts to Google Analytics. With over 80 reports, your free Google Analytics account will track visitors through your site, and will keep track of the performance of your marketing campaigns. The Google Analytics Tracking Code will not interfere with the AdWords Conversion Tracking code if you use them simultaneously on your site.
To begin learning about Google Analytics, read our Google Analytics Getting Started Guide.
To sign up for Google Analytics, please visit our homepage at http://www.google.com/analytics/.
