@everymatrix/player-active-bonuses 1.0.2 → 1.0.4

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": "@everymatrix/player-active-bonuses",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "main": "dist/player-active-bonuses",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -134,6 +134,15 @@
134
134
  type: 'success',
135
135
  message: $_('activeBonuses.successMessage')
136
136
  }}, window.location.href);
137
+
138
+ //Analytics event
139
+ if(typeof gtag == 'function'){
140
+ gtag('event', 'ClaimBonus', {
141
+ 'context': 'PlayerActiveBonuses',
142
+ 'userId' : `${playerid ? playerid : 'Not logged in'}`,
143
+ 'bonusCode': `${bonusCode}`
144
+ });
145
+ }
137
146
  } else {
138
147
  invalidBonusCode = true;
139
148
  window.postMessage({ type: 'WidgetNotification', data: {