Naast Google Analytics e-commerce tracking is het ook mogelijk om order waarde te meten in AdWords met de Google AdWords conversion tracking code (GACT) op een "bedankt-bestelling"-pagina. Hierna vindt u de instructie over hoe u dat kunt (laten) doen.
Voor het meten van de orderwaarden dient de variabel "value" in de AdWords conversion tracking code dynamisch te worden ingevuld. Elke order heeft een andere omzet, dus dat moet telkens opnieuw worden doorgegeven aan AdWords als er een bezoek aan de "bedankt-bestelling"-pagina is geweest.
Noot: onderstaande informatie is afkomstig uit het Google AdWords helpcentrum. Het zit daar echter zo verstopt dat we het hier herhalen.
Dynamically generated (thank-you) 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: <body> ... <!-- 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 (<%= totalValue %>) { var google_conversion_value = <%= totalValue %>; } </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=<%=
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 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> <title>Thank You for Shopping</title> </head>
<body> ... <!-- #include file=".../googleconversion.html" --> </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 --> <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 (<%= totalValue %>) { var google_conversion_value = <%= totalValue %>;
} </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=<%=
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 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> <head> <title>Thank You for Shopping</title> </head> <body> ... <jsp:include src=".../googleconversion.html"/> </body> </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> <title>Thank You for Shopping</title> </head> <body> ... #include file=".../googleconversion.html" </body>
|
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 --> <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 (<? echo $totalValue ?>) { var google_conversion_value = <? echo $totalValue ?>
} </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=<? echo
$totalValue ?>&label=Purchase&script=0"> </noscript> </body> |
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.