PageSourceSearch

https://www.loadcare.de/custom/plugins/DIScoGA4S5/Resources/js/ga4/actions/view-item.action.js

js loadcare.de collected 2026-10-10 01:21:09 UTC 770 bytes, 30 lines download raw bytes

1import ga4ControllerAction from "../ga4-action.js";
2import DatalayerHelper from "../helpers/datalayer.helper.js";
3
4export default class viewItemAction extends ga4ControllerAction {
5
6    trigger() {
7        let self = this;
8
9        self._triggerViewItem();
10
11        $.subscribe('plugin/swAjaxVariant/onRequestData', () => self._triggerViewItem());
12    }
13
14    _triggerViewItem() {
15        if (!this.actionEnabled) {
16            return;
17        }
18
19        let productForm = document.querySelector('.buybox--form');
20        if (!productForm) {
21            return;
22        }
23        let productId = productForm.querySelector('input[name=sAdd]').value;
24        if (!productId) {
25            return;
26        }
27
28        DatalayerHelper.viewItemFromHeader(productId,1);
29    }
30}

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.