@internetarchive/ia-book-actions 1.4.1-alpha1 → 1.4.1-alpha2

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": "@internetarchive/ia-book-actions",
3
- "version": "1.4.1-alpha1",
3
+ "version": "1.4.1-alpha2",
4
4
  "description": "Bookreader actions for borrowable book",
5
5
  "author": "Internet Archive",
6
6
  "license": "AGPL-3.0-only",
@@ -14,6 +14,7 @@ export const analyticsActions = {
14
14
  browse: 'Borrow-1Hour',
15
15
  browseAgain: 'Borrow-Again',
16
16
  browseRenew: 'BookRenew',
17
+ browseReturn: 'BookReturn',
17
18
  borrow: 'Borrow-14Days',
18
19
  waitlistJoin: 'JoinWaitlist',
19
20
  waitlistLeave: 'LeaveWaitlist',
@@ -64,7 +64,8 @@ export default class ActionsHandler extends LitElement {
64
64
  this.loanAnanlytics?.sendEvent(
65
65
  analyticsCategories.browse,
66
66
  analyticsActions.browseRenew,
67
- analyticsLabel
67
+ analyticsLabel,
68
+ this.identifier
68
69
  );
69
70
  });
70
71
 
@@ -77,7 +78,8 @@ export default class ActionsHandler extends LitElement {
77
78
 
78
79
  this.loanAnanlytics?.sendEvent(
79
80
  analyticsCategories.browse,
80
- analyticsActions.browseAutoReturn,
81
+ analyticsActions.browseReturn,
82
+ analyticsLabels.browseAutoReturn,
81
83
  this.identifier
82
84
  );
83
85
  });
@@ -89,7 +91,8 @@ export default class ActionsHandler extends LitElement {
89
91
 
90
92
  this.loanAnanlytics?.sendEvent(
91
93
  analyticsCategories.browse,
92
- analyticsActions.browseManualReturn,
94
+ analyticsActions.browseReturn,
95
+ analyticsLabels.browseManualReturn,
93
96
  this.identifier
94
97
  );
95
98
  }
@@ -159,14 +159,16 @@ export default class LoanAnanlytics {
159
159
  * @memberof LoanAnanlytics
160
160
  */
161
161
  sendEvent(eventCategory, eventAction, label, extraParams) {
162
- // log(
163
- // 'eventCategory:-',
164
- // eventCategory,
165
- // '||\teventAction:-',
166
- // eventAction,
167
- // '||\tlabel:-',
168
- // label
169
- // );
162
+ log(
163
+ 'eventCategory:-',
164
+ eventCategory,
165
+ '||\teventAction:-',
166
+ eventAction,
167
+ '||\tlabel:-',
168
+ label,
169
+ '||\textraParams:-',
170
+ extraParams,
171
+ );
170
172
 
171
173
  window?.archive_analytics?.send_event_no_sampling(
172
174
  eventCategory,