PageSourceSearch

https://members.cccsaa.org/GZContent/WebAnalytics/micronet-tracking.js

js cccsaa.org collected 2026-10-01 02:20:39 UTC 2,850 bytes, 96 lines download raw bytes

1let sourceKeys = ['src', 'leadsource', 'leadsrc', 'utm_source', 'utm_src'];
2
3//get visitor id from the webvisitor cookie.
4let tracking_visitorId,referer,src;
5referer = document.referrer;
6src = tryGetSource();
7
8try {
9    let visitor_tracking_cookie_values = getCookie('mmpui').split('=');
10    tracking_visitorId = visitor_tracking_cookie_values[1].split('&xid')[0];
11} catch (err) {
12
13    //We don't have a visitor cookie 
14    console.error(err);
15}
16
17//Need to get base url because a external template will override the Base url to it's URL
18let tracking_baseUrl = window.location.origin;
19
20const trackPageView = (eventToken) => {
21
22    fetch(
23        `${tracking_baseUrl}/api/analytics/logPageView`,
24        {
25            method: 'POST',
26            body: JSON.stringify({
27                EventToken: eventToken,
28                VisitorId: tracking_visitorId,
29                Referer: referer,
30                Src: src
31            }),
32            headers: {
33                'Content-Type': 'application/json; charset=UTF-8'
34            }
35        }
36    )
37
38}
39
40function trackClickouts(clickoutToken) {
41
42    MMP.jQuery(function ($) {
43
44        //gz-details-website or gz-details-social => version 2
45        //mn-website => version 1
46        //gz-card-website => version 2 card/serach/Find
47        //mn-listing-website => version 1 card/Search/Find
48
49        $(".gz-details-website, .gz-details-social, .mn-website, .mn-listing-website, .gz-card-website").delegate('a', 'click', function (event) {
50            let url = this.href;
51
52            //log clickout
53            fetch(`${tracking_baseUrl}/api/analytics/logClickout`,
54                {
55                    method: 'POST',
56                    body: JSON.stringify({
57                        ClickOutToken: clickoutToken ? clickoutToken : this.getAttribute("_clt"),
58                        VisitorId: tracking_visitorId,
59                        ClickedUrl: url
60                    }),
61                    headers: {
62                        'Content-Type': 'application/json; charset=UTF-8'
63                    }
64                })
65
66        });
67    });
68
69
70}
71
72function getCookie(cname) {
73    var name = cname + "=";
74    var decodedCookie = decodeURIComponent(document.cookie);
75    var ca = decodedCookie.split(';');
76    for (var i = 0; i < ca.length; i++) {
77        var c = ca[i];
78        while (c.charAt(0) == ' ') {
79            c = c.substring(1);
80        }
81        if (c.indexOf(name) == 0) {
82            return c.substring(name.length, c.length);
83        }
84    }
85    return "";
86}
87
88function tryGetSource() {
89    const urlParams = new URLSearchParams(location.search);
90
91    for (const [key, value] of urlParams) {
92        if (sourceKeys.includes(key.toLowerCase())) {
93            return value;
94        }
95    }
96}

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.