wingbot 3.61.4 → 3.61.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wingbot",
3
- "version": "3.61.4",
3
+ "version": "3.61.5",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -105,11 +105,19 @@ async function trackingEvent (req, res) {
105
105
  };
106
106
 
107
107
  try {
108
- await fetch(`https://www.google-analytics.com/mp/collect?api_secret=${encodeURIComponent(gaApiSecret)}&measurement_id=${encodeURIComponent(gaMeasurementId)}`, params);
108
+ res.typingOn();
109
+ const result = await fetch(`https://www.google-analytics.com/mp/collect?api_secret=${encodeURIComponent(gaApiSecret)}&measurement_id=${encodeURIComponent(gaMeasurementId)}`, params);
110
+
111
+ // eslint-disable-next-line no-console
112
+ console.log('GA RESPONSE', result.status, body);
113
+
109
114
  } catch (e) {
110
115
  // eslint-disable-next-line no-console
111
116
  console.error('GA FAILED', e, body);
112
117
  }
118
+ } else if (clientId) {
119
+ // eslint-disable-next-line no-console
120
+ console.error('GA MISSING', req.configuration);
113
121
  }
114
122
 
115
123
  res.trackEvent(type || 'report', c, a, l, v);