PageSourceSearch

https://online.maryville.edu/wp-content/themes/twoyou/dist/static/scripts/analytics.js?ver=1790762540

js maryville.edu collected 2026-10-01 09:04:29 UTC 6,879 bytes, 286 lines download raw bytes

1/* eslint-disable */
2var segmentKey = window.globalSettings.values.theme_settings.segment_key;
3var trackingDomain = window.globalSettings.values.theme_settings.trackingDomain;
4
5var _bind = function _bind(fn, me) {
6  return function() {
7    return fn.apply(me, arguments);
8  };
9};
10
11window.u = window.u || {};
12window.u.analytics_wrapper = window.u.analytics_wrapper || {};
13window.u.analytics_wrapper.bootstrap = true;
14window.u.segment_io_token = segmentKey;
15
16var getURLParameter = function getURLParameter(param) {
17  var params = window.location.search.substring(1).split('&');
18
19  for (var i = 0; i < params.length; i += 1) {
20    var paramName = params[i].split('=');
21
22    if (paramName[0] === param) {
23      return paramName[1];
24    }
25  }
26};
27
28var paramDict = {
29  l: 'landing_page',
30  c: 'creative_id',
31  ef_id: 'ef_id',
32  permguid: 'permguid',
33  campaign: 'campaign',
34  sendid: 'send_id',
35  splash_creative: 'splash_creative',
36  lsrc: 'lead_source'
37}; // IE8 doesn't support Object.keys
38
39if (!Object.keys) {
40  Object.keys = function(obj) {
41    var keys = [];
42
43    for (var k in obj) {
44      if (obj.hasOwnProperty(k)) {
45        keys.push(k);
46      }
47    }
48
49    return keys;
50  };
51}
52
53var trackedParams = Object.keys(paramDict);
54var properties = {};
55var propertyKey = '';
56var propertyVal = '';
57properties['domain'] = trackingDomain;
58properties['has_mega_menu'] = document.querySelector('.wp-block-bigbite-mega-menu-container')
59  ? 'true'
60  : 'false';
61
62for (var i = 0; i < trackedParams.length; i += 1) {
63  propertyKey = trackedParams[i];
64  propertyVal = getURLParameter(propertyKey);
65
66  if (propertyVal != undefined) {
67    // Add to properties array for Segment
68    var key = paramDict[propertyKey];
69    properties[key] = propertyVal;
70  }
71}
72
73window.u.analytics_wrapper.initial_page_properties = properties;
74
75if (
76  window.u &&
77  window.u.analytics_wrapper &&
78  typeof window.u.analytics_wrapper.AnalyticsService !== 'undefined'
79) {
80  setInterval(function() {
81    new window.u.analytics_wrapper.AnalyticsService();
82  }, 2000);
83} // Analytics Setup
84
85window.u.analytics_wrapper.AnalyticsService = (function() {
86  var _this2 = this;
87
88  function AnalyticsService() {
89    this.page = _bind(this.page, this);
90    this.track = _bind(this.track, this);
91    this.identify = _bind(this.identify, this);
92    this.getUserId = _bind(this.getUserId, this);
93    this.setUserId = _bind(this.setUserId, this);
94    this.ready = _bind(this.ready, this);
95    var _ref = '';
96
97    if (window.u.analytics_wrapper._instance) {
98      return window.u.analytics_wrapper._instance;
99    }
100
101    window.u.analytics_wrapper._instance = this;
102
103    if (!window.u.segment_io_token) {
104      if ((_ref = window.console) != null) {
105        _ref.log('Analytics not configured.');
106      }
107
108      window.analytics = window.analytics || [];
109      return;
110    }
111
112    window.u.analytics_wrapper.SegmentProvider(window.u.segment_io_token);
113    this.page(window.u.analytics_wrapper.initial_page_properties);
114  }
115
116  AnalyticsService.prototype.ready = function(callback, waited_for) {
117    var awaiting_segment;
118    var being_patient;
119    var call;
120    var wait;
121
122    if (waited_for == null) {
123      waited_for = 0;
124    }
125
126    awaiting_segment = !window.analytics.initialized;
127    being_patient = waited_for < 3000;
128    if (awaiting_segment && being_patient) {
129      wait = 10;
130
131      call = (function(_this) {
132        return function() {
133          return _this.ready(callback, waited_for + wait);
134        };
135      })(this);
136
137      return setTimeout(call, wait);
138    } else if (window.u.segment_io_token) {
139      return callback();
140    }
141  };
142
143  AnalyticsService.prototype.setUserId = function(uuid) {
144    return (_this2._uuid = uuid);
145  };
146
147  AnalyticsService.prototype.getUserId = function() {
148    var _ref;
149
150    var _ref1;
151
152    if (!_this2._uuid) {
153      _this2._uuid =
154        (typeof window !== 'undefined' && window !== null
155          ? (_ref = window.analytics) != null
156            ? (_ref1 = _ref._user) != null
157              ? _ref1.anonymousId()
158              : void 0
159            : void 0
160          : void 0) || '';
161    }
162
163    return _this2._uuid;
164  };
165
166  AnalyticsService.prototype.identify = function(id, props) {
167    return _this2.ready(
168      (function(_this) {
169        return function() {
170          if (props === void 0) {
171            props = id;
172            id = _this._uuid;
173          }
174
175          return window.analytics.identify(id, props);
176        };
177      })(_this2)
178    );
179  };
180
181  AnalyticsService.prototype.track = function(event_id, props) {
182    return this.ready(
183      (function(_this) {
184        return function() {
185          return window.analytics.track(event_id, props);
186        };
187      })(this)
188    );
189  };
190
191  AnalyticsService.prototype.page = function(props) {
192    return this.ready(
193      (function(_this) {
194        return function() {
195          props = props || {};
196          return setTimeout(function() {
197            window.analytics.track('Mega Menu Event', {
198              has_mega_menu
199            });
200            window.analytics.page(props);
201          }, 1000);
202        };
203      })(this)
204    );
205  };
206
207  return AnalyticsService;
208})(); //Segment Setup
209
210window.u.analytics_wrapper.SegmentProvider = (function() {
211  function SegmentProvider(segmentIoToken) {
212    var _arguments = arguments;
213    var analytics;
214    var key;
215
216    var _i;
217
218    var _len;
219
220    var _ref;
221
222    analytics = window.analytics = window.analytics || [];
223
224    if (analytics.initialize || analytics.invoked) {
225      return analytics;
226    }
227
228    analytics.invoked = true;
229    analytics.methods = [
230      'trackSubmit',
231      'trackClick',
232      'trackLink',
233      'trackForm',
234      'pageview',
235      'identify',
236      'group',
237      'track',
238      'ready',
239      'alias',
240      'page',
241      'once',
242      'off',
243      'on'
244    ];
245
246    analytics.factory = function(method) {
247      var fun = function fun() {
248        var args = [];
249        // args = Array.prototype.slice.call(_arguments);
250        args.unshift(method);
251        analytics.push(args);
252        return analytics;
253      };
254
255      return fun;
256    };
257
258    _ref = analytics.methods;
259
260    for (_i = 0, _len = _ref.length; _i < _len; _i++) {
261      key = _ref[_i];
262      analytics[key] = analytics.factory(key);
263    }
264
265    analytics.load = function(key) {
266      var first, script;
267      script = document.createElement('script');
268      script.type = 'text/javascript';
269      script.async = true;
270      script.src = 'https://cdn.segment.com/analytics.js/v1/' + key + '/analytics.min.js';
271      first = document.getElementsByTagName('script')[0];
272      return first.parentNode.insertBefore(script, first);
273    };
274
275    analytics.SNIPPET_VERSION = '4.13.2';
276    analytics.load(segmentIoToken); //analytics.page();
277
278    return analytics;
279  }
280
281  return SegmentProvider;
282})();
283
284if (window.u.analytics_wrapper.bootstrap) {
285  new window.u.analytics_wrapper.AnalyticsService();
286}

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.