enable and disable iOS App tracking for 3rd party like Dynatrace using App Tracking Transparency - Stack Overflow

admin2025-04-18  3

I have integrated Dynatrace for tracking user session in my React Native app. And have added ATT so when I deny tracking form ATT pop-up, Dynatrace is still tracking the session details, all mobile action and username. How can I solve this? I want when I allow ATT dynatrace should capture and when deny it should not.

 let privacyConfig = new UserPrivacyOptions(DataCollectionLevel.Off, true);
    requestTrackingPermission()
      .then((trackingStatus) => {
        if (trackingStatus === "authorized") {
          console.log("Access granted");
        } else {
          console.log("Access revoke");
          Dynatrace.applyUserPrivacyOptions(privacyConfig);
        }
      })
      .catch((error) => {
        console.error("Tracking Permission Error", error);
      });

I have added this additional code but its not working as in ATT pop-up u allow or deny its taking Access revoke only.

转载请注明原文地址:http://anycun.com/QandA/1744922522a89529.html