You will need to edit the source of the page on which you currently display a PayPal Shopping Cart Button.
- While viewing the HTML code of this page, find the block of text that begins with and ends with.
- This block of text will include the line:
- Immediately before the, insert this line:
Recording a conversion value with PayPal
Note: The following instructions assume that you have a working knowledge of CGI and generating a dynamic webpage, and you selected the advanced conversion tracking option at http://adwords.google.com.
PayPal automatically sends certain information, like the amount of a purchase, to the "Successful purchase" URL (your conversion confirmation page that you specified to PayPal). This information is sent in the form of a CGI POST. To successfully gather information from the CGI POST from PayPal, and incorporate it into Google’s conversion reporting, your "Successful purchase" URL needs to be a dynamic webpage.
To use PayPal information to track the value of your conversions:
- Log into your AdWords account. From the Campaign Summary page, select the "Conversion Tracking" link.
- From Step 1 of the conversion tracking setup process, select the Purchase/Sale conversion type. In Step 2, select the Advanced Option link. Type in totalValue into the "Value" field and press Refresh. Save this code into a separate file.
- Create code for dynamically generating your conversion confirmation page that does the following:
- Extracts the amount parameter from the CGI POST provided by PayPal.
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).
You may use one of the following programs to edit your site’s ASP pages:
To add conversion tracking code to ASP pages using your ASP editor, complete the following tasks:
- Microsoft® Visual Studio
- Macromedia® Drumbeat 2000
- 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.
- If your site has a variable conversion value, determine the ASP expression which calculates that value.
Choose the Purchase/Sale conversion type while going through the conversion tracking setup. Insert the full string into the "Value" field and press Refresh to generate the final tracking code. Copy and save this code snippet.
- 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. Insert the conversion tracking code directly into the body of the conversion confirmation page. Search for the close body tag and place the code immediately above it. If the close 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.
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 snippet, save it to a file on your webserver – we recommend using the filename googleconversion.asp. Search for the close body tag and place the #include statement with the location of the file directly above it. If the close 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.
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.
- 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. You should see the conversion tracking code between the open body tag and close body tags on your page. Note that the ASP expression will be replaced by the actual conversion value when you view the source.