Demo: Attribution Reporting API

Demo version: v-2022-04-29

Ask questions / Share feedback 👋

Is there a feature you'd like to see added to this demo? Do you have any question, request, or an issue running the demo?
We want to hear from you. Open an issue on our dev support repo and select the type Attribution Reporting (or ask your question on the developer mailing list).

See the code

Code for this demo. You can reuse and customize it.

Set up your browser

⚠️ Make sure to follow these steps.

Browser requirements

Setup (may require browser restart)

Run the demo

In this demo an advertiser uses an adtech provider to run their ads on a publisher sites. Follow the flow below to see how the API generates event-level and aggregatable reports:

  1. First visit the publisher site and view and/or click an ad on that site.
      Because this ad is configured with special attribution parameters, a source event is registered. You'll see that either anchor elements or JavaScript calls can be used to generate a source event.
  2. Second, either follow the link for a clickable ad or visit the advertiser site directly (direct visits will *not* trigger a conversion)
  3. Third, interact with the product on the advertiser site by visiting the product page, adding the product to your cart, or making a purchase...
      While interacting with the product, the adtech endpoint will be informed. It decides that your actions are conversions, and hence will trigger attributions, with variable trigger data values, for your engagements on the advertiser's site.
      After attributions have been triggered, attribution reports are generated and stored in local storage in your browser (on your device).
  4. Finally, open chrome://attribution-internals to inspect the reports that have been generated.
      The reports are configured to be sent to the adtech provider setup in Step 1