Application tracking privacy

Configure the Dana application

This API have to be called when the application start.

To do so, you have to modify the method beforeInitializeof your application to call the tracking API.

import $TrackingService from "@TrackingService";
export default $Application.declare("app", {
  properties: /** @lends app.prototype */ {
    name: "app",
    trackingService: {
      class: $TrackingService
    }
  },
  methods: {
    beforeInitialize: function () {
      const promise = $Application.prototype.beforeInitialize.apply(this, arguments);

      return this.trackingService.requestTrackingAuthorization().then(promise);
    }
  }
});

This way, the application tracking privacy flow will be called when the application starts.

Some tips

Note

To get the value set by the user, use getTrackingAuthorizationStatus method.

Note

This service is specific for Apple application and is only implemented on TVOS.

As it has to be called in the application, default implementation returns a resolved promise to be cross device compatible.