diff --git a/packages/GA4Client/src/initialization.js b/packages/GA4Client/src/initialization.js index 79a4139..141a39f 100644 --- a/packages/GA4Client/src/initialization.js +++ b/packages/GA4Client/src/initialization.js @@ -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 );