PageSourceSearch

https://ampifire.com/js/analytics/analytics.js

js ampifire.com collected 2026-09-25 23:34:52 UTC 8,613 bytes, 265 lines download raw bytes

1
2/**
3 * If loaded from SkyRanker, or without a key, use PressCable
4 */
5if( typeof segmentIoKey == 'undefined' ) {
6    //presscable
7    var segmentIoKey = "rptyhe0d7c";
8    if (window.location.href.indexOf("skyranker") > -1) {
9        segmentIoKey = "mtks9o989w";
10    } else {
11        if (window.location.href.indexOf("munchweb") > -1 && window.location.href.indexOf("munchweb.yesletslearn") === -1) {
12            segmentIoKey = "b5lcv3s3ia";
13        } else {
14            if (window.location.href.indexOf("yesletslearn") > -1) {
15                segmentIoKey = "l8xiy7vt19";
16            } else {
17                if (window.location.href.indexOf("vidbullet") > -1) {
18                    segmentIoKey = "HVP4bwFVqHpngvhIfMYYokgwtV329hYH";
19                } else {
20                    if (window.location.href.indexOf("ampifire") > -1) {
21                        segmentIoKey = "xA1STVu3EZAewhd02X6bT9XR6bGzr1VY";
22                    } else {
23                        if (window.location.href.indexOf("clientcabin") > -1) {
24                            segmentIoKey = "EWzhf4hhT54Nkt7OrvvUB3Xfja3HDAwY"
25                        }
26                    }
27                }
28            }
29        }
30    }
31}
32
33/**
34* Read a cookie
35*/
36function getCookie(name) {
37    var value = document.cookie;
38    var start = value.indexOf(" " + name + "=");
39    if (start == -1) {
40        start = value.indexOf(name + "=");
41    }
42    if (start == -1) {
43        return null;
44    } else {
45        start = value.indexOf("=", start) + 1;
46        var end = value.indexOf(";", start);
47        if (end == -1) {
48            end = value.length;
49        }
50        value = unescape(value.substring(start, end));
51    }
52    return value;
53}
54
55/**
56* Send an OptIn Complete Event
57*/
58function optIn(name,email){
59   analytics.track('Optin Completed', {
60      'optinName':name,
61      'email':email
62   });
63   aliasUser(KM.i(),email);
64}
65
66/**
67* Track Landing Page
68*/
69function landingPage(pageUrl,pageName,pageHost,referrer) {
70   analytics.track('Viewed Landing Page', {
71       'Page_URL': pageUrl,
72       'Page_Name': pageName,
73       'Page_Host': pageHost,
74       'Referrer': referrer
75   });
76}
77
78/**
79* Track Selected Plan
80*/
81function planTracking(planName,planPrice,referrer) {
82   analytics.track('Selected Plan', {
83       'Selected_Plan_Name': planName,
84       'Selected_Plan_Price': planPrice,
85       'Referrer': referrer
86   });
87}
88
89/**
90* Track Selected Plan
91*/
92function checkoutTracking(productName,productPrice,referrer) {
93   analytics.track('Went to Checkout', {
94       'Selected_Product_Name': productName,
95       'Selected_Product_Price': productPrice,
96       'Referrer': referrer
97   });
98}
99
100function aliasUsers(previousId,newId) {
101   analytics.alias({
102       'previousId': previousId,
103       'userId': newId
104   });
105   analytics.identify(newId);
106}
107
108/**
109* Defines analytics
110*/
111var analytics = analytics || [];
112(function() {
113    var e = ["identify", "track", "trackLink", "trackForm", "trackClick", "trackSubmit", "page", "pageview", "ab", "alias", "ready", "group"],
114        t = function(e) {
115            return function() {
116                analytics.push([e].concat(Array.prototype.slice.call(arguments, 0)))
117            }
118        };
119    for (var n = 0; n < e.length; n++) analytics[e[n]] = t(e[n])
120})(), analytics.load = function(e) {
121    var t = document.createElement("script");
122    t.type = "text/javascript", t.async = !0, t.src = ("https:" === document.location.protocol ? "https://" : "http://") + "d2dq2ahtl5zl1z.cloudfront.net/analytics.js/v1/" + e + "/analytics.min.js";
123    var n = document.getElementsByTagName("script")[0];
124    n.parentNode.insertBefore(t, n)
125};
126
127// Segment.io
128var domain = window.location.host.replace('.com','').replace('.net','').replace('.io');
129if(domain == 'affiliates.presscable'){
130   domain = 'munchweb';
131}
132
133// segmentIoKey is different for every domain, defined in the file before loading this file.
134if( typeof segmentIoKey != 'undefined' ){
135   analytics.load(segmentIoKey);
136
137   var trackUser = getCookie('MunchCookie[paypalEmail]');
138   if (!trackUser) {
139      trackUser = getCookie('paypalEmail');
140   }
141   var creationTime = getCookie('MunchCookie[account_created]');
142   if (creationTime) {
143      analytics.identify(trackUser, {createdAt: creationTime});
144   } else {
145      analytics.identify(trackUser);
146   }
147}
148
149/**
150* SiteScout
151*/
152var ssa = 'f7d166041d20693c';
153var ssaUrl = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'pixel.sitescout.com/iap/' + ssa;
154new Image().src=ssaUrl;
155
156/**
157* ActiveCampaign
158*/
159var trackcmp_email = trackUser;
160var trackcmp = document.createElement("script");
161trackcmp.async = true;
162trackcmp.type = 'text/javascript';
163trackcmp.src = '//trackcmp.net/visit?actid=999636678&e='+encodeURIComponent(trackcmp_email)+'&r='+encodeURIComponent(document.referrer)+'&u='+encodeURIComponent(window.location.href);
164var trackcmp_s = document.getElementsByTagName("script");
165if (trackcmp_s.length) {
166   trackcmp_s[0].parentNode.appendChild(trackcmp);
167} else {
168   var trackcmp_h = document.getElementsByTagName("head");
169   trackcmp_h.length && trackcmp_h[0].appendChild(trackcmp);
170}
171
172/**
173 * Hotjar
174 */
175if(window.location.href.indexOf("presscable") > -1) {
vendor: 120 bytes, lines 175-178
175
176   (function(h,o,t,j,a,r){
177      h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
178      h._hjSettings={hjid:
17878088
vendor: 243 bytes, lines 178-183
178,hjsv:5};
179      a=o.getElementsByTagName('head')[0];
180      r=o.createElement('script');r.async=1;
181      r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
182      a.appendChild(r);
183   })(window,document,'//static.hotjar.com/c/hotjar-','.js?sv=');
184}
185if(window.location.href.indexOf("skyranker") > -1) {
vendor: 125 bytes, lines 185-188
185
186    (function(h,o,t,j,a,r){
187        h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
188        h._hjSettings={hjid:
18892592
vendor: 252 bytes, lines 188-193
188,hjsv:5};
189        a=o.getElementsByTagName('head')[0];
190        r=o.createElement('script');r.async=1;
191        r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
192        a.appendChild(r);
193    })(window,document,'//static.hotjar.com/c/hotjar-','.js?sv=');
194}
195if(window.location.href.indexOf("yesletslearn") > -1) {
vendor: 125 bytes, lines 195-198
195
196    (function(h,o,t,j,a,r){
197        h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
198        h._hjSettings={hjid:
198258346
vendor: 252 bytes, lines 198-203
198,hjsv:5};
199        a=o.getElementsByTagName('head')[0];
200        r=o.createElement('script');r.async=1;
201        r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
202        a.appendChild(r);
203    })(window,document,'//static.hotjar.com/c/hotjar-','.js?sv=');
204}
205if(window.location.href.indexOf("vidbullet") > -1) {
vendor: 167 bytes, lines 205-210
205
206    (function (h, o, t, j, a, r) {
207        h.hj = h.hj || function () {
208            (h.hj.q = h.hj.q || []).push(arguments)
209        };
210        h._hjSettings = {hjid: 
2102250406
vendor: 286 bytes, lines 210-216
210, hjsv: 6};
211        a = o.getElementsByTagName('head')[0];
212        r = o.createElement('script');
213        r.async = 1;
214        r.src = t + h._hjSettings.hjid + j + h._hjSettings.hjsv;
215        a.appendChild(r);
216    })(window, document, 'https://static.hotjar.com/c/hotjar-', '.js?sv=');
217}
218if(window.location.href.indexOf("ampifire") > -1) {
vendor: 125 bytes, lines 218-221
218
219    (function(h,o,t,j,a,r){
220        h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
221        h._hjSettings={hjid:
2212210199
vendor: 258 bytes, lines 221-226
221,hjsv:6};
222        a=o.getElementsByTagName('head')[0];
223        r=o.createElement('script');r.async=1;
224        r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
225        a.appendChild(r);
226    })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
227}
228/**
229 * Wishloop
230 */
231 /*
232(function(d, a)
233   { var h = d.getElementsByTagName("head")[0], p = d.location.protocol, s; wl_ef_uid = a; s = d.createElement("script"); s.type = "text/javascript"; s.charset = "utf-8"; s.async = true; s.defer = true; s.src = "//app.wishloop.com/js/ef_embed.min.js"; h.appendChild(s); }
234
235)(document, '4572');
236*/
237/**
238 * GTM function
239 */
240function includeGTM(gmtId) {
241    (function (w, d, s, l, i) {
242        w[l] = w[l] || [];
243        w[l].push({
244            'gtm.start':
245                new Date().getTime(), event: 'gtm.js'
246        });
247        var f = d.getElementsByTagName(s)[0],
248            j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
249        j.async = true;
250        j.src =
251            'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
252        f.parentNode.insertBefore(j, f);
253    })(window, document, 'script', 'dataLayer', gmtId);
254}
255
256/**
257 * Add GTM
258 */
259var funnelCode = (document.location.search.match(new RegExp('[?&]f=([^&]+)')) || [, null])[1];
260var isVidBulletDomain = domain.match('vidbullet.com');
261var isInternalFunnelCode = funnelCode !== 'vt' && funnelCode !== 'vu';
262
263if (!isVidBulletDomain || (isVidBulletDomain && isInternalFunnelCode)) {
264    includeGTM('GTM-WNX4BJF');
265}

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.