Skip to content

Commit

Permalink
fix:send default and update consent paylaods on kit init
Browse files Browse the repository at this point in the history
  • Loading branch information
mmustafa-tse committed Oct 8, 2024
1 parent 3c691a0 commit 5a8346f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/GA4Client/src/initialization.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ var initialization = {
common.consentMappings
);

// If a default consent payload exists (as selected in the mParticle UI), set it as the default
if (!common.isEmpty(defaultConsentPayload)) {
// If a default consent payload exists (as selected in the mParticle UI), set it as the default
common.sendDefaultConsentPayloadToGoogle(defaultConsentPayload);
// If a default consent payload does not exist, but the user currently has updated their consent,
// send that as the default because a default must be sent
} else if (!common.isEmpty(updatedDefaultConsentPayload)) {
// If a default consent payload does not exist, but the user currently has updated their consent,
// send that as the default because a default must be sent
common.sendDefaultConsentPayloadToGoogle(
updatedDefaultConsentPayload
);
Expand Down

0 comments on commit 5a8346f

Please sign in to comment.