Skip to content

Commit

Permalink
remove cmpuishown event for tcf2 logic (#5642)
Browse files Browse the repository at this point in the history
* remove cmpuishown event for tcf2 logic

* store consent on "cmpuishown" event

* reverted last consnetManagement cmpuishown commit

* combine if statements

* fix typo

Co-authored-by: Eric Harper <eharper@rubiconproject.com>
  • Loading branch information
jsnellbaker and Eric Harper authored Sep 1, 2020
1 parent d90642d commit c8a6010
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions modules/consentManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,7 @@ function lookupIabConsent(cmpSuccess, cmpError, hookConfig) {
function v2CmpResponseCallback(tcfData, success) {
utils.logInfo('Received a response from CMP', tcfData);
if (success) {
if (tcfData.gdprApplies === false) {
cmpSuccess(tcfData, hookConfig);
} else if (tcfData.eventStatus === 'tcloaded' || tcfData.eventStatus === 'useractioncomplete') {
cmpSuccess(tcfData, hookConfig);
} else if (tcfData.eventStatus === 'cmpuishown' && tcfData.tcString && tcfData.purposeOneTreatment === true) {
if (tcfData.gdprApplies === false || tcfData.eventStatus === 'tcloaded' || tcfData.eventStatus === 'useractioncomplete') {
cmpSuccess(tcfData, hookConfig);
}
} else {
Expand Down

0 comments on commit c8a6010

Please sign in to comment.