Product Benefits Pricing Guides Docs About Contact us Try it out
Analytics tools

WKWebView Global Privacy Control Tracking

WKWebView Global Privacy Control tracking: measure how the iOS 27 GPC setting changes web content in your app and keep analytics honest.

· 3 min read

If your iOS app shows web pages, those pages talk to ad and analytics scripts you may not control. Until now, your app had no built-in way to tell them the user wants their data left alone. Without tracking how that choice is used, you cannot show it works, and you will not notice when it quietly changes your numbers.

On 18 November 2026, the WebKit team documented a new API for iOS 27 that lets apps built on WKWebView, or SwiftUI’s WebPage, send the Global Privacy Control (GPC) signal. It is off by default. Nothing changes unless your app adds its own setting and switches it on.

Why This Matters

When enabled, the web view sends a Sec-GPC: 1 header and exposes navigator.globalPrivacyControl to the page, its frames and its subresources. That means third-party scripts on those pages receive the signal too, not just yours. Some vendors will then stop selling or sharing data, which can shift attribution and ad reporting inside web screens. The setting applies per navigation, so a change mid-session only takes effect on the next top-level page load.

Data Points to Track

Log a gpc_setting_changed event and add these properties to your web view screen events:

  • gpc_enabled: true or false for the current navigation
  • gpc_setting_source: user toggle, default or privacy centre
  • gpc_setting_changed_at: timestamp of the last change
  • webview_url_host: the domain being loaded (no paths or query strings)
  • webview_engine: WKWebView or SwiftUI WebPage
  • os_version: iOS version, since the API needs version 27
  • page_load_success: true or false
  • third_party_request_count: requests to other domains during the page load
  • conversion_in_webview: true if a purchase or sign-up finished on the page

Setup Steps

  1. Decide whether your app will offer a GPC setting. Check with your privacy lead, as the API does nothing by default.
  2. Add a clear toggle in your settings screen and store the choice.
  3. In the navigation policy delegate, set globalPrivacyControlEnabled on the preferences object for WKWebView. For SwiftUI’s WebPage, set isGlobalPrivacyControlEnabled.
  4. Fire gpc_setting_changed whenever the user flips the toggle.
  5. Attach gpc_enabled to every web view screen view and conversion event.
  6. Check your analytics vendor’s documentation on how it treats the signal for your own SDK, and record the answer.
  7. Test on an iOS 27 device and confirm the header with a proxy tool.

Actionable Insights

Adoption. Compare the share of users with gpc_enabled true against the total. A very low number may mean the toggle is hard to find.

Conversion gaps. If conversion_in_webview drops for GPC users, an ad or checkout script may be failing without the signal’s data. Fix the flow, not the setting.

Attribution shifts. Expect fewer matched ad events for opted-out users. Report them as a separate segment so the change is not mistaken for a campaign problem.

Load issues. If page_load_success is lower when GPC is on, a third-party script may be breaking. Test it.

Reach. Remember GPC is aimed at selling and sharing data, not necessarily your own first-party analytics. Keep consent decisions and GPC records separate in your reporting.