<!--
{
  "availability" : [
    "iOS: 14.5.0 -",
    "iPadOS: 14.5.0 -",
    "macCatalyst: 14.5.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIEventAttributionView",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIEventAttributionView"
  },
  "title" : "UIEventAttributionView"
}
-->

# UIEventAttributionView

An overlay view that verifies user interaction for Web AdAttributionKit.

```
@MainActor class UIEventAttributionView
```

## Overview

Web AdAttributionKit (formerly known as Private Click Measurement, or PCM) is a proposed web standard that allows external websites to measure when external links, such as ads, result in a *conversion*. The external website decides what constitutes a conversion, but it’s often the result of the user making a purchase or signing up for a service. Web AdAttributionKit doesn’t send any user-identifiable information to the remote server, so it protects user privacy, while providing websites the ability to measure the effectiveness of their ad campaigns.

Apps running in iOS 17.4 or later can use <doc://com.apple.documentation/documentation/AdAttributionKit> to record click-through impressions on custom rendered ad content using a `UIEventAttributionView`. For more information about click-through in AdAttributionKit, see <doc://com.apple.documentation/documentation/AdAttributionKit/presenting-ads-in-your-app>.

Apps running in iOS 14.5 or later can take advantage of Web AdAttributionKit by sending event attribution data to the browser when opening an external link. If the linked website reports a conversion within 7 days, the browser forwards your appʼs Web AdAttributionKit data to a specified remote server sometime between 24 and 48 hours after the reported conversion.

You can’t subclass [`UIEventAttributionView`](/documentation/UIKit/UIEventAttributionView).

For more information on the proposed Web AdAttributionKit web standard, see [Introducing Private Click Measurement](https://webkit.org/blog/11529/introducing-private-click-measurement-pcm/) and [Private Click Measurement Draft Community Group Report](https://privacycg.github.io/private-click-measurement/).

### Verify user interaction

Event attribution views overlay other UIKit controls to ensure that either handling a tap with `AdAttributionKit` or opening an external link with Web AdAttributionKit data only happens as the result of a user tap. The system doesn’t handle the tap or send event attribution data to the browser unless a `UIEventAttributionView` exists above the tapped control.

### Create an event attribution view

Place an event attribution view above any view that launches external links with event attribution data and make sure there are no other overlapping views above the event attribution view that might intercept taps. [`UIEventAttributionView`](/documentation/UIKit/UIEventAttributionView) doesn’t consume tap events, so the behavior of any control below one in the view hierarchy isn’t affected.

If multiple views or controls in your app can launch an external link using Web AdAttributionKit, use a separate [`UIEventAttributionView`](/documentation/UIKit/UIEventAttributionView) to overlay each control. While you can use a single [`UIEventAttributionView`](/documentation/UIKit/UIEventAttributionView) to validate more than one control, attribution views that cover large portions of the screen may impact performance because the system must validate all user interactions that pass through the attribution view.

Here’s how to add an event attribution view to an in-app advertisement:

```swift
// Create an event attribution view.
let eventAttributionView = UIEventAttributionView()

// Place it over the ad view.
eventAttributionView.translatesAutoresizingMaskIntoConstraints = false
adView.addSubview(eventAttributionView)
NSLayoutConstraint.activate([
    adView.topAnchor.constraint(equalTo: eventAttributionView.topAnchor),
    adView.leadingAnchor.constraint(equalTo: eventAttributionView.leadingAnchor),
    adView.trailingAnchor.constraint(equalTo: eventAttributionView.trailingAnchor),
    adView.bottomAnchor.constraint(equalTo: eventAttributionView.bottomAnchor)
])
```

For more information on sending Web AdAttributionKit event attribution data to the browser when opening an external link, see [`UIEventAttribution`](/documentation/UIKit/UIEventAttribution).

> Note:
> Web AdAttributionKit isn’t supported in Mac apps built with Mac Catalyst.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)