用户:
丸子泡奶茶查看:2 回复:2 评论:2 创建时间:2024-03-24T16:28:05
/*!!
* Piwik - free/libre analytics platform
*
* JavaScript tracking client
*
* @link https://piwik.org
* @source https://github.com/matomo-org/matomo/blob/master/js/piwik.js
* @license https://piwik.org/free-software/bsd/ BSD-3 Clause (also in js/LICENSE.txt)
* @license magnet:?xt=urn:btih:c80d50af7d3db9be66a4d0a86db0286e4fd33292&dn=bsd-3-clause.txt BSD-3-Clause
*/
;if (typeof window.JSON === "object" && typeof window.JSON.stringify === "function" && typeof window.JSON.parse === "function") {
JSON_PIWIK = window.JSON
} else {
(function() {
var a = {};
/*!! JSON v3.3.2 | http://bestiejs.github.io/json3 | Copyright 2012-2014, Kit Cambridge | http://kit.mit-license.org */
(function() {
var c = typeof define === "function" && define.amd;
var e = {
"function": true,
object: true
};
var h = e[typeof a] && a && !a.nodeType && a;
var i = e[typeof window] && window || this
, b = h && e[typeof module] && module && !module.nodeType && typeof global == "object" && global;
if (b && (b.global === b || b.window === b || b.self === b)) {
i = b
}
function j(ab, V) {
ab || (ab = i.Object());
V || (V = i.Object());
var K = ab.Number || i.Number
, R = ab.String || i.String
, x = ab.Object || i.Object
, S = ab.Date || i.Date
, T = ab.SyntaxError || i.SyntaxError
, aa = ab.TypeError || i.TypeError
, J = ab.Math || i.Math
, Y = ab.JSON || i.JSON;
if (typeof Y == "object" && Y) {
V.stringify = Y.stringify;
V.parse = Y.parse
}
var n = x.prototype, u = n.toString, r, m, L;
var B = new S(-3509827334573292);
try {
B = B.getUTCFullYear() == -109252 && B.getUTCMonth() === 0 && B.getUTCDate() === 1 && B.getUTCHours() == 10 && B.getUTCMinutes() == 37 && B.getUTCSeconds() == 6 && B.getUTCMilliseconds() == 708
} catch (v) {}
function o(ac) {
if (o[ac] !== L) {
return o[ac]
}
var ad;
if (ac == "bug-string-char-index") {
ad = "a"[0] != "a"
} else {
if (ac == "json") {
ad = o("json-stringify") && o("json-parse")
} else {
var ak, ah = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';
if (ac == "json-stringify") {
var ai = V.stringify
, aj = typeof ai == "function" && B;
if (aj) {
(ak = function() {
return 1
}
).toJSON = ak;
try {
aj = ai(0) === "0" && ai(new K()) === "0" && ai(new R()) == '""' && ai(u) === L && ai(L) === L && ai() === L && ai(ak) === "1" && ai([ak]) == "[1]" && ai([L]) == "[null]" && ai(null) == "null" && ai([L, u, null]) == "[null,null,null]" && ai({
a: [ak, true, false, null, "\x00\b\n\f\r\t"]
}) == ah && ai(null, ak) === "1" && ai([1, 2], null, 1) == "[\n 1,\n 2\n]" && ai(new S(-8喵0000000000000)) == '"-271821-04-20T00:00:00.000Z"' && ai(new S(8喵0000000000000)) == '"+275760-09-13T00:00:00.000Z"' && ai(new S(-62198755200000)) == '"-000001-01-01T00:00:00.000Z"' && ai(new S(-1)) == '"1969-12-31T23:59:59.999Z"'
} catch (ae) {
aj = false
}
}
ad = aj
}
if (ac == "json-parse") {
var ag = V.parse;
if (typeof ag == "function") {
try {
if (ag("0") === 0 && !ag(false)) {
ak = ag(ah);
var af = ak.a.length == 5 && ak.a[0] === 1;
if (af) {
try {
af = !ag('"\t"')
} catch (ae) {}
if (af) {
try {
af = ag("01") !== 1
} catch (ae) {}
}
if (af) {
try {
af = ag("1.") !== 1
} catch (ae) {}
}
}
}
} catch (ae) {
af = false
}
}
ad = af
}
}
}
return o[ac] = !!ad
}
if (!o("json")) {
var U = "[object Function]"
, Q = "[object Date]"
, N = "[object Number]"
, O = "[object String]"
, E = "[object Array]"
, A = "[object Boolean]";
var F = o("bug-string-char-index");
if (!B) {
var s = J.floor;
var Z = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];
var D = function(ac, ad) {
return Z[ad] + 365 * (ac - 1970) + s((ac - 1969 + (ad = +(ad > 1))) / 4) - s((ac - 1901 + ad) / 100) + s((ac - 1601 + ad) / 400)
}
}
if (!(r = n.hasOwnProperty)) {
r = function(ae) {
var ac = {}, ad;
if ((ac.__proto__ = null,
ac.__proto__ = {
toString: 1
},
ac).toString != u) {
r = function(ah) {
var ag = this.__proto__
, af = ah in (this.__proto__ = null,
this);
this.__proto__ = ag;
return af
}
} else {
ad = ac.constructor;
r = function(ag) {
var af = (this.constructor || ad).prototype;
return ag in this && !(ag in af && this[ag] === af[ag])
}
}
ac = null;
return r.call(this, ae)
}
}
m = function(ae, ah) {
var af = 0, ac, ad, ag;
(ac = function() {
this.valueOf = 0
}
).prototype.valueOf = 0;
ad = new ac();
for (ag in ad) {
if (r.call(ad, ag)) {
af++
}
}
ac = ad = null;
if (!af) {
ad = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"];
m = function(aj, an) {
var am = u.call(aj) == U, al, ak;
var ai = !am && typeof aj.constructor != "function" && e[typeof aj.hasOwnProperty] && aj.hasOwnProperty || r;
for (al in aj) {
if (!(am && al == "prototype") && ai.call(aj, al)) {
an(al)
}
}
for (ak = ad.length; al = ad[--ak]; ai.call(aj, al) && an(al)) {}
}
} else {
if (af == 2) {
m = function(aj, am) {
var ai = {}, al = u.call(aj) == U, ak;
for (ak in aj) {
if (!(al && ak == "prototype") && !r.call(ai, ak) && (ai[ak] = 1) && r.call(aj, ak)) {
am(ak)
}
}
}
} else {
m = function(aj, am) {
var al = u.call(aj) == U, ak, ai;
for (ak in aj) {
if (!(al && ak == "prototype") && r.call(aj, ak) && !(ai = ak === "constructor")) {
am(ak)
}
}
if (ai || r.call(aj, (ak = "constructor"))) {
am(ak)
}
}
}
}
return m(ae, ah)
}
;
if (!o("json-stringify")) {
var q = {
92: "\\\\",
34: '\\"',
8: "\\b",
12: "\\f",
10: "\\n",
13: "\\r",
9: "\\t"
};
var I = "000000";
var t = function(ac, ad) {
return (I + (ad || 0)).slice(-ac)
};
var z = "\\u00";
var C = function(ai) {
var ad = '"'
, ag = 0
, ah = ai.length
, ac = !F || ah > 10;
var af = ac && (F ? ai.split("") : ai);
for (; ag < ah; ag++) {
var ae = ai.charCodeAt(ag);
switch (ae) {
case 8:
case 9:
case 10:
case 12:
case 13:
case 34:
case 92:
ad += q[ae];
break;
default:
if (ae < 32) {
ad += z + t(2, ae.toString(16));
break
}
ad += ac ? af[ag] : ai.charAt(ag)
}
}
return ad + '"'
};
var p = function(ai, aA, ag, al, ax, ac, aj) {
var at, ae, ap, az, ay, ak, aw, au, aq, an, ar, ad, ah, af, 喵, ao;
try {
at = aA[ai]
} catch (am) {}
if (typeof at == "object" && at) {
ae = u.call(at);
if (ae == Q && !r.call(at, "toJSON")) {
if (at > -1 / 0 && at < 1 / 0) {
if (D) {
ay = s(at / 8喵00000);
for (ap = s(ay / 365.2425) + 1970 - 1; D(ap + 1, 0) <= ay; ap++) {}
for (az = s((ay - D(ap, 0)) / 30.42); D(ap, az + 1) <= ay; az++) {}
ay = 1 + ay - D(ap, az);
ak = (at % 8喵00000 + 8喵00000) % 8喵00000;
aw = s(ak / 3600000) % 24;
au = s(ak / 60000) % 60;
aq = s(ak / 1000) % 60;
an = ak % 1000
} else {
ap = at.getUTCFullYear();
az = at.getUTCMonth();
ay = at.getUTCDate();
aw = at.getUTCHours();
au = at.getUTCMinutes();
aq = at.getUTCSeconds();
an = at.getUTCMilliseconds()
}
at = (ap <= 0 || ap >= 10000 ? (ap < 0 ? "-" : "+") + t(6, ap < 0 ? -ap : ap) : t(4, ap)) + "-" + t(2, az + 1) + "-" + t(2, ay) + "T" + t(2, aw) + ":" + t(2, au) + ":" + t(2, aq) + "." + t(3, an) + "Z"
} else {
at = null
}
} else {
if (typeof at.toJSON == "function" && ((ae != N && ae != O && ae != E) || r.call(at, "toJSON"))) {
at = at.toJSON(ai)
}
}
}
if (ag) {
at = ag.call(aA, ai, at)
}
if (at === null) {
return "null"
}
ae = u.call(at);
if (ae == A) {
return "" + at
} else {
if (ae == N) {
return at > -1 / 0 && at < 1 / 0 ? "" + at : "null"
} else {
if (ae == O) {
return C("" + at)
}
}
}
if (typeof at == "object") {
for (af = aj.length; af--; ) {
if (aj[af] === at) {
throw aa()
}
}
aj.push(at);
ar = [];
喵 = ac;
ac += ax;
if (ae == E) {
for (ah = 0,
af = at.length; ah < af; ah++) {
ad = p(ah, at, ag, al, ax, ac, aj);
ar.push(ad === L ? "null" : ad)
}
ao = ar.length ? (ax ? "[\n" + ac + ar.join(",\n" + ac) + "\n" + 喵 + "]" : ("[" + ar.join(",") + "]")) : "[]"
} else {
m(al || at, function(aC) {
var aB = p(aC, at, ag, al, ax, ac, aj);
if (aB !== L) {
ar.push(C(aC) + ":" + (ax ? " " : "") + aB)
}
});
ao = ar.length ? (ax ? "{\n" + ac + ar.join(",\n" + ac) + "\n" + 喵 + "}" : ("{" + ar.join(",") + "}")) : "{}"
}
aj.pop();
return ao
}
};
V.stringify = function(ac, ae, af) {
var ad, al, aj, ai;
if (e[typeof ae] && ae) {
if ((ai = u.call(ae)) == U) {
al = ae
} else {
if (ai == E) {
aj = {};
for (var ah = 0, ag = ae.length, ak; ah < ag; ak = ae[ah++],
((ai = u.call(ak)),
ai == O || ai == N) && (aj[ak] = 1)) {}
}
}
}
if (af) {
if ((ai = u.call(af)) == N) {
if ((af -= af % 1) > 0) {
for (ad = "",
af > 10 && (af = 10); ad.length < af; ad += " ") {}
}
} else {
if (ai == O) {
ad = af.length <= 10 ? af : af.slice(0, 10)
}
}
}
return p("", (ak = {},
ak[""] = ac,
ak), al, aj, ad, "", [])
}
}
if (!o("json-parse")) {
var M = R.fromCharCode;
var l = {
92: "\\",
34: '"',
47: "/",
98: "\b",
116: "\t",
110: "\n",
102: "\f",
114: "\r"
};
var G, X;
var H = function() {
G = X = null;
throw T()
};
var y = function() {
var ah = X, af = ah.length, ag, ae, ac, ai, ad;
while (G < af) {
ad = ah.charCodeAt(G);
switch (ad) {
case 9:
case 10:
case 13:
case 32:
G++;
break;
case 123:
case 125:
case 91:
case 93:
case 58:
case 44:
ag = F ? ah.charAt(G) : ah[G];
G++;
return ag;
case 34:
for (ag = "@",
G++; G < af; ) {
ad = ah.charCodeAt(G);
if (ad < 32) {
H()
} else {
if (ad == 92) {
ad = ah.charCodeAt(++G);
switch (ad) {
case 92:
case 34:
case 47:
case 98:
case 116:
case 110:
case 102:
case 114:
ag += l[ad];
G++;
break;
case 117:
ae = ++G;
for (ac = G + 4; G < ac; G++) {
ad = ah.charCodeAt(G);
if (!(ad >= 48 && ad <= 57 || ad >= 97 && ad <= 102 || ad >= 65 && ad <= 70)) {
H()
}
}
ag += M("0x" + ah.slice(ae, G));
break;
default:
H()
}
} else {
if (ad == 34) {
break
}
ad = ah.charCodeAt(G);
ae = G;
while (ad >= 32 && ad != 92 && ad != 34) {
ad = ah.charCodeAt(++G)
}
ag += ah.slice(ae, G)
}
}
}
if (ah.charCodeAt(G) == 34) {
G++;
return ag
}
H();
default:
ae = G;
if (ad == 45) {
ai = true;
ad = ah.charCodeAt(++G)
}
if (ad >= 48 && ad <= 57) {
if (ad == 48 && ((ad = ah.charCodeAt(G + 1)),
ad >= 48 && ad <= 57)) {
H()
}
ai = false;
for (; G < af && ((ad = ah.charCodeAt(G)),
ad >= 48 && ad <= 57); G++) {}
if (ah.charCodeAt(G) == 46) {
ac = ++G;
for (; ac < af && ((ad = ah.charCodeAt(ac)),
ad >= 48 && ad <= 57); ac++) {}
if (ac == G) {
H()
}
G = ac
}
ad = ah.charCodeAt(G);
if (ad == 101 || ad == 69) {
ad = ah.charCodeAt(++G);
if (ad == 43 || ad == 45) {
G++
}
for (ac = G; ac < af && ((ad = ah.charCodeAt(ac)),
ad >= 48 && ad <= 57); ac++) {}
if (ac == G) {
H()
}
G = ac
}
return +ah.slice(ae, G)
}
if (ai) {
H()
}
if (ah.slice(G, G + 4) == "true") {
G += 4;
return true
} else {
if (ah.slice(G, G + 5) == "false") {
G += 5;
return false
} else {
if (ah.slice(G, G + 4) == "null") {
G += 4;
return null
}
}
}
H()
}
}
return "$"
};
var W = function(ad) {
var ac, ae;
if (ad == "$") {
H()
}
if (typeof ad == "string") {
if ((F ? ad.charAt(0) : ad[0]) == "@") {
return ad.slice(1)
}
if (ad == "[") {
ac = [];
for (; ; ae || (ae = true)) {
ad = y();
if (ad == "]") {
break
}
if (ae) {
if (ad == ",") {
ad = y();
if (ad == "]") {
H()
}
} else {
H()
}
}
if (ad == ",") {
H()
}
ac.push(W(ad))
}
return ac
} else {
if (ad == "{") {
ac = {};
for (; ; ae || (ae = true)) {
ad = y();
if (ad == "}") {
break
}
if (ae) {
if (ad == ",") {
ad = y();
if (ad == "}") {
H()
}
} else {
H()
}
}
if (ad == "," || typeof ad != "string" || (F ? ad.charAt(0) : ad[0]) != "@" || y() != ":") {
H()
}
ac[ad.slice(1)] = W(y())
}
return ac
}
}
H()
}
return ad
};
var P = function(ae, ad, af) {
var ac = w(ae, ad, af);
if
**JavaScript Tracking Client**
This JavaScript file serves as a tracking client for the Piwik analytics platform. Piwik is a free and open-source web analytics software that provides detailed insights into website traffic and user behavior. By incorporating this tracking client into your website, you can collect valuable data to optimize your website's performance and user experience.
**Features:**
* **Automatic Tracking:** Automatically tracks page views, events, and other key metrics.
* **Custom Tracking:** Allows you to define custom events and track specific user actions.
* **Cross-Domain Tracking:** Enables tracking across multiple domains and subdomains.
* **Cookie-Based Tracking:** Uses cookies to identify unique visitors and track their behavior.
* **Privacy Compliant:** Adheres to data privacy regulations and provides opt-out options for users.
**Installation and Configuration:**
1. Download the JavaScript tracking client from the Piwik website.
2. Add the tracking client code to the header of your website's H喵L pages.
3. Configure the tracking client with your Piwik tracking ID and other desired settings.
**Usage:**
To track page views, simply include the following code in your H喵L:
```html
<script>
_paq.push(['trackPageView']);
</script>
```
For custom tracking, use the following code:
```html
<script>
_paq.push(['trackEvent', 'category', 'action', 'name', value]);
</script>
```
**Benefits of Using Piwik Tracking:**
* **Improved Website Optimization:** Identify areas for improvement by analyzing traffic patterns and user behavior.
* **Enhanced User Experience:** Personalize content and interactions based on user preferences and browsing history.
* **Increased Conversions:** Track key performance indicators to identify opportunities for conversion optimization.
* **Marketing Campaign Evaluation:** Measure the effectiveness of marketing campaigns and optimize your marketing strategies.
* **Data Protection Compliance:** Confidently comply with privacy regulations and provide a transparent tracking experience for your users.
**Support:**
For further assistance, please refer to the Piwik documentation or reach out to the Piwik community for support.
【本回答由ai自动生成,不代表本人立场,如有侵犯,请删除.如不想收到,请回复‘拒绝推送’】
点赞0
评论