Does anyone know what this script does within a page?

makka64

New Member
I need to know what the var sites are used for. I see it in the source code of many websites from one particular host, but don't know what it's for or why so many sites use it. Thanks in advance.

<script type='text/javascript'>(window._ext || (window._ext =[])).push('variants_combination'
wink.png
;</script><!-- --><script> try { (function () { var sites = [["blackfridaye01", "colinlist", "jiapining", "echooy","bobilemon","leaplamb","huasilang","blackfridaye01"],["beautilili","fanggongong","sindrahome","civiltube"],["xlwl001","yuayee","fashionshein","amorchile"]]; var orgs = ["13N898","13PV45","13PWCB"]; var orgIdx = sites.findIndex(function (arr) { return arr.indexOf(SHOPLAZZA.slug) != -1 }); if (orgIdx == -1 || (!/FBAV|FBAN|FBIOS/g.test(navigator.userAgent))) return; window['_fs_debug'] = false; window['_fs_host'] = 'fullstory.com'; window['_fs_script'] = 'edge.fullstory.com/s/fs.js'; window['_fs_org'] = orgs[orgIdx]; window['_fs_namespace'] = 'FS'; (function (m, n, e, t, l, o, g, y) { if (e in m) { if (m.console && m.console.log) { m.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].'
wink.png
; } return; } g = m[e] = function (a, b, s) { g.q ? g.q.push([a, b, s]) : g._api(a, b, s); }; g.q = []; o = n.createElement(t); o.async = 1; o.crossOrigin = 'anonymous'; o.src = 'https://' + _fs_script; y = n.getElementsByTagName(t)[0]; y.parentNode.insertBefore(o, y); g.identify = function (i, v, s) { g(l, { uid: i }, s); if (v) g(l, v, s) }; g.setUserVars = function (v, s) { g(l, v, s) }; g.event = function (i, v, s) { g('event', { n: i, p: v }, s) }; g.anonymize = function () { g.identify(!!0) }; g.shutdown = function () { g("rec", !1) }; g.restart = function () { g("rec", !0) }; g.log = function (a, b) { g("log", [a, b]) }; g.consent = function (a) { g("consent", !arguments.length || a) }; g.identifyAccount = function (i, v) { o = 'account'; v = v || {}; v.acctId = i; g(o, v) }; g.clearUserCookie = function () { }; g.setVars = function (n, p) { g(n, p); }; g._w = {}; y = 'XMLHttpRequest'; g._w[y] = m[y]; y = 'fetch'; g._w[y] = m[y]; if (m[y]) m[y] = function () { return g._w[y].apply(this, arguments) }; g._v = "1.3.0"; })(window, document, window['_fs_namespace'], 'script', 'user'
wink.png
; })();} catch (e) { } </script>
 
Not exactly a js expert but I'd guess it's either a tracking code, authorisation pop up so they can track you or analytics.

If you go to fullstory.com you'll see it seems to be some sort of analytics service so that would be most likely imo.
 
Just wondering what all the var site names are for? Why so many if it's just for analytics? Are they an index of sites (slugs) to be analysed as well? Every website on Shoplazza has a slug. Won't the index of Shoplazza sites be huge? I had a look at FS but I'm no wiser!
 
Back
Top