PageSourceSearch

https://mails.udeoghjemme.dk/tracking/track.js

js udeoghjemme.dk collected 2026-09-24 23:48:01 UTC 3,959 bytes, 106 lines download raw bytes

1/**
2 * trackedWindow and trackedDoc points to the customers page
3 * Since we try to load using "
4 */
5(function (trackedWindow, trackedDoc) {
6    function startTracking() {
7        var ownFrame = false;
8        if (trackedWindow.name == "ag:scrf") {
9            try {
10                // windows is actually
11                trackedWindow = trackedWindow.parent;
12                trackedDoc = trackedWindow.document;
13                ownFrame = true;
14            } catch (e) {
15                // crossdomain error or parent not preset but windows has "our" name -
16                // monitoring the logs for requests which has not interesting data such as
17                trackedWindow = window;
18                trackedDoc = window.document;
19            }
20        }
21        var sn = "",
22            hostName = "//unknown.agillic.eu",
23            baseParams = [],
24            pgSent = false, first = true,
25            ua = navigator.userAgent,
26            isSafari = ua && ua.indexOf("Safari/") >= 0 && ua.indexOf("Chrome/") < 0,
27            defaultParams = {v: 1, t: trackedDoc.title, u: trackedWindow.location, r: trackedDoc.referrer, edid: null},
28            // search 'document' as script is within the frame
29            scriptLoaderElem = document.getElementById('ag:trackscript.1');
30        if (scriptLoaderElem && scriptLoaderElem.src) {
31            hostName = scriptLoaderElem.src.replace(/[^:]*:?(\/\/[^\/]+)\/.*.js/, "$1");
32        }
33
34        function req(url, callback) {
35            if (isSafari) {
36                fetch(url, {method: 'POST', credentials: 'include'}).then(() => {
37                    if (callback) {
38                        callback.call(trackedWindow);
39                    }
40                });
41            } else {
42                var img = new Image();
43                if (!ownFrame) {
44                    img.style.display = "none"
45                }
46                if (callback) {
47                    img.onload = function () {
48                        callback.call(trackedWindow)
49                    };
50                }
51                img.src = url + "&ts=" + new Date().getTime();
52                // older browsers seems to kill off the request more eagerly if we dont add to the DOM
53                document.body.appendChild(img);
54            }
55        }
56
57        function genUrl(obj) {
58            sn = obj.cid || hostName;
59            var params = ["s=" + sn];
60            obj.u = obj.pageView || obj.url || obj.u;
61            for (var key in defaultParams) {
62                var val = obj[key] || defaultParams[key];
63                if (val) {
64                    params.push(key + "=" + encodeURIComponent(val));
65                }
66            }
67            if (pgSent && !obj.pageView) {
68                params.ex = 'y';
69            } else {
70                pgSent = true;
71            }
72            for (var key in (obj.data || {})) {
73                params.push("d." + encodeURIComponent(key) + "=" + encodeURIComponent(obj.data[key]));
74            }
75            for (var j = 0; obj.evt && j < obj.evt.length; j++) {
76                params.push("e." + encodeURIComponent(obj.evt[j]));
77            }
78            return (obj.trackurl || hostName) + "/tracking/track.gif?" + params.join("&")
79        }
80
81        function track(data) {
82            req(genUrl(data), data.after);
83        }
84
85        var globalName = "_agillicTrack";
86        var data = trackedWindow[globalName] || [];
87        (function chain() {
88
89            if (!data.pop || data.length == 0) {
90                // replace array with our object
91                trackedWindow[globalName] = {push: track};
92                return;
93            }
94            var pushData = data.shift(),
95                orgAfter = pushData.after;
96            pushData.after = function () {
97                orgAfter && orgAfter.call(trackedWindow);
98                chain();
99            };
100            track(pushData);
101        })();
102    };
103
104    startTracking()
105
106})(window, document);

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.