PageSourceSearch

https://cdn.logitravel.pt/resources/javascript/common/helpers/tagmanager.js

js logitravel.pt collected 2026-09-26 13:11:34 UTC 4,160 bytes, 118 lines download raw bytes

1var toolfactory = toolfactory || {};
2toolfactory.common = toolfactory.common || {};
3toolfactory.common.helpers = toolfactory.common.helpers || {};
4
5//Declare a class, with parameteres
6toolfactory.common.helpers.tagmanagerEvents = {
7    budgetInteration: "budgetInteraction",
8    click2callInteraction: "c2cInteraction",
9    clickInteraction: "clickInteraction"
10};
11toolfactory.common.helpers.tagmanagerStatus = {
12    openForm: "openForm",
13    send: "send"
14};
15toolfactory.common.helpers.tagmanager =
16(function () {
17    var events = toolfactory.common.helpers.tagmanagerEvents;
18    var status = toolfactory.common.helpers.tagmanagerStatus;
19
20    return {
21        pushObject: function (object) {
22            window.dataLayer.push(object);
23        },
24        pushEvent: function (str1, str2, str3, str4, num1, obj1) {
25
26            var str1 = str1 || undefined;
27            var str2 = str2 || undefined;
28            var str3 = str3 || undefined;
29            var str4 = str4 || undefined;
30            var num1 = num1 || undefined;
31            var obj1 = obj1 || undefined;
32
33            var var1 = str1;
34            if ((str1 != 'formValidation') && (str1 != 'waitingProcess') && (str1 != 'fluxeInterruption') && (str1 != 'customEvent') && (str1 != 'budgetInteraction') && (str1 != 'c2cInteraction') && (str1 != 'clickInteraction')) {
35                var1 = 'customEvent';
36            }
37
38            var eventObject = { 'event': var1 };
39            if (str2 !== undefined) {
40                eventObject.str2 = str2;
41            }
42            else{
43                eventObject.str2 = undefined;
44            }
45
46            if (str3 !== undefined) {
47                eventObject.str3 = str3;
48            }
49            else{
50                eventObject.str3 = undefined;
51            }
52
53            if (str4 !== undefined) {
54                eventObject.str4 = str4;
55            }
56            else{
57                eventObject.str4 = undefined;
58            }
59
60            if (num1 !== undefined) {
61                if (!isNaN(parseFloat(num1)) && isFinite(num1)) {
62                    eventObject.num1 = num1;
63                }
64                else{
65                    eventObject.num1 = undefined;
66                }
67            }
68            else{
69                eventObject.num1 = undefined;
70            }
71
72            if (obj1 !== undefined) {
73                eventObject.obj1 = obj1;
74            }
75            else{
76                eventObject.obj1 = undefined;
77            }
78
79            if (eventObject !== undefined) {
80                this.pushObject(eventObject);
81            }
82        },
83        pushEventOld: function (event, status) {
84            if (status !== undefined) {
85                toolfactory.common.helpers.tagmanager.pushObject({
86                    'event': event,
87                    'status': status
88                });
89            }
90            else {
91                toolfactory.common.helpers.tagmanager.pushObject({
92                    'event': event
93                });
94            }
95        },
96        openFormEvent: function () {
97            toolfactory.common.helpers.tagmanager.pushEventOld(events.budgetInteration, status.openForm);
98        },
99        sendBudgetEvent: function () {
100            toolfactory.common.helpers.tagmanager.pushEventOld(events.budgetInteration, status.send);
101        },
102        openClick2Call: function () {
103            toolfactory.common.helpers.tagmanager.pushEventOld(events.click2callInteraction, status.openForm);
104        },
105        sendClick2Call: function () {
106            toolfactory.common.helpers.tagmanager.pushEventOld(events.click2callInteraction, status.send);
107        },
108        clickEv: function () {
109            var $doc = $(document);
110            $doc.on('click', function () {
111                var dl = window.toolfactoryDataLayer;
112                dl.Page.EventType = 'click';
113                toolfactory.common.helpers.tagmanager.pushObject(dl);
114                toolfactory.common.helpers.tagmanager.pushEventOld(events.clickInteraction);
115            });
116        }
117    };
118})();

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.