Skip to content

Commit c0ccc15

Browse files
author
Nicholas Case
committed
add 'cmpStarted' event notification per Rakuten ask
1 parent 959dfbd commit c0ccc15

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib/cmp.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export default class Cmp {
4444

4545
if (testingMode !== 'normal') {
4646
if (testingMode === 'always show') {
47+
self.notify('cmpStarted');
4748
cmp('showConsentTool', callback);
4849
} else {
4950
log.debug('Toolbox can be rendered only manually');
@@ -52,6 +53,7 @@ export default class Cmp {
5253
} else if (config.gdprAppliesGlobally || self.gdprApplies) {
5354
self.gdprApplies = true;
5455
if (shouldBePrompted) {
56+
self.notify('cmpStarted');
5557
cmp('showConsentTool', callback);
5658
} else {
5759
self.notify('consentNotRequired');
@@ -63,6 +65,7 @@ export default class Cmp {
6365
self.gdprAppliesLanguage = response.language;
6466
self.gdprAppliesLocation = response.location;
6567
if (response.applies && shouldBePrompted) {
68+
self.notify('cmpStarted');
6669
cmp('showConsentTool', callback);
6770
} else {
6871
self.notify('consentNotRequired');

0 commit comments

Comments
 (0)