This article explains the steps advertisers need to take to implement Ad Manager activity tags on their websites. Note: The Conversion Tracking SDK for apps has been deprecated.
Choose the webpage where you'll implement each activity tag.
Keep in mind that activity tags track visits to webpages. To make sure that the counted conversions are relevant, place each activity tag on the webpage where a visit represents the completed action you want to track. For example, if you're tracking purchases, put the activity tag on the purchase confirmation page. If you're tracking shopping cart visits, put the tag on the shopping cart page.
Modify the activity tags as necessary.
If you're dynamically inserting key-values into an activity tag, such as an order number or a session ID, make sure to make any necessary changes to the tag to enable that process. It's up to you, as the advertiser, to implement any dynamic key-value insertions.
For example, the advertiser receives a Transaction (Sales) tag in the following format:<img src="https://pubads.g.doubleclick.net/ activity; xsp=9659 ;qty=[quantity of items purchased]; cost=[revenue]; ord=[order id]?" width=1 height=1 border=0/>
It's up to the advertiser to replace
[quantity of items purchased],
[order id]with code snippets that will enable values to be inserted dynamically when the webpage is loaded.
Also, make sure that the HTTP call matches the security setting of the webpage where it's implemented (
http://for standard pages,
https://for secure pages).
Place the activity tag near the top of the webpage.
We recommend that you place the tag as close to the
<body>tag as possible to ensure that a conversion is counted even if the web user closes the browser tab or otherwise stops the page from loading fully.