PageSourceSearch

https://idopontfoglalas.nephrohome.hu/apps/appointment/js/ga4.js

js nephrohome.hu collected 2026-10-07 04:20:58 UTC 6,389 bytes, 264 lines download raw bytes

1class GA4 {
2	// Tagmanegerből behúzott analytics szintaktika szerint
3
4	constructor(TAG_IDS) {
5		window.dataLayer = window.dataLayer || [];
6		this.ids = [];
7	}
8
9	select_doctor_or_qualification(data, itemCategory, id = null) {
10		window.dataLayer.push({ 'event': 'cleanup', 'ecommerce': null });
11
12		const dataObject = {
13			'ecommerce': {
14				'items': [
15					{
16						'item_name': data.name,
17						'item_id': data.id.toString(),
18						'item_category': itemCategory,
19						'index': data.index,
20					},
21				],
22			},
23		};
24
25		this.dataLayerPush('select_item', dataObject, id);
26	}
27
28	view_specializations(data, id = null) {
29		window.dataLayer.push({ 'event': 'cleanup', 'ecommerce': null });
30
31		let index = 1;
32		const dataObject = {
33			'ecommerce': {
34				'currency': 'HUF',
35				'items': data.map((d) => ({
36					'item_name': d.name,
37					'item_id': d.id.toString(),
38					'item_category': d.qualification,
39					'custom_price': d.customPrice,
40					'index': index++,
41				})),
42			},
43		};
44
45		this.dataLayerPush('view_item_list', dataObject, id);
46	}
47
48	select_specialization(data, id = null) {
49		window.dataLayer.push({ 'event': 'cleanup', 'ecommerce': null });
50		const dataObject = {
51			'ecommerce': {
52				'currency': 'HUF',
53				'items': [
54					{
55						'item_name': data.name,
56						'item_id': data.id.toString(),
57						'item_category': data.qualification,
58						'custom_price': data.customPrice,
59						'index': data.index,
60					},
61				],
62			},
63		};
64
65		this.dataLayerPush('select_item', dataObject, id);
66	}
67
68	view_calendars(datas, id = null) {
69		window.dataLayer.push({ 'event': 'cleanup', 'ecommerce': null });
70		const dataObject = {
71			'ecommerce': {
72				'currency': 'HUF',
73				'items': datas.map((data) => {
74					const item = {
75						'item_name': data.specialization,
76						'item_id': data.id.toString(),
77						'item_category': data.qualification,
78						'item_category2': data.specialization,
79						'price': data.price + '.00',
80						'custom_price': data.customPrice,
81						'doctor_id': data.doctorId.toString(),
82						'doctor_name': data.doctorName,
83						'item_variant': data.doctorName,
84					};
85
86					if (data.customPrice) {
87						delete item.price;
88					}
89
90					return item;
91				}),
92			},
93		};
94
95		this.dataLayerPush('view_item', dataObject, id);
96	}
97
98	select_date(data, id = null) {
99		window.dataLayer.push({ 'event': 'cleanup', 'ecommerce': null });
100		const dataObject = {
101			'ecommerce': {
102				'currency': 'HUF',
103				'items': [
104					{
105						'item_name': data.specialization,
106						'item_id': data.specializationId.toString(),
107						'item_category': data.qualification,
108						'item_category2': data.specialization,
109						'price': data.price + '.00',
110						'custom_price': data.customPrice,
111						'doctor_id': data.doctorId.toString(),
112						'doctor_name': data.doctorName,
113						'item_variant': data.doctorName,
114						'location': data.institution,
115						'item_brand': data.institution,
116					},
117				],
118			},
119		};
120
121		if (data.customPrice) {
122			delete dataObject.ecommerce.items[0].price;
123		}
124
125		this.dataLayerPush('add_to_wishlist', dataObject, id);
126	}
127
128	confirm_button_click(data, id = null) {
129		window.dataLayer.push({ 'event': 'cleanup', 'ecommerce': null });
130
131		const dataObject = {
132			'ecommerce': {
133				'currency': 'HUF',
134				'items': [
135					{
136						'item_name': data.specialization,
137						'item_id': data.specializationId,
138						'item_category': data.qualification,
139						'item_category2': data.specialization,
140						'price': data.price + '.00',
141						'custom_price': data.customPrice,
142						'doctor_id': data.doctorId.toString(),
143						'doctor_name': data.doctorName,
144						'item_variant': data.doctorName,
145						'location': data.institution,
146						'item_brand': data.institution,
147					},
148				],
149			},
150		};
151
152		if (data.customPrice) {
153			delete dataObject.ecommerce.items[0].price;
154		}
155
156		this.dataLayerPush('add_to_cart', dataObject, id);
157	}
158
159	on_user_datas(data, id = null) {
160		window.dataLayer.push({ 'event': 'cleanup', 'ecommerce': null });
161
162		const dataObject = {
163			'is_registered': false,
164			'ecommerce': {
165				'currency': 'HUF',
166				'items': [
167					{
168						'item_name': data.specialization,
169						'item_id': data.specializationId,
170						'item_category': data.qualification,
171						'item_category2': data.specialization,
172						'price': data.price + '.00',
173						'custom_price': data.customPrice,
174						'doctor_id': data.doctorId.toString(),
175						'doctor_name': data.doctorName,
176						'item_variant': data.date,
177						'location': data.institution,
178					},
179				],
180			},
181		};
182
183		if (data.customPrice) {
184			delete dataObject.ecommerce.items[0].price;
185		}
186
187		this.dataLayerPush('begin_checkout', dataObject, id);
188	}
189
190	reservation_finish(data, id = null) {
191		window.dataLayer.push({ 'event': 'cleanup', 'ecommerce': null });
192
193		const dataObject = {
194			'ecommerce': {
195				'currency': 'HUF',
196				'value': data.price + '.00',
197				'tax': 0 + '.00',
198				'transaction_id': data.reservationId,
199				'coupon': '',
200				'items': [
201					{
202						'item_name': data.specialization,
203						'item_id': data.specializationId,
204						'item_category': data.qualification,
205						'item_category2': data.specialization,
206						'price': data.price + '.00',
207						'custom_price': data.customPrice,
208						'doctor_id': data.doctorId.toString(),
209						'doctor_name': data.doctorName,
210						'item_variant': data.doctorName,
211						'location': data.institution,
212						'item_brand': data.institution,
213						'customer_email': data.customerEmail,
214					},
215				],
216			},
217		};
218
219		if (data.customPrice) {
220			delete dataObject.ecommerce.items[0].price;
221		}
222
223		this.dataLayerPush('purchase', dataObject, id);
224	}
225
226	delete_reservation(data, id = null) {
227		window.dataLayer.push({ 'event': 'cleanup', 'ecommerce': null });
228
229		const dataObject = {
230			'ecommerce': {
231				'transaction_id': data.reservationId,
232			},
233		};
234
235		this.dataLayerPush('refund', dataObject, id);
236	}
237
238	dataLayerPush(event, dataObject, targetId = null) {
239		window.dataLayer.push({
240			event,
241			...dataObject,
242		});
243	}
244
245	// dataLayerPush(event, dataObject, targetId = null) {
246	// 	// Ha egy kifejezett tag-ra akarjuk küldeni az eseményt
247	// 	if (targetId) {
248	// 		window.dataLayer.push({
249	// 			event,
250	// 			...dataObject,
251	// 			send_to: targetId,
252	// 		});
253	// 	} else {
254	// 		// Az összes tag-re küldés
255	// 		for (let id of this.#ids) {
256	// 			window.dataLayer.push({
257	// 				event,
258	// 				...dataObject,
259	// 				send_to: id,
260	// 			});
261	// 		}
262	// 	}
263	// }
264}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.