PageSourceSearch

https://www.strato.fr/faq/assets/js/optimization.js?v=88a3adb7820c42298b1eb2ed939f243c

js strato.fr collected 2026-10-04 09:13:52 UTC 7,271 bytes, 187 lines download raw bytes

1var tracking = (function () {
2    "use strict";
3
4    function queryAll(selector, ctx = document) {
5        return ctx.querySelectorAll(selector);
6    }
7
8    var template_vars = window.template_vars;
9
10    var priv = {},
11        api = {},
12        _paq = _paq || [],
13        dataLayer = [{
14            'ver': '0.1',
15            'language': template_vars.language,
16        }];
17
18    priv = {
19        piwik: function () {
20            let domain_regex = /^(.+)\/faq/g;
21            let domain = domain_regex.exec(document.URL);
22
23            let path_regex = /faq\/(.+)$/g;
24            let path = path_regex.exec(document.URL);
25            let part = path && path[1] ? path[1] : "";
26            let custom_url = domain[1] + "/faq/" + template_vars.language + "/" + part;
27
28            _paq = window._paq = window._paq || [];
29            _paq.push(['setCustomUrl', custom_url ]);
30            _paq.push([ 'trackPageView' ]);
31            _paq.push([ 'setDocumentTitle', document.title ]);
32            _paq.push([ 'enableLinkTracking' ]);
33            _paq.push(['setTrackerUrl', template_vars.piwik_host_php]);
34            _paq.push(["setSiteId", template_vars.piwik_site_id]);
35
36            if ( location.protocol === 'https:' ) {
37                _paq.push([ 'setSecureCookie', true ]);
38            }
39
40            (function() {
41                var d = document, g = d.createElement("script"), s = d.getElementsByTagName("script")[0];
42                    g.async = true;
43                    g.src = template_vars.piwik_host_js;
44                    s.parentNode.insertBefore(g, s);
45            })();
46
47            document.querySelectorAll('.piwik_eventtracker_click').forEach(function (element) {
48                element.addEventListener("click", function(){
49                    let param = ['trackEvent', element.dataset.piwikCategory, element.dataset.piwikAction ];
50                    if( element.dataset.piwikName ) {
51                        param.push( element.dataset.piwikName );
52                        if( element.dataset.piwikValue ) {
53                            param.push( element.dataset.piwikValue );
54                        }
55                    }
56                    _paq.push( param );
57                });
58            });
59
60            document.querySelectorAll('.piwik_eventtracker_seen').forEach(function (element) {
61                let param = ['trackEvent', element.dataset.piwikCategory, element.dataset.piwikAction ];
62                if( element.dataset.piwikName ) {
63                    param.push( element.dataset.piwikName );
64                    if( element.dataset.piwikValue ) {
65                        param.push( element.dataset.piwikValue );
66                    }
67                }
68                _paq.push( param );
69            });
70        },
71
72        google_analytics: function () {
73            window.ga = window.ga || function () {
74                (ga.q = ga.q || []).push(arguments)
75            };
76
77            ga.l = +new Date;
78
79            ga('create', template_vars.google_analytics_ua, template_vars.google_analytics_domain);
80            ga('set', 'contentGroup2', template_vars.google_analytics_group);
81            ga('set', 'anonymizeIp', true);
82            ga('send', 'pageview');
83
84            var analytic_script = document.createElement( "script" );
85            analytic_script.src = "https://www.google-analytics.com/analytics.js";
86
87            var div = document.getElementById( "analytic_div" );
88            div.appendChild( analytic_script );
89        },
90
91        google_gtm: function (user_data) {
92            if (template_vars.if_google_tag_manager != "1") {
93                return
94            }
95
96            dataLayer.push({
97                'version': '0.1.2',
98                '1': user_data["1"],
99                '2': user_data["2"],
100                '3': user_data["3"]
101            });
102
103            (function (w, d, s, l, i) {
104                w[l] = w[l] || [];
105                w[l].push({
106                    'gtm.start': new Date().getTime(),
107                    event: 'gtm.js'
108                });
109                var f = d.getElementsByTagName(s)[0],
110                    j = d.createElement(s),
111                    dl = l != 'dataLayer' ? '&l=' + l : '';
112                j.async = true;
113                j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
114                f.parentNode.insertBefore(j, f);
115            })(window, document, 'script', 'dataLayer', template_vars.google_tag_manager);
116        },
117
118        jentis: function ( user_data ) {
119            let sCDN          = window.template_vars.jentis_trackdomain;
120            let sCDNProject   = window.template_vars.jentis_trackid;
121            let sCDNWorkspace = window.template_vars.jentis_system;
122            let sCDNVers      = "_";
123            let sFileHash     = window.template_vars.jentis_filehash;
124
125            if (
126                window.localStorage !== null &&
127                    typeof window.localStorage === "object" &&
128                    typeof window.localStorage.getItem === "function" &&
129                    window.sessionStorage !== null &&
130                    typeof window.sessionStorage === "object" &&
131                    typeof window.sessionStorage.getItem === "function"
132            ) {
133                sCDNVers =
134                    window.sessionStorage.getItem( "jts_preview_version" ) ||
135                    window.localStorage.getItem( "jts_preview_version" ) ||
136                    sCDNVers;
137            }
138            window.jentis = window.jentis || {};
139            window.jentis.config = window.jentis.config || {};
140            window.jentis.config.frontend = window.jentis.config.frontend || {};
141            window.jentis.config.frontend.cdnhost = sCDN + "/get/" + sCDNWorkspace + "/web/" + sCDNVers + "/";
142            window.jentis.config.frontend.vers = sCDNVers;
143            window.jentis.config.frontend.env = sCDNWorkspace;
144            window.jentis.config.frontend.project = sCDNProject;
145            window._jts = window._jts || [];
146            var f = document.getElementsByTagName( "script" )[ 0 ];
147            var j = document.createElement( "script" );
148            j.async = true;
149            j.src = window.jentis.config.frontend.cdnhost + sFileHash;
150            f.parentNode.insertBefore( j, f );
151            var market = window.template_vars.country.toLowerCase();
152            if ( market === 'us' ) {
153                market = 'gb';
154            }
155            var logged_in = window.template_vars.logged_in;
156
157            _jts.push( {
158                track: "pageview",
159                applicationName: "faq",
160                productArea: "FAQ",
161                countryMarket: market,
162                hashedCustomerId: user_data[ '1' ],
163                loginStatus: logged_in,
164                isInternalIp: user_data[ '2' ],
165            } );
166            _jts.push( { track: "submit" } );
167        }
168    };
169
170    api = {
171        init: function () {},
172        piwik: function () {
173            priv.piwik();
174        },
175        google_analytics: function () {
176            priv.google_analytics();
177        },
178        google_gtm: function (user_data) {
179            priv.google_gtm(user_data);
180        },
181        jentis: function (user_data) {
182            priv.jentis(user_data);
183        }
184    };
185
186    return api;
187}());

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.