@session-services/web-elements 0.1.14 → 0.1.17
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/README.md +17 -1
- package/dist/cjs/session-services-ticketing.cjs.entry.js +16686 -55
- package/dist/collection/components/session-services-ticketing/session-services-ticketing.js +23 -0
- package/dist/components/session-services-ticketing.js +16708 -77
- package/dist/esm/session-services-ticketing.entry.js +16707 -76
- package/dist/session-services-elements/p-448028d4.entry.js +1 -0
- package/dist/session-services-elements/session-services-elements.esm.js +1 -1
- package/dist/types/components/session-services-ticketing/session-services-ticketing.d.ts +1 -0
- package/package.json +3 -3
- package/dist/session-services-elements/p-e6aee881.entry.js +0 -1
|
@@ -92,6 +92,11 @@ export class SessionsTicketing {
|
|
|
92
92
|
...properties,
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
+
getLowestPrice() {
|
|
96
|
+
if (!this.event?.admissions.length)
|
|
97
|
+
return 0;
|
|
98
|
+
return Math.min(...this.event.admissions.map((adm) => (adm.price?.base || 0) + (adm.price?.booking || 0)));
|
|
99
|
+
}
|
|
95
100
|
async loadEventData() {
|
|
96
101
|
try {
|
|
97
102
|
this.loading = true;
|
|
@@ -103,8 +108,26 @@ export class SessionsTicketing {
|
|
|
103
108
|
client: this.client,
|
|
104
109
|
debug: this.debugAnalytics,
|
|
105
110
|
});
|
|
111
|
+
this.analytics.page("Ticketing Widget", {
|
|
112
|
+
event_id: this.eventId,
|
|
113
|
+
team_id: this.event.teamId,
|
|
114
|
+
promoter_id: this.event.promoterId,
|
|
115
|
+
event_name: this.event.name,
|
|
116
|
+
event_slug: this.event.slug,
|
|
117
|
+
});
|
|
106
118
|
}
|
|
107
119
|
if (this.event) {
|
|
120
|
+
this.trackEvent("Product Viewed", {
|
|
121
|
+
product_id: this.eventId,
|
|
122
|
+
sku: this.eventId,
|
|
123
|
+
name: this.event.name,
|
|
124
|
+
category: "Event",
|
|
125
|
+
value: this.getLowestPrice() / 100,
|
|
126
|
+
price: this.getLowestPrice() / 100,
|
|
127
|
+
event_date: this.event.entryStartsAt,
|
|
128
|
+
venue_name: this.event.location?.venue?.name || this.event.location?.name,
|
|
129
|
+
venue_city: this.event.location?.city,
|
|
130
|
+
});
|
|
108
131
|
this.trackEvent("Product List Viewed", {
|
|
109
132
|
list_id: this.eventId,
|
|
110
133
|
category: "Admissions",
|