Skip to content

Commit

Permalink
added CCPA transition to USNat section to README
Browse files Browse the repository at this point in the history
  • Loading branch information
andresilveirah authored Dec 11, 2023
1 parent c829bae commit 3549cb8
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,11 @@ The `SpConsentManager` initializer contains your organization's account and prop

```swift
lazy var consentManager: SPConsentManager = { SPConsentManager(
accountId: 1584,
propertyId: 12345,
propertyName: try! SPPropertyName("example.demo"),
accountId: 22,
propertyId: 34152,
propertyName: try! SPPropertyName("usnat.mobile.demo"),
campaigns: SPCampaigns(
gdpr: SPCampaign()
gdpr: SPCampaign(),
usnat: SPCampaign()
),
delegate: self
Expand Down Expand Up @@ -444,6 +444,25 @@ SPCampaign *myCampaign = [[SPCampaign alloc]
];
```

## Transfering CCPA consents over USNat

When transitioning from CCPA to USNat campaign, the SDK will automatically detect CCPA consent data and have that transferred over to USNat. In other words, if your user, opted-out from CCPA consent, that user will continue to be opted-out on USNat. Same goes for opted-in.

If you ever used authenticated consent for CCPA, you'll have to set the flag `transitionCCPAAuth` manually when configuring the campaigns to be loaded by the SDK. Example:

```swift
var consentManager = SPConsentManager(
accountId: accId,
propertyId: propId,
propertyName: try! SPPropertyName(propName),
campaigns: SPCampaigns(usnat: SPCampaign(transitionCCPAAuth: true)), // <== here
delegate: self
)
```

This way, the SDK will look for authenticated consent within CCPA profiles and carry that over to USNat, even if the user current doesn't have CCPA local data (on a fresh install, for example)


## Configuring the Message/Consents timeout

Before calling `.loadMessage` or `.loadPrivacyManager`, set the `.messageTimeoutInSeconds` attribute to a time interval that makes most sense for your own application. By default, we set it to 30 seconds.
Expand Down

1 comment on commit 3549cb8

@tom-win87
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjustments to transferring opt-in/opt-out preferences:

Transfer opt-in/opt out preferences from U.S. Privacy (Legacy) to U.S. Multi-State Privacy

When migrating a property from the U.S. Privacy (Legacy) campaign to U.S. Multi-State Privacy campaign, the SDK will automatically detect previously set end-user opt-in/opt-out preferences for U.S. Privacy (Legacy) and have that transferred over to U.S. Multi-State Privacy.

In other words, if your end-user, opted-out from categories for U.S. Privacy (Legacy), that user will continue to be opted-out on U.S. Multi-State Privacy. Same goes for opted-in.

If you ever used authenticated consent for CCPA, you'll have to set the flag transitionCCPAAuth manually when configuring the campaigns to be loaded by the SDK. This way, the SDK will look for authenticated consent within CCPA profiles and carry that over to USNat, even if the user current doesn't have CCPA local data (on a fresh install, for example). Example:

var consentManager = SPConsentManager(
    accountId: accId,
    propertyId: propId,
    propertyName: try! SPPropertyName(propName),
    campaigns: SPCampaigns(usnat: SPCampaign(transitionCCPAAuth: true)), // <== here
    delegate: self
)

Please sign in to comment.