@internetarchive/ia-book-actions 0.0.19-3 → 0.0.19-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": "@internetarchive/ia-book-actions",
3
- "version": "0.0.19-3",
3
+ "version": "0.0.19-5",
4
4
  "description": "Bookreader actions for borrowable book",
5
5
  "author": "Internet Archive",
6
6
  "license": "AGPL-3.0-only",
@@ -22,8 +22,6 @@ export default class ActionsHandler extends LitElement {
22
22
  }
23
23
 
24
24
  sendEvent(eventCategory, eventAction) {
25
- // eslint-disable-next-line no-console
26
- console?.log('Book action: ', { eventCategory, eventAction });
27
25
  window?.archive_analytics?.send_event_no_sampling(
28
26
  eventCategory,
29
27
  eventAction,
@@ -419,8 +419,6 @@ export default class GetLendingActions {
419
419
  lendingActions = this.restrictedAction();
420
420
  }
421
421
 
422
- // debugging console
423
- console.log(lendingActions.primaryTitle);
424
422
  return lendingActions;
425
423
  }
426
424
  }
@@ -60,8 +60,6 @@ export class LoanTokenPoller {
60
60
  }
61
61
 
62
62
  sendEvent(eventCategory, eventAction) {
63
- // eslint-disable-next-line no-console
64
- console?.log('Book action: ', { eventCategory, eventAction });
65
63
  window?.archive_analytics?.send_event_no_sampling(
66
64
  eventCategory,
67
65
  eventAction,
@@ -77,6 +75,8 @@ export class LoanTokenPoller {
77
75
  error: data => {
78
76
  this.disconnectedInterval(); // stop token fetch api
79
77
  this.errorCallback({ detail: { action, data } });
78
+ // send LendingServiceError to GA
79
+ this.sendEvent('LendingServiceLoanError', action);
80
80
  },
81
81
  success: () => {
82
82
  if (isInitial) this.successCallback();