PageSourceSearch

https://careers.ccs.spokane.edu/assets/sites/third_party_libraries-77dc8690.js

js spokane.edu collected 2026-09-24 09:44:12 UTC 3,868 bytes, 110 lines download raw bytes

1export class ThirdPartyLibraries {
2  static start() {
3    if (js_vars.third_party_libraries.google_tag_manager) {
4      this.startGoogleTagManager()
5    }
6
7    if (js_vars.third_party_libraries.google_analytics) {
8      this.startLegacyGoogleUniversalAnalytics()
9    }
10
11    if (js_vars.third_party_libraries.meta) {
12      this.startMetaPixel()
13    }
14
15    if (js_vars.third_party_libraries.linkedin) {
16      this.startLinkedinTag()
17    }
18  }
19
20  // private
21
22  static startGoogleTagManager() {
23    const googleTagManagerConfig = js_vars.third_party_libraries.google_tag_manager
24    const trackingCodes = [googleTagManagerConfig.tracking_code, googleTagManagerConfig.regional_tracking_code].filter(Boolean)
25
26    window.dataLayer = window.dataLayer || []
27
28    if (googleTagManagerConfig.data_layer) {
29      window.dataLayer.push(googleTagManagerConfig.data_layer)
30    }
31
32    const firstScript = document.getElementsByTagName('script')[0]
33    trackingCodes.filter(id => id.startsWith('GTM-')).forEach(id => this.addGTMScript(id, firstScript))
34
35    const ga4Codes = trackingCodes.filter(id => id.startsWith('G-'))
36    if (ga4Codes.length > 0) this.addGA4Script(ga4Codes, firstScript)
37  }
38
39  static addGTMScript(id, firstScript) {
40    window.dataLayer.push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' })
41    this.insertScriptTag('https://www.googletagmanager.com/gtm.js?id=' + id, firstScript)
42  }
43
44  static addGA4Script(ids, firstScript) {
45    window.gtag = window.gtag || function() { window.dataLayer.push(arguments) }
46    window.gtag('js', new Date())
47    ids.forEach(id => window.gtag('config', id))
48    this.insertScriptTag('https://www.googletagmanager.com/gtag/js?id=' + ids[0], firstScript)
49  }
50
51  static insertScriptTag(src, firstScript) {
52    const tag = document.createElement('script')
53    tag.async = true
54    tag.nonce = js_vars.nonce
55    tag.src = src
56    firstScript.parentNode.insertBefore(tag, firstScript)
57  }
58
59  static startLegacyGoogleUniversalAnalytics() {
60    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
61      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
62        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
63    })(window,document,'script','https://www.google-analytics.com/analytics.js','ga')
64
65    ga('create', js_vars.third_party_libraries.google_analytics.tracking_code, 'auto')
66    ga('send', 'pageview')
67  }
68
69  static startMetaPixel() {
70    !function(f,b,e,v,n,t,s)
71    {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
72        n.callMethod.apply(n,arguments):n.queue.push(arguments)};
73      if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
74      n.queue=[];t=b.createElement(e);t.async=!0;
75      t.src=v;s=b.getElementsByTagName(e)[0];
76      s.parentNode.insertBefore(t,s)}(window, document,'script',
77        'https://connect.facebook.net/en_US/fbevents.js')
78
79    fbq('init', js_vars.third_party_libraries.meta.tracking_code)
80    fbq('track', 'PageView')
81  }
82
83  static startLinkedinTag() {
84    var _linkedin_partner_id = js_vars.third_party_libraries.linkedin.partner_id;
85    window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
86    window._linkedin_data_partner_ids.push(_linkedin_partner_id);
87    (function (l) {
88      if (!l) {
89        window.lintrk = function (a, b) {
90          window.lintrk.q.push([a, b])
91        };
92        window.lintrk.q = []
93      }
94      var s = document.getElementsByTagName("script")[0];
95      var b = document.createElement("script");
96      b.type = "text/javascript";
97      b.async = true;
98      b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js";
99      s.parentNode.insertBefore(b, s);
100    })
101    (window.lintrk);
102  }
103}
104
105document.addEventListener('clinch:trackable', (_) => {
106  if (js_vars.third_party_libraries) {
107    ThirdPartyLibraries.start()
108  }
109})
110

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.