Using SendBeacon for AdWords click tracking
Thursday, March 9, 2017
Accurate click accounting is a critical aspect of any campaign. However, traditionally it often came with a high cost to the user experience: the user has to follow one or more HTTP redirects, or is forced to wait for a synchronous logging request to complete before they can navigate to their destination. The Beacon API addresses these shortcomings:
AdWords recently switched from redirects to the Beacon API to account for some of the ad clicks on Google.com. This resulted in significant latency improvements. For example, for ad clicks pointing to Google Maps pages, the median latency dropped by 250ms and the 90th percentile latency dropped by more than 1,000ms.
You do not need to take any action at this time to benefit from SendBeacon. Chrome, Firefox and Edge all support SendBeacon, accounting for over 72% of worldwide traffic. We are planning to leverage Beacon API in more of our products in the future, and we encourage everyone else to take it out for a spin.
- Beacon requests are prioritized by the browser to minimize conflict with other time-critical operations, like reacting to user input.
- Beacon requests are guaranteed to be initiated before a page is unloaded and are allowed to run to completion without requiring blocking requests or other techniques that block processing of user input.
AdWords recently switched from redirects to the Beacon API to account for some of the ad clicks on Google.com. This resulted in significant latency improvements. For example, for ad clicks pointing to Google Maps pages, the median latency dropped by 250ms and the 90th percentile latency dropped by more than 1,000ms.
You do not need to take any action at this time to benefit from SendBeacon. Chrome, Firefox and Edge all support SendBeacon, accounting for over 72% of worldwide traffic. We are planning to leverage Beacon API in more of our products in the future, and we encourage everyone else to take it out for a spin.