-
Notifications
You must be signed in to change notification settings - Fork 0
4. Constants to use on the website
Your website has to detect the webview for analytics reasons or other ?
You need to disable analytics if user enables App Tracking Transparency ?
A simple way to do that, is to use our constants:
is_webview
wantsPrivacy
Those constants are injected when the webview is loading.
On your website, you can directly access them like any other variable:
console.log(is_webview, wantsPrivacy);
It's always set to true
if the website loads inside a webview.
Thanks to that, you can add a tag (or whatever) to your analytic system to differentiate users using the app and the website.
If the user enables ATT, this constant will be equal to true
otherwise, it's equal to false
.
With that, you can disable analytics and tracking on your website, to respect user’s privacy.
If you don't, Apple might not accept your app on the store
This project was created by Johann Buscail