Skip to content

Commit

Permalink
Allow script elements to use attribution (#447)
Browse files Browse the repository at this point in the history
Resolves #446

Co-authored-by: Andrew Paseltiner <apaseltiner@google.com>
  • Loading branch information
johnivdel and apasel422 authored May 27, 2022
1 parent e52300b commit f3966c6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions EVENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,16 @@ window.open(
```

`event` sources do not require any user interaction and can be registered via
`<img>` tags with the new `attributionsrc` attribute:
`<img>` or `<script>` tags with the new `attributionsrc` attribute:
```html
<img src="https://advertiser.example/pixel"
attributionsrc="https://adtech.example/attribution_source?my_ad_id=123">

<script src="https://advertiser.example/register-view"
attributionsrc="https://adtech.example/attribution_source?my_ad_id=123">
```
Specifying a URL value for `attributionsrc` within `<a>`, `<img>`, or
Specifying a URL value for `attributionsrc` within `<a>`, `<img>`, `<script>` or
`window.open` will cause the browser to initiate a separate `keepalive` fetch
request which includes the `Attribution-Reporting-Eligible` request header.
Expand Down

0 comments on commit f3966c6

Please sign in to comment.