Skip to content

Commit 8ecb0c3

Browse files
authored
chore(artifacts): Updating the group name of the published artifact. (#16)
* chore(artifacts): Updating the group name of the published artifact. * docs(README): Add getting started section. * docs(README): Clean up sample code
1 parent 75be102 commit 8ecb0c3

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,39 @@
33
This plugin provides the framework to integration Consent Management Platform (CMP) SDKs like OneTrust to supply consent status and potential block events going to device mode destinations.
44

55

6+
## Getting Started
7+
8+
Add the consent denpendency (which has recently changed):
9+
10+
```kotlin
11+
implementation("com.segment.analytics.kotlin:consent:<version>")
12+
```
13+
14+
Then add the ConsentManager Plugin to your analytics:
15+
16+
```kotlin
17+
import sovran.kotlin.SynchronousStore
18+
import com.segment.analytics.kotlin.consent.ConsentManager
19+
20+
// ...
21+
22+
// Create the category Provider for your CMP
23+
val consentCategoryProvider = MyCmpConsentCategoryProvider(myCmpInstance)
24+
val store = SynchronousStore()
25+
26+
val consentPlugin = ConsentManager(store, consentCategoryProvider)
27+
28+
analytics.add(consentPlugin)
29+
30+
// Call this to start event flow.
31+
// NOTE: You might want to wait until CMP is ready before you call start()
32+
// so that events are held until the CMP is ready to provide the
33+
// current consent status.
34+
consentPlugin.start()
35+
```
36+
37+
38+
639
## Background
740

841
Consent Management is the management of a user’s consent preferences related to privacy. You might be familiar with the Privacy Pop-ups that have become mandated recently that ask the user if he or she consents to the use of certain category of cookies:

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ android.enableJetifier=true
2121
kotlin.code.style=official
2222

2323
# Deployment variables
24-
GROUP=com.segment.analytics.kotlin.destinations
24+
GROUP=com.segment.analytics.kotlin
2525

2626
VERSION_CODE=131
2727
VERSION_NAME=1.3.1

0 commit comments

Comments
 (0)