@mparticle/web-google-analytics-4-client-kit 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -136,13 +136,15 @@ Common.prototype.standardizeParameters = function (parameters) {
136
136
  };
137
137
 
138
138
  Common.prototype.standardizeName = function (name) {
139
- try {
140
- name = window.GoogleAnalytics4Kit.setCustomNameStandardization(name);
141
- } catch (e) {
142
- console.error(
143
- '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/',
144
- e
145
- );
139
+ if (window.GoogleAnalytics4Kit.hasOwnProperty('setCustomNameStandardization')) {
140
+ try {
141
+ name = window.GoogleAnalytics4Kit.setCustomNameStandardization(name);
142
+ } catch (e) {
143
+ console.warn(
144
+ '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/',
145
+ e
146
+ );
147
+ }
146
148
  }
147
149
 
148
150
  // names of events and parameters have the following requirements:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mparticle/web-google-analytics-4-client-kit",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "author": "mParticle Developers <developers@mparticle.com> (https://www.mparticle.com)",
5
5
  "description": "mParticle integration sdk for Google Analytics",
6
6
  "main": "dist/GoogleAnalytics4EventForwarderClientSide-Kit.common.js",