GDPR tracking
You can add an entity detailing the GDPR basis for processing to every event tracked. To configure this, provide a GdprConfiguration
object when setting up a new tracker.
The only required argument is the Basis
enum, which contains the six GDPR options. A document describing the legal basis for processing can also be provided (as a string), along with the document version and ID.
- iOS
- Android (Kotlin)
- Android (Java)
let gdprConfig = GDPRConfiguration(
basis: .consent, // basis for processing
documentId: "id", // document ID
documentVersion: "1.0", // document version
documentDescription: "Legal justification" // document
)
let networkConfig = NetworkConfiguration(
endpoint: "https://collector-url.com",
method: .post
)
Snowplow.createTracker(
namespace: "namespace",
network: networkConfig,
configurations: [gdprConfig]
)
val gdprConfiguration = GdprConfiguration(
Basis.CONSENT, // basis for processing
"someId", // document ID
"0.1.0", // document version
"Legal justification" // document
)
val networkConfiguration = NetworkConfiguration("https://collector-url.com")
createTracker(
applicationContext,
"namespace",
networkConfiguration,
gdprConfiguration
)
GdprConfiguration gdprConfiguration = new GdprConfiguration(
Basis.CONSENT, // basis for processing
"someId", // document ID
"0.1.0", // document version
"Legal justification" // document
);
NetworkConfiguration networkConfiguration = new NetworkConfiguration("https://collector-url.com");
Snowplow.createTracker(
getApplicationContext(),
"namespace",
networkConfiguration,
gdprConfiguration
);