Skip to content

Commit 8aa052f

Browse files
committed
Add trackConsentWithdrawn method (close snowplow#624)
1 parent 3241605 commit 8aa052f

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

src/js/tracker.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2362,6 +2362,23 @@
23622362
});
23632363
},
23642364

2365+
/**
2366+
* Track a consent withdrawn action
2367+
*
2368+
* @param {boolean} all - Indicates user withdraws all consent regardless of context documents.
2369+
* @param {number} [id] - Number associated with document.
2370+
* @param {number} [version] - Document version number.
2371+
* @param {string} [name] - Document name.
2372+
* @param {string} [description] - Document description.
2373+
* @param {array} [context] - Context relating to the event.
2374+
* @param {number|Timestamp} [tstamp] - Number or Timestamp object.
2375+
*/
2376+
trackConsentWithdrawn: function (all, id, version, name, description, context, tstamp) {
2377+
trackCallback(function () {
2378+
core.trackConsentWithdrawn(all, id, version, name, description, addCommonContexts(context), tstamp);
2379+
});
2380+
},
2381+
23652382
/**
23662383
* Track a GA Enhanced Ecommerce Action with all stored
23672384
* Enhanced Ecommerce contexts

0 commit comments

Comments
 (0)