Integrating Your Actions with CCPA
This page shows how you can integrate your actions based upon visitor's response to CCPA Notice.
Here are the examples showing how you can integrate your actions based upon visitor's response to CCPA Notice.
1) When CCPA doesn’t apply to a business
1
// check for user's optout
2
window.__uspapi("getUSPData", 1, function(consent, success) {
3
if (success && consent.uspString === '1---') {
4
// ccpa doesn’t apply
5
} else {
6
// error retrieving the uspString.
7
}
8
});
Copied!
2) When a user has opted out of selling the personal information
1
// check for user's optout
2
window.__uspapi("getUSPData", 1, function(consent, success) {
3
if (success && consent.uspString === "1YYY") {
4
// user has opted out
5
} else {
6
// error retrieving the uspString.
7
}
8
});
Copied!
3) User didn’t opt-out, business as usual
1
// check for user's optout
2
window.__uspapi("getUSPData", 1, function(consent, success) {
3
if (success && consent.uspString === "1YNY") {
4
// user has not opted out.
5
} else {
6
// error retrieving the uspString.
7
}
8
});
Copied!
Last modified 1yr ago
Copy link