PageSourceSearch

https://data.gov.hk/assets/client/js/matomo-analytics.js?v=1

js data.gov.hk collected 2026-10-02 02:23:32 UTC 2,539 bytes, 74 lines download raw bytes

1var ids = {
2    datagovhk: "6",
3    tt: "4",
4    dev: "3"
5}
6domain = document.domain;
7switch(domain){
8    case "data.gov.hk":
9        analytics_id = ids["datagovhk"];
10        break;
11    case "tt.data.gov.hk":
12        analytics_id = ids["tt"];
13        break;
14    default:
15        analytics_id = ids["dev"];
16}
17 
18 
19var _hmt = _hmt || [];
20 
21var _paq = window._paq = window._paq || [];
22_paq.push(['trackPageView']);
23_paq.push(['enableLinkTracking']);
24 
25function trackTabInteraction(event) {
26    const tabLink = event.target.closest('.nav-tabs__link');
27    if (!tabLink) return;
28    const targetUrl = tabLink.href || window.location.href;
29    _paq.push(['setCustomUrl', targetUrl]);
30    _paq.push(['trackPageView']);
31    }
32document.addEventListener('DOMContentLoaded', function() {
33    const tabSelector = '.nav-tabs__link, .nav-tabs__link button, .nav-tabs__link div';
34    document.querySelectorAll(tabSelector).forEach(function(element) {
35        const tabLink = element.closest('.nav-tabs__link');
36        if (tabLink && !tabLink.hasAttribute("data-matomo-bound")) {
37            element.addEventListener("click", trackTabInteraction);
38            tabLink.setAttribute("data-matomo-bound", "true");
39        }
40    });
41    try {
42        new MutationObserver(function(mutations) {
43            mutations.forEach(function(mutation) {
44                mutation.addedNodes.forEach(function(node) {
45                    if (node.nodeType === Node.ELEMENT_NODE) {
46                        const tabs = node.querySelectorAll ? node.querySelectorAll(tabSelector) : [];
47                        tabs.forEach(function(element) {
48                            const tabLink = element.closest('.nav-tabs__link');
49                            if (tabLink && !tabLink.hasAttribute("data-matomo-bound")) {
50                                element.addEventListener("click", trackTabInteraction);
51                                tabLink.setAttribute("data-matomo-bound", "true");
52                            }
53                        });
54                    }
55                });
56            });
57        }).observe(document.body, { 
58            subtree: true, 
59            childList: true
60        });
61    } catch (e) {
62 
63    }
64});
65 
66(function() {
67    var u = "//atics.data.gov.hk/matomo/";
68    _paq.push(['setTrackerUrl', u + 'matomo.php']);
69    _paq.push(['setSiteId', analytics_id]);
70    var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
71    g.async = true;
72    g.src = u + 'matomo.js';
73    s.parentNode.insertBefore(g, s);
74})();

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.