diff --git a/packages/GA4Client/src/common.js b/packages/GA4Client/src/common.js index a532ee4..bf8ff43 100644 --- a/packages/GA4Client/src/common.js +++ b/packages/GA4Client/src/common.js @@ -136,7 +136,7 @@ Common.prototype.standardizeName = function (name) { name = window.GoogleAnalytics4Kit.setCustomNameStandardization(name); } catch (e) { console.error( - 'Error calling setCustomNameStandardization callback. Check your callback. Data will still be sent without user-defined standardization', + 'Error calling setCustomNameStandardization callback. Check your callback. Data will still be sent without user-defined standardization. See our docs for proper use - https://docs.mparticle.com/integrations/google-analytics-4/event/', e ); } diff --git a/packages/GA4Client/src/initialization.js b/packages/GA4Client/src/initialization.js index a957a97..0b764e8 100644 --- a/packages/GA4Client/src/initialization.js +++ b/packages/GA4Client/src/initialization.js @@ -23,11 +23,11 @@ var initialization = { ) { mParticle._setIntegrationDelay(this.moduleId, true); - // Due to current limitations, the API for allowing a customer to cleanse - // their data before our cleansing occurs must be placed on the - // window.GoogleAnalytics4Kit object. This exists when initializing MP - // SDK via snippet, but not via npm. If a customer uses npm, using the API - // requires window.GoogleAnalytics4Kit to exist on the page. + // The API to allow a customer to provide the cleansing callback + // relies on window.GoogleAnalytics4Kit to exist. When MP is initialized + // via the snippet, the kit code adds it to the window automatically. + // However, when initialized via npm, it does not exist, and so we have + // to set it manually here. window.GoogleAnalytics4Kit = window.GoogleAnalytics4Kit || {}; common.forwarderSettings = forwarderSettings;