Version Description
Download this release
Release Info
Developer | matomoteam |
Plugin | Matomo Analytics – Ethical Stats. Powerful Insights. |
Version | 1.2.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.3 to 1.2.0
- app/LegacyAutoloader.php +31 -0
- app/config/global.php +2 -0
- app/core/Cookie.php +1 -1
- app/core/CronArchive.php +7 -0
- app/core/DeviceDetector/DeviceDetectorFactory.php +1 -1
- app/core/Nonce.php +33 -26
- app/core/Option.php +12 -0
- app/core/Tracker/Request.php +4 -1
- app/core/Tracker/Settings.php +11 -0
- app/core/Tracker/Visit.php +5 -1
- app/core/Version.php +1 -1
- app/js/piwik.min.js +34 -33
- app/js/tracker.php +14 -0
- app/matomo.js +34 -33
- app/piwik.js +34 -33
- app/plugins/API/Menu.php +2 -1
- app/plugins/CoreHome/angularjs/reporting-page/reportingpage.directive.html +1 -1
- app/plugins/CoreHome/angularjs/widget-loader/widgetloader.directive.html +1 -1
- app/plugins/CoreHome/stylesheets/layout.less +7 -2
- app/plugins/Login/Controller.php +4 -0
- app/plugins/Morpheus/templates/javascriptCode.twig +1 -1
- app/plugins/TagManager/Context/WebContext.php +2 -2
- app/plugins/TagManager/Template/Tag/MatomoTag.web.js +1 -1
- app/plugins/UsersManager/API.php +23 -1
- app/vendor/composer/autoload_files.php +1 -0
- app/vendor/composer/autoload_static.php +1 -0
- assets/css/admin-style.css +4 -0
- classes/WpMatomo/API.php +2 -0
- classes/WpMatomo/Admin/Summary.php +3 -0
- classes/WpMatomo/Admin/TrackingSettings.php +20 -0
- classes/WpMatomo/Admin/views/marketplace.php +11 -6
- classes/WpMatomo/Admin/views/summary.php +13 -6
- classes/WpMatomo/Admin/views/tracking.php +16 -13
- classes/WpMatomo/Settings.php +2 -0
- classes/WpMatomo/Site/Sync.php +14 -2
- classes/WpMatomo/TrackingCode/TrackingCodeGenerator.php +1 -1
- config/config.php +1 -0
- matomo.php +1 -1
- plugins/WordPress/WordPress.php +3 -0
- readme.txt +3 -2
app/LegacyAutoloader.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class LegacyAutoloader
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
spl_autoload_register(array($this, 'load_class'));
|
8 |
+
}
|
9 |
+
|
10 |
+
public static function register()
|
11 |
+
{
|
12 |
+
new LegacyAutoloader();
|
13 |
+
}
|
14 |
+
|
15 |
+
public function load_class($className)
|
16 |
+
{
|
17 |
+
if (strpos($className, 'Matomo\\') === 0) {
|
18 |
+
$newName = 'Piwik' . substr($className, 6);
|
19 |
+
if (class_exists($newName) && !class_exists($className, false)) {
|
20 |
+
@class_alias($newName, $className);
|
21 |
+
}
|
22 |
+
} elseif (strpos($className, 'Piwik\\') === 0) {
|
23 |
+
$newName = 'Matomo' . substr($className, 5);
|
24 |
+
if (class_exists($newName) && !class_exists($className, false)) {
|
25 |
+
@class_alias($newName, $className);
|
26 |
+
}
|
27 |
+
}
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
LegacyAutoloader::register();
|
app/config/global.php
CHANGED
@@ -79,6 +79,8 @@ return array(
|
|
79 |
'Piwik\Translation\Loader\LoaderInterface' => DI\object('Piwik\Translation\Loader\LoaderCache')
|
80 |
->constructor(DI\get('Piwik\Translation\Loader\JsonFileLoader')),
|
81 |
|
|
|
|
|
82 |
'observers.global' => array(),
|
83 |
|
84 |
/**
|
79 |
'Piwik\Translation\Loader\LoaderInterface' => DI\object('Piwik\Translation\Loader\LoaderCache')
|
80 |
->constructor(DI\get('Piwik\Translation\Loader\JsonFileLoader')),
|
81 |
|
82 |
+
'DeviceDetector\Cache\Cache' => DI\object('Piwik\DeviceDetector\DeviceDetectorCache')->constructor(86400),
|
83 |
+
|
84 |
'observers.global' => array(),
|
85 |
|
86 |
/**
|
app/core/Cookie.php
CHANGED
@@ -154,7 +154,7 @@ class Cookie
|
|
154 |
$header = 'Set-Cookie: ' . rawurlencode($Name) . '=' . rawurlencode($Value)
|
155 |
. (empty($Expires) ? '' : '; expires=' . gmdate('D, d-M-Y H:i:s', $Expires) . ' GMT')
|
156 |
. (empty($Path) ? '' : '; path=' . rawurlencode($Path))
|
157 |
-
. (empty($Domain) ? '' : '; domain=' .
|
158 |
. (!$Secure ? '' : '; secure')
|
159 |
. (!$HTTPOnly ? '' : '; HttpOnly')
|
160 |
. (!$sameSite ? '' : '; SameSite=' . rawurlencode($sameSite));
|
154 |
$header = 'Set-Cookie: ' . rawurlencode($Name) . '=' . rawurlencode($Value)
|
155 |
. (empty($Expires) ? '' : '; expires=' . gmdate('D, d-M-Y H:i:s', $Expires) . ' GMT')
|
156 |
. (empty($Path) ? '' : '; path=' . rawurlencode($Path))
|
157 |
+
. (empty($Domain) ? '' : '; domain=' . $Domain)
|
158 |
. (!$Secure ? '' : '; secure')
|
159 |
. (!$HTTPOnly ? '' : '; HttpOnly')
|
160 |
. (!$sameSite ? '' : '; SameSite=' . rawurlencode($sameSite));
|
app/core/CronArchive.php
CHANGED
@@ -2119,6 +2119,13 @@ class CronArchive
|
|
2119 |
|
2120 |
public function isAlreadyArchivingUrl($url, $idSite, $period, $date)
|
2121 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2122 |
$periodInProgress = $this->isAlreadyArchivingAnyLowerOrThisPeriod($idSite, $period);
|
2123 |
if ($periodInProgress) {
|
2124 |
$this->logger->info("- skipping archiving for period '{period}' because processing the period '{periodcheck}' is already in progress.", array('period' => $period, 'periodcheck' => $periodInProgress));
|
2119 |
|
2120 |
public function isAlreadyArchivingUrl($url, $idSite, $period, $date)
|
2121 |
{
|
2122 |
+
|
2123 |
+
if (!empty($this->segmentsToForce)) {
|
2124 |
+
// we ignore checking for any running command in the background so a user can launch multiple cronjob entries
|
2125 |
+
// at the same time where each of them forces a differet segment
|
2126 |
+
return false;
|
2127 |
+
}
|
2128 |
+
|
2129 |
$periodInProgress = $this->isAlreadyArchivingAnyLowerOrThisPeriod($idSite, $period);
|
2130 |
if ($periodInProgress) {
|
2131 |
$this->logger->info("- skipping archiving for period '{period}' because processing the period '{periodcheck}' is already in progress.", array('period' => $period, 'periodcheck' => $periodInProgress));
|
app/core/DeviceDetector/DeviceDetectorFactory.php
CHANGED
@@ -52,7 +52,7 @@ class DeviceDetectorFactory
|
|
52 |
{
|
53 |
$deviceDetector = new DeviceDetector($userAgent);
|
54 |
$deviceDetector->discardBotInformation();
|
55 |
-
|
56 |
$deviceDetector->parse();
|
57 |
return $deviceDetector;
|
58 |
}
|
52 |
{
|
53 |
$deviceDetector = new DeviceDetector($userAgent);
|
54 |
$deviceDetector->discardBotInformation();
|
55 |
+
$deviceDetector->setCache(StaticContainer::get('DeviceDetector\Cache\Cache'));
|
56 |
$deviceDetector->parse();
|
57 |
return $deviceDetector;
|
58 |
}
|
app/core/Nonce.php
CHANGED
@@ -126,32 +126,39 @@ class Nonce
|
|
126 |
*/
|
127 |
public static function getAcceptableOrigins()
|
128 |
{
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
}
|
156 |
|
157 |
/**
|
126 |
*/
|
127 |
public static function getAcceptableOrigins()
|
128 |
{
|
129 |
+
$host = Url::getCurrentHost(null);
|
130 |
+
|
131 |
+
if (empty($host)) {
|
132 |
+
return array();
|
133 |
+
}
|
134 |
+
|
135 |
+
// parse host:port
|
136 |
+
if (preg_match('/^([^:]+):([0-9]+)$/D', $host, $matches)) {
|
137 |
+
$host = $matches[1];
|
138 |
+
$port = $matches[2];
|
139 |
+
$origins = array(
|
140 |
+
'http://' . $host,
|
141 |
+
'https://' . $host,
|
142 |
+
);
|
143 |
+
if ($port != 443) {
|
144 |
+
$origins[] = 'http://' . $host .':' . $port;
|
145 |
+
}
|
146 |
+
$origins[] = 'https://' . $host . ':' . $port;
|
147 |
+
} elseif (Config::getInstance()->General['force_ssl']) {
|
148 |
+
$origins = array(
|
149 |
+
'https://' . $host,
|
150 |
+
'https://' . $host . ':443',
|
151 |
+
);
|
152 |
+
} else {
|
153 |
+
$origins = array(
|
154 |
+
'http://' . $host,
|
155 |
+
'https://' . $host,
|
156 |
+
'http://' . $host . ':80',
|
157 |
+
'https://' . $host . ':443',
|
158 |
+
);
|
159 |
+
}
|
160 |
+
|
161 |
+
return $origins;
|
162 |
}
|
163 |
|
164 |
/**
|
app/core/Option.php
CHANGED
@@ -224,6 +224,8 @@ class Option
|
|
224 |
|
225 |
protected function deleteNameLike($name, $value = null)
|
226 |
{
|
|
|
|
|
227 |
$sql = 'DELETE FROM `' . Common::prefixTable('option') . '` WHERE option_name LIKE ?';
|
228 |
$bind[] = $name;
|
229 |
|
@@ -237,8 +239,18 @@ class Option
|
|
237 |
$this->clearCache();
|
238 |
}
|
239 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
protected function getNameLike($name)
|
241 |
{
|
|
|
|
|
242 |
$sql = 'SELECT option_name, option_value FROM `' . Common::prefixTable('option') . '` WHERE option_name LIKE ?';
|
243 |
$bind = array($name);
|
244 |
$rows = Db::fetchAll($sql, $bind);
|
224 |
|
225 |
protected function deleteNameLike($name, $value = null)
|
226 |
{
|
227 |
+
$name = $this->getNameForLike($name);
|
228 |
+
|
229 |
$sql = 'DELETE FROM `' . Common::prefixTable('option') . '` WHERE option_name LIKE ?';
|
230 |
$bind[] = $name;
|
231 |
|
239 |
$this->clearCache();
|
240 |
}
|
241 |
|
242 |
+
private function getNameForLike($name)
|
243 |
+
{
|
244 |
+
$name = str_replace('\_', '###NOREPLACE###', $name);
|
245 |
+
$name = str_replace('_', '\_', $name);
|
246 |
+
$name = str_replace( '###NOREPLACE###', '\_', $name);
|
247 |
+
return $name;
|
248 |
+
}
|
249 |
+
|
250 |
protected function getNameLike($name)
|
251 |
{
|
252 |
+
$name = $this->getNameForLike($name);
|
253 |
+
|
254 |
$sql = 'SELECT option_name, option_value FROM `' . Common::prefixTable('option') . '` WHERE option_name LIKE ?';
|
255 |
$bind = array($name);
|
256 |
$rows = Db::fetchAll($sql, $bind);
|
app/core/Tracker/Request.php
CHANGED
@@ -662,7 +662,7 @@ class Request
|
|
662 |
return substr(trim($input), 0, CustomVariables::getMaxLengthCustomVariables());
|
663 |
}
|
664 |
|
665 |
-
|
666 |
{
|
667 |
return (bool)Config::getInstance()->Tracker['use_third_party_id_cookie'];
|
668 |
}
|
@@ -687,6 +687,9 @@ class Request
|
|
687 |
if (!$this->shouldUseThirdPartyCookie()) {
|
688 |
return;
|
689 |
}
|
|
|
|
|
|
|
690 |
|
691 |
$cookie = $this->makeThirdPartyCookieUID();
|
692 |
$idVisitor = bin2hex($idVisitor);
|
662 |
return substr(trim($input), 0, CustomVariables::getMaxLengthCustomVariables());
|
663 |
}
|
664 |
|
665 |
+
public function shouldUseThirdPartyCookie()
|
666 |
{
|
667 |
return (bool)Config::getInstance()->Tracker['use_third_party_id_cookie'];
|
668 |
}
|
687 |
if (!$this->shouldUseThirdPartyCookie()) {
|
688 |
return;
|
689 |
}
|
690 |
+
if (\Piwik\Tracker\IgnoreCookie::isIgnoreCookieFound()) {
|
691 |
+
return;
|
692 |
+
}
|
693 |
|
694 |
$cookie = $this->makeThirdPartyCookieUID();
|
695 |
$idVisitor = bin2hex($idVisitor);
|
app/core/Tracker/Settings.php
CHANGED
@@ -60,6 +60,17 @@ class Settings // TODO: merge w/ visitor recognizer or make it it's own service.
|
|
60 |
$os = empty($os['short_name']) ? 'UNK' : $os['short_name'];
|
61 |
}
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
$browserLang = substr($request->getBrowserLanguage(), 0, 20); // limit the length of this string to match db
|
64 |
$trackerConfig = Config::getInstance()->Tracker;
|
65 |
|
60 |
$os = empty($os['short_name']) ? 'UNK' : $os['short_name'];
|
61 |
}
|
62 |
|
63 |
+
$client = $deviceDetector->getClient();
|
64 |
+
if (!empty($client['name']) && $client['name'] === 'Internet Explorer') {
|
65 |
+
// we assume cookies are disabled... when in tracker cookies are disabled, this ensures when upgrading to this version
|
66 |
+
// that no fingerprint changes in the 30min window during the upgrade...
|
67 |
+
// We don't include it anymore as it otherwise may cause new visits to be created when switching between
|
68 |
+
// cookies disabled and enabled in IE11 or older. Before Matomo 3.13.7 when cookies were disabled, then
|
69 |
+
// this value was set to 0. For people with cookies enabled the fingerprint is not as relevant as the visitorId
|
70 |
+
// is used to identify a visitor
|
71 |
+
$plugin_Cookie = '0';
|
72 |
+
}
|
73 |
+
|
74 |
$browserLang = substr($request->getBrowserLanguage(), 0, 20); // limit the length of this string to match db
|
75 |
$trackerConfig = Config::getInstance()->Tracker;
|
76 |
|
app/core/Tracker/Visit.php
CHANGED
@@ -550,7 +550,11 @@ class Visit implements VisitInterface
|
|
550 |
$binIdVisitor = $this->visitProperties->getProperty('idvisitor');
|
551 |
$valuesToUpdate['idvisitor'] = $binIdVisitor;
|
552 |
}
|
553 |
-
|
|
|
|
|
|
|
|
|
554 |
return $valuesToUpdate;
|
555 |
}
|
556 |
|
550 |
$binIdVisitor = $this->visitProperties->getProperty('idvisitor');
|
551 |
$valuesToUpdate['idvisitor'] = $binIdVisitor;
|
552 |
}
|
553 |
+
$visitorId = $this->request->getVisitorId();
|
554 |
+
if ($visitorId && strlen($visitorId) === Tracker::LENGTH_BINARY_ID) {
|
555 |
+
// Might update the idvisitor when it was forced or overwritten for this visit
|
556 |
+
$valuesToUpdate['idvisitor'] = $this->request->getVisitorId();
|
557 |
+
}
|
558 |
return $valuesToUpdate;
|
559 |
}
|
560 |
|
app/core/Version.php
CHANGED
@@ -20,7 +20,7 @@ final class Version
|
|
20 |
* The current Matomo version.
|
21 |
* @var string
|
22 |
*/
|
23 |
-
const VERSION = '3.
|
24 |
|
25 |
public function isStableVersion($version)
|
26 |
{
|
20 |
* The current Matomo version.
|
21 |
* @var string
|
22 |
*/
|
23 |
+
const VERSION = '3.14.0';
|
24 |
|
25 |
public function isStableVersion($version)
|
26 |
{
|
app/js/piwik.min.js
CHANGED
@@ -38,39 +38,40 @@ if(!aq){aq="/"}}return aq},findMediaUrlInNode:function(at){if(!at){return}var aq
|
|
38 |
if(aq&&au.offsetTop){aq=(au.offsetTop+at.height)>0}var ap=ar.clientWidth;if(T.innerWidth&&ap>T.innerWidth){ap=T.innerWidth}var ao=ar.clientHeight;if(T.innerHeight&&ao>T.innerHeight){ao=T.innerHeight}return((at.bottom>0||aq)&&at.right>0&&at.left<ap&&((at.top<ao)||aq))},isNodeVisible:function(ap){var ao=j(ap);var aq=this.isOrWasNodeInViewport(ap);return ao&&aq},buildInteractionRequestParams:function(ao,ap,aq,ar){var at="";if(ao){at+="c_i="+t(ao)}if(ap){if(at){at+="&"}at+="c_n="+t(ap)}if(aq){if(at){at+="&"}at+="c_p="+t(aq)}if(ar){if(at){at+="&"}at+="c_t="+t(ar)}return at},buildImpressionRequestParams:function(ao,ap,aq){var ar="c_n="+t(ao)+"&c_p="+t(ap);if(aq){ar+="&c_t="+t(aq)}return ar},buildContentBlock:function(aq){if(!aq){return}var ao=this.findContentName(aq);var ap=this.findContentPiece(aq);var ar=this.findContentTarget(aq);ao=this.trim(ao);ap=this.trim(ap);ar=this.trim(ar);return{name:ao||"Unknown",piece:ap||"Unknown",target:ar||""}},collectContent:function(ar){if(!ar||!ar.length){return[]
|
39 |
}var aq=[];var ao,ap;for(ao=0;ao<ar.length;ao++){ap=this.buildContentBlock(ar[ao]);if(J(ap)){aq.push(ap)}}return aq},setLocation:function(ao){this.location=ao},getLocation:function(){var ao=this.location||T.location;if(!ao.origin){ao.origin=ao.protocol+"//"+ao.hostname+(ao.port?":"+ao.port:"")}return ao},toAbsoluteUrl:function(ap){if((!ap||String(ap)!==ap)&&ap!==""){return ap}if(""===ap){return this.getLocation().href}if(ap.search(/^\/\//)!==-1){return this.getLocation().protocol+ap}if(ap.search(/:\/\//)!==-1){return ap}if(0===ap.indexOf("#")){return this.getLocation().origin+this.getLocation().pathname+ap}if(0===ap.indexOf("?")){return this.getLocation().origin+this.getLocation().pathname+ap}if(0===ap.search("^[a-zA-Z]{2,11}:")){return ap}if(ap.search(/^\//)!==-1){return this.getLocation().origin+ap}var ao="(.*/)";var aq=this.getLocation().origin+this.getLocation().pathname.match(new RegExp(ao))[0];return aq+ap},isUrlToCurrentDomain:function(ap){var aq=this.toAbsoluteUrl(ap);if(!aq){return false
|
40 |
}var ao=this.getLocation().origin;if(ao===aq){return true}if(0===String(aq).indexOf(ao)){if(":"===String(aq).substr(ao.length,1)){return false}return true}return false},setHrefAttribute:function(ap,ao){if(!ap||!ao){return}ae.setAnyAttribute(ap,"href",ao)},shouldIgnoreInteraction:function(aq){var ap=ae.hasNodeAttribute(aq,this.CONTENT_IGNOREINTERACTION_ATTR);var ao=ae.hasNodeCssClass(aq,this.CONTENT_IGNOREINTERACTION_CLASS);return ap||ao}};function O(ap,at){if(at){return at}ap=v.toAbsoluteUrl(ap);if(z(ap,"?")){var ar=ap.indexOf("?");ap=ap.slice(0,ar)}if(R(ap,"matomo.php")){ap=g(ap,"matomo.php".length)}else{if(R(ap,"piwik.php")){ap=g(ap,"piwik.php".length)}else{if(R(ap,".php")){var ao=ap.lastIndexOf("/");var aq=1;ap=ap.slice(0,ao+aq)}}}if(R(ap,"/js/")){ap=g(ap,"js/".length)}return ap}function N(av){var ax="Piwik_Overlay";var ap=new RegExp("index\\.php\\?module=Overlay&action=startOverlaySession&idSite=([0-9]+)&period=([^&]+)&date=([^&]+)(&segment=.*)?$");var aq=ap.exec(G.referrer);if(aq){var at=aq[1];
|
41 |
-
if(at!==String(av)){return false}var au=aq[2],ao=aq[3],ar=aq[4];if(!ar){ar=""}else{if(ar.indexOf("&segment=")===0){ar=ar.substr("&segment=".length)}}T.name=ax+"###"+au+"###"+ao+"###"+ar}var aw=T.name.split("###");return aw.length===4&&aw[0]===ax}function Z(ap,aw,ar){var av=T.name.split("###"),au=av[1],ao=av[2],at=av[3],aq=O(ap,aw);o(aq+"plugins/Overlay/client/client.js?v=1",function(){Piwik_Overlay_Client.initialize(aq,ar,au,ao,at)})}function u(){var aq;try{aq=T.frameElement}catch(ap){return true}if(J(aq)){return(aq&&String(aq.nodeName).toLowerCase()==="iframe")?true:false}try{return T.self!==T.top}catch(ao){return true}}function Q(
|
42 |
-
try{
|
43 |
-
if(
|
44 |
-
var
|
45 |
-
|
46 |
-
return !
|
47 |
-
if(
|
48 |
-
}if(A(T.GearsFactory)){
|
49 |
-
var dl=new RegExp("^[a-zA-Z0-9]+$");if(
|
50 |
-
}function
|
51 |
-
if(
|
52 |
-
var
|
53 |
-
}}}if(
|
54 |
-
}
|
55 |
-
}var
|
56 |
-
if(!
|
57 |
-
v.setHrefAttribute(
|
58 |
-
}}}function
|
59 |
-
return false}var
|
60 |
-
if(!
|
61 |
-
}}function
|
62 |
-
}
|
63 |
-
}
|
64 |
-
}ao[
|
65 |
-
}else{if(dl==="visit"||
|
66 |
-
if(dm&&
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
|
|
|
74 |
}}_paq=new H();e.trigger("TrackerAdded",[ap]);return ap}an(T,"beforeunload",ai,false);an(T,"message",function(au){if(!au||!au.origin){return}var aw,ar,ap;var ax=d(au.origin);var at=e.getAsyncTrackers();for(ar=0;ar<at.length;ar++){ap=d(at[ar].getPiwikUrl());if(ap===ax){aw=at[ar];break}}if(!aw){return}var aq=null;try{aq=JSON.parse(au.data)}catch(av){return}if(!aq){return}function ao(aA){var aC=G.getElementsByTagName("iframe");for(ar=0;ar<aC.length;ar++){var aB=aC[ar];var ay=d(aB.src);if(aB.contentWindow&&J(aB.contentWindow.postMessage)&&ay===ax){var az=JSON.stringify(aA);aB.contentWindow.postMessage(az,"*")}}}if(J(aq.maq_initial_value)){ao({maq_opted_in:aq.maq_initial_value&&aw.hasConsent(),maq_url:aw.getPiwikUrl(),maq_optout_by_default:aw.isConsentRequired()})}else{if(J(aq.maq_opted_in)){at=e.getAsyncTrackers();for(ar=0;ar<at.length;ar++){aw=at[ar];if(aq.maq_opted_in){aw.rememberConsentGiven()}else{aw.forgetConsentGiven()}}ao({maq_confirm_opted_in:aw.hasConsent(),maq_url:aw.getPiwikUrl(),maq_optout_by_default:aw.isConsentRequired()})
|
75 |
}}},false);Date.prototype.getTimeAlias=Date.prototype.getTime;e={initialized:false,JSON:JSON_PIWIK,DOM:{addEventListener:function(ar,aq,ap,ao){var at=typeof ao;if(at==="undefined"){ao=false}an(ar,aq,ap,ao)},onLoad:n,onReady:q,isNodeVisible:j,isOrWasNodeVisible:v.isNodeVisible},on:function(ap,ao){if(!y[ap]){y[ap]=[]}y[ap].push(ao)},off:function(aq,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){if(y[aq][ao]===ap){y[aq].splice(ao,1)}}},trigger:function(aq,ar,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){y[aq][ao].apply(ap||T,ar)}},addPlugin:function(ao,ap){b[ao]=ap},getTracker:function(ao,ap){if(!J(ap)){ap=this.getAsyncTracker().getSiteId()}if(!J(ao)){ao=this.getAsyncTracker().getTrackerUrl()}return new Q(ao,ap)},getAsyncTrackers:function(){return I},addTracker:function(ao,aq){var ap;if(!I.length){ap=ad(ao,aq)}else{ap=I[0].addTracker(ao,aq)}return ap},getAsyncTracker:function(ap,at){var ar;if(I&&I.length&&I[0]){ar=I[0]}else{return ad(ap,at)}if(!at&&!ap){return ar
|
76 |
}if((!J(at)||null===at)&&ar){at=ar.getSiteId()}if((!J(ap)||null===ap)&&ar){ap=ar.getTrackerUrl()}var aq,ao=0;for(ao;ao<I.length;ao++){aq=I[ao];if(aq&&String(aq.getSiteId())===String(at)&&aq.getTrackerUrl()===ap){return aq}}},retryMissedPluginCalls:function(){var ap=ah;ah=[];var ao=0;for(ao;ao<ap.length;ao++){af(ap[ao])}}};if(typeof define==="function"&&define.amd){define("piwik",[],function(){return e});define("matomo",[],function(){return e})}return e}())}
|
38 |
if(aq&&au.offsetTop){aq=(au.offsetTop+at.height)>0}var ap=ar.clientWidth;if(T.innerWidth&&ap>T.innerWidth){ap=T.innerWidth}var ao=ar.clientHeight;if(T.innerHeight&&ao>T.innerHeight){ao=T.innerHeight}return((at.bottom>0||aq)&&at.right>0&&at.left<ap&&((at.top<ao)||aq))},isNodeVisible:function(ap){var ao=j(ap);var aq=this.isOrWasNodeInViewport(ap);return ao&&aq},buildInteractionRequestParams:function(ao,ap,aq,ar){var at="";if(ao){at+="c_i="+t(ao)}if(ap){if(at){at+="&"}at+="c_n="+t(ap)}if(aq){if(at){at+="&"}at+="c_p="+t(aq)}if(ar){if(at){at+="&"}at+="c_t="+t(ar)}return at},buildImpressionRequestParams:function(ao,ap,aq){var ar="c_n="+t(ao)+"&c_p="+t(ap);if(aq){ar+="&c_t="+t(aq)}return ar},buildContentBlock:function(aq){if(!aq){return}var ao=this.findContentName(aq);var ap=this.findContentPiece(aq);var ar=this.findContentTarget(aq);ao=this.trim(ao);ap=this.trim(ap);ar=this.trim(ar);return{name:ao||"Unknown",piece:ap||"Unknown",target:ar||""}},collectContent:function(ar){if(!ar||!ar.length){return[]
|
39 |
}var aq=[];var ao,ap;for(ao=0;ao<ar.length;ao++){ap=this.buildContentBlock(ar[ao]);if(J(ap)){aq.push(ap)}}return aq},setLocation:function(ao){this.location=ao},getLocation:function(){var ao=this.location||T.location;if(!ao.origin){ao.origin=ao.protocol+"//"+ao.hostname+(ao.port?":"+ao.port:"")}return ao},toAbsoluteUrl:function(ap){if((!ap||String(ap)!==ap)&&ap!==""){return ap}if(""===ap){return this.getLocation().href}if(ap.search(/^\/\//)!==-1){return this.getLocation().protocol+ap}if(ap.search(/:\/\//)!==-1){return ap}if(0===ap.indexOf("#")){return this.getLocation().origin+this.getLocation().pathname+ap}if(0===ap.indexOf("?")){return this.getLocation().origin+this.getLocation().pathname+ap}if(0===ap.search("^[a-zA-Z]{2,11}:")){return ap}if(ap.search(/^\//)!==-1){return this.getLocation().origin+ap}var ao="(.*/)";var aq=this.getLocation().origin+this.getLocation().pathname.match(new RegExp(ao))[0];return aq+ap},isUrlToCurrentDomain:function(ap){var aq=this.toAbsoluteUrl(ap);if(!aq){return false
|
40 |
}var ao=this.getLocation().origin;if(ao===aq){return true}if(0===String(aq).indexOf(ao)){if(":"===String(aq).substr(ao.length,1)){return false}return true}return false},setHrefAttribute:function(ap,ao){if(!ap||!ao){return}ae.setAnyAttribute(ap,"href",ao)},shouldIgnoreInteraction:function(aq){var ap=ae.hasNodeAttribute(aq,this.CONTENT_IGNOREINTERACTION_ATTR);var ao=ae.hasNodeCssClass(aq,this.CONTENT_IGNOREINTERACTION_CLASS);return ap||ao}};function O(ap,at){if(at){return at}ap=v.toAbsoluteUrl(ap);if(z(ap,"?")){var ar=ap.indexOf("?");ap=ap.slice(0,ar)}if(R(ap,"matomo.php")){ap=g(ap,"matomo.php".length)}else{if(R(ap,"piwik.php")){ap=g(ap,"piwik.php".length)}else{if(R(ap,".php")){var ao=ap.lastIndexOf("/");var aq=1;ap=ap.slice(0,ao+aq)}}}if(R(ap,"/js/")){ap=g(ap,"js/".length)}return ap}function N(av){var ax="Piwik_Overlay";var ap=new RegExp("index\\.php\\?module=Overlay&action=startOverlaySession&idSite=([0-9]+)&period=([^&]+)&date=([^&]+)(&segment=.*)?$");var aq=ap.exec(G.referrer);if(aq){var at=aq[1];
|
41 |
+
if(at!==String(av)){return false}var au=aq[2],ao=aq[3],ar=aq[4];if(!ar){ar=""}else{if(ar.indexOf("&segment=")===0){ar=ar.substr("&segment=".length)}}T.name=ax+"###"+au+"###"+ao+"###"+ar}var aw=T.name.split("###");return aw.length===4&&aw[0]===ax}function Z(ap,aw,ar){var av=T.name.split("###"),au=av[1],ao=av[2],at=av[3],aq=O(ap,aw);o(aq+"plugins/Overlay/client/client.js?v=1",function(){Piwik_Overlay_Client.initialize(aq,ar,au,ao,at)})}function u(){var aq;try{aq=T.frameElement}catch(ap){return true}if(J(aq)){return(aq&&String(aq.nodeName).toLowerCase()==="iframe")?true:false}try{return T.self!==T.top}catch(ao){return true}}function Q(ce,b9){var bI=this,be="mtm_consent",cD="mtm_cookie_consent",cN="mtm_consent_removed",b4=aa(G.domain,T.location.href,K()),cW=L(b4[0]),bN=p(b4[1]),bn=p(b4[2]),cU=false,ci="GET",dc=ci,aI="application/x-www-form-urlencoded; charset=UTF-8",cx=aI,aE=ce||"",bH="",c1="",b6=b9||"",by="",bO="",a5,bj="",c8=["7z","aac","apk","arc","arj","asf","asx","avi","azw3","bin","csv","deb","dmg","doc","docx","epub","exe","flv","gif","gz","gzip","hqx","ibooks","jar","jpg","jpeg","js","mobi","mp2","mp3","mp4","mpg","mpeg","mov","movie","msi","msp","odb","odf","odg","ods","odt","ogg","ogv","pdf","phps","png","ppt","pptx","qt","qtm","ra","ram","rar","rpm","sea","sit","tar","tbz","tbz2","bz","bz2","tgz","torrent","txt","wav","wma","wmv","wpd","xls","xlsx","xml","z","zip"],ay=[cW],bz=[],bL=[],a9=[],bJ=500,cY=false,cJ,a6,bR,c9=1800,bP,ao,cr=["pk_campaign","piwik_campaign","utm_campaign","utm_source","utm_medium"],bG=["pk_kwd","piwik_kwd","utm_term"],bk="_pk_",av="pk_vid",a0=180,cZ,bp,bS=false,bl=false,cR,bf,bv,cK=33955200000,cp=1800000,c7=15768000000,a3=true,cn=0,bQ=false,aR=false,cb,bW={},cm={},bm={},bt=200,c2={},da={},ca=[],cf=false,cB=false,ap=false,db=false,cO=false,aO=false,bd=u(),cT=null,c0=null,cc,aS,bA,b7=am,bo,aL,cs=0,bu=["id","ses","cvar","ref"],cA=false,bB=null,cL=[],ax=U++,aw=false;
|
42 |
+
try{bj=G.title}catch(cy){bj=""}function dg(ds,dq,dp,dr,dn,dm){if(bl){return}var dl;if(dp){dl=new Date();dl.setTime(dl.getTime()+dp)}G.cookie=ds+"="+t(dq)+(dp?";expires="+dl.toGMTString():"")+";path="+(dr||"/")+(dn?";domain="+dn:"")+(dm?";secure":"")+";SameSite=Lax"}function aD(dn){if(bl){return 0}var dl=new RegExp("(^|;)[ ]*"+dn+"=([^;]*)"),dm=dl.exec(G.cookie);return dm?S(dm[2]):0}bB=!aD(cN);function b2(dl){var dm;dl=k(dl,av);if(bP){dm=new RegExp("#.*");return dl.replace(dm,"")}return dl}function bV(dn,dl){var dp=s(dl),dm;if(dp){return dl}if(dl.slice(0,1)==="/"){return s(dn)+"://"+d(dn)+dl}dn=b2(dn);dm=dn.indexOf("?");if(dm>=0){dn=dn.slice(0,dm)}dm=dn.lastIndexOf("/");if(dm!==dn.length-1){dn=dn.slice(0,dm+1)}return dn+dl}function cH(dn,dl){var dm;dn=String(dn).toLowerCase();dl=String(dl).toLowerCase();if(dn===dl){return true}if(dl.slice(0,1)==="."){if(dn===dl.slice(1)){return true}dm=dn.length-dl.length;if((dm>0)&&(dn.slice(dm)===dl)){return true}}return false}function cl(dl){var dm=document.createElement("a");
|
43 |
+
if(dl.indexOf("//")!==0&&dl.indexOf("http")!==0){if(dl.indexOf("*")===0){dl=dl.substr(1)}if(dl.indexOf(".")===0){dl=dl.substr(1)}dl="http://"+dl}dm.href=v.toAbsoluteUrl(dl);if(dm.pathname){return dm.pathname}return""}function a4(dm,dl){if(!aj(dl,"/")){dl="/"+dl}if(!aj(dm,"/")){dm="/"+dm}var dn=(dl==="/"||dl==="/*");if(dn){return true}if(dm===dl){return true}dl=String(dl).toLowerCase();dm=String(dm).toLowerCase();if(R(dl,"*")){dl=dl.slice(0,-1);dn=(!dl||dl==="/");if(dn){return true}if(dm===dl){return true}return dm.indexOf(dl)===0}if(!R(dm,"/")){dm+="/"}if(!R(dl,"/")){dl+="/"}return dm.indexOf(dl)===0}function ar(dq,ds){var dm,dl,dn,dp,dr;for(dm=0;dm<ay.length;dm++){dp=L(ay[dm]);dr=cl(ay[dm]);if(cH(dq,dp)&&a4(ds,dr)){return true}}return false}function aW(dp){var dm,dl,dn;for(dm=0;dm<ay.length;dm++){dl=L(ay[dm].toLowerCase());if(dp===dl){return true}if(dl.slice(0,1)==="."){if(dp===dl.slice(1)){return true}dn=dp.length-dl.length;if((dn>0)&&(dp.slice(dn)===dl)){return true}}}return false}function cq(dl,dn){dl=dl.replace("send_image=0","send_image=1");
|
44 |
+
var dm=new Image(1,1);dm.onload=function(){E=0;if(typeof dn==="function"){dn({request:dl,trackerUrl:aE,success:true})}};dm.onerror=function(){if(typeof dn==="function"){dn({request:dl,trackerUrl:aE,success:false})}};dm.src=aE+(aE.indexOf("?")<0?"?":"&")+dl}function cE(dl){if(dc==="POST"){return true}return dl&&(dl.length>2000||dl.indexOf('{"requests"')===0)}function aK(){return"object"===typeof h&&"function"===typeof h.sendBeacon&&"function"===typeof Blob}function a7(dq,dt,ds){var dn=aK();if(!dn){return false}var dp={type:"application/x-www-form-urlencoded; charset=UTF-8"};var du=false;var dm=aE;try{var dl=new Blob([dq],dp);if(ds&&!cE(dq)){dl=new Blob([],dp);dm=dm+(dm.indexOf("?")<0?"?":"&")+dq}du=h.sendBeacon(dm,dl)}catch(dr){return false}if(du&&typeof dt==="function"){dt({request:dq,trackerUrl:aE,success:true,isSendBeacon:true})}return du}function c6(dm,dn,dl){if(!J(dl)||null===dl){dl=true}if(m&&a7(dm,dn,dl)){return}setTimeout(function(){if(m&&a7(dm,dn,dl)){return}var dr;try{var dq=T.XMLHttpRequest?new T.XMLHttpRequest():T.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;
|
45 |
+
dq.open("POST",aE,true);dq.onreadystatechange=function(){if(this.readyState===4&&!(this.status>=200&&this.status<300)){var ds=m&&a7(dm,dn,dl);if(!ds&&dl){cq(dm,dn)}else{if(typeof dn==="function"){dn({request:dm,trackerUrl:aE,success:false,xhr:this})}}}else{if(this.readyState===4&&(typeof dn==="function")){dn({request:dm,trackerUrl:aE,success:true,xhr:this})}}};dq.setRequestHeader("Content-Type",cx);dq.withCredentials=true;dq.send(dm)}catch(dp){dr=m&&a7(dm,dn,dl);if(!dr&&dl){cq(dm,dn)}else{if(typeof dn==="function"){dn({request:dm,trackerUrl:aE,success:false})}}}},50)}function cg(dm){var dl=new Date();var dn=dl.getTime()+dm;if(!r||dn>r){r=dn}}function co(dl){if(cc||!a6||!bB){return}cc=setTimeout(function dm(){cc=null;if(!bd){bd=(!G.hasFocus||G.hasFocus())}if(!bd){co(a6);return}if(bR()){return}var dn=new Date(),dp=a6-(dn.getTime()-c0);dp=Math.min(a6,dp);co(dp)},dl||a6)}function bK(){if(!cc){return}clearTimeout(cc);cc=null}function bb(){bd=true;cT=new Date().getTime()}function df(){var dl=new Date().getTime();
|
46 |
+
return !cT||(dl-cT)>a6}function az(){if(df()){bR()}bK()}function di(){if(aO||!a6){return}aO=true;an(T,"focus",bb);an(T,"blur",az);ab++;e.addPlugin("HeartBeat"+ab,{unload:function(){if(aO&&df()){bR()}}})}function cC(dq){var dm=new Date();var dl=dm.getTime();c0=dl;if(cB&&dl<cB){var dn=cB-dl;setTimeout(dq,dn);cg(dn+50);cB+=50;return}if(cB===false){var dp=800;cB=dl+dp}dq()}function aP(){if(aD(cN)){bB=false}else{if(aD(be)){bB=true}}}function bF(dm,dl,dn){aP();if(!bB){cL.push(dm);return}aw=true;if(!cR&&dm){if(cA&&bB){dm+="&consent=1"}cC(function(){if(cY&&a7(dm,dn,true)){cg(100);return}if(cE(dm)){c6(dm,dn)}else{cq(dm,dn)}cg(dl)})}if(!aO){di()}}function ck(dl){if(cR){return false}return(dl&&dl.length)}function c5(dl,dq){if(!dq||dq>=dl.length){return[dl]}var dm=0;var dn=dl.length;var dp=[];for(dm;dm<dn;dm+=dq){dp.push(dl.slice(dm,dm+dq))}return dp}function dh(dm,dl){if(!ck(dm)){return}if(!bB){cL.push(dm);return}aw=true;cC(function(){var dq=c5(dm,50);var dn=0,dp;for(dn;dn<dq.length;dn++){dp='{"requests":["?'+dq[dn].join('","?')+'"]}';
|
47 |
+
if(cY&&a7(dp,null,false)){cg(100)}else{c6(dp,null,false)}}cg(dl)})}function aU(dl){return bk+dl+"."+b6+"."+bo}function bY(dn,dm,dl){dg(dn,"",-86400,dm,dl)}function b5(){if(bl){return"0"}if(!J(T.showModalDialog)&&J(h.cookieEnabled)){return h.cookieEnabled?"1":"0"}var dl=bk+"testcookie";dg(dl,"1",undefined,bp,cZ,bS);var dm=aD(dl)==="1"?"1":"0";bY(dl);return dm}function bi(){bo=b7((cZ||cW)+(bp||"/")).slice(0,4)}function cI(){if(J(da.res)){return da}var dm,dp,dq={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",dir:"application/x-director",fla:"application/x-shockwave-flash",java:"application/x-java-vm",gears:"application/x-googlegears",ag:"application/x-silverlight"};if(!((new RegExp("MSIE")).test(h.userAgent))){if(h.mimeTypes&&h.mimeTypes.length){for(dm in dq){if(Object.prototype.hasOwnProperty.call(dq,dm)){dp=h.mimeTypes[dq[dm]];da[dm]=(dp&&dp.enabledPlugin)?"1":"0"}}}if(!((new RegExp("Edge[ /](\\d+[\\.\\d]+)")).test(h.userAgent))&&typeof navigator.javaEnabled!=="unknown"&&J(h.javaEnabled)&&h.javaEnabled()){da.java="1"
|
48 |
+
}if(A(T.GearsFactory)){da.gears="1"}if(!J(T.showModalDialog)&&J(h.cookieEnabled)){da.cookie=h.cookieEnabled?"1":"0"}else{da.cookie=b5()}}var dn=parseInt(X.width,10);var dl=parseInt(X.height,10);da.res=parseInt(dn,10)+"x"+parseInt(dl,10);return da}function bX(){var dm=aU("cvar"),dl=aD(dm);if(dl.length){dl=JSON_PIWIK.parse(dl);if(W(dl)){return dl}}return{}}function cF(){if(aR===false){aR=bX()}}function cS(){var dl=cI();return b7((h.userAgent||"")+(h.platform||"")+JSON_PIWIK.stringify(dl)+(new Date()).getTime()+Math.random()).slice(0,16)}function aA(){var dl=cI();return b7((h.userAgent||"")+(h.platform||"")+JSON_PIWIK.stringify(dl)).slice(0,6)}function bg(){return Math.floor((new Date()).getTime()/1000)}function aJ(){var dm=bg();var dn=aA();var dl=String(dm)+dn;return dl}function c4(dn){dn=String(dn);var dr=aA();var dp=dr.length;var dq=dn.substr(-1*dp,dp);var dm=parseInt(dn.substr(0,dn.length-dp),10);if(dm&&dq&&dq===dr){var dl=bg();if(a0<=0){return true}if(dl>=dm&&dl<=(dm+a0)){return true}}return false
|
49 |
+
}function dj(dl){if(!cO){return""}var dq=f(dl,av);if(!dq){return""}dq=String(dq);var dn=new RegExp("^[a-zA-Z0-9]+$");if(dq.length===32&&dn.test(dq)){var dm=dq.substr(16,32);if(c4(dm)){var dp=dq.substr(0,16);return dp}}return""}function cP(){if(!bO){bO=dj(bN)}var dn=new Date(),dl=Math.round(dn.getTime()/1000),dm=aU("id"),dr=aD(dm),dq,dp;if(dr){dq=dr.split(".");dq.unshift("0");if(bO.length){dq[1]=bO}return dq}if(bO.length){dp=bO}else{if("0"===b5()){dp=""}else{dp=cS()}}dq=["1",dp,dl,0,dl,"",""];return dq}function aZ(){var dt=cP(),dp=dt[0],dq=dt[1],dm=dt[2],dl=dt[3],dr=dt[4],dn=dt[5];if(!J(dt[6])){dt[6]=""}var ds=dt[6];return{newVisitor:dp,uuid:dq,createTs:dm,visitCount:dl,currentVisitTs:dr,lastVisitTs:dn,lastEcommerceOrderTs:ds}}function aH(){var dp=new Date(),dm=dp.getTime(),dq=aZ().createTs;var dl=parseInt(dq,10);var dn=(dl*1000)+cK-dm;return dn}function aM(dl){if(!b6){return}var dn=new Date(),dm=Math.round(dn.getTime()/1000);if(!J(dl)){dl=aZ()}var dp=dl.uuid+"."+dl.createTs+"."+dl.visitCount+"."+dm+"."+dl.lastVisitTs+"."+dl.lastEcommerceOrderTs;
|
50 |
+
dg(aU("id"),dp,aH(),bp,cZ,bS)}function bM(){var dl=aD(aU("ref"));if(dl.length){try{dl=JSON_PIWIK.parse(dl);if(W(dl)){return dl}}catch(dm){}}return["","",0,""]}function bw(dm){var dl="testvalue";dg("test",dl,10000,null,dm);if(aD("test")===dl){bY("test",null,dm);return true}return false}function aF(){var dm=bl;bl=false;var dl,dn;for(dl=0;dl<bu.length;dl++){dn=aU(bu[dl]);if(dn!==cN&&dn!==be&&0!==aD(dn)){bY(dn,bp,cZ)}}bl=dm}function b3(dl){b6=dl}function dk(dq){if(!dq||!W(dq)){return}var dp=[];var dn;for(dn in dq){if(Object.prototype.hasOwnProperty.call(dq,dn)){dp.push(dn)}}var dr={};dp.sort();var dl=dp.length;var dm;for(dm=0;dm<dl;dm++){dr[dp[dm]]=dq[dp[dm]]}return dr}function cd(){dg(aU("ses"),"1",cp,bp,cZ,bS)}function bh(){var dp="";var dm="abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";var dn=dm.length;var dl;for(dl=0;dl<6;dl++){dp+=dm.charAt(Math.floor(Math.random()*dn))}return dp}function ct(dn,dJ,dK,dp){var dI,dm=new Date(),dw=Math.round(dm.getTime()/1000),dt,dH,dq=1024,dQ,dx,dF=aR,dr=aU("ses"),dD=aU("ref"),dA=aU("cvar"),dB=aD(dr),dG=bM(),dM=a5||bN,du,dl;
|
51 |
+
if(bl){aF()}if(cR){return""}var dC=aZ();if(!J(dp)){dp=""}var dz=G.characterSet||G.charset;if(!dz||dz.toLowerCase()==="utf-8"){dz=null}du=dG[0];dl=dG[1];dt=dG[2];dH=dG[3];if(!dB){var dL=cp/1000;if(!dC.lastVisitTs||(dw-dC.lastVisitTs)>dL){dC.visitCount++;dC.lastVisitTs=dC.currentVisitTs}if(!bv||!du.length){for(dI in cr){if(Object.prototype.hasOwnProperty.call(cr,dI)){du=f(dM,cr[dI]);if(du.length){break}}}for(dI in bG){if(Object.prototype.hasOwnProperty.call(bG,dI)){dl=f(dM,bG[dI]);if(dl.length){break}}}}dQ=d(bn);dx=dH.length?d(dH):"";if(dQ.length&&!aW(dQ)&&(!bv||!dx.length||aW(dx))){dH=bn}if(dH.length||du.length){dt=dw;dG=[du,dl,dt,b2(dH.slice(0,dq))];dg(dD,JSON_PIWIK.stringify(dG),c7,bp,cZ)}}dn+="&idsite="+b6+"&rec=1&r="+String(Math.random()).slice(2,8)+"&h="+dm.getHours()+"&m="+dm.getMinutes()+"&s="+dm.getSeconds()+"&url="+t(b2(dM))+(bn.length?"&urlref="+t(b2(bn)):"")+((by&&by.length)?"&uid="+t(by):"")+"&_id="+dC.uuid+"&_idts="+dC.createTs+"&_idvc="+dC.visitCount+"&_idn="+dC.newVisitor+(du.length?"&_rcn="+t(du):"")+(dl.length?"&_rck="+t(dl):"")+"&_refts="+dt+"&_viewts="+dC.lastVisitTs+(String(dC.lastEcommerceOrderTs).length?"&_ects="+dC.lastEcommerceOrderTs:"")+(String(dH).length?"&_ref="+t(b2(dH.slice(0,dq))):"")+(dz?"&cs="+t(dz):"")+"&send_image=0";
|
52 |
+
var dP=cI();for(dI in dP){if(Object.prototype.hasOwnProperty.call(dP,dI)){dn+="&"+dI+"="+dP[dI]}}var dO=[];if(dJ){for(dI in dJ){if(Object.prototype.hasOwnProperty.call(dJ,dI)&&/^dimension\d+$/.test(dI)){var ds=dI.replace("dimension","");dO.push(parseInt(ds,10));dO.push(String(ds));dn+="&"+dI+"="+t(dJ[dI]);delete dJ[dI]}}}if(dJ&&B(dJ)){dJ=null}for(dI in bm){if(Object.prototype.hasOwnProperty.call(bm,dI)){var dy=(-1===M(dO,dI));if(dy){dn+="&dimension"+dI+"="+t(bm[dI])}}}if(dJ){dn+="&data="+t(JSON_PIWIK.stringify(dJ))}else{if(ao){dn+="&data="+t(JSON_PIWIK.stringify(ao))}}function dv(dR,dS){var dT=JSON_PIWIK.stringify(dR);if(dT.length>2){return"&"+dS+"="+t(dT)}return""}var dN=dk(bW);var dE=dk(cm);dn+=dv(dN,"cvar");dn+=dv(dE,"e_cvar");if(aR){dn+=dv(aR,"_cvar");for(dI in dF){if(Object.prototype.hasOwnProperty.call(dF,dI)){if(aR[dI][0]===""||aR[dI][1]===""){delete aR[dI]}}}if(bQ){dg(dA,JSON_PIWIK.stringify(aR),cp,bp,cZ)}}if(a3){if(cn){dn+=">_ms="+cn}else{if(i&&i.timing&&i.timing.requestStart&&i.timing.responseEnd){dn+=">_ms="+(i.timing.responseEnd-i.timing.requestStart)
|
53 |
+
}}}if(aL){dn+="&pv_id="+aL}dC.lastEcommerceOrderTs=J(dp)&&String(dp).length?dp:dC.lastEcommerceOrderTs;aM(dC);cd();dn+=ac(dK,{tracker:bI,request:dn});if(c1.length){dn+="&"+c1}if(A(cb)){dn=cb(dn)}return dn}bR=function a8(){var dl=new Date();dl=dl.getTime();if(!c0){return false}if((c0+(1000*c9))<=dl){return false}if(c0+a6<=dl){bI.ping();return true}return false};function bq(dp,dn,du,dq,dl,dx){var ds="idgoal=0",dt,dm=new Date(),dv=[],dw,dr=String(dp).length;if(dr){ds+="&ec_id="+t(dp);dt=Math.round(dm.getTime()/1000)}ds+="&revenue="+dn;if(String(du).length){ds+="&ec_st="+du}if(String(dq).length){ds+="&ec_tx="+dq}if(String(dl).length){ds+="&ec_sh="+dl}if(String(dx).length){ds+="&ec_dt="+dx}if(c2){for(dw in c2){if(Object.prototype.hasOwnProperty.call(c2,dw)){if(!J(c2[dw][1])){c2[dw][1]=""}if(!J(c2[dw][2])){c2[dw][2]=""}if(!J(c2[dw][3])||String(c2[dw][3]).length===0){c2[dw][3]=0}if(!J(c2[dw][4])||String(c2[dw][4]).length===0){c2[dw][4]=1}dv.push(c2[dw])}}ds+="&ec_items="+t(JSON_PIWIK.stringify(dv))
|
54 |
+
}ds=ct(ds,ao,"ecommerce",dt);bF(ds,bJ);if(dr){c2={}}}function bZ(dl,dq,dp,dn,dm,dr){if(String(dl).length&&J(dq)){bq(dl,dq,dp,dn,dm,dr)}}function bs(dl){if(J(dl)){bq("",dl,"","","","")}}function b0(dm,dp,dn){aL=bh();var dl=ct("action_name="+t(al(dm||bj)),dp,"log");bF(dl,bJ,dn)}function a1(dn,dm){var dp,dl="(^| )(piwik[_-]"+dm+"|matomo[_-]"+dm;if(dn){for(dp=0;dp<dn.length;dp++){dl+="|"+dn[dp]}}dl+=")( |$)";return new RegExp(dl)}function aV(dl){return(aE&&dl&&0===String(dl).indexOf(aE))}function cv(dq,dl,dr,dm){if(aV(dl)){return 0}var dp=a1(bL,"download"),dn=a1(a9,"link"),ds=new RegExp("\\.("+c8.join("|")+")([?&#]|$)","i");if(dn.test(dq)){return"link"}if(dm||dp.test(dq)||ds.test(dl)){return"download"}if(dr){return 0}return"link"}function au(dm){var dl;dl=dm.parentNode;while(dl!==null&&J(dl)){if(ae.isLinkElement(dm)){break}dm=dl;dl=dm.parentNode}return dm}function de(dr){dr=au(dr);if(!ae.hasNodeAttribute(dr,"href")){return}if(!J(dr.href)){return}var dq=ae.getAttributeValueFromNode(dr,"href");
|
55 |
+
if(aV(dq)){return}var dm=dr.pathname||cl(dr.href);var ds=dr.hostname||d(dr.href);var dt=ds.toLowerCase();var dn=dr.href.replace(ds,dt);var dp=new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript|mailto|tel):","i");if(!dp.test(dn)){var dl=cv(dr.className,dn,ar(dt,dm),ae.hasNodeAttribute(dr,"download"));if(dl){return{type:dl,href:dn}}}}function aQ(dl,dm,dn,dp){var dq=v.buildInteractionRequestParams(dl,dm,dn,dp);if(!dq){return}return ct(dq,null,"contentInteraction")}function cM(dn,dp,dt,dl,dm){if(!J(dn)){return}if(aV(dn)){return dn}var dr=v.toAbsoluteUrl(dn);var dq="redirecturl="+t(dr)+"&";dq+=aQ(dp,dt,dl,(dm||dn));var ds="&";if(aE.indexOf("?")<0){ds="?"}return aE+ds+dq}function bc(dl,dm){if(!dl||!dm){return false}var dn=v.findTargetNode(dl);if(v.shouldIgnoreInteraction(dn)){return false}dn=v.findTargetNodeNoDefault(dl);if(dn&&!V(dn,dm)){return false}return true}function cu(dn,dm,dq){if(!dn){return}var dl=v.findParentContentNode(dn);if(!dl){return}if(!bc(dl,dn)){return}var dp=v.buildContentBlock(dl);
|
56 |
+
if(!dp){return}if(!dp.target&&dq){dp.target=dq}return v.buildInteractionRequestParams(dm,dp.name,dp.piece,dp.target)}function aX(dm){if(!ca||!ca.length){return false}var dl,dn;for(dl=0;dl<ca.length;dl++){dn=ca[dl];if(dn&&dn.name===dm.name&&dn.piece===dm.piece&&dn.target===dm.target){return true}}return false}function bE(dp){if(!dp){return false}var ds=v.findTargetNode(dp);if(!ds||v.shouldIgnoreInteraction(ds)){return false}var dt=de(ds);if(db&&dt&&dt.type){return false}if(ae.isLinkElement(ds)&&ae.hasNodeAttributeWithValue(ds,"href")){var dl=String(ae.getAttributeValueFromNode(ds,"href"));if(0===dl.indexOf("#")){return false}if(aV(dl)){return true}if(!v.isUrlToCurrentDomain(dl)){return false}var dq=v.buildContentBlock(dp);if(!dq){return}var dn=dq.name;var du=dq.piece;var dr=dq.target;if(!ae.hasNodeAttributeWithValue(ds,v.CONTENT_TARGET_ATTR)||ds.wasContentTargetAttrReplaced){ds.wasContentTargetAttrReplaced=true;dr=v.toAbsoluteUrl(dl);ae.setAnyAttribute(ds,v.CONTENT_TARGET_ATTR,dr)}var dm=cM(dl,"click",dn,du,dr);
|
57 |
+
v.setHrefAttribute(ds,dm);return true}return false}function aN(dm){if(!dm||!dm.length){return}var dl;for(dl=0;dl<dm.length;dl++){bE(dm[dl])}}function aY(dl){return function(dm){if(!dl){return}var dq=v.findParentContentNode(dl);var dr;if(dm){dr=dm.target||dm.srcElement}if(!dr){dr=dl}if(!bc(dq,dr)){return}cg(bJ);if(ae.isLinkElement(dl)&&ae.hasNodeAttributeWithValue(dl,"href")&&ae.hasNodeAttributeWithValue(dl,v.CONTENT_TARGET_ATTR)){var dn=ae.getAttributeValueFromNode(dl,"href");if(!aV(dn)&&dl.wasContentTargetAttrReplaced){ae.setAnyAttribute(dl,v.CONTENT_TARGET_ATTR,"")}}var dv=de(dl);if(ap&&dv&&dv.type){return dv.type}if(bE(dq)){return"href"}var ds=v.buildContentBlock(dq);if(!ds){return}var dp=ds.name;var dw=ds.piece;var du=ds.target;var dt=aQ("click",dp,dw,du);if(dt){bF(dt,bJ)}return dt}}function b1(dn){if(!dn||!dn.length){return}var dl,dm;for(dl=0;dl<dn.length;dl++){dm=v.findTargetNode(dn[dl]);if(dm&&!dm.contentInteractionTrackingSetupDone){dm.contentInteractionTrackingSetupDone=true;an(dm,"click",aY(dm))
|
58 |
+
}}}function bx(dn,dp){if(!dn||!dn.length){return[]}var dl,dm;for(dl=0;dl<dn.length;dl++){if(aX(dn[dl])){dn.splice(dl,1);dl--}else{ca.push(dn[dl])}}if(!dn||!dn.length){return[]}aN(dp);b1(dp);var dq=[];for(dl=0;dl<dn.length;dl++){dm=ct(v.buildImpressionRequestParams(dn[dl].name,dn[dl].piece,dn[dl].target),undefined,"contentImpressions");if(dm){dq.push(dm)}}return dq}function cz(dm){var dl=v.collectContent(dm);return bx(dl,dm)}function ba(dm){if(!dm||!dm.length){return[]}var dl;for(dl=0;dl<dm.length;dl++){if(!v.isNodeVisible(dm[dl])){dm.splice(dl,1);dl--}}if(!dm||!dm.length){return[]}return cz(dm)}function aG(dn,dl,dm){var dp=v.buildImpressionRequestParams(dn,dl,dm);return ct(dp,null,"contentImpression")}function dd(dp,dm){if(!dp){return}var dl=v.findParentContentNode(dp);var dn=v.buildContentBlock(dl);if(!dn){return}if(!dm){dm="Unknown"}return aQ(dm,dn.name,dn.piece,dn.target)}function cQ(dm,dp,dl,dn){return"e_c="+t(dm)+"&e_a="+t(dp)+(J(dl)?"&e_n="+t(dl):"")+(J(dn)?"&e_v="+t(dn):"")}function at(dn,dq,dl,dp,ds,dr){if(a(String(dn)).length===0||a(String(dq)).length===0){ak("Error while logging event: Parameters `category` and `action` must not be empty or filled with whitespaces");
|
59 |
+
return false}var dm=ct(cQ(dn,dq,dl,dp),ds,"event");bF(dm,bJ,dr)}function b8(dl,dp,dm,dq){var dn=ct("search="+t(dl)+(dp?"&search_cat="+t(dp):"")+(J(dm)?"&search_count="+dm:""),dq,"sitesearch");bF(dn,bJ)}function cV(dl,dq,dp,dn){var dm=ct("idgoal="+dl+(dq?"&revenue="+dq:""),dp,"goal");bF(dm,bJ,dn)}function c3(dp,dl,dt,ds,dn){var dr=dl+"="+t(b2(dp));var dm=cu(dn,"click",dp);if(dm){dr+="&"+dm}var dq=ct(dr,dt,"link");bF(dq,bJ,ds)}function bU(dm,dl){if(dm!==""){return dm+dl.charAt(0).toUpperCase()+dl.slice(1)}return dl}function ch(dr){var dq,dl,dp=["","webkit","ms","moz"],dn;if(!bf){for(dl=0;dl<dp.length;dl++){dn=dp[dl];if(Object.prototype.hasOwnProperty.call(G,bU(dn,"hidden"))){if(G[bU(dn,"visibilityState")]==="prerender"){dq=true}break}}}if(dq){an(G,dn+"visibilitychange",function dm(){G.removeEventListener(dn+"visibilitychange",dm,false);dr()});return}dr()}function br(){var dm=aZ().uuid;var dl=aJ();return dm+dl}function cj(dl){if(!dl){return}if(!ae.hasNodeAttribute(dl,"href")){return}var dm=ae.getAttributeValueFromNode(dl,"href");
|
60 |
+
if(!dm||aV(dm)){return}dm=k(dm,av);var dn=br();dm=F(dm,av,dn);ae.setAnyAttribute(dl,"href",dm)}function aB(dp){var dq=ae.getAttributeValueFromNode(dp,"href");if(!dq){return false}dq=String(dq);var dm=dq.indexOf("//")===0||dq.indexOf("http://")===0||dq.indexOf("https://")===0;if(!dm){return false}var dl=dp.pathname||cl(dp.href);var dn=(dp.hostname||d(dp.href)).toLowerCase();if(ar(dn,dl)){if(!cH(cW,L(dn))){return true}return false}return false}function cG(dl){var dm=de(dl);if(dm&&dm.type){dm.href=p(dm.href);c3(dm.href,dm.type,undefined,null,dl);return}if(cO){dl=au(dl);if(aB(dl)){cj(dl)}}}function cw(){return G.all&&!G.addEventListener}function cX(dl){var dn=dl.which;var dm=(typeof dl.button);if(!dn&&dm!=="undefined"){if(cw()){if(dl.button&1){dn=1}else{if(dl.button&2){dn=3}else{if(dl.button&4){dn=2}}}}else{if(dl.button===0||dl.button==="0"){dn=1}else{if(dl.button&1){dn=2}else{if(dl.button&2){dn=3}}}}}return dn}function bT(dl){switch(cX(dl)){case 1:return"left";case 2:return"middle";case 3:return"right"
|
61 |
+
}}function a2(dl){return dl.target||dl.srcElement}function aC(dl){return function(dp){dp=dp||T.event;var dn=bT(dp);var dq=a2(dp);if(dp.type==="click"){var dm=false;if(dl&&dn==="middle"){dm=true}if(dq&&!dm){cG(dq)}}else{if(dp.type==="mousedown"){if(dn==="middle"&&dq){aS=dn;bA=dq}else{aS=bA=null}}else{if(dp.type==="mouseup"){if(dn===aS&&dq===bA){cG(dq)}aS=bA=null}else{if(dp.type==="contextmenu"){cG(dq)}}}}}}function aq(dn,dm){var dl=typeof dm;if(dl==="undefined"){dm=true}an(dn,"click",aC(dm),false);if(dm){an(dn,"mouseup",aC(dm),false);an(dn,"mousedown",aC(dm),false);an(dn,"contextmenu",aC(dm),false)}}function bD(dn,dq){ap=true;var dp,dm=a1(bz,"ignore"),dr=G.links,dl=null,ds=null;if(dr){for(dp=0;dp<dr.length;dp++){dl=dr[dp];if(!dm.test(dl.className)){ds=typeof dl.piwikTrackers;if("undefined"===ds){dl.piwikTrackers=[]}if(-1===M(dl.piwikTrackers,dq)){dl.piwikTrackers.push(dq);aq(dl,dn)}}}}}function aT(dm,dq,dr){if(cf){return true}cf=true;var ds=false;var dp,dn;function dl(){ds=true}n(function(){function dt(dv){setTimeout(function(){if(!cf){return
|
62 |
+
}ds=false;dr.trackVisibleContentImpressions();dt(dv)},dv)}function du(dv){setTimeout(function(){if(!cf){return}if(ds){ds=false;dr.trackVisibleContentImpressions()}du(dv)},dv)}if(dm){dp=["scroll","resize"];for(dn=0;dn<dp.length;dn++){if(G.addEventListener){G.addEventListener(dp[dn],dl,false)}else{T.attachEvent("on"+dp[dn],dl)}}du(100)}if(dq&&dq>0){dq=parseInt(dq,10);dt(dq)}})}var bC={enabled:true,requests:[],timeout:null,interval:2500,sendRequests:function(){var dl=this.requests;this.requests=[];if(dl.length===1){bF(dl[0],bJ)}else{dh(dl,bJ)}},canQueue:function(){return !m&&this.enabled},pushMultiple:function(dm){if(!this.canQueue()){dh(dm,bJ);return}var dl;for(dl=0;dl<dm.length;dl++){this.push(dm[dl])}},push:function(dl){if(!dl){return}if(!this.canQueue()){bF(dl,bJ);return}bC.requests.push(dl);if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.timeout=setTimeout(function(){bC.timeout=null;bC.sendRequests()},bC.interval);var dm="RequestQueue"+ax;if(!Object.prototype.hasOwnProperty.call(b,dm)){b[dm]={unload:function(){if(bC.timeout){clearTimeout(bC.timeout)
|
63 |
+
}bC.sendRequests()}}}}};bi();aM();this.hasConsent=function(){return bB};this.getVisitorId=function(){return aZ().uuid};this.getVisitorInfo=function(){return cP()};this.getAttributionInfo=function(){return bM()};this.getAttributionCampaignName=function(){return bM()[0]};this.getAttributionCampaignKeyword=function(){return bM()[1]};this.getAttributionReferrerTimestamp=function(){return bM()[2]};this.getAttributionReferrerUrl=function(){return bM()[3]};this.setTrackerUrl=function(dl){aE=dl};this.getTrackerUrl=function(){return aE};this.getPiwikUrl=function(){return O(this.getTrackerUrl(),bH)};this.addTracker=function(dl,dn){if(!J(dl)||null===dl){dl=this.getTrackerUrl()}var dm=new Q(dl,dn);I.push(dm);e.trigger("TrackerAdded",[this]);return dm};this.getSiteId=function(){return b6};this.setSiteId=function(dl){b3(dl)};this.resetUserId=function(){by=""};this.setUserId=function(dl){if(Y(dl)){by=dl}};this.setVisitorId=function(dm){var dl=/[0-9A-Fa-f]{16}/g;if(w(dm)&&dl.test(dm)){bO=dm}else{ak("Invalid visitorId set"+dm)
|
64 |
+
}};this.getUserId=function(){return by};this.setCustomData=function(dl,dm){if(W(dl)){ao=dl}else{if(!ao){ao={}}ao[dl]=dm}};this.getCustomData=function(){return ao};this.setCustomRequestProcessing=function(dl){cb=dl};this.appendToTrackingUrl=function(dl){c1=dl};this.getRequest=function(dl){return ct(dl)};this.addPlugin=function(dl,dm){b[dl]=dm};this.setCustomDimension=function(dl,dm){dl=parseInt(dl,10);if(dl>0){if(!J(dm)){dm=""}if(!w(dm)){dm=String(dm)}bm[dl]=dm}};this.getCustomDimension=function(dl){dl=parseInt(dl,10);if(dl>0&&Object.prototype.hasOwnProperty.call(bm,dl)){return bm[dl]}};this.deleteCustomDimension=function(dl){dl=parseInt(dl,10);if(dl>0){delete bm[dl]}};this.setCustomVariable=function(dm,dl,dq,dn){var dp;if(!J(dn)){dn="visit"}if(!J(dl)){return}if(!J(dq)){dq=""}if(dm>0){dl=!w(dl)?String(dl):dl;dq=!w(dq)?String(dq):dq;dp=[dl.slice(0,bt),dq.slice(0,bt)];if(dn==="visit"||dn===2){cF();aR[dm]=dp}else{if(dn==="page"||dn===3){bW[dm]=dp}else{if(dn==="event"){cm[dm]=dp}}}}};this.getCustomVariable=function(dm,dn){var dl;
|
65 |
+
if(!J(dn)){dn="visit"}if(dn==="page"||dn===3){dl=bW[dm]}else{if(dn==="event"){dl=cm[dm]}else{if(dn==="visit"||dn===2){cF();dl=aR[dm]}}}if(!J(dl)||(dl&&dl[0]==="")){return false}return dl};this.deleteCustomVariable=function(dl,dm){if(this.getCustomVariable(dl,dm)){this.setCustomVariable(dl,"","",dm)}};this.deleteCustomVariables=function(dl){if(dl==="page"||dl===3){bW={}}else{if(dl==="event"){cm={}}else{if(dl==="visit"||dl===2){aR={}}}}};this.storeCustomVariablesInCookie=function(){bQ=true};this.setLinkTrackingTimer=function(dl){bJ=dl};this.getLinkTrackingTimer=function(){return bJ};this.setDownloadExtensions=function(dl){if(w(dl)){dl=dl.split("|")}c8=dl};this.addDownloadExtensions=function(dm){var dl;if(w(dm)){dm=dm.split("|")}for(dl=0;dl<dm.length;dl++){c8.push(dm[dl])}};this.removeDownloadExtensions=function(dn){var dm,dl=[];if(w(dn)){dn=dn.split("|")}for(dm=0;dm<c8.length;dm++){if(M(dn,c8[dm])===-1){dl.push(c8[dm])}}c8=dl};this.setDomains=function(dl){ay=w(dl)?[dl]:dl;var dq=false,dn=0,dm;
|
66 |
+
for(dn;dn<ay.length;dn++){dm=String(ay[dn]);if(cH(cW,L(dm))){dq=true;break}var dp=cl(dm);if(dp&&dp!=="/"&&dp!=="/*"){dq=true;break}}if(!dq){ay.push(cW)}};this.enableCrossDomainLinking=function(){cO=true};this.disableCrossDomainLinking=function(){cO=false};this.isCrossDomainLinkingEnabled=function(){return cO};this.setCrossDomainLinkingTimeout=function(dl){a0=dl};this.getCrossDomainLinkingUrlParameter=function(){return t(av)+"="+t(br())};this.setIgnoreClasses=function(dl){bz=w(dl)?[dl]:dl};this.setRequestMethod=function(dl){dc=dl||ci};this.setRequestContentType=function(dl){cx=dl||aI};this.setReferrerUrl=function(dl){bn=dl};this.setCustomUrl=function(dl){a5=bV(bN,dl)};this.getCurrentUrl=function(){return a5||bN};this.setDocumentTitle=function(dl){bj=dl};this.setAPIUrl=function(dl){bH=dl};this.setDownloadClasses=function(dl){bL=w(dl)?[dl]:dl};this.setLinkClasses=function(dl){a9=w(dl)?[dl]:dl};this.setCampaignNameKey=function(dl){cr=w(dl)?[dl]:dl};this.setCampaignKeywordKey=function(dl){bG=w(dl)?[dl]:dl
|
67 |
+
};this.discardHashTag=function(dl){bP=dl};this.setCookieNamePrefix=function(dl){bk=dl;aR=bX()};this.setCookieDomain=function(dl){var dm=L(dl);if(bw(dm)){cZ=dm;bi()}};this.getCookieDomain=function(){return cZ};this.hasCookies=function(){return"1"===b5()};this.setSessionCookie=function(dn,dm,dl){if(!dn){throw new Error("Missing cookie name")}if(!J(dl)){dl=cp}bu.push(dn);dg(aU(dn),dm,dl,bp,cZ)};this.getCookie=function(dm){var dl=aD(aU(dm));if(dl===0){return null}return dl};this.setCookiePath=function(dl){bp=dl;bi()};this.getCookiePath=function(dl){return bp};this.setVisitorCookieTimeout=function(dl){cK=dl*1000};this.setSessionCookieTimeout=function(dl){cp=dl*1000};this.getSessionCookieTimeout=function(){return cp};this.setReferralCookieTimeout=function(dl){c7=dl*1000};this.setConversionAttributionFirstReferrer=function(dl){bv=dl};this.setSecureCookie=function(dl){bS=dl};this.disableCookies=function(){bl=true;if(b6){aF()}};this.areCookiesEnabled=function(){return !bl};this.setCookieConsentGiven=function(){if(bl&&!cR){bl=false;
|
68 |
+
if(b6&&aw){aM();var dl=ct("ping=1",null,"ping");bF(dl,bJ)}}};this.requireCookieConsent=function(){if(this.getRememberedCookieConsent()){return false}this.disableCookies();return true};this.getRememberedCookieConsent=function(){return aD(cD)};this.forgetCookieConsentGiven=function(){bY(cD,bp,cZ);this.disableCookies()};this.rememberCookieConsentGiven=function(dm){if(dm){dm=dm*60*60*1000}else{dm=30*365*24*60*60*1000}this.setCookieConsentGiven();var dl=new Date().getTime();dg(cD,dl,dm,bp,cZ,bS)};this.deleteCookies=function(){aF()};this.setDoNotTrack=function(dm){var dl=h.doNotTrack||h.msDoNotTrack;cR=dm&&(dl==="yes"||dl==="1");if(cR){this.disableCookies()}};this.alwaysUseSendBeacon=function(){cY=true};this.addListener=function(dm,dl){aq(dm,dl)};this.enableLinkTracking=function(dm){db=true;var dl=this;ch(function(){q(function(){bD(dm,dl)});n(function(){bD(dm,dl)})})};this.enableJSErrorTracking=function(){if(cU){return}cU=true;var dl=T.onerror;T.onerror=function(dr,dp,dn,dq,dm){ch(function(){var ds="JavaScript Errors";
|
69 |
+
var dt=dp+":"+dn;if(dq){dt+=":"+dq}at(ds,dt,dr)});if(dl){return dl(dr,dp,dn,dq,dm)}return false}};this.disablePerformanceTracking=function(){a3=false};this.setGenerationTimeMs=function(dl){cn=parseInt(dl,10)};this.setVisitStandardLength=function(dl){dl=Math.max(dl,5);c9=dl};this.enableHeartBeatTimer=function(dl){dl=Math.max(dl,5);a6=(dl||15)*1000;if(c0!==null){di()}};this.disableHeartBeatTimer=function(){bK();if(a6||aO){if(T.removeEventListener){T.removeEventListener("focus",bb);T.removeEventListener("blur",az)}else{if(T.detachEvent){T.detachEvent("onfocus",bb);T.detachEvent("onblur",az)}}}a6=null;aO=false};this.killFrame=function(){if(T.location!==T.top.location){T.top.location=T.location}};this.redirectFile=function(dl){if(T.location.protocol==="file:"){T.location=dl}};this.setCountPreRendered=function(dl){bf=dl};this.trackGoal=function(dl,dp,dn,dm){ch(function(){cV(dl,dp,dn,dm)})};this.trackLink=function(dm,dl,dp,dn){ch(function(){c3(dm,dl,dp,dn)})};this.getNumTrackedPageViews=function(){return cs
|
70 |
+
};this.trackPageView=function(dl,dn,dm){ca=[];cL=[];if(N(b6)){ch(function(){Z(aE,bH,b6)})}else{ch(function(){cs++;b0(dl,dn,dm)})}};this.trackAllContentImpressions=function(){if(N(b6)){return}ch(function(){q(function(){var dl=v.findContentNodes();var dm=cz(dl);bC.pushMultiple(dm)})})};this.trackVisibleContentImpressions=function(dl,dm){if(N(b6)){return}if(!J(dl)){dl=true}if(!J(dm)){dm=750}aT(dl,dm,this);ch(function(){n(function(){var dn=v.findContentNodes();var dp=ba(dn);bC.pushMultiple(dp)})})};this.trackContentImpression=function(dn,dl,dm){if(N(b6)){return}dn=a(dn);dl=a(dl);dm=a(dm);if(!dn){return}dl=dl||"Unknown";ch(function(){var dp=aG(dn,dl,dm);bC.push(dp)})};this.trackContentImpressionsWithinNode=function(dl){if(N(b6)||!dl){return}ch(function(){if(cf){n(function(){var dm=v.findContentNodesWithinNode(dl);var dn=ba(dm);bC.pushMultiple(dn)})}else{q(function(){var dm=v.findContentNodesWithinNode(dl);var dn=cz(dm);bC.pushMultiple(dn)})}})};this.trackContentInteraction=function(dn,dp,dl,dm){if(N(b6)){return
|
71 |
+
}dn=a(dn);dp=a(dp);dl=a(dl);dm=a(dm);if(!dn||!dp){return}dl=dl||"Unknown";ch(function(){var dq=aQ(dn,dp,dl,dm);if(dq){bC.push(dq)}})};this.trackContentInteractionNode=function(dm,dl){if(N(b6)||!dm){return}ch(function(){var dn=dd(dm,dl);if(dn){bC.push(dn)}})};this.logAllContentBlocksOnPage=function(){var dn=v.findContentNodes();var dl=v.collectContent(dn);var dm=typeof console;if(dm!=="undefined"&&console&&console.log){console.log(dl)}};this.trackEvent=function(dm,dp,dl,dn,dr,dq){ch(function(){at(dm,dp,dl,dn,dr,dq)})};this.trackSiteSearch=function(dl,dn,dm,dp){ca=[];ch(function(){b8(dl,dn,dm,dp)})};this.setEcommerceView=function(dp,dl,dn,dm){if(Y(dn)){dn=String(dn)}if(!J(dn)||dn===null||dn===false||!dn.length){dn=""}else{if(dn instanceof Array){dn=JSON_PIWIK.stringify(dn)}}bW[5]=["_pkc",dn];if(J(dm)&&dm!==null&&dm!==false&&String(dm).length){bW[2]=["_pkp",dm]}if(!Y(dp)&&!Y(dl)){return}if(Y(dp)){bW[3]=["_pks",dp]}if(!Y(dl)){dl=""}bW[4]=["_pkn",dl]};this.getEcommerceItems=function(){return JSON.parse(JSON.stringify(c2))
|
72 |
+
};this.addEcommerceItem=function(dq,dl,dn,dm,dp){if(Y(dq)){c2[dq]=[String(dq),dl,dn,dm,dp]}};this.removeEcommerceItem=function(dl){if(Y(dl)){dl=String(dl);delete c2[dl]}};this.clearEcommerceCart=function(){c2={}};this.trackEcommerceOrder=function(dl,dq,dp,dn,dm,dr){bZ(dl,dq,dp,dn,dm,dr)};this.trackEcommerceCartUpdate=function(dl){bs(dl)};this.trackRequest=function(dm,dp,dn,dl){ch(function(){var dq=ct(dm,dp,dl);bF(dq,bJ,dn)})};this.ping=function(){this.trackRequest("ping=1",null,null,"ping")};this.disableQueueRequest=function(){bC.enabled=false};this.setRequestQueueInterval=function(dl){if(dl<1000){throw new Error("Request queue interval needs to be at least 1000ms")}bC.interval=dl};this.queueRequest=function(dl){ch(function(){var dm=ct(dl);bC.push(dm)})};this.isConsentRequired=function(){return cA};this.getRememberedConsent=function(){var dl=aD(be);if(aD(cN)){if(dl){bY(be,bp,cZ)}return null}if(!dl||dl===0){return null}return dl};this.hasRememberedConsent=function(){return !!this.getRememberedConsent()
|
73 |
+
};this.requireConsent=function(){cA=true;bB=this.hasRememberedConsent();if(!bB){bl=true}x++;b["CoreConsent"+x]={unload:function(){if(!bB){aF()}}}};this.setConsentGiven=function(dm){bB=true;bY(cN,bp,cZ);var dn,dl;for(dn=0;dn<cL.length;dn++){dl=typeof cL[dn];if(dl==="string"){bF(cL[dn],bJ)}else{if(dl==="object"){dh(cL[dn],bJ)}}}cL=[];if(!J(dm)||dm){this.setCookieConsentGiven()}};this.rememberConsentGiven=function(dn){if(dn){dn=dn*60*60*1000}else{dn=30*365*24*60*60*1000}var dl=true;this.setConsentGiven(dl);var dm=new Date().getTime();dg(be,dm,dn,bp,cZ,bS)};this.forgetConsentGiven=function(){var dl=30*365*24*60*60*1000;bY(be,bp,cZ);dg(cN,new Date().getTime(),dl,bp,cZ,bS);this.forgetCookieConsentGiven();this.requireConsent()};this.isUserOptedOut=function(){return !bB};this.optUserOut=this.forgetConsentGiven;this.forgetUserOptOut=function(){var dl=false;this.rememberConsentGiven(0,dl)};e.trigger("TrackerSetup",[this])}function H(){return{push:af}}function c(au,at){var av={};var aq,ar;for(aq=0;
|
74 |
+
aq<at.length;aq++){var ao=at[aq];av[ao]=1;for(ar=0;ar<au.length;ar++){if(au[ar]&&au[ar][0]){var ap=au[ar][0];if(ao===ap){af(au[ar]);delete au[ar];if(av[ap]>1&&ap!=="addTracker"){ak("The method "+ap+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation: https://developer.piwik.org/guides/tracking-javascript-guide#multiple-piwik-trackers')}av[ap]++}}}}return au}var C=["addTracker","forgetCookieConsentGiven","requireCookieConsent","disableCookies","setTrackerUrl","setAPIUrl","enableCrossDomainLinking","setCrossDomainLinkingTimeout","setSessionCookieTimeout","setVisitorCookieTimeout","setSecureCookie","setCookiePath","setCookieDomain","setDomains","setUserId","setVisitorId","setSiteId","alwaysUseSendBeacon","enableLinkTracking","setCookieConsentGiven","requireConsent","setConsentGiven"];function ad(ao,aq){var ap=new Q(ao,aq);I.push(ap);_paq=c(_paq,C);for(E=0;E<_paq.length;E++){if(_paq[E]){af(_paq[E])
|
75 |
}}_paq=new H();e.trigger("TrackerAdded",[ap]);return ap}an(T,"beforeunload",ai,false);an(T,"message",function(au){if(!au||!au.origin){return}var aw,ar,ap;var ax=d(au.origin);var at=e.getAsyncTrackers();for(ar=0;ar<at.length;ar++){ap=d(at[ar].getPiwikUrl());if(ap===ax){aw=at[ar];break}}if(!aw){return}var aq=null;try{aq=JSON.parse(au.data)}catch(av){return}if(!aq){return}function ao(aA){var aC=G.getElementsByTagName("iframe");for(ar=0;ar<aC.length;ar++){var aB=aC[ar];var ay=d(aB.src);if(aB.contentWindow&&J(aB.contentWindow.postMessage)&&ay===ax){var az=JSON.stringify(aA);aB.contentWindow.postMessage(az,"*")}}}if(J(aq.maq_initial_value)){ao({maq_opted_in:aq.maq_initial_value&&aw.hasConsent(),maq_url:aw.getPiwikUrl(),maq_optout_by_default:aw.isConsentRequired()})}else{if(J(aq.maq_opted_in)){at=e.getAsyncTrackers();for(ar=0;ar<at.length;ar++){aw=at[ar];if(aq.maq_opted_in){aw.rememberConsentGiven()}else{aw.forgetConsentGiven()}}ao({maq_confirm_opted_in:aw.hasConsent(),maq_url:aw.getPiwikUrl(),maq_optout_by_default:aw.isConsentRequired()})
|
76 |
}}},false);Date.prototype.getTimeAlias=Date.prototype.getTime;e={initialized:false,JSON:JSON_PIWIK,DOM:{addEventListener:function(ar,aq,ap,ao){var at=typeof ao;if(at==="undefined"){ao=false}an(ar,aq,ap,ao)},onLoad:n,onReady:q,isNodeVisible:j,isOrWasNodeVisible:v.isNodeVisible},on:function(ap,ao){if(!y[ap]){y[ap]=[]}y[ap].push(ao)},off:function(aq,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){if(y[aq][ao]===ap){y[aq].splice(ao,1)}}},trigger:function(aq,ar,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){y[aq][ao].apply(ap||T,ar)}},addPlugin:function(ao,ap){b[ao]=ap},getTracker:function(ao,ap){if(!J(ap)){ap=this.getAsyncTracker().getSiteId()}if(!J(ao)){ao=this.getAsyncTracker().getTrackerUrl()}return new Q(ao,ap)},getAsyncTrackers:function(){return I},addTracker:function(ao,aq){var ap;if(!I.length){ap=ad(ao,aq)}else{ap=I[0].addTracker(ao,aq)}return ap},getAsyncTracker:function(ap,at){var ar;if(I&&I.length&&I[0]){ar=I[0]}else{return ad(ap,at)}if(!at&&!ap){return ar
|
77 |
}if((!J(at)||null===at)&&ar){at=ar.getSiteId()}if((!J(ap)||null===ap)&&ar){ap=ar.getTrackerUrl()}var aq,ao=0;for(ao;ao<I.length;ao++){aq=I[ao];if(aq&&String(aq.getSiteId())===String(at)&&aq.getTrackerUrl()===ap){return aq}}},retryMissedPluginCalls:function(){var ap=ah;ah=[];var ao=0;for(ao;ao<ap.length;ao++){af(ap[ao])}}};if(typeof define==="function"&&define.amd){define("piwik",[],function(){return e});define("matomo",[],function(){return e})}return e}())}
|
app/js/tracker.php
CHANGED
@@ -67,6 +67,20 @@ $environment = new \Piwik\Application\Environment(null, array(
|
|
67 |
));
|
68 |
$environment->init();
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
ProxyHttp::serverStaticFile($file, "application/javascript; charset=UTF-8", $daysExpireFarFuture, $byteStart, $byteEnd);
|
71 |
|
72 |
exit;
|
67 |
));
|
68 |
$environment->init();
|
69 |
|
70 |
+
if (!\Piwik\Tracker\IgnoreCookie::isIgnoreCookieFound()) {
|
71 |
+
|
72 |
+
$request = new \Piwik\Tracker\Request(array());
|
73 |
+
|
74 |
+
if ($request->shouldUseThirdPartyCookie()) {
|
75 |
+
$visitorId = $request->getVisitorIdForThirdPartyCookie();
|
76 |
+
if (!$visitorId) {
|
77 |
+
$visitorId = \Piwik\Common::hex2bin(\Piwik\Tracker\Visit::generateUniqueVisitorId());
|
78 |
+
}
|
79 |
+
$request->setThirdPartyCookie($visitorId);
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
|
84 |
ProxyHttp::serverStaticFile($file, "application/javascript; charset=UTF-8", $daysExpireFarFuture, $byteStart, $byteEnd);
|
85 |
|
86 |
exit;
|
app/matomo.js
CHANGED
@@ -38,39 +38,40 @@ if(!aq){aq="/"}}return aq},findMediaUrlInNode:function(at){if(!at){return}var aq
|
|
38 |
if(aq&&au.offsetTop){aq=(au.offsetTop+at.height)>0}var ap=ar.clientWidth;if(T.innerWidth&&ap>T.innerWidth){ap=T.innerWidth}var ao=ar.clientHeight;if(T.innerHeight&&ao>T.innerHeight){ao=T.innerHeight}return((at.bottom>0||aq)&&at.right>0&&at.left<ap&&((at.top<ao)||aq))},isNodeVisible:function(ap){var ao=j(ap);var aq=this.isOrWasNodeInViewport(ap);return ao&&aq},buildInteractionRequestParams:function(ao,ap,aq,ar){var at="";if(ao){at+="c_i="+t(ao)}if(ap){if(at){at+="&"}at+="c_n="+t(ap)}if(aq){if(at){at+="&"}at+="c_p="+t(aq)}if(ar){if(at){at+="&"}at+="c_t="+t(ar)}return at},buildImpressionRequestParams:function(ao,ap,aq){var ar="c_n="+t(ao)+"&c_p="+t(ap);if(aq){ar+="&c_t="+t(aq)}return ar},buildContentBlock:function(aq){if(!aq){return}var ao=this.findContentName(aq);var ap=this.findContentPiece(aq);var ar=this.findContentTarget(aq);ao=this.trim(ao);ap=this.trim(ap);ar=this.trim(ar);return{name:ao||"Unknown",piece:ap||"Unknown",target:ar||""}},collectContent:function(ar){if(!ar||!ar.length){return[]
|
39 |
}var aq=[];var ao,ap;for(ao=0;ao<ar.length;ao++){ap=this.buildContentBlock(ar[ao]);if(J(ap)){aq.push(ap)}}return aq},setLocation:function(ao){this.location=ao},getLocation:function(){var ao=this.location||T.location;if(!ao.origin){ao.origin=ao.protocol+"//"+ao.hostname+(ao.port?":"+ao.port:"")}return ao},toAbsoluteUrl:function(ap){if((!ap||String(ap)!==ap)&&ap!==""){return ap}if(""===ap){return this.getLocation().href}if(ap.search(/^\/\//)!==-1){return this.getLocation().protocol+ap}if(ap.search(/:\/\//)!==-1){return ap}if(0===ap.indexOf("#")){return this.getLocation().origin+this.getLocation().pathname+ap}if(0===ap.indexOf("?")){return this.getLocation().origin+this.getLocation().pathname+ap}if(0===ap.search("^[a-zA-Z]{2,11}:")){return ap}if(ap.search(/^\//)!==-1){return this.getLocation().origin+ap}var ao="(.*/)";var aq=this.getLocation().origin+this.getLocation().pathname.match(new RegExp(ao))[0];return aq+ap},isUrlToCurrentDomain:function(ap){var aq=this.toAbsoluteUrl(ap);if(!aq){return false
|
40 |
}var ao=this.getLocation().origin;if(ao===aq){return true}if(0===String(aq).indexOf(ao)){if(":"===String(aq).substr(ao.length,1)){return false}return true}return false},setHrefAttribute:function(ap,ao){if(!ap||!ao){return}ae.setAnyAttribute(ap,"href",ao)},shouldIgnoreInteraction:function(aq){var ap=ae.hasNodeAttribute(aq,this.CONTENT_IGNOREINTERACTION_ATTR);var ao=ae.hasNodeCssClass(aq,this.CONTENT_IGNOREINTERACTION_CLASS);return ap||ao}};function O(ap,at){if(at){return at}ap=v.toAbsoluteUrl(ap);if(z(ap,"?")){var ar=ap.indexOf("?");ap=ap.slice(0,ar)}if(R(ap,"matomo.php")){ap=g(ap,"matomo.php".length)}else{if(R(ap,"piwik.php")){ap=g(ap,"piwik.php".length)}else{if(R(ap,".php")){var ao=ap.lastIndexOf("/");var aq=1;ap=ap.slice(0,ao+aq)}}}if(R(ap,"/js/")){ap=g(ap,"js/".length)}return ap}function N(av){var ax="Piwik_Overlay";var ap=new RegExp("index\\.php\\?module=Overlay&action=startOverlaySession&idSite=([0-9]+)&period=([^&]+)&date=([^&]+)(&segment=.*)?$");var aq=ap.exec(G.referrer);if(aq){var at=aq[1];
|
41 |
-
if(at!==String(av)){return false}var au=aq[2],ao=aq[3],ar=aq[4];if(!ar){ar=""}else{if(ar.indexOf("&segment=")===0){ar=ar.substr("&segment=".length)}}T.name=ax+"###"+au+"###"+ao+"###"+ar}var aw=T.name.split("###");return aw.length===4&&aw[0]===ax}function Z(ap,aw,ar){var av=T.name.split("###"),au=av[1],ao=av[2],at=av[3],aq=O(ap,aw);o(aq+"plugins/Overlay/client/client.js?v=1",function(){Piwik_Overlay_Client.initialize(aq,ar,au,ao,at)})}function u(){var aq;try{aq=T.frameElement}catch(ap){return true}if(J(aq)){return(aq&&String(aq.nodeName).toLowerCase()==="iframe")?true:false}try{return T.self!==T.top}catch(ao){return true}}function Q(
|
42 |
-
try{
|
43 |
-
if(
|
44 |
-
var
|
45 |
-
|
46 |
-
return !
|
47 |
-
if(
|
48 |
-
}if(A(T.GearsFactory)){
|
49 |
-
var dl=new RegExp("^[a-zA-Z0-9]+$");if(
|
50 |
-
}function
|
51 |
-
if(
|
52 |
-
var
|
53 |
-
}}}if(
|
54 |
-
}
|
55 |
-
}var
|
56 |
-
if(!
|
57 |
-
v.setHrefAttribute(
|
58 |
-
}}}function
|
59 |
-
return false}var
|
60 |
-
if(!
|
61 |
-
}}function
|
62 |
-
}
|
63 |
-
}
|
64 |
-
}ao[
|
65 |
-
}else{if(dl==="visit"||
|
66 |
-
if(dm&&
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
|
|
|
74 |
}}_paq=new H();e.trigger("TrackerAdded",[ap]);return ap}an(T,"beforeunload",ai,false);an(T,"message",function(au){if(!au||!au.origin){return}var aw,ar,ap;var ax=d(au.origin);var at=e.getAsyncTrackers();for(ar=0;ar<at.length;ar++){ap=d(at[ar].getPiwikUrl());if(ap===ax){aw=at[ar];break}}if(!aw){return}var aq=null;try{aq=JSON.parse(au.data)}catch(av){return}if(!aq){return}function ao(aA){var aC=G.getElementsByTagName("iframe");for(ar=0;ar<aC.length;ar++){var aB=aC[ar];var ay=d(aB.src);if(aB.contentWindow&&J(aB.contentWindow.postMessage)&&ay===ax){var az=JSON.stringify(aA);aB.contentWindow.postMessage(az,"*")}}}if(J(aq.maq_initial_value)){ao({maq_opted_in:aq.maq_initial_value&&aw.hasConsent(),maq_url:aw.getPiwikUrl(),maq_optout_by_default:aw.isConsentRequired()})}else{if(J(aq.maq_opted_in)){at=e.getAsyncTrackers();for(ar=0;ar<at.length;ar++){aw=at[ar];if(aq.maq_opted_in){aw.rememberConsentGiven()}else{aw.forgetConsentGiven()}}ao({maq_confirm_opted_in:aw.hasConsent(),maq_url:aw.getPiwikUrl(),maq_optout_by_default:aw.isConsentRequired()})
|
75 |
}}},false);Date.prototype.getTimeAlias=Date.prototype.getTime;e={initialized:false,JSON:JSON_PIWIK,DOM:{addEventListener:function(ar,aq,ap,ao){var at=typeof ao;if(at==="undefined"){ao=false}an(ar,aq,ap,ao)},onLoad:n,onReady:q,isNodeVisible:j,isOrWasNodeVisible:v.isNodeVisible},on:function(ap,ao){if(!y[ap]){y[ap]=[]}y[ap].push(ao)},off:function(aq,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){if(y[aq][ao]===ap){y[aq].splice(ao,1)}}},trigger:function(aq,ar,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){y[aq][ao].apply(ap||T,ar)}},addPlugin:function(ao,ap){b[ao]=ap},getTracker:function(ao,ap){if(!J(ap)){ap=this.getAsyncTracker().getSiteId()}if(!J(ao)){ao=this.getAsyncTracker().getTrackerUrl()}return new Q(ao,ap)},getAsyncTrackers:function(){return I},addTracker:function(ao,aq){var ap;if(!I.length){ap=ad(ao,aq)}else{ap=I[0].addTracker(ao,aq)}return ap},getAsyncTracker:function(ap,at){var ar;if(I&&I.length&&I[0]){ar=I[0]}else{return ad(ap,at)}if(!at&&!ap){return ar
|
76 |
}if((!J(at)||null===at)&&ar){at=ar.getSiteId()}if((!J(ap)||null===ap)&&ar){ap=ar.getTrackerUrl()}var aq,ao=0;for(ao;ao<I.length;ao++){aq=I[ao];if(aq&&String(aq.getSiteId())===String(at)&&aq.getTrackerUrl()===ap){return aq}}},retryMissedPluginCalls:function(){var ap=ah;ah=[];var ao=0;for(ao;ao<ap.length;ao++){af(ap[ao])}}};if(typeof define==="function"&&define.amd){define("piwik",[],function(){return e});define("matomo",[],function(){return e})}return e}())}
|
38 |
if(aq&&au.offsetTop){aq=(au.offsetTop+at.height)>0}var ap=ar.clientWidth;if(T.innerWidth&&ap>T.innerWidth){ap=T.innerWidth}var ao=ar.clientHeight;if(T.innerHeight&&ao>T.innerHeight){ao=T.innerHeight}return((at.bottom>0||aq)&&at.right>0&&at.left<ap&&((at.top<ao)||aq))},isNodeVisible:function(ap){var ao=j(ap);var aq=this.isOrWasNodeInViewport(ap);return ao&&aq},buildInteractionRequestParams:function(ao,ap,aq,ar){var at="";if(ao){at+="c_i="+t(ao)}if(ap){if(at){at+="&"}at+="c_n="+t(ap)}if(aq){if(at){at+="&"}at+="c_p="+t(aq)}if(ar){if(at){at+="&"}at+="c_t="+t(ar)}return at},buildImpressionRequestParams:function(ao,ap,aq){var ar="c_n="+t(ao)+"&c_p="+t(ap);if(aq){ar+="&c_t="+t(aq)}return ar},buildContentBlock:function(aq){if(!aq){return}var ao=this.findContentName(aq);var ap=this.findContentPiece(aq);var ar=this.findContentTarget(aq);ao=this.trim(ao);ap=this.trim(ap);ar=this.trim(ar);return{name:ao||"Unknown",piece:ap||"Unknown",target:ar||""}},collectContent:function(ar){if(!ar||!ar.length){return[]
|
39 |
}var aq=[];var ao,ap;for(ao=0;ao<ar.length;ao++){ap=this.buildContentBlock(ar[ao]);if(J(ap)){aq.push(ap)}}return aq},setLocation:function(ao){this.location=ao},getLocation:function(){var ao=this.location||T.location;if(!ao.origin){ao.origin=ao.protocol+"//"+ao.hostname+(ao.port?":"+ao.port:"")}return ao},toAbsoluteUrl:function(ap){if((!ap||String(ap)!==ap)&&ap!==""){return ap}if(""===ap){return this.getLocation().href}if(ap.search(/^\/\//)!==-1){return this.getLocation().protocol+ap}if(ap.search(/:\/\//)!==-1){return ap}if(0===ap.indexOf("#")){return this.getLocation().origin+this.getLocation().pathname+ap}if(0===ap.indexOf("?")){return this.getLocation().origin+this.getLocation().pathname+ap}if(0===ap.search("^[a-zA-Z]{2,11}:")){return ap}if(ap.search(/^\//)!==-1){return this.getLocation().origin+ap}var ao="(.*/)";var aq=this.getLocation().origin+this.getLocation().pathname.match(new RegExp(ao))[0];return aq+ap},isUrlToCurrentDomain:function(ap){var aq=this.toAbsoluteUrl(ap);if(!aq){return false
|
40 |
}var ao=this.getLocation().origin;if(ao===aq){return true}if(0===String(aq).indexOf(ao)){if(":"===String(aq).substr(ao.length,1)){return false}return true}return false},setHrefAttribute:function(ap,ao){if(!ap||!ao){return}ae.setAnyAttribute(ap,"href",ao)},shouldIgnoreInteraction:function(aq){var ap=ae.hasNodeAttribute(aq,this.CONTENT_IGNOREINTERACTION_ATTR);var ao=ae.hasNodeCssClass(aq,this.CONTENT_IGNOREINTERACTION_CLASS);return ap||ao}};function O(ap,at){if(at){return at}ap=v.toAbsoluteUrl(ap);if(z(ap,"?")){var ar=ap.indexOf("?");ap=ap.slice(0,ar)}if(R(ap,"matomo.php")){ap=g(ap,"matomo.php".length)}else{if(R(ap,"piwik.php")){ap=g(ap,"piwik.php".length)}else{if(R(ap,".php")){var ao=ap.lastIndexOf("/");var aq=1;ap=ap.slice(0,ao+aq)}}}if(R(ap,"/js/")){ap=g(ap,"js/".length)}return ap}function N(av){var ax="Piwik_Overlay";var ap=new RegExp("index\\.php\\?module=Overlay&action=startOverlaySession&idSite=([0-9]+)&period=([^&]+)&date=([^&]+)(&segment=.*)?$");var aq=ap.exec(G.referrer);if(aq){var at=aq[1];
|
41 |
+
if(at!==String(av)){return false}var au=aq[2],ao=aq[3],ar=aq[4];if(!ar){ar=""}else{if(ar.indexOf("&segment=")===0){ar=ar.substr("&segment=".length)}}T.name=ax+"###"+au+"###"+ao+"###"+ar}var aw=T.name.split("###");return aw.length===4&&aw[0]===ax}function Z(ap,aw,ar){var av=T.name.split("###"),au=av[1],ao=av[2],at=av[3],aq=O(ap,aw);o(aq+"plugins/Overlay/client/client.js?v=1",function(){Piwik_Overlay_Client.initialize(aq,ar,au,ao,at)})}function u(){var aq;try{aq=T.frameElement}catch(ap){return true}if(J(aq)){return(aq&&String(aq.nodeName).toLowerCase()==="iframe")?true:false}try{return T.self!==T.top}catch(ao){return true}}function Q(ce,b9){var bI=this,be="mtm_consent",cD="mtm_cookie_consent",cN="mtm_consent_removed",b4=aa(G.domain,T.location.href,K()),cW=L(b4[0]),bN=p(b4[1]),bn=p(b4[2]),cU=false,ci="GET",dc=ci,aI="application/x-www-form-urlencoded; charset=UTF-8",cx=aI,aE=ce||"",bH="",c1="",b6=b9||"",by="",bO="",a5,bj="",c8=["7z","aac","apk","arc","arj","asf","asx","avi","azw3","bin","csv","deb","dmg","doc","docx","epub","exe","flv","gif","gz","gzip","hqx","ibooks","jar","jpg","jpeg","js","mobi","mp2","mp3","mp4","mpg","mpeg","mov","movie","msi","msp","odb","odf","odg","ods","odt","ogg","ogv","pdf","phps","png","ppt","pptx","qt","qtm","ra","ram","rar","rpm","sea","sit","tar","tbz","tbz2","bz","bz2","tgz","torrent","txt","wav","wma","wmv","wpd","xls","xlsx","xml","z","zip"],ay=[cW],bz=[],bL=[],a9=[],bJ=500,cY=false,cJ,a6,bR,c9=1800,bP,ao,cr=["pk_campaign","piwik_campaign","utm_campaign","utm_source","utm_medium"],bG=["pk_kwd","piwik_kwd","utm_term"],bk="_pk_",av="pk_vid",a0=180,cZ,bp,bS=false,bl=false,cR,bf,bv,cK=33955200000,cp=1800000,c7=15768000000,a3=true,cn=0,bQ=false,aR=false,cb,bW={},cm={},bm={},bt=200,c2={},da={},ca=[],cf=false,cB=false,ap=false,db=false,cO=false,aO=false,bd=u(),cT=null,c0=null,cc,aS,bA,b7=am,bo,aL,cs=0,bu=["id","ses","cvar","ref"],cA=false,bB=null,cL=[],ax=U++,aw=false;
|
42 |
+
try{bj=G.title}catch(cy){bj=""}function dg(ds,dq,dp,dr,dn,dm){if(bl){return}var dl;if(dp){dl=new Date();dl.setTime(dl.getTime()+dp)}G.cookie=ds+"="+t(dq)+(dp?";expires="+dl.toGMTString():"")+";path="+(dr||"/")+(dn?";domain="+dn:"")+(dm?";secure":"")+";SameSite=Lax"}function aD(dn){if(bl){return 0}var dl=new RegExp("(^|;)[ ]*"+dn+"=([^;]*)"),dm=dl.exec(G.cookie);return dm?S(dm[2]):0}bB=!aD(cN);function b2(dl){var dm;dl=k(dl,av);if(bP){dm=new RegExp("#.*");return dl.replace(dm,"")}return dl}function bV(dn,dl){var dp=s(dl),dm;if(dp){return dl}if(dl.slice(0,1)==="/"){return s(dn)+"://"+d(dn)+dl}dn=b2(dn);dm=dn.indexOf("?");if(dm>=0){dn=dn.slice(0,dm)}dm=dn.lastIndexOf("/");if(dm!==dn.length-1){dn=dn.slice(0,dm+1)}return dn+dl}function cH(dn,dl){var dm;dn=String(dn).toLowerCase();dl=String(dl).toLowerCase();if(dn===dl){return true}if(dl.slice(0,1)==="."){if(dn===dl.slice(1)){return true}dm=dn.length-dl.length;if((dm>0)&&(dn.slice(dm)===dl)){return true}}return false}function cl(dl){var dm=document.createElement("a");
|
43 |
+
if(dl.indexOf("//")!==0&&dl.indexOf("http")!==0){if(dl.indexOf("*")===0){dl=dl.substr(1)}if(dl.indexOf(".")===0){dl=dl.substr(1)}dl="http://"+dl}dm.href=v.toAbsoluteUrl(dl);if(dm.pathname){return dm.pathname}return""}function a4(dm,dl){if(!aj(dl,"/")){dl="/"+dl}if(!aj(dm,"/")){dm="/"+dm}var dn=(dl==="/"||dl==="/*");if(dn){return true}if(dm===dl){return true}dl=String(dl).toLowerCase();dm=String(dm).toLowerCase();if(R(dl,"*")){dl=dl.slice(0,-1);dn=(!dl||dl==="/");if(dn){return true}if(dm===dl){return true}return dm.indexOf(dl)===0}if(!R(dm,"/")){dm+="/"}if(!R(dl,"/")){dl+="/"}return dm.indexOf(dl)===0}function ar(dq,ds){var dm,dl,dn,dp,dr;for(dm=0;dm<ay.length;dm++){dp=L(ay[dm]);dr=cl(ay[dm]);if(cH(dq,dp)&&a4(ds,dr)){return true}}return false}function aW(dp){var dm,dl,dn;for(dm=0;dm<ay.length;dm++){dl=L(ay[dm].toLowerCase());if(dp===dl){return true}if(dl.slice(0,1)==="."){if(dp===dl.slice(1)){return true}dn=dp.length-dl.length;if((dn>0)&&(dp.slice(dn)===dl)){return true}}}return false}function cq(dl,dn){dl=dl.replace("send_image=0","send_image=1");
|
44 |
+
var dm=new Image(1,1);dm.onload=function(){E=0;if(typeof dn==="function"){dn({request:dl,trackerUrl:aE,success:true})}};dm.onerror=function(){if(typeof dn==="function"){dn({request:dl,trackerUrl:aE,success:false})}};dm.src=aE+(aE.indexOf("?")<0?"?":"&")+dl}function cE(dl){if(dc==="POST"){return true}return dl&&(dl.length>2000||dl.indexOf('{"requests"')===0)}function aK(){return"object"===typeof h&&"function"===typeof h.sendBeacon&&"function"===typeof Blob}function a7(dq,dt,ds){var dn=aK();if(!dn){return false}var dp={type:"application/x-www-form-urlencoded; charset=UTF-8"};var du=false;var dm=aE;try{var dl=new Blob([dq],dp);if(ds&&!cE(dq)){dl=new Blob([],dp);dm=dm+(dm.indexOf("?")<0?"?":"&")+dq}du=h.sendBeacon(dm,dl)}catch(dr){return false}if(du&&typeof dt==="function"){dt({request:dq,trackerUrl:aE,success:true,isSendBeacon:true})}return du}function c6(dm,dn,dl){if(!J(dl)||null===dl){dl=true}if(m&&a7(dm,dn,dl)){return}setTimeout(function(){if(m&&a7(dm,dn,dl)){return}var dr;try{var dq=T.XMLHttpRequest?new T.XMLHttpRequest():T.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;
|
45 |
+
dq.open("POST",aE,true);dq.onreadystatechange=function(){if(this.readyState===4&&!(this.status>=200&&this.status<300)){var ds=m&&a7(dm,dn,dl);if(!ds&&dl){cq(dm,dn)}else{if(typeof dn==="function"){dn({request:dm,trackerUrl:aE,success:false,xhr:this})}}}else{if(this.readyState===4&&(typeof dn==="function")){dn({request:dm,trackerUrl:aE,success:true,xhr:this})}}};dq.setRequestHeader("Content-Type",cx);dq.withCredentials=true;dq.send(dm)}catch(dp){dr=m&&a7(dm,dn,dl);if(!dr&&dl){cq(dm,dn)}else{if(typeof dn==="function"){dn({request:dm,trackerUrl:aE,success:false})}}}},50)}function cg(dm){var dl=new Date();var dn=dl.getTime()+dm;if(!r||dn>r){r=dn}}function co(dl){if(cc||!a6||!bB){return}cc=setTimeout(function dm(){cc=null;if(!bd){bd=(!G.hasFocus||G.hasFocus())}if(!bd){co(a6);return}if(bR()){return}var dn=new Date(),dp=a6-(dn.getTime()-c0);dp=Math.min(a6,dp);co(dp)},dl||a6)}function bK(){if(!cc){return}clearTimeout(cc);cc=null}function bb(){bd=true;cT=new Date().getTime()}function df(){var dl=new Date().getTime();
|
46 |
+
return !cT||(dl-cT)>a6}function az(){if(df()){bR()}bK()}function di(){if(aO||!a6){return}aO=true;an(T,"focus",bb);an(T,"blur",az);ab++;e.addPlugin("HeartBeat"+ab,{unload:function(){if(aO&&df()){bR()}}})}function cC(dq){var dm=new Date();var dl=dm.getTime();c0=dl;if(cB&&dl<cB){var dn=cB-dl;setTimeout(dq,dn);cg(dn+50);cB+=50;return}if(cB===false){var dp=800;cB=dl+dp}dq()}function aP(){if(aD(cN)){bB=false}else{if(aD(be)){bB=true}}}function bF(dm,dl,dn){aP();if(!bB){cL.push(dm);return}aw=true;if(!cR&&dm){if(cA&&bB){dm+="&consent=1"}cC(function(){if(cY&&a7(dm,dn,true)){cg(100);return}if(cE(dm)){c6(dm,dn)}else{cq(dm,dn)}cg(dl)})}if(!aO){di()}}function ck(dl){if(cR){return false}return(dl&&dl.length)}function c5(dl,dq){if(!dq||dq>=dl.length){return[dl]}var dm=0;var dn=dl.length;var dp=[];for(dm;dm<dn;dm+=dq){dp.push(dl.slice(dm,dm+dq))}return dp}function dh(dm,dl){if(!ck(dm)){return}if(!bB){cL.push(dm);return}aw=true;cC(function(){var dq=c5(dm,50);var dn=0,dp;for(dn;dn<dq.length;dn++){dp='{"requests":["?'+dq[dn].join('","?')+'"]}';
|
47 |
+
if(cY&&a7(dp,null,false)){cg(100)}else{c6(dp,null,false)}}cg(dl)})}function aU(dl){return bk+dl+"."+b6+"."+bo}function bY(dn,dm,dl){dg(dn,"",-86400,dm,dl)}function b5(){if(bl){return"0"}if(!J(T.showModalDialog)&&J(h.cookieEnabled)){return h.cookieEnabled?"1":"0"}var dl=bk+"testcookie";dg(dl,"1",undefined,bp,cZ,bS);var dm=aD(dl)==="1"?"1":"0";bY(dl);return dm}function bi(){bo=b7((cZ||cW)+(bp||"/")).slice(0,4)}function cI(){if(J(da.res)){return da}var dm,dp,dq={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",dir:"application/x-director",fla:"application/x-shockwave-flash",java:"application/x-java-vm",gears:"application/x-googlegears",ag:"application/x-silverlight"};if(!((new RegExp("MSIE")).test(h.userAgent))){if(h.mimeTypes&&h.mimeTypes.length){for(dm in dq){if(Object.prototype.hasOwnProperty.call(dq,dm)){dp=h.mimeTypes[dq[dm]];da[dm]=(dp&&dp.enabledPlugin)?"1":"0"}}}if(!((new RegExp("Edge[ /](\\d+[\\.\\d]+)")).test(h.userAgent))&&typeof navigator.javaEnabled!=="unknown"&&J(h.javaEnabled)&&h.javaEnabled()){da.java="1"
|
48 |
+
}if(A(T.GearsFactory)){da.gears="1"}if(!J(T.showModalDialog)&&J(h.cookieEnabled)){da.cookie=h.cookieEnabled?"1":"0"}else{da.cookie=b5()}}var dn=parseInt(X.width,10);var dl=parseInt(X.height,10);da.res=parseInt(dn,10)+"x"+parseInt(dl,10);return da}function bX(){var dm=aU("cvar"),dl=aD(dm);if(dl.length){dl=JSON_PIWIK.parse(dl);if(W(dl)){return dl}}return{}}function cF(){if(aR===false){aR=bX()}}function cS(){var dl=cI();return b7((h.userAgent||"")+(h.platform||"")+JSON_PIWIK.stringify(dl)+(new Date()).getTime()+Math.random()).slice(0,16)}function aA(){var dl=cI();return b7((h.userAgent||"")+(h.platform||"")+JSON_PIWIK.stringify(dl)).slice(0,6)}function bg(){return Math.floor((new Date()).getTime()/1000)}function aJ(){var dm=bg();var dn=aA();var dl=String(dm)+dn;return dl}function c4(dn){dn=String(dn);var dr=aA();var dp=dr.length;var dq=dn.substr(-1*dp,dp);var dm=parseInt(dn.substr(0,dn.length-dp),10);if(dm&&dq&&dq===dr){var dl=bg();if(a0<=0){return true}if(dl>=dm&&dl<=(dm+a0)){return true}}return false
|
49 |
+
}function dj(dl){if(!cO){return""}var dq=f(dl,av);if(!dq){return""}dq=String(dq);var dn=new RegExp("^[a-zA-Z0-9]+$");if(dq.length===32&&dn.test(dq)){var dm=dq.substr(16,32);if(c4(dm)){var dp=dq.substr(0,16);return dp}}return""}function cP(){if(!bO){bO=dj(bN)}var dn=new Date(),dl=Math.round(dn.getTime()/1000),dm=aU("id"),dr=aD(dm),dq,dp;if(dr){dq=dr.split(".");dq.unshift("0");if(bO.length){dq[1]=bO}return dq}if(bO.length){dp=bO}else{if("0"===b5()){dp=""}else{dp=cS()}}dq=["1",dp,dl,0,dl,"",""];return dq}function aZ(){var dt=cP(),dp=dt[0],dq=dt[1],dm=dt[2],dl=dt[3],dr=dt[4],dn=dt[5];if(!J(dt[6])){dt[6]=""}var ds=dt[6];return{newVisitor:dp,uuid:dq,createTs:dm,visitCount:dl,currentVisitTs:dr,lastVisitTs:dn,lastEcommerceOrderTs:ds}}function aH(){var dp=new Date(),dm=dp.getTime(),dq=aZ().createTs;var dl=parseInt(dq,10);var dn=(dl*1000)+cK-dm;return dn}function aM(dl){if(!b6){return}var dn=new Date(),dm=Math.round(dn.getTime()/1000);if(!J(dl)){dl=aZ()}var dp=dl.uuid+"."+dl.createTs+"."+dl.visitCount+"."+dm+"."+dl.lastVisitTs+"."+dl.lastEcommerceOrderTs;
|
50 |
+
dg(aU("id"),dp,aH(),bp,cZ,bS)}function bM(){var dl=aD(aU("ref"));if(dl.length){try{dl=JSON_PIWIK.parse(dl);if(W(dl)){return dl}}catch(dm){}}return["","",0,""]}function bw(dm){var dl="testvalue";dg("test",dl,10000,null,dm);if(aD("test")===dl){bY("test",null,dm);return true}return false}function aF(){var dm=bl;bl=false;var dl,dn;for(dl=0;dl<bu.length;dl++){dn=aU(bu[dl]);if(dn!==cN&&dn!==be&&0!==aD(dn)){bY(dn,bp,cZ)}}bl=dm}function b3(dl){b6=dl}function dk(dq){if(!dq||!W(dq)){return}var dp=[];var dn;for(dn in dq){if(Object.prototype.hasOwnProperty.call(dq,dn)){dp.push(dn)}}var dr={};dp.sort();var dl=dp.length;var dm;for(dm=0;dm<dl;dm++){dr[dp[dm]]=dq[dp[dm]]}return dr}function cd(){dg(aU("ses"),"1",cp,bp,cZ,bS)}function bh(){var dp="";var dm="abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";var dn=dm.length;var dl;for(dl=0;dl<6;dl++){dp+=dm.charAt(Math.floor(Math.random()*dn))}return dp}function ct(dn,dJ,dK,dp){var dI,dm=new Date(),dw=Math.round(dm.getTime()/1000),dt,dH,dq=1024,dQ,dx,dF=aR,dr=aU("ses"),dD=aU("ref"),dA=aU("cvar"),dB=aD(dr),dG=bM(),dM=a5||bN,du,dl;
|
51 |
+
if(bl){aF()}if(cR){return""}var dC=aZ();if(!J(dp)){dp=""}var dz=G.characterSet||G.charset;if(!dz||dz.toLowerCase()==="utf-8"){dz=null}du=dG[0];dl=dG[1];dt=dG[2];dH=dG[3];if(!dB){var dL=cp/1000;if(!dC.lastVisitTs||(dw-dC.lastVisitTs)>dL){dC.visitCount++;dC.lastVisitTs=dC.currentVisitTs}if(!bv||!du.length){for(dI in cr){if(Object.prototype.hasOwnProperty.call(cr,dI)){du=f(dM,cr[dI]);if(du.length){break}}}for(dI in bG){if(Object.prototype.hasOwnProperty.call(bG,dI)){dl=f(dM,bG[dI]);if(dl.length){break}}}}dQ=d(bn);dx=dH.length?d(dH):"";if(dQ.length&&!aW(dQ)&&(!bv||!dx.length||aW(dx))){dH=bn}if(dH.length||du.length){dt=dw;dG=[du,dl,dt,b2(dH.slice(0,dq))];dg(dD,JSON_PIWIK.stringify(dG),c7,bp,cZ)}}dn+="&idsite="+b6+"&rec=1&r="+String(Math.random()).slice(2,8)+"&h="+dm.getHours()+"&m="+dm.getMinutes()+"&s="+dm.getSeconds()+"&url="+t(b2(dM))+(bn.length?"&urlref="+t(b2(bn)):"")+((by&&by.length)?"&uid="+t(by):"")+"&_id="+dC.uuid+"&_idts="+dC.createTs+"&_idvc="+dC.visitCount+"&_idn="+dC.newVisitor+(du.length?"&_rcn="+t(du):"")+(dl.length?"&_rck="+t(dl):"")+"&_refts="+dt+"&_viewts="+dC.lastVisitTs+(String(dC.lastEcommerceOrderTs).length?"&_ects="+dC.lastEcommerceOrderTs:"")+(String(dH).length?"&_ref="+t(b2(dH.slice(0,dq))):"")+(dz?"&cs="+t(dz):"")+"&send_image=0";
|
52 |
+
var dP=cI();for(dI in dP){if(Object.prototype.hasOwnProperty.call(dP,dI)){dn+="&"+dI+"="+dP[dI]}}var dO=[];if(dJ){for(dI in dJ){if(Object.prototype.hasOwnProperty.call(dJ,dI)&&/^dimension\d+$/.test(dI)){var ds=dI.replace("dimension","");dO.push(parseInt(ds,10));dO.push(String(ds));dn+="&"+dI+"="+t(dJ[dI]);delete dJ[dI]}}}if(dJ&&B(dJ)){dJ=null}for(dI in bm){if(Object.prototype.hasOwnProperty.call(bm,dI)){var dy=(-1===M(dO,dI));if(dy){dn+="&dimension"+dI+"="+t(bm[dI])}}}if(dJ){dn+="&data="+t(JSON_PIWIK.stringify(dJ))}else{if(ao){dn+="&data="+t(JSON_PIWIK.stringify(ao))}}function dv(dR,dS){var dT=JSON_PIWIK.stringify(dR);if(dT.length>2){return"&"+dS+"="+t(dT)}return""}var dN=dk(bW);var dE=dk(cm);dn+=dv(dN,"cvar");dn+=dv(dE,"e_cvar");if(aR){dn+=dv(aR,"_cvar");for(dI in dF){if(Object.prototype.hasOwnProperty.call(dF,dI)){if(aR[dI][0]===""||aR[dI][1]===""){delete aR[dI]}}}if(bQ){dg(dA,JSON_PIWIK.stringify(aR),cp,bp,cZ)}}if(a3){if(cn){dn+=">_ms="+cn}else{if(i&&i.timing&&i.timing.requestStart&&i.timing.responseEnd){dn+=">_ms="+(i.timing.responseEnd-i.timing.requestStart)
|
53 |
+
}}}if(aL){dn+="&pv_id="+aL}dC.lastEcommerceOrderTs=J(dp)&&String(dp).length?dp:dC.lastEcommerceOrderTs;aM(dC);cd();dn+=ac(dK,{tracker:bI,request:dn});if(c1.length){dn+="&"+c1}if(A(cb)){dn=cb(dn)}return dn}bR=function a8(){var dl=new Date();dl=dl.getTime();if(!c0){return false}if((c0+(1000*c9))<=dl){return false}if(c0+a6<=dl){bI.ping();return true}return false};function bq(dp,dn,du,dq,dl,dx){var ds="idgoal=0",dt,dm=new Date(),dv=[],dw,dr=String(dp).length;if(dr){ds+="&ec_id="+t(dp);dt=Math.round(dm.getTime()/1000)}ds+="&revenue="+dn;if(String(du).length){ds+="&ec_st="+du}if(String(dq).length){ds+="&ec_tx="+dq}if(String(dl).length){ds+="&ec_sh="+dl}if(String(dx).length){ds+="&ec_dt="+dx}if(c2){for(dw in c2){if(Object.prototype.hasOwnProperty.call(c2,dw)){if(!J(c2[dw][1])){c2[dw][1]=""}if(!J(c2[dw][2])){c2[dw][2]=""}if(!J(c2[dw][3])||String(c2[dw][3]).length===0){c2[dw][3]=0}if(!J(c2[dw][4])||String(c2[dw][4]).length===0){c2[dw][4]=1}dv.push(c2[dw])}}ds+="&ec_items="+t(JSON_PIWIK.stringify(dv))
|
54 |
+
}ds=ct(ds,ao,"ecommerce",dt);bF(ds,bJ);if(dr){c2={}}}function bZ(dl,dq,dp,dn,dm,dr){if(String(dl).length&&J(dq)){bq(dl,dq,dp,dn,dm,dr)}}function bs(dl){if(J(dl)){bq("",dl,"","","","")}}function b0(dm,dp,dn){aL=bh();var dl=ct("action_name="+t(al(dm||bj)),dp,"log");bF(dl,bJ,dn)}function a1(dn,dm){var dp,dl="(^| )(piwik[_-]"+dm+"|matomo[_-]"+dm;if(dn){for(dp=0;dp<dn.length;dp++){dl+="|"+dn[dp]}}dl+=")( |$)";return new RegExp(dl)}function aV(dl){return(aE&&dl&&0===String(dl).indexOf(aE))}function cv(dq,dl,dr,dm){if(aV(dl)){return 0}var dp=a1(bL,"download"),dn=a1(a9,"link"),ds=new RegExp("\\.("+c8.join("|")+")([?&#]|$)","i");if(dn.test(dq)){return"link"}if(dm||dp.test(dq)||ds.test(dl)){return"download"}if(dr){return 0}return"link"}function au(dm){var dl;dl=dm.parentNode;while(dl!==null&&J(dl)){if(ae.isLinkElement(dm)){break}dm=dl;dl=dm.parentNode}return dm}function de(dr){dr=au(dr);if(!ae.hasNodeAttribute(dr,"href")){return}if(!J(dr.href)){return}var dq=ae.getAttributeValueFromNode(dr,"href");
|
55 |
+
if(aV(dq)){return}var dm=dr.pathname||cl(dr.href);var ds=dr.hostname||d(dr.href);var dt=ds.toLowerCase();var dn=dr.href.replace(ds,dt);var dp=new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript|mailto|tel):","i");if(!dp.test(dn)){var dl=cv(dr.className,dn,ar(dt,dm),ae.hasNodeAttribute(dr,"download"));if(dl){return{type:dl,href:dn}}}}function aQ(dl,dm,dn,dp){var dq=v.buildInteractionRequestParams(dl,dm,dn,dp);if(!dq){return}return ct(dq,null,"contentInteraction")}function cM(dn,dp,dt,dl,dm){if(!J(dn)){return}if(aV(dn)){return dn}var dr=v.toAbsoluteUrl(dn);var dq="redirecturl="+t(dr)+"&";dq+=aQ(dp,dt,dl,(dm||dn));var ds="&";if(aE.indexOf("?")<0){ds="?"}return aE+ds+dq}function bc(dl,dm){if(!dl||!dm){return false}var dn=v.findTargetNode(dl);if(v.shouldIgnoreInteraction(dn)){return false}dn=v.findTargetNodeNoDefault(dl);if(dn&&!V(dn,dm)){return false}return true}function cu(dn,dm,dq){if(!dn){return}var dl=v.findParentContentNode(dn);if(!dl){return}if(!bc(dl,dn)){return}var dp=v.buildContentBlock(dl);
|
56 |
+
if(!dp){return}if(!dp.target&&dq){dp.target=dq}return v.buildInteractionRequestParams(dm,dp.name,dp.piece,dp.target)}function aX(dm){if(!ca||!ca.length){return false}var dl,dn;for(dl=0;dl<ca.length;dl++){dn=ca[dl];if(dn&&dn.name===dm.name&&dn.piece===dm.piece&&dn.target===dm.target){return true}}return false}function bE(dp){if(!dp){return false}var ds=v.findTargetNode(dp);if(!ds||v.shouldIgnoreInteraction(ds)){return false}var dt=de(ds);if(db&&dt&&dt.type){return false}if(ae.isLinkElement(ds)&&ae.hasNodeAttributeWithValue(ds,"href")){var dl=String(ae.getAttributeValueFromNode(ds,"href"));if(0===dl.indexOf("#")){return false}if(aV(dl)){return true}if(!v.isUrlToCurrentDomain(dl)){return false}var dq=v.buildContentBlock(dp);if(!dq){return}var dn=dq.name;var du=dq.piece;var dr=dq.target;if(!ae.hasNodeAttributeWithValue(ds,v.CONTENT_TARGET_ATTR)||ds.wasContentTargetAttrReplaced){ds.wasContentTargetAttrReplaced=true;dr=v.toAbsoluteUrl(dl);ae.setAnyAttribute(ds,v.CONTENT_TARGET_ATTR,dr)}var dm=cM(dl,"click",dn,du,dr);
|
57 |
+
v.setHrefAttribute(ds,dm);return true}return false}function aN(dm){if(!dm||!dm.length){return}var dl;for(dl=0;dl<dm.length;dl++){bE(dm[dl])}}function aY(dl){return function(dm){if(!dl){return}var dq=v.findParentContentNode(dl);var dr;if(dm){dr=dm.target||dm.srcElement}if(!dr){dr=dl}if(!bc(dq,dr)){return}cg(bJ);if(ae.isLinkElement(dl)&&ae.hasNodeAttributeWithValue(dl,"href")&&ae.hasNodeAttributeWithValue(dl,v.CONTENT_TARGET_ATTR)){var dn=ae.getAttributeValueFromNode(dl,"href");if(!aV(dn)&&dl.wasContentTargetAttrReplaced){ae.setAnyAttribute(dl,v.CONTENT_TARGET_ATTR,"")}}var dv=de(dl);if(ap&&dv&&dv.type){return dv.type}if(bE(dq)){return"href"}var ds=v.buildContentBlock(dq);if(!ds){return}var dp=ds.name;var dw=ds.piece;var du=ds.target;var dt=aQ("click",dp,dw,du);if(dt){bF(dt,bJ)}return dt}}function b1(dn){if(!dn||!dn.length){return}var dl,dm;for(dl=0;dl<dn.length;dl++){dm=v.findTargetNode(dn[dl]);if(dm&&!dm.contentInteractionTrackingSetupDone){dm.contentInteractionTrackingSetupDone=true;an(dm,"click",aY(dm))
|
58 |
+
}}}function bx(dn,dp){if(!dn||!dn.length){return[]}var dl,dm;for(dl=0;dl<dn.length;dl++){if(aX(dn[dl])){dn.splice(dl,1);dl--}else{ca.push(dn[dl])}}if(!dn||!dn.length){return[]}aN(dp);b1(dp);var dq=[];for(dl=0;dl<dn.length;dl++){dm=ct(v.buildImpressionRequestParams(dn[dl].name,dn[dl].piece,dn[dl].target),undefined,"contentImpressions");if(dm){dq.push(dm)}}return dq}function cz(dm){var dl=v.collectContent(dm);return bx(dl,dm)}function ba(dm){if(!dm||!dm.length){return[]}var dl;for(dl=0;dl<dm.length;dl++){if(!v.isNodeVisible(dm[dl])){dm.splice(dl,1);dl--}}if(!dm||!dm.length){return[]}return cz(dm)}function aG(dn,dl,dm){var dp=v.buildImpressionRequestParams(dn,dl,dm);return ct(dp,null,"contentImpression")}function dd(dp,dm){if(!dp){return}var dl=v.findParentContentNode(dp);var dn=v.buildContentBlock(dl);if(!dn){return}if(!dm){dm="Unknown"}return aQ(dm,dn.name,dn.piece,dn.target)}function cQ(dm,dp,dl,dn){return"e_c="+t(dm)+"&e_a="+t(dp)+(J(dl)?"&e_n="+t(dl):"")+(J(dn)?"&e_v="+t(dn):"")}function at(dn,dq,dl,dp,ds,dr){if(a(String(dn)).length===0||a(String(dq)).length===0){ak("Error while logging event: Parameters `category` and `action` must not be empty or filled with whitespaces");
|
59 |
+
return false}var dm=ct(cQ(dn,dq,dl,dp),ds,"event");bF(dm,bJ,dr)}function b8(dl,dp,dm,dq){var dn=ct("search="+t(dl)+(dp?"&search_cat="+t(dp):"")+(J(dm)?"&search_count="+dm:""),dq,"sitesearch");bF(dn,bJ)}function cV(dl,dq,dp,dn){var dm=ct("idgoal="+dl+(dq?"&revenue="+dq:""),dp,"goal");bF(dm,bJ,dn)}function c3(dp,dl,dt,ds,dn){var dr=dl+"="+t(b2(dp));var dm=cu(dn,"click",dp);if(dm){dr+="&"+dm}var dq=ct(dr,dt,"link");bF(dq,bJ,ds)}function bU(dm,dl){if(dm!==""){return dm+dl.charAt(0).toUpperCase()+dl.slice(1)}return dl}function ch(dr){var dq,dl,dp=["","webkit","ms","moz"],dn;if(!bf){for(dl=0;dl<dp.length;dl++){dn=dp[dl];if(Object.prototype.hasOwnProperty.call(G,bU(dn,"hidden"))){if(G[bU(dn,"visibilityState")]==="prerender"){dq=true}break}}}if(dq){an(G,dn+"visibilitychange",function dm(){G.removeEventListener(dn+"visibilitychange",dm,false);dr()});return}dr()}function br(){var dm=aZ().uuid;var dl=aJ();return dm+dl}function cj(dl){if(!dl){return}if(!ae.hasNodeAttribute(dl,"href")){return}var dm=ae.getAttributeValueFromNode(dl,"href");
|
60 |
+
if(!dm||aV(dm)){return}dm=k(dm,av);var dn=br();dm=F(dm,av,dn);ae.setAnyAttribute(dl,"href",dm)}function aB(dp){var dq=ae.getAttributeValueFromNode(dp,"href");if(!dq){return false}dq=String(dq);var dm=dq.indexOf("//")===0||dq.indexOf("http://")===0||dq.indexOf("https://")===0;if(!dm){return false}var dl=dp.pathname||cl(dp.href);var dn=(dp.hostname||d(dp.href)).toLowerCase();if(ar(dn,dl)){if(!cH(cW,L(dn))){return true}return false}return false}function cG(dl){var dm=de(dl);if(dm&&dm.type){dm.href=p(dm.href);c3(dm.href,dm.type,undefined,null,dl);return}if(cO){dl=au(dl);if(aB(dl)){cj(dl)}}}function cw(){return G.all&&!G.addEventListener}function cX(dl){var dn=dl.which;var dm=(typeof dl.button);if(!dn&&dm!=="undefined"){if(cw()){if(dl.button&1){dn=1}else{if(dl.button&2){dn=3}else{if(dl.button&4){dn=2}}}}else{if(dl.button===0||dl.button==="0"){dn=1}else{if(dl.button&1){dn=2}else{if(dl.button&2){dn=3}}}}}return dn}function bT(dl){switch(cX(dl)){case 1:return"left";case 2:return"middle";case 3:return"right"
|
61 |
+
}}function a2(dl){return dl.target||dl.srcElement}function aC(dl){return function(dp){dp=dp||T.event;var dn=bT(dp);var dq=a2(dp);if(dp.type==="click"){var dm=false;if(dl&&dn==="middle"){dm=true}if(dq&&!dm){cG(dq)}}else{if(dp.type==="mousedown"){if(dn==="middle"&&dq){aS=dn;bA=dq}else{aS=bA=null}}else{if(dp.type==="mouseup"){if(dn===aS&&dq===bA){cG(dq)}aS=bA=null}else{if(dp.type==="contextmenu"){cG(dq)}}}}}}function aq(dn,dm){var dl=typeof dm;if(dl==="undefined"){dm=true}an(dn,"click",aC(dm),false);if(dm){an(dn,"mouseup",aC(dm),false);an(dn,"mousedown",aC(dm),false);an(dn,"contextmenu",aC(dm),false)}}function bD(dn,dq){ap=true;var dp,dm=a1(bz,"ignore"),dr=G.links,dl=null,ds=null;if(dr){for(dp=0;dp<dr.length;dp++){dl=dr[dp];if(!dm.test(dl.className)){ds=typeof dl.piwikTrackers;if("undefined"===ds){dl.piwikTrackers=[]}if(-1===M(dl.piwikTrackers,dq)){dl.piwikTrackers.push(dq);aq(dl,dn)}}}}}function aT(dm,dq,dr){if(cf){return true}cf=true;var ds=false;var dp,dn;function dl(){ds=true}n(function(){function dt(dv){setTimeout(function(){if(!cf){return
|
62 |
+
}ds=false;dr.trackVisibleContentImpressions();dt(dv)},dv)}function du(dv){setTimeout(function(){if(!cf){return}if(ds){ds=false;dr.trackVisibleContentImpressions()}du(dv)},dv)}if(dm){dp=["scroll","resize"];for(dn=0;dn<dp.length;dn++){if(G.addEventListener){G.addEventListener(dp[dn],dl,false)}else{T.attachEvent("on"+dp[dn],dl)}}du(100)}if(dq&&dq>0){dq=parseInt(dq,10);dt(dq)}})}var bC={enabled:true,requests:[],timeout:null,interval:2500,sendRequests:function(){var dl=this.requests;this.requests=[];if(dl.length===1){bF(dl[0],bJ)}else{dh(dl,bJ)}},canQueue:function(){return !m&&this.enabled},pushMultiple:function(dm){if(!this.canQueue()){dh(dm,bJ);return}var dl;for(dl=0;dl<dm.length;dl++){this.push(dm[dl])}},push:function(dl){if(!dl){return}if(!this.canQueue()){bF(dl,bJ);return}bC.requests.push(dl);if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.timeout=setTimeout(function(){bC.timeout=null;bC.sendRequests()},bC.interval);var dm="RequestQueue"+ax;if(!Object.prototype.hasOwnProperty.call(b,dm)){b[dm]={unload:function(){if(bC.timeout){clearTimeout(bC.timeout)
|
63 |
+
}bC.sendRequests()}}}}};bi();aM();this.hasConsent=function(){return bB};this.getVisitorId=function(){return aZ().uuid};this.getVisitorInfo=function(){return cP()};this.getAttributionInfo=function(){return bM()};this.getAttributionCampaignName=function(){return bM()[0]};this.getAttributionCampaignKeyword=function(){return bM()[1]};this.getAttributionReferrerTimestamp=function(){return bM()[2]};this.getAttributionReferrerUrl=function(){return bM()[3]};this.setTrackerUrl=function(dl){aE=dl};this.getTrackerUrl=function(){return aE};this.getPiwikUrl=function(){return O(this.getTrackerUrl(),bH)};this.addTracker=function(dl,dn){if(!J(dl)||null===dl){dl=this.getTrackerUrl()}var dm=new Q(dl,dn);I.push(dm);e.trigger("TrackerAdded",[this]);return dm};this.getSiteId=function(){return b6};this.setSiteId=function(dl){b3(dl)};this.resetUserId=function(){by=""};this.setUserId=function(dl){if(Y(dl)){by=dl}};this.setVisitorId=function(dm){var dl=/[0-9A-Fa-f]{16}/g;if(w(dm)&&dl.test(dm)){bO=dm}else{ak("Invalid visitorId set"+dm)
|
64 |
+
}};this.getUserId=function(){return by};this.setCustomData=function(dl,dm){if(W(dl)){ao=dl}else{if(!ao){ao={}}ao[dl]=dm}};this.getCustomData=function(){return ao};this.setCustomRequestProcessing=function(dl){cb=dl};this.appendToTrackingUrl=function(dl){c1=dl};this.getRequest=function(dl){return ct(dl)};this.addPlugin=function(dl,dm){b[dl]=dm};this.setCustomDimension=function(dl,dm){dl=parseInt(dl,10);if(dl>0){if(!J(dm)){dm=""}if(!w(dm)){dm=String(dm)}bm[dl]=dm}};this.getCustomDimension=function(dl){dl=parseInt(dl,10);if(dl>0&&Object.prototype.hasOwnProperty.call(bm,dl)){return bm[dl]}};this.deleteCustomDimension=function(dl){dl=parseInt(dl,10);if(dl>0){delete bm[dl]}};this.setCustomVariable=function(dm,dl,dq,dn){var dp;if(!J(dn)){dn="visit"}if(!J(dl)){return}if(!J(dq)){dq=""}if(dm>0){dl=!w(dl)?String(dl):dl;dq=!w(dq)?String(dq):dq;dp=[dl.slice(0,bt),dq.slice(0,bt)];if(dn==="visit"||dn===2){cF();aR[dm]=dp}else{if(dn==="page"||dn===3){bW[dm]=dp}else{if(dn==="event"){cm[dm]=dp}}}}};this.getCustomVariable=function(dm,dn){var dl;
|
65 |
+
if(!J(dn)){dn="visit"}if(dn==="page"||dn===3){dl=bW[dm]}else{if(dn==="event"){dl=cm[dm]}else{if(dn==="visit"||dn===2){cF();dl=aR[dm]}}}if(!J(dl)||(dl&&dl[0]==="")){return false}return dl};this.deleteCustomVariable=function(dl,dm){if(this.getCustomVariable(dl,dm)){this.setCustomVariable(dl,"","",dm)}};this.deleteCustomVariables=function(dl){if(dl==="page"||dl===3){bW={}}else{if(dl==="event"){cm={}}else{if(dl==="visit"||dl===2){aR={}}}}};this.storeCustomVariablesInCookie=function(){bQ=true};this.setLinkTrackingTimer=function(dl){bJ=dl};this.getLinkTrackingTimer=function(){return bJ};this.setDownloadExtensions=function(dl){if(w(dl)){dl=dl.split("|")}c8=dl};this.addDownloadExtensions=function(dm){var dl;if(w(dm)){dm=dm.split("|")}for(dl=0;dl<dm.length;dl++){c8.push(dm[dl])}};this.removeDownloadExtensions=function(dn){var dm,dl=[];if(w(dn)){dn=dn.split("|")}for(dm=0;dm<c8.length;dm++){if(M(dn,c8[dm])===-1){dl.push(c8[dm])}}c8=dl};this.setDomains=function(dl){ay=w(dl)?[dl]:dl;var dq=false,dn=0,dm;
|
66 |
+
for(dn;dn<ay.length;dn++){dm=String(ay[dn]);if(cH(cW,L(dm))){dq=true;break}var dp=cl(dm);if(dp&&dp!=="/"&&dp!=="/*"){dq=true;break}}if(!dq){ay.push(cW)}};this.enableCrossDomainLinking=function(){cO=true};this.disableCrossDomainLinking=function(){cO=false};this.isCrossDomainLinkingEnabled=function(){return cO};this.setCrossDomainLinkingTimeout=function(dl){a0=dl};this.getCrossDomainLinkingUrlParameter=function(){return t(av)+"="+t(br())};this.setIgnoreClasses=function(dl){bz=w(dl)?[dl]:dl};this.setRequestMethod=function(dl){dc=dl||ci};this.setRequestContentType=function(dl){cx=dl||aI};this.setReferrerUrl=function(dl){bn=dl};this.setCustomUrl=function(dl){a5=bV(bN,dl)};this.getCurrentUrl=function(){return a5||bN};this.setDocumentTitle=function(dl){bj=dl};this.setAPIUrl=function(dl){bH=dl};this.setDownloadClasses=function(dl){bL=w(dl)?[dl]:dl};this.setLinkClasses=function(dl){a9=w(dl)?[dl]:dl};this.setCampaignNameKey=function(dl){cr=w(dl)?[dl]:dl};this.setCampaignKeywordKey=function(dl){bG=w(dl)?[dl]:dl
|
67 |
+
};this.discardHashTag=function(dl){bP=dl};this.setCookieNamePrefix=function(dl){bk=dl;aR=bX()};this.setCookieDomain=function(dl){var dm=L(dl);if(bw(dm)){cZ=dm;bi()}};this.getCookieDomain=function(){return cZ};this.hasCookies=function(){return"1"===b5()};this.setSessionCookie=function(dn,dm,dl){if(!dn){throw new Error("Missing cookie name")}if(!J(dl)){dl=cp}bu.push(dn);dg(aU(dn),dm,dl,bp,cZ)};this.getCookie=function(dm){var dl=aD(aU(dm));if(dl===0){return null}return dl};this.setCookiePath=function(dl){bp=dl;bi()};this.getCookiePath=function(dl){return bp};this.setVisitorCookieTimeout=function(dl){cK=dl*1000};this.setSessionCookieTimeout=function(dl){cp=dl*1000};this.getSessionCookieTimeout=function(){return cp};this.setReferralCookieTimeout=function(dl){c7=dl*1000};this.setConversionAttributionFirstReferrer=function(dl){bv=dl};this.setSecureCookie=function(dl){bS=dl};this.disableCookies=function(){bl=true;if(b6){aF()}};this.areCookiesEnabled=function(){return !bl};this.setCookieConsentGiven=function(){if(bl&&!cR){bl=false;
|
68 |
+
if(b6&&aw){aM();var dl=ct("ping=1",null,"ping");bF(dl,bJ)}}};this.requireCookieConsent=function(){if(this.getRememberedCookieConsent()){return false}this.disableCookies();return true};this.getRememberedCookieConsent=function(){return aD(cD)};this.forgetCookieConsentGiven=function(){bY(cD,bp,cZ);this.disableCookies()};this.rememberCookieConsentGiven=function(dm){if(dm){dm=dm*60*60*1000}else{dm=30*365*24*60*60*1000}this.setCookieConsentGiven();var dl=new Date().getTime();dg(cD,dl,dm,bp,cZ,bS)};this.deleteCookies=function(){aF()};this.setDoNotTrack=function(dm){var dl=h.doNotTrack||h.msDoNotTrack;cR=dm&&(dl==="yes"||dl==="1");if(cR){this.disableCookies()}};this.alwaysUseSendBeacon=function(){cY=true};this.addListener=function(dm,dl){aq(dm,dl)};this.enableLinkTracking=function(dm){db=true;var dl=this;ch(function(){q(function(){bD(dm,dl)});n(function(){bD(dm,dl)})})};this.enableJSErrorTracking=function(){if(cU){return}cU=true;var dl=T.onerror;T.onerror=function(dr,dp,dn,dq,dm){ch(function(){var ds="JavaScript Errors";
|
69 |
+
var dt=dp+":"+dn;if(dq){dt+=":"+dq}at(ds,dt,dr)});if(dl){return dl(dr,dp,dn,dq,dm)}return false}};this.disablePerformanceTracking=function(){a3=false};this.setGenerationTimeMs=function(dl){cn=parseInt(dl,10)};this.setVisitStandardLength=function(dl){dl=Math.max(dl,5);c9=dl};this.enableHeartBeatTimer=function(dl){dl=Math.max(dl,5);a6=(dl||15)*1000;if(c0!==null){di()}};this.disableHeartBeatTimer=function(){bK();if(a6||aO){if(T.removeEventListener){T.removeEventListener("focus",bb);T.removeEventListener("blur",az)}else{if(T.detachEvent){T.detachEvent("onfocus",bb);T.detachEvent("onblur",az)}}}a6=null;aO=false};this.killFrame=function(){if(T.location!==T.top.location){T.top.location=T.location}};this.redirectFile=function(dl){if(T.location.protocol==="file:"){T.location=dl}};this.setCountPreRendered=function(dl){bf=dl};this.trackGoal=function(dl,dp,dn,dm){ch(function(){cV(dl,dp,dn,dm)})};this.trackLink=function(dm,dl,dp,dn){ch(function(){c3(dm,dl,dp,dn)})};this.getNumTrackedPageViews=function(){return cs
|
70 |
+
};this.trackPageView=function(dl,dn,dm){ca=[];cL=[];if(N(b6)){ch(function(){Z(aE,bH,b6)})}else{ch(function(){cs++;b0(dl,dn,dm)})}};this.trackAllContentImpressions=function(){if(N(b6)){return}ch(function(){q(function(){var dl=v.findContentNodes();var dm=cz(dl);bC.pushMultiple(dm)})})};this.trackVisibleContentImpressions=function(dl,dm){if(N(b6)){return}if(!J(dl)){dl=true}if(!J(dm)){dm=750}aT(dl,dm,this);ch(function(){n(function(){var dn=v.findContentNodes();var dp=ba(dn);bC.pushMultiple(dp)})})};this.trackContentImpression=function(dn,dl,dm){if(N(b6)){return}dn=a(dn);dl=a(dl);dm=a(dm);if(!dn){return}dl=dl||"Unknown";ch(function(){var dp=aG(dn,dl,dm);bC.push(dp)})};this.trackContentImpressionsWithinNode=function(dl){if(N(b6)||!dl){return}ch(function(){if(cf){n(function(){var dm=v.findContentNodesWithinNode(dl);var dn=ba(dm);bC.pushMultiple(dn)})}else{q(function(){var dm=v.findContentNodesWithinNode(dl);var dn=cz(dm);bC.pushMultiple(dn)})}})};this.trackContentInteraction=function(dn,dp,dl,dm){if(N(b6)){return
|
71 |
+
}dn=a(dn);dp=a(dp);dl=a(dl);dm=a(dm);if(!dn||!dp){return}dl=dl||"Unknown";ch(function(){var dq=aQ(dn,dp,dl,dm);if(dq){bC.push(dq)}})};this.trackContentInteractionNode=function(dm,dl){if(N(b6)||!dm){return}ch(function(){var dn=dd(dm,dl);if(dn){bC.push(dn)}})};this.logAllContentBlocksOnPage=function(){var dn=v.findContentNodes();var dl=v.collectContent(dn);var dm=typeof console;if(dm!=="undefined"&&console&&console.log){console.log(dl)}};this.trackEvent=function(dm,dp,dl,dn,dr,dq){ch(function(){at(dm,dp,dl,dn,dr,dq)})};this.trackSiteSearch=function(dl,dn,dm,dp){ca=[];ch(function(){b8(dl,dn,dm,dp)})};this.setEcommerceView=function(dp,dl,dn,dm){if(Y(dn)){dn=String(dn)}if(!J(dn)||dn===null||dn===false||!dn.length){dn=""}else{if(dn instanceof Array){dn=JSON_PIWIK.stringify(dn)}}bW[5]=["_pkc",dn];if(J(dm)&&dm!==null&&dm!==false&&String(dm).length){bW[2]=["_pkp",dm]}if(!Y(dp)&&!Y(dl)){return}if(Y(dp)){bW[3]=["_pks",dp]}if(!Y(dl)){dl=""}bW[4]=["_pkn",dl]};this.getEcommerceItems=function(){return JSON.parse(JSON.stringify(c2))
|
72 |
+
};this.addEcommerceItem=function(dq,dl,dn,dm,dp){if(Y(dq)){c2[dq]=[String(dq),dl,dn,dm,dp]}};this.removeEcommerceItem=function(dl){if(Y(dl)){dl=String(dl);delete c2[dl]}};this.clearEcommerceCart=function(){c2={}};this.trackEcommerceOrder=function(dl,dq,dp,dn,dm,dr){bZ(dl,dq,dp,dn,dm,dr)};this.trackEcommerceCartUpdate=function(dl){bs(dl)};this.trackRequest=function(dm,dp,dn,dl){ch(function(){var dq=ct(dm,dp,dl);bF(dq,bJ,dn)})};this.ping=function(){this.trackRequest("ping=1",null,null,"ping")};this.disableQueueRequest=function(){bC.enabled=false};this.setRequestQueueInterval=function(dl){if(dl<1000){throw new Error("Request queue interval needs to be at least 1000ms")}bC.interval=dl};this.queueRequest=function(dl){ch(function(){var dm=ct(dl);bC.push(dm)})};this.isConsentRequired=function(){return cA};this.getRememberedConsent=function(){var dl=aD(be);if(aD(cN)){if(dl){bY(be,bp,cZ)}return null}if(!dl||dl===0){return null}return dl};this.hasRememberedConsent=function(){return !!this.getRememberedConsent()
|
73 |
+
};this.requireConsent=function(){cA=true;bB=this.hasRememberedConsent();if(!bB){bl=true}x++;b["CoreConsent"+x]={unload:function(){if(!bB){aF()}}}};this.setConsentGiven=function(dm){bB=true;bY(cN,bp,cZ);var dn,dl;for(dn=0;dn<cL.length;dn++){dl=typeof cL[dn];if(dl==="string"){bF(cL[dn],bJ)}else{if(dl==="object"){dh(cL[dn],bJ)}}}cL=[];if(!J(dm)||dm){this.setCookieConsentGiven()}};this.rememberConsentGiven=function(dn){if(dn){dn=dn*60*60*1000}else{dn=30*365*24*60*60*1000}var dl=true;this.setConsentGiven(dl);var dm=new Date().getTime();dg(be,dm,dn,bp,cZ,bS)};this.forgetConsentGiven=function(){var dl=30*365*24*60*60*1000;bY(be,bp,cZ);dg(cN,new Date().getTime(),dl,bp,cZ,bS);this.forgetCookieConsentGiven();this.requireConsent()};this.isUserOptedOut=function(){return !bB};this.optUserOut=this.forgetConsentGiven;this.forgetUserOptOut=function(){var dl=false;this.rememberConsentGiven(0,dl)};e.trigger("TrackerSetup",[this])}function H(){return{push:af}}function c(au,at){var av={};var aq,ar;for(aq=0;
|
74 |
+
aq<at.length;aq++){var ao=at[aq];av[ao]=1;for(ar=0;ar<au.length;ar++){if(au[ar]&&au[ar][0]){var ap=au[ar][0];if(ao===ap){af(au[ar]);delete au[ar];if(av[ap]>1&&ap!=="addTracker"){ak("The method "+ap+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation: https://developer.piwik.org/guides/tracking-javascript-guide#multiple-piwik-trackers')}av[ap]++}}}}return au}var C=["addTracker","forgetCookieConsentGiven","requireCookieConsent","disableCookies","setTrackerUrl","setAPIUrl","enableCrossDomainLinking","setCrossDomainLinkingTimeout","setSessionCookieTimeout","setVisitorCookieTimeout","setSecureCookie","setCookiePath","setCookieDomain","setDomains","setUserId","setVisitorId","setSiteId","alwaysUseSendBeacon","enableLinkTracking","setCookieConsentGiven","requireConsent","setConsentGiven"];function ad(ao,aq){var ap=new Q(ao,aq);I.push(ap);_paq=c(_paq,C);for(E=0;E<_paq.length;E++){if(_paq[E]){af(_paq[E])
|
75 |
}}_paq=new H();e.trigger("TrackerAdded",[ap]);return ap}an(T,"beforeunload",ai,false);an(T,"message",function(au){if(!au||!au.origin){return}var aw,ar,ap;var ax=d(au.origin);var at=e.getAsyncTrackers();for(ar=0;ar<at.length;ar++){ap=d(at[ar].getPiwikUrl());if(ap===ax){aw=at[ar];break}}if(!aw){return}var aq=null;try{aq=JSON.parse(au.data)}catch(av){return}if(!aq){return}function ao(aA){var aC=G.getElementsByTagName("iframe");for(ar=0;ar<aC.length;ar++){var aB=aC[ar];var ay=d(aB.src);if(aB.contentWindow&&J(aB.contentWindow.postMessage)&&ay===ax){var az=JSON.stringify(aA);aB.contentWindow.postMessage(az,"*")}}}if(J(aq.maq_initial_value)){ao({maq_opted_in:aq.maq_initial_value&&aw.hasConsent(),maq_url:aw.getPiwikUrl(),maq_optout_by_default:aw.isConsentRequired()})}else{if(J(aq.maq_opted_in)){at=e.getAsyncTrackers();for(ar=0;ar<at.length;ar++){aw=at[ar];if(aq.maq_opted_in){aw.rememberConsentGiven()}else{aw.forgetConsentGiven()}}ao({maq_confirm_opted_in:aw.hasConsent(),maq_url:aw.getPiwikUrl(),maq_optout_by_default:aw.isConsentRequired()})
|
76 |
}}},false);Date.prototype.getTimeAlias=Date.prototype.getTime;e={initialized:false,JSON:JSON_PIWIK,DOM:{addEventListener:function(ar,aq,ap,ao){var at=typeof ao;if(at==="undefined"){ao=false}an(ar,aq,ap,ao)},onLoad:n,onReady:q,isNodeVisible:j,isOrWasNodeVisible:v.isNodeVisible},on:function(ap,ao){if(!y[ap]){y[ap]=[]}y[ap].push(ao)},off:function(aq,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){if(y[aq][ao]===ap){y[aq].splice(ao,1)}}},trigger:function(aq,ar,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){y[aq][ao].apply(ap||T,ar)}},addPlugin:function(ao,ap){b[ao]=ap},getTracker:function(ao,ap){if(!J(ap)){ap=this.getAsyncTracker().getSiteId()}if(!J(ao)){ao=this.getAsyncTracker().getTrackerUrl()}return new Q(ao,ap)},getAsyncTrackers:function(){return I},addTracker:function(ao,aq){var ap;if(!I.length){ap=ad(ao,aq)}else{ap=I[0].addTracker(ao,aq)}return ap},getAsyncTracker:function(ap,at){var ar;if(I&&I.length&&I[0]){ar=I[0]}else{return ad(ap,at)}if(!at&&!ap){return ar
|
77 |
}if((!J(at)||null===at)&&ar){at=ar.getSiteId()}if((!J(ap)||null===ap)&&ar){ap=ar.getTrackerUrl()}var aq,ao=0;for(ao;ao<I.length;ao++){aq=I[ao];if(aq&&String(aq.getSiteId())===String(at)&&aq.getTrackerUrl()===ap){return aq}}},retryMissedPluginCalls:function(){var ap=ah;ah=[];var ao=0;for(ao;ao<ap.length;ao++){af(ap[ao])}}};if(typeof define==="function"&&define.amd){define("piwik",[],function(){return e});define("matomo",[],function(){return e})}return e}())}
|
app/piwik.js
CHANGED
@@ -38,39 +38,40 @@ if(!aq){aq="/"}}return aq},findMediaUrlInNode:function(at){if(!at){return}var aq
|
|
38 |
if(aq&&au.offsetTop){aq=(au.offsetTop+at.height)>0}var ap=ar.clientWidth;if(T.innerWidth&&ap>T.innerWidth){ap=T.innerWidth}var ao=ar.clientHeight;if(T.innerHeight&&ao>T.innerHeight){ao=T.innerHeight}return((at.bottom>0||aq)&&at.right>0&&at.left<ap&&((at.top<ao)||aq))},isNodeVisible:function(ap){var ao=j(ap);var aq=this.isOrWasNodeInViewport(ap);return ao&&aq},buildInteractionRequestParams:function(ao,ap,aq,ar){var at="";if(ao){at+="c_i="+t(ao)}if(ap){if(at){at+="&"}at+="c_n="+t(ap)}if(aq){if(at){at+="&"}at+="c_p="+t(aq)}if(ar){if(at){at+="&"}at+="c_t="+t(ar)}return at},buildImpressionRequestParams:function(ao,ap,aq){var ar="c_n="+t(ao)+"&c_p="+t(ap);if(aq){ar+="&c_t="+t(aq)}return ar},buildContentBlock:function(aq){if(!aq){return}var ao=this.findContentName(aq);var ap=this.findContentPiece(aq);var ar=this.findContentTarget(aq);ao=this.trim(ao);ap=this.trim(ap);ar=this.trim(ar);return{name:ao||"Unknown",piece:ap||"Unknown",target:ar||""}},collectContent:function(ar){if(!ar||!ar.length){return[]
|
39 |
}var aq=[];var ao,ap;for(ao=0;ao<ar.length;ao++){ap=this.buildContentBlock(ar[ao]);if(J(ap)){aq.push(ap)}}return aq},setLocation:function(ao){this.location=ao},getLocation:function(){var ao=this.location||T.location;if(!ao.origin){ao.origin=ao.protocol+"//"+ao.hostname+(ao.port?":"+ao.port:"")}return ao},toAbsoluteUrl:function(ap){if((!ap||String(ap)!==ap)&&ap!==""){return ap}if(""===ap){return this.getLocation().href}if(ap.search(/^\/\//)!==-1){return this.getLocation().protocol+ap}if(ap.search(/:\/\//)!==-1){return ap}if(0===ap.indexOf("#")){return this.getLocation().origin+this.getLocation().pathname+ap}if(0===ap.indexOf("?")){return this.getLocation().origin+this.getLocation().pathname+ap}if(0===ap.search("^[a-zA-Z]{2,11}:")){return ap}if(ap.search(/^\//)!==-1){return this.getLocation().origin+ap}var ao="(.*/)";var aq=this.getLocation().origin+this.getLocation().pathname.match(new RegExp(ao))[0];return aq+ap},isUrlToCurrentDomain:function(ap){var aq=this.toAbsoluteUrl(ap);if(!aq){return false
|
40 |
}var ao=this.getLocation().origin;if(ao===aq){return true}if(0===String(aq).indexOf(ao)){if(":"===String(aq).substr(ao.length,1)){return false}return true}return false},setHrefAttribute:function(ap,ao){if(!ap||!ao){return}ae.setAnyAttribute(ap,"href",ao)},shouldIgnoreInteraction:function(aq){var ap=ae.hasNodeAttribute(aq,this.CONTENT_IGNOREINTERACTION_ATTR);var ao=ae.hasNodeCssClass(aq,this.CONTENT_IGNOREINTERACTION_CLASS);return ap||ao}};function O(ap,at){if(at){return at}ap=v.toAbsoluteUrl(ap);if(z(ap,"?")){var ar=ap.indexOf("?");ap=ap.slice(0,ar)}if(R(ap,"matomo.php")){ap=g(ap,"matomo.php".length)}else{if(R(ap,"piwik.php")){ap=g(ap,"piwik.php".length)}else{if(R(ap,".php")){var ao=ap.lastIndexOf("/");var aq=1;ap=ap.slice(0,ao+aq)}}}if(R(ap,"/js/")){ap=g(ap,"js/".length)}return ap}function N(av){var ax="Piwik_Overlay";var ap=new RegExp("index\\.php\\?module=Overlay&action=startOverlaySession&idSite=([0-9]+)&period=([^&]+)&date=([^&]+)(&segment=.*)?$");var aq=ap.exec(G.referrer);if(aq){var at=aq[1];
|
41 |
-
if(at!==String(av)){return false}var au=aq[2],ao=aq[3],ar=aq[4];if(!ar){ar=""}else{if(ar.indexOf("&segment=")===0){ar=ar.substr("&segment=".length)}}T.name=ax+"###"+au+"###"+ao+"###"+ar}var aw=T.name.split("###");return aw.length===4&&aw[0]===ax}function Z(ap,aw,ar){var av=T.name.split("###"),au=av[1],ao=av[2],at=av[3],aq=O(ap,aw);o(aq+"plugins/Overlay/client/client.js?v=1",function(){Piwik_Overlay_Client.initialize(aq,ar,au,ao,at)})}function u(){var aq;try{aq=T.frameElement}catch(ap){return true}if(J(aq)){return(aq&&String(aq.nodeName).toLowerCase()==="iframe")?true:false}try{return T.self!==T.top}catch(ao){return true}}function Q(
|
42 |
-
try{
|
43 |
-
if(
|
44 |
-
var
|
45 |
-
|
46 |
-
return !
|
47 |
-
if(
|
48 |
-
}if(A(T.GearsFactory)){
|
49 |
-
var dl=new RegExp("^[a-zA-Z0-9]+$");if(
|
50 |
-
}function
|
51 |
-
if(
|
52 |
-
var
|
53 |
-
}}}if(
|
54 |
-
}
|
55 |
-
}var
|
56 |
-
if(!
|
57 |
-
v.setHrefAttribute(
|
58 |
-
}}}function
|
59 |
-
return false}var
|
60 |
-
if(!
|
61 |
-
}}function
|
62 |
-
}
|
63 |
-
}
|
64 |
-
}ao[
|
65 |
-
}else{if(dl==="visit"||
|
66 |
-
if(dm&&
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
|
|
|
74 |
}}_paq=new H();e.trigger("TrackerAdded",[ap]);return ap}an(T,"beforeunload",ai,false);an(T,"message",function(au){if(!au||!au.origin){return}var aw,ar,ap;var ax=d(au.origin);var at=e.getAsyncTrackers();for(ar=0;ar<at.length;ar++){ap=d(at[ar].getPiwikUrl());if(ap===ax){aw=at[ar];break}}if(!aw){return}var aq=null;try{aq=JSON.parse(au.data)}catch(av){return}if(!aq){return}function ao(aA){var aC=G.getElementsByTagName("iframe");for(ar=0;ar<aC.length;ar++){var aB=aC[ar];var ay=d(aB.src);if(aB.contentWindow&&J(aB.contentWindow.postMessage)&&ay===ax){var az=JSON.stringify(aA);aB.contentWindow.postMessage(az,"*")}}}if(J(aq.maq_initial_value)){ao({maq_opted_in:aq.maq_initial_value&&aw.hasConsent(),maq_url:aw.getPiwikUrl(),maq_optout_by_default:aw.isConsentRequired()})}else{if(J(aq.maq_opted_in)){at=e.getAsyncTrackers();for(ar=0;ar<at.length;ar++){aw=at[ar];if(aq.maq_opted_in){aw.rememberConsentGiven()}else{aw.forgetConsentGiven()}}ao({maq_confirm_opted_in:aw.hasConsent(),maq_url:aw.getPiwikUrl(),maq_optout_by_default:aw.isConsentRequired()})
|
75 |
}}},false);Date.prototype.getTimeAlias=Date.prototype.getTime;e={initialized:false,JSON:JSON_PIWIK,DOM:{addEventListener:function(ar,aq,ap,ao){var at=typeof ao;if(at==="undefined"){ao=false}an(ar,aq,ap,ao)},onLoad:n,onReady:q,isNodeVisible:j,isOrWasNodeVisible:v.isNodeVisible},on:function(ap,ao){if(!y[ap]){y[ap]=[]}y[ap].push(ao)},off:function(aq,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){if(y[aq][ao]===ap){y[aq].splice(ao,1)}}},trigger:function(aq,ar,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){y[aq][ao].apply(ap||T,ar)}},addPlugin:function(ao,ap){b[ao]=ap},getTracker:function(ao,ap){if(!J(ap)){ap=this.getAsyncTracker().getSiteId()}if(!J(ao)){ao=this.getAsyncTracker().getTrackerUrl()}return new Q(ao,ap)},getAsyncTrackers:function(){return I},addTracker:function(ao,aq){var ap;if(!I.length){ap=ad(ao,aq)}else{ap=I[0].addTracker(ao,aq)}return ap},getAsyncTracker:function(ap,at){var ar;if(I&&I.length&&I[0]){ar=I[0]}else{return ad(ap,at)}if(!at&&!ap){return ar
|
76 |
}if((!J(at)||null===at)&&ar){at=ar.getSiteId()}if((!J(ap)||null===ap)&&ar){ap=ar.getTrackerUrl()}var aq,ao=0;for(ao;ao<I.length;ao++){aq=I[ao];if(aq&&String(aq.getSiteId())===String(at)&&aq.getTrackerUrl()===ap){return aq}}},retryMissedPluginCalls:function(){var ap=ah;ah=[];var ao=0;for(ao;ao<ap.length;ao++){af(ap[ao])}}};if(typeof define==="function"&&define.amd){define("piwik",[],function(){return e});define("matomo",[],function(){return e})}return e}())}
|
38 |
if(aq&&au.offsetTop){aq=(au.offsetTop+at.height)>0}var ap=ar.clientWidth;if(T.innerWidth&&ap>T.innerWidth){ap=T.innerWidth}var ao=ar.clientHeight;if(T.innerHeight&&ao>T.innerHeight){ao=T.innerHeight}return((at.bottom>0||aq)&&at.right>0&&at.left<ap&&((at.top<ao)||aq))},isNodeVisible:function(ap){var ao=j(ap);var aq=this.isOrWasNodeInViewport(ap);return ao&&aq},buildInteractionRequestParams:function(ao,ap,aq,ar){var at="";if(ao){at+="c_i="+t(ao)}if(ap){if(at){at+="&"}at+="c_n="+t(ap)}if(aq){if(at){at+="&"}at+="c_p="+t(aq)}if(ar){if(at){at+="&"}at+="c_t="+t(ar)}return at},buildImpressionRequestParams:function(ao,ap,aq){var ar="c_n="+t(ao)+"&c_p="+t(ap);if(aq){ar+="&c_t="+t(aq)}return ar},buildContentBlock:function(aq){if(!aq){return}var ao=this.findContentName(aq);var ap=this.findContentPiece(aq);var ar=this.findContentTarget(aq);ao=this.trim(ao);ap=this.trim(ap);ar=this.trim(ar);return{name:ao||"Unknown",piece:ap||"Unknown",target:ar||""}},collectContent:function(ar){if(!ar||!ar.length){return[]
|
39 |
}var aq=[];var ao,ap;for(ao=0;ao<ar.length;ao++){ap=this.buildContentBlock(ar[ao]);if(J(ap)){aq.push(ap)}}return aq},setLocation:function(ao){this.location=ao},getLocation:function(){var ao=this.location||T.location;if(!ao.origin){ao.origin=ao.protocol+"//"+ao.hostname+(ao.port?":"+ao.port:"")}return ao},toAbsoluteUrl:function(ap){if((!ap||String(ap)!==ap)&&ap!==""){return ap}if(""===ap){return this.getLocation().href}if(ap.search(/^\/\//)!==-1){return this.getLocation().protocol+ap}if(ap.search(/:\/\//)!==-1){return ap}if(0===ap.indexOf("#")){return this.getLocation().origin+this.getLocation().pathname+ap}if(0===ap.indexOf("?")){return this.getLocation().origin+this.getLocation().pathname+ap}if(0===ap.search("^[a-zA-Z]{2,11}:")){return ap}if(ap.search(/^\//)!==-1){return this.getLocation().origin+ap}var ao="(.*/)";var aq=this.getLocation().origin+this.getLocation().pathname.match(new RegExp(ao))[0];return aq+ap},isUrlToCurrentDomain:function(ap){var aq=this.toAbsoluteUrl(ap);if(!aq){return false
|
40 |
}var ao=this.getLocation().origin;if(ao===aq){return true}if(0===String(aq).indexOf(ao)){if(":"===String(aq).substr(ao.length,1)){return false}return true}return false},setHrefAttribute:function(ap,ao){if(!ap||!ao){return}ae.setAnyAttribute(ap,"href",ao)},shouldIgnoreInteraction:function(aq){var ap=ae.hasNodeAttribute(aq,this.CONTENT_IGNOREINTERACTION_ATTR);var ao=ae.hasNodeCssClass(aq,this.CONTENT_IGNOREINTERACTION_CLASS);return ap||ao}};function O(ap,at){if(at){return at}ap=v.toAbsoluteUrl(ap);if(z(ap,"?")){var ar=ap.indexOf("?");ap=ap.slice(0,ar)}if(R(ap,"matomo.php")){ap=g(ap,"matomo.php".length)}else{if(R(ap,"piwik.php")){ap=g(ap,"piwik.php".length)}else{if(R(ap,".php")){var ao=ap.lastIndexOf("/");var aq=1;ap=ap.slice(0,ao+aq)}}}if(R(ap,"/js/")){ap=g(ap,"js/".length)}return ap}function N(av){var ax="Piwik_Overlay";var ap=new RegExp("index\\.php\\?module=Overlay&action=startOverlaySession&idSite=([0-9]+)&period=([^&]+)&date=([^&]+)(&segment=.*)?$");var aq=ap.exec(G.referrer);if(aq){var at=aq[1];
|
41 |
+
if(at!==String(av)){return false}var au=aq[2],ao=aq[3],ar=aq[4];if(!ar){ar=""}else{if(ar.indexOf("&segment=")===0){ar=ar.substr("&segment=".length)}}T.name=ax+"###"+au+"###"+ao+"###"+ar}var aw=T.name.split("###");return aw.length===4&&aw[0]===ax}function Z(ap,aw,ar){var av=T.name.split("###"),au=av[1],ao=av[2],at=av[3],aq=O(ap,aw);o(aq+"plugins/Overlay/client/client.js?v=1",function(){Piwik_Overlay_Client.initialize(aq,ar,au,ao,at)})}function u(){var aq;try{aq=T.frameElement}catch(ap){return true}if(J(aq)){return(aq&&String(aq.nodeName).toLowerCase()==="iframe")?true:false}try{return T.self!==T.top}catch(ao){return true}}function Q(ce,b9){var bI=this,be="mtm_consent",cD="mtm_cookie_consent",cN="mtm_consent_removed",b4=aa(G.domain,T.location.href,K()),cW=L(b4[0]),bN=p(b4[1]),bn=p(b4[2]),cU=false,ci="GET",dc=ci,aI="application/x-www-form-urlencoded; charset=UTF-8",cx=aI,aE=ce||"",bH="",c1="",b6=b9||"",by="",bO="",a5,bj="",c8=["7z","aac","apk","arc","arj","asf","asx","avi","azw3","bin","csv","deb","dmg","doc","docx","epub","exe","flv","gif","gz","gzip","hqx","ibooks","jar","jpg","jpeg","js","mobi","mp2","mp3","mp4","mpg","mpeg","mov","movie","msi","msp","odb","odf","odg","ods","odt","ogg","ogv","pdf","phps","png","ppt","pptx","qt","qtm","ra","ram","rar","rpm","sea","sit","tar","tbz","tbz2","bz","bz2","tgz","torrent","txt","wav","wma","wmv","wpd","xls","xlsx","xml","z","zip"],ay=[cW],bz=[],bL=[],a9=[],bJ=500,cY=false,cJ,a6,bR,c9=1800,bP,ao,cr=["pk_campaign","piwik_campaign","utm_campaign","utm_source","utm_medium"],bG=["pk_kwd","piwik_kwd","utm_term"],bk="_pk_",av="pk_vid",a0=180,cZ,bp,bS=false,bl=false,cR,bf,bv,cK=33955200000,cp=1800000,c7=15768000000,a3=true,cn=0,bQ=false,aR=false,cb,bW={},cm={},bm={},bt=200,c2={},da={},ca=[],cf=false,cB=false,ap=false,db=false,cO=false,aO=false,bd=u(),cT=null,c0=null,cc,aS,bA,b7=am,bo,aL,cs=0,bu=["id","ses","cvar","ref"],cA=false,bB=null,cL=[],ax=U++,aw=false;
|
42 |
+
try{bj=G.title}catch(cy){bj=""}function dg(ds,dq,dp,dr,dn,dm){if(bl){return}var dl;if(dp){dl=new Date();dl.setTime(dl.getTime()+dp)}G.cookie=ds+"="+t(dq)+(dp?";expires="+dl.toGMTString():"")+";path="+(dr||"/")+(dn?";domain="+dn:"")+(dm?";secure":"")+";SameSite=Lax"}function aD(dn){if(bl){return 0}var dl=new RegExp("(^|;)[ ]*"+dn+"=([^;]*)"),dm=dl.exec(G.cookie);return dm?S(dm[2]):0}bB=!aD(cN);function b2(dl){var dm;dl=k(dl,av);if(bP){dm=new RegExp("#.*");return dl.replace(dm,"")}return dl}function bV(dn,dl){var dp=s(dl),dm;if(dp){return dl}if(dl.slice(0,1)==="/"){return s(dn)+"://"+d(dn)+dl}dn=b2(dn);dm=dn.indexOf("?");if(dm>=0){dn=dn.slice(0,dm)}dm=dn.lastIndexOf("/");if(dm!==dn.length-1){dn=dn.slice(0,dm+1)}return dn+dl}function cH(dn,dl){var dm;dn=String(dn).toLowerCase();dl=String(dl).toLowerCase();if(dn===dl){return true}if(dl.slice(0,1)==="."){if(dn===dl.slice(1)){return true}dm=dn.length-dl.length;if((dm>0)&&(dn.slice(dm)===dl)){return true}}return false}function cl(dl){var dm=document.createElement("a");
|
43 |
+
if(dl.indexOf("//")!==0&&dl.indexOf("http")!==0){if(dl.indexOf("*")===0){dl=dl.substr(1)}if(dl.indexOf(".")===0){dl=dl.substr(1)}dl="http://"+dl}dm.href=v.toAbsoluteUrl(dl);if(dm.pathname){return dm.pathname}return""}function a4(dm,dl){if(!aj(dl,"/")){dl="/"+dl}if(!aj(dm,"/")){dm="/"+dm}var dn=(dl==="/"||dl==="/*");if(dn){return true}if(dm===dl){return true}dl=String(dl).toLowerCase();dm=String(dm).toLowerCase();if(R(dl,"*")){dl=dl.slice(0,-1);dn=(!dl||dl==="/");if(dn){return true}if(dm===dl){return true}return dm.indexOf(dl)===0}if(!R(dm,"/")){dm+="/"}if(!R(dl,"/")){dl+="/"}return dm.indexOf(dl)===0}function ar(dq,ds){var dm,dl,dn,dp,dr;for(dm=0;dm<ay.length;dm++){dp=L(ay[dm]);dr=cl(ay[dm]);if(cH(dq,dp)&&a4(ds,dr)){return true}}return false}function aW(dp){var dm,dl,dn;for(dm=0;dm<ay.length;dm++){dl=L(ay[dm].toLowerCase());if(dp===dl){return true}if(dl.slice(0,1)==="."){if(dp===dl.slice(1)){return true}dn=dp.length-dl.length;if((dn>0)&&(dp.slice(dn)===dl)){return true}}}return false}function cq(dl,dn){dl=dl.replace("send_image=0","send_image=1");
|
44 |
+
var dm=new Image(1,1);dm.onload=function(){E=0;if(typeof dn==="function"){dn({request:dl,trackerUrl:aE,success:true})}};dm.onerror=function(){if(typeof dn==="function"){dn({request:dl,trackerUrl:aE,success:false})}};dm.src=aE+(aE.indexOf("?")<0?"?":"&")+dl}function cE(dl){if(dc==="POST"){return true}return dl&&(dl.length>2000||dl.indexOf('{"requests"')===0)}function aK(){return"object"===typeof h&&"function"===typeof h.sendBeacon&&"function"===typeof Blob}function a7(dq,dt,ds){var dn=aK();if(!dn){return false}var dp={type:"application/x-www-form-urlencoded; charset=UTF-8"};var du=false;var dm=aE;try{var dl=new Blob([dq],dp);if(ds&&!cE(dq)){dl=new Blob([],dp);dm=dm+(dm.indexOf("?")<0?"?":"&")+dq}du=h.sendBeacon(dm,dl)}catch(dr){return false}if(du&&typeof dt==="function"){dt({request:dq,trackerUrl:aE,success:true,isSendBeacon:true})}return du}function c6(dm,dn,dl){if(!J(dl)||null===dl){dl=true}if(m&&a7(dm,dn,dl)){return}setTimeout(function(){if(m&&a7(dm,dn,dl)){return}var dr;try{var dq=T.XMLHttpRequest?new T.XMLHttpRequest():T.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;
|
45 |
+
dq.open("POST",aE,true);dq.onreadystatechange=function(){if(this.readyState===4&&!(this.status>=200&&this.status<300)){var ds=m&&a7(dm,dn,dl);if(!ds&&dl){cq(dm,dn)}else{if(typeof dn==="function"){dn({request:dm,trackerUrl:aE,success:false,xhr:this})}}}else{if(this.readyState===4&&(typeof dn==="function")){dn({request:dm,trackerUrl:aE,success:true,xhr:this})}}};dq.setRequestHeader("Content-Type",cx);dq.withCredentials=true;dq.send(dm)}catch(dp){dr=m&&a7(dm,dn,dl);if(!dr&&dl){cq(dm,dn)}else{if(typeof dn==="function"){dn({request:dm,trackerUrl:aE,success:false})}}}},50)}function cg(dm){var dl=new Date();var dn=dl.getTime()+dm;if(!r||dn>r){r=dn}}function co(dl){if(cc||!a6||!bB){return}cc=setTimeout(function dm(){cc=null;if(!bd){bd=(!G.hasFocus||G.hasFocus())}if(!bd){co(a6);return}if(bR()){return}var dn=new Date(),dp=a6-(dn.getTime()-c0);dp=Math.min(a6,dp);co(dp)},dl||a6)}function bK(){if(!cc){return}clearTimeout(cc);cc=null}function bb(){bd=true;cT=new Date().getTime()}function df(){var dl=new Date().getTime();
|
46 |
+
return !cT||(dl-cT)>a6}function az(){if(df()){bR()}bK()}function di(){if(aO||!a6){return}aO=true;an(T,"focus",bb);an(T,"blur",az);ab++;e.addPlugin("HeartBeat"+ab,{unload:function(){if(aO&&df()){bR()}}})}function cC(dq){var dm=new Date();var dl=dm.getTime();c0=dl;if(cB&&dl<cB){var dn=cB-dl;setTimeout(dq,dn);cg(dn+50);cB+=50;return}if(cB===false){var dp=800;cB=dl+dp}dq()}function aP(){if(aD(cN)){bB=false}else{if(aD(be)){bB=true}}}function bF(dm,dl,dn){aP();if(!bB){cL.push(dm);return}aw=true;if(!cR&&dm){if(cA&&bB){dm+="&consent=1"}cC(function(){if(cY&&a7(dm,dn,true)){cg(100);return}if(cE(dm)){c6(dm,dn)}else{cq(dm,dn)}cg(dl)})}if(!aO){di()}}function ck(dl){if(cR){return false}return(dl&&dl.length)}function c5(dl,dq){if(!dq||dq>=dl.length){return[dl]}var dm=0;var dn=dl.length;var dp=[];for(dm;dm<dn;dm+=dq){dp.push(dl.slice(dm,dm+dq))}return dp}function dh(dm,dl){if(!ck(dm)){return}if(!bB){cL.push(dm);return}aw=true;cC(function(){var dq=c5(dm,50);var dn=0,dp;for(dn;dn<dq.length;dn++){dp='{"requests":["?'+dq[dn].join('","?')+'"]}';
|
47 |
+
if(cY&&a7(dp,null,false)){cg(100)}else{c6(dp,null,false)}}cg(dl)})}function aU(dl){return bk+dl+"."+b6+"."+bo}function bY(dn,dm,dl){dg(dn,"",-86400,dm,dl)}function b5(){if(bl){return"0"}if(!J(T.showModalDialog)&&J(h.cookieEnabled)){return h.cookieEnabled?"1":"0"}var dl=bk+"testcookie";dg(dl,"1",undefined,bp,cZ,bS);var dm=aD(dl)==="1"?"1":"0";bY(dl);return dm}function bi(){bo=b7((cZ||cW)+(bp||"/")).slice(0,4)}function cI(){if(J(da.res)){return da}var dm,dp,dq={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",dir:"application/x-director",fla:"application/x-shockwave-flash",java:"application/x-java-vm",gears:"application/x-googlegears",ag:"application/x-silverlight"};if(!((new RegExp("MSIE")).test(h.userAgent))){if(h.mimeTypes&&h.mimeTypes.length){for(dm in dq){if(Object.prototype.hasOwnProperty.call(dq,dm)){dp=h.mimeTypes[dq[dm]];da[dm]=(dp&&dp.enabledPlugin)?"1":"0"}}}if(!((new RegExp("Edge[ /](\\d+[\\.\\d]+)")).test(h.userAgent))&&typeof navigator.javaEnabled!=="unknown"&&J(h.javaEnabled)&&h.javaEnabled()){da.java="1"
|
48 |
+
}if(A(T.GearsFactory)){da.gears="1"}if(!J(T.showModalDialog)&&J(h.cookieEnabled)){da.cookie=h.cookieEnabled?"1":"0"}else{da.cookie=b5()}}var dn=parseInt(X.width,10);var dl=parseInt(X.height,10);da.res=parseInt(dn,10)+"x"+parseInt(dl,10);return da}function bX(){var dm=aU("cvar"),dl=aD(dm);if(dl.length){dl=JSON_PIWIK.parse(dl);if(W(dl)){return dl}}return{}}function cF(){if(aR===false){aR=bX()}}function cS(){var dl=cI();return b7((h.userAgent||"")+(h.platform||"")+JSON_PIWIK.stringify(dl)+(new Date()).getTime()+Math.random()).slice(0,16)}function aA(){var dl=cI();return b7((h.userAgent||"")+(h.platform||"")+JSON_PIWIK.stringify(dl)).slice(0,6)}function bg(){return Math.floor((new Date()).getTime()/1000)}function aJ(){var dm=bg();var dn=aA();var dl=String(dm)+dn;return dl}function c4(dn){dn=String(dn);var dr=aA();var dp=dr.length;var dq=dn.substr(-1*dp,dp);var dm=parseInt(dn.substr(0,dn.length-dp),10);if(dm&&dq&&dq===dr){var dl=bg();if(a0<=0){return true}if(dl>=dm&&dl<=(dm+a0)){return true}}return false
|
49 |
+
}function dj(dl){if(!cO){return""}var dq=f(dl,av);if(!dq){return""}dq=String(dq);var dn=new RegExp("^[a-zA-Z0-9]+$");if(dq.length===32&&dn.test(dq)){var dm=dq.substr(16,32);if(c4(dm)){var dp=dq.substr(0,16);return dp}}return""}function cP(){if(!bO){bO=dj(bN)}var dn=new Date(),dl=Math.round(dn.getTime()/1000),dm=aU("id"),dr=aD(dm),dq,dp;if(dr){dq=dr.split(".");dq.unshift("0");if(bO.length){dq[1]=bO}return dq}if(bO.length){dp=bO}else{if("0"===b5()){dp=""}else{dp=cS()}}dq=["1",dp,dl,0,dl,"",""];return dq}function aZ(){var dt=cP(),dp=dt[0],dq=dt[1],dm=dt[2],dl=dt[3],dr=dt[4],dn=dt[5];if(!J(dt[6])){dt[6]=""}var ds=dt[6];return{newVisitor:dp,uuid:dq,createTs:dm,visitCount:dl,currentVisitTs:dr,lastVisitTs:dn,lastEcommerceOrderTs:ds}}function aH(){var dp=new Date(),dm=dp.getTime(),dq=aZ().createTs;var dl=parseInt(dq,10);var dn=(dl*1000)+cK-dm;return dn}function aM(dl){if(!b6){return}var dn=new Date(),dm=Math.round(dn.getTime()/1000);if(!J(dl)){dl=aZ()}var dp=dl.uuid+"."+dl.createTs+"."+dl.visitCount+"."+dm+"."+dl.lastVisitTs+"."+dl.lastEcommerceOrderTs;
|
50 |
+
dg(aU("id"),dp,aH(),bp,cZ,bS)}function bM(){var dl=aD(aU("ref"));if(dl.length){try{dl=JSON_PIWIK.parse(dl);if(W(dl)){return dl}}catch(dm){}}return["","",0,""]}function bw(dm){var dl="testvalue";dg("test",dl,10000,null,dm);if(aD("test")===dl){bY("test",null,dm);return true}return false}function aF(){var dm=bl;bl=false;var dl,dn;for(dl=0;dl<bu.length;dl++){dn=aU(bu[dl]);if(dn!==cN&&dn!==be&&0!==aD(dn)){bY(dn,bp,cZ)}}bl=dm}function b3(dl){b6=dl}function dk(dq){if(!dq||!W(dq)){return}var dp=[];var dn;for(dn in dq){if(Object.prototype.hasOwnProperty.call(dq,dn)){dp.push(dn)}}var dr={};dp.sort();var dl=dp.length;var dm;for(dm=0;dm<dl;dm++){dr[dp[dm]]=dq[dp[dm]]}return dr}function cd(){dg(aU("ses"),"1",cp,bp,cZ,bS)}function bh(){var dp="";var dm="abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";var dn=dm.length;var dl;for(dl=0;dl<6;dl++){dp+=dm.charAt(Math.floor(Math.random()*dn))}return dp}function ct(dn,dJ,dK,dp){var dI,dm=new Date(),dw=Math.round(dm.getTime()/1000),dt,dH,dq=1024,dQ,dx,dF=aR,dr=aU("ses"),dD=aU("ref"),dA=aU("cvar"),dB=aD(dr),dG=bM(),dM=a5||bN,du,dl;
|
51 |
+
if(bl){aF()}if(cR){return""}var dC=aZ();if(!J(dp)){dp=""}var dz=G.characterSet||G.charset;if(!dz||dz.toLowerCase()==="utf-8"){dz=null}du=dG[0];dl=dG[1];dt=dG[2];dH=dG[3];if(!dB){var dL=cp/1000;if(!dC.lastVisitTs||(dw-dC.lastVisitTs)>dL){dC.visitCount++;dC.lastVisitTs=dC.currentVisitTs}if(!bv||!du.length){for(dI in cr){if(Object.prototype.hasOwnProperty.call(cr,dI)){du=f(dM,cr[dI]);if(du.length){break}}}for(dI in bG){if(Object.prototype.hasOwnProperty.call(bG,dI)){dl=f(dM,bG[dI]);if(dl.length){break}}}}dQ=d(bn);dx=dH.length?d(dH):"";if(dQ.length&&!aW(dQ)&&(!bv||!dx.length||aW(dx))){dH=bn}if(dH.length||du.length){dt=dw;dG=[du,dl,dt,b2(dH.slice(0,dq))];dg(dD,JSON_PIWIK.stringify(dG),c7,bp,cZ)}}dn+="&idsite="+b6+"&rec=1&r="+String(Math.random()).slice(2,8)+"&h="+dm.getHours()+"&m="+dm.getMinutes()+"&s="+dm.getSeconds()+"&url="+t(b2(dM))+(bn.length?"&urlref="+t(b2(bn)):"")+((by&&by.length)?"&uid="+t(by):"")+"&_id="+dC.uuid+"&_idts="+dC.createTs+"&_idvc="+dC.visitCount+"&_idn="+dC.newVisitor+(du.length?"&_rcn="+t(du):"")+(dl.length?"&_rck="+t(dl):"")+"&_refts="+dt+"&_viewts="+dC.lastVisitTs+(String(dC.lastEcommerceOrderTs).length?"&_ects="+dC.lastEcommerceOrderTs:"")+(String(dH).length?"&_ref="+t(b2(dH.slice(0,dq))):"")+(dz?"&cs="+t(dz):"")+"&send_image=0";
|
52 |
+
var dP=cI();for(dI in dP){if(Object.prototype.hasOwnProperty.call(dP,dI)){dn+="&"+dI+"="+dP[dI]}}var dO=[];if(dJ){for(dI in dJ){if(Object.prototype.hasOwnProperty.call(dJ,dI)&&/^dimension\d+$/.test(dI)){var ds=dI.replace("dimension","");dO.push(parseInt(ds,10));dO.push(String(ds));dn+="&"+dI+"="+t(dJ[dI]);delete dJ[dI]}}}if(dJ&&B(dJ)){dJ=null}for(dI in bm){if(Object.prototype.hasOwnProperty.call(bm,dI)){var dy=(-1===M(dO,dI));if(dy){dn+="&dimension"+dI+"="+t(bm[dI])}}}if(dJ){dn+="&data="+t(JSON_PIWIK.stringify(dJ))}else{if(ao){dn+="&data="+t(JSON_PIWIK.stringify(ao))}}function dv(dR,dS){var dT=JSON_PIWIK.stringify(dR);if(dT.length>2){return"&"+dS+"="+t(dT)}return""}var dN=dk(bW);var dE=dk(cm);dn+=dv(dN,"cvar");dn+=dv(dE,"e_cvar");if(aR){dn+=dv(aR,"_cvar");for(dI in dF){if(Object.prototype.hasOwnProperty.call(dF,dI)){if(aR[dI][0]===""||aR[dI][1]===""){delete aR[dI]}}}if(bQ){dg(dA,JSON_PIWIK.stringify(aR),cp,bp,cZ)}}if(a3){if(cn){dn+=">_ms="+cn}else{if(i&&i.timing&&i.timing.requestStart&&i.timing.responseEnd){dn+=">_ms="+(i.timing.responseEnd-i.timing.requestStart)
|
53 |
+
}}}if(aL){dn+="&pv_id="+aL}dC.lastEcommerceOrderTs=J(dp)&&String(dp).length?dp:dC.lastEcommerceOrderTs;aM(dC);cd();dn+=ac(dK,{tracker:bI,request:dn});if(c1.length){dn+="&"+c1}if(A(cb)){dn=cb(dn)}return dn}bR=function a8(){var dl=new Date();dl=dl.getTime();if(!c0){return false}if((c0+(1000*c9))<=dl){return false}if(c0+a6<=dl){bI.ping();return true}return false};function bq(dp,dn,du,dq,dl,dx){var ds="idgoal=0",dt,dm=new Date(),dv=[],dw,dr=String(dp).length;if(dr){ds+="&ec_id="+t(dp);dt=Math.round(dm.getTime()/1000)}ds+="&revenue="+dn;if(String(du).length){ds+="&ec_st="+du}if(String(dq).length){ds+="&ec_tx="+dq}if(String(dl).length){ds+="&ec_sh="+dl}if(String(dx).length){ds+="&ec_dt="+dx}if(c2){for(dw in c2){if(Object.prototype.hasOwnProperty.call(c2,dw)){if(!J(c2[dw][1])){c2[dw][1]=""}if(!J(c2[dw][2])){c2[dw][2]=""}if(!J(c2[dw][3])||String(c2[dw][3]).length===0){c2[dw][3]=0}if(!J(c2[dw][4])||String(c2[dw][4]).length===0){c2[dw][4]=1}dv.push(c2[dw])}}ds+="&ec_items="+t(JSON_PIWIK.stringify(dv))
|
54 |
+
}ds=ct(ds,ao,"ecommerce",dt);bF(ds,bJ);if(dr){c2={}}}function bZ(dl,dq,dp,dn,dm,dr){if(String(dl).length&&J(dq)){bq(dl,dq,dp,dn,dm,dr)}}function bs(dl){if(J(dl)){bq("",dl,"","","","")}}function b0(dm,dp,dn){aL=bh();var dl=ct("action_name="+t(al(dm||bj)),dp,"log");bF(dl,bJ,dn)}function a1(dn,dm){var dp,dl="(^| )(piwik[_-]"+dm+"|matomo[_-]"+dm;if(dn){for(dp=0;dp<dn.length;dp++){dl+="|"+dn[dp]}}dl+=")( |$)";return new RegExp(dl)}function aV(dl){return(aE&&dl&&0===String(dl).indexOf(aE))}function cv(dq,dl,dr,dm){if(aV(dl)){return 0}var dp=a1(bL,"download"),dn=a1(a9,"link"),ds=new RegExp("\\.("+c8.join("|")+")([?&#]|$)","i");if(dn.test(dq)){return"link"}if(dm||dp.test(dq)||ds.test(dl)){return"download"}if(dr){return 0}return"link"}function au(dm){var dl;dl=dm.parentNode;while(dl!==null&&J(dl)){if(ae.isLinkElement(dm)){break}dm=dl;dl=dm.parentNode}return dm}function de(dr){dr=au(dr);if(!ae.hasNodeAttribute(dr,"href")){return}if(!J(dr.href)){return}var dq=ae.getAttributeValueFromNode(dr,"href");
|
55 |
+
if(aV(dq)){return}var dm=dr.pathname||cl(dr.href);var ds=dr.hostname||d(dr.href);var dt=ds.toLowerCase();var dn=dr.href.replace(ds,dt);var dp=new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript|mailto|tel):","i");if(!dp.test(dn)){var dl=cv(dr.className,dn,ar(dt,dm),ae.hasNodeAttribute(dr,"download"));if(dl){return{type:dl,href:dn}}}}function aQ(dl,dm,dn,dp){var dq=v.buildInteractionRequestParams(dl,dm,dn,dp);if(!dq){return}return ct(dq,null,"contentInteraction")}function cM(dn,dp,dt,dl,dm){if(!J(dn)){return}if(aV(dn)){return dn}var dr=v.toAbsoluteUrl(dn);var dq="redirecturl="+t(dr)+"&";dq+=aQ(dp,dt,dl,(dm||dn));var ds="&";if(aE.indexOf("?")<0){ds="?"}return aE+ds+dq}function bc(dl,dm){if(!dl||!dm){return false}var dn=v.findTargetNode(dl);if(v.shouldIgnoreInteraction(dn)){return false}dn=v.findTargetNodeNoDefault(dl);if(dn&&!V(dn,dm)){return false}return true}function cu(dn,dm,dq){if(!dn){return}var dl=v.findParentContentNode(dn);if(!dl){return}if(!bc(dl,dn)){return}var dp=v.buildContentBlock(dl);
|
56 |
+
if(!dp){return}if(!dp.target&&dq){dp.target=dq}return v.buildInteractionRequestParams(dm,dp.name,dp.piece,dp.target)}function aX(dm){if(!ca||!ca.length){return false}var dl,dn;for(dl=0;dl<ca.length;dl++){dn=ca[dl];if(dn&&dn.name===dm.name&&dn.piece===dm.piece&&dn.target===dm.target){return true}}return false}function bE(dp){if(!dp){return false}var ds=v.findTargetNode(dp);if(!ds||v.shouldIgnoreInteraction(ds)){return false}var dt=de(ds);if(db&&dt&&dt.type){return false}if(ae.isLinkElement(ds)&&ae.hasNodeAttributeWithValue(ds,"href")){var dl=String(ae.getAttributeValueFromNode(ds,"href"));if(0===dl.indexOf("#")){return false}if(aV(dl)){return true}if(!v.isUrlToCurrentDomain(dl)){return false}var dq=v.buildContentBlock(dp);if(!dq){return}var dn=dq.name;var du=dq.piece;var dr=dq.target;if(!ae.hasNodeAttributeWithValue(ds,v.CONTENT_TARGET_ATTR)||ds.wasContentTargetAttrReplaced){ds.wasContentTargetAttrReplaced=true;dr=v.toAbsoluteUrl(dl);ae.setAnyAttribute(ds,v.CONTENT_TARGET_ATTR,dr)}var dm=cM(dl,"click",dn,du,dr);
|
57 |
+
v.setHrefAttribute(ds,dm);return true}return false}function aN(dm){if(!dm||!dm.length){return}var dl;for(dl=0;dl<dm.length;dl++){bE(dm[dl])}}function aY(dl){return function(dm){if(!dl){return}var dq=v.findParentContentNode(dl);var dr;if(dm){dr=dm.target||dm.srcElement}if(!dr){dr=dl}if(!bc(dq,dr)){return}cg(bJ);if(ae.isLinkElement(dl)&&ae.hasNodeAttributeWithValue(dl,"href")&&ae.hasNodeAttributeWithValue(dl,v.CONTENT_TARGET_ATTR)){var dn=ae.getAttributeValueFromNode(dl,"href");if(!aV(dn)&&dl.wasContentTargetAttrReplaced){ae.setAnyAttribute(dl,v.CONTENT_TARGET_ATTR,"")}}var dv=de(dl);if(ap&&dv&&dv.type){return dv.type}if(bE(dq)){return"href"}var ds=v.buildContentBlock(dq);if(!ds){return}var dp=ds.name;var dw=ds.piece;var du=ds.target;var dt=aQ("click",dp,dw,du);if(dt){bF(dt,bJ)}return dt}}function b1(dn){if(!dn||!dn.length){return}var dl,dm;for(dl=0;dl<dn.length;dl++){dm=v.findTargetNode(dn[dl]);if(dm&&!dm.contentInteractionTrackingSetupDone){dm.contentInteractionTrackingSetupDone=true;an(dm,"click",aY(dm))
|
58 |
+
}}}function bx(dn,dp){if(!dn||!dn.length){return[]}var dl,dm;for(dl=0;dl<dn.length;dl++){if(aX(dn[dl])){dn.splice(dl,1);dl--}else{ca.push(dn[dl])}}if(!dn||!dn.length){return[]}aN(dp);b1(dp);var dq=[];for(dl=0;dl<dn.length;dl++){dm=ct(v.buildImpressionRequestParams(dn[dl].name,dn[dl].piece,dn[dl].target),undefined,"contentImpressions");if(dm){dq.push(dm)}}return dq}function cz(dm){var dl=v.collectContent(dm);return bx(dl,dm)}function ba(dm){if(!dm||!dm.length){return[]}var dl;for(dl=0;dl<dm.length;dl++){if(!v.isNodeVisible(dm[dl])){dm.splice(dl,1);dl--}}if(!dm||!dm.length){return[]}return cz(dm)}function aG(dn,dl,dm){var dp=v.buildImpressionRequestParams(dn,dl,dm);return ct(dp,null,"contentImpression")}function dd(dp,dm){if(!dp){return}var dl=v.findParentContentNode(dp);var dn=v.buildContentBlock(dl);if(!dn){return}if(!dm){dm="Unknown"}return aQ(dm,dn.name,dn.piece,dn.target)}function cQ(dm,dp,dl,dn){return"e_c="+t(dm)+"&e_a="+t(dp)+(J(dl)?"&e_n="+t(dl):"")+(J(dn)?"&e_v="+t(dn):"")}function at(dn,dq,dl,dp,ds,dr){if(a(String(dn)).length===0||a(String(dq)).length===0){ak("Error while logging event: Parameters `category` and `action` must not be empty or filled with whitespaces");
|
59 |
+
return false}var dm=ct(cQ(dn,dq,dl,dp),ds,"event");bF(dm,bJ,dr)}function b8(dl,dp,dm,dq){var dn=ct("search="+t(dl)+(dp?"&search_cat="+t(dp):"")+(J(dm)?"&search_count="+dm:""),dq,"sitesearch");bF(dn,bJ)}function cV(dl,dq,dp,dn){var dm=ct("idgoal="+dl+(dq?"&revenue="+dq:""),dp,"goal");bF(dm,bJ,dn)}function c3(dp,dl,dt,ds,dn){var dr=dl+"="+t(b2(dp));var dm=cu(dn,"click",dp);if(dm){dr+="&"+dm}var dq=ct(dr,dt,"link");bF(dq,bJ,ds)}function bU(dm,dl){if(dm!==""){return dm+dl.charAt(0).toUpperCase()+dl.slice(1)}return dl}function ch(dr){var dq,dl,dp=["","webkit","ms","moz"],dn;if(!bf){for(dl=0;dl<dp.length;dl++){dn=dp[dl];if(Object.prototype.hasOwnProperty.call(G,bU(dn,"hidden"))){if(G[bU(dn,"visibilityState")]==="prerender"){dq=true}break}}}if(dq){an(G,dn+"visibilitychange",function dm(){G.removeEventListener(dn+"visibilitychange",dm,false);dr()});return}dr()}function br(){var dm=aZ().uuid;var dl=aJ();return dm+dl}function cj(dl){if(!dl){return}if(!ae.hasNodeAttribute(dl,"href")){return}var dm=ae.getAttributeValueFromNode(dl,"href");
|
60 |
+
if(!dm||aV(dm)){return}dm=k(dm,av);var dn=br();dm=F(dm,av,dn);ae.setAnyAttribute(dl,"href",dm)}function aB(dp){var dq=ae.getAttributeValueFromNode(dp,"href");if(!dq){return false}dq=String(dq);var dm=dq.indexOf("//")===0||dq.indexOf("http://")===0||dq.indexOf("https://")===0;if(!dm){return false}var dl=dp.pathname||cl(dp.href);var dn=(dp.hostname||d(dp.href)).toLowerCase();if(ar(dn,dl)){if(!cH(cW,L(dn))){return true}return false}return false}function cG(dl){var dm=de(dl);if(dm&&dm.type){dm.href=p(dm.href);c3(dm.href,dm.type,undefined,null,dl);return}if(cO){dl=au(dl);if(aB(dl)){cj(dl)}}}function cw(){return G.all&&!G.addEventListener}function cX(dl){var dn=dl.which;var dm=(typeof dl.button);if(!dn&&dm!=="undefined"){if(cw()){if(dl.button&1){dn=1}else{if(dl.button&2){dn=3}else{if(dl.button&4){dn=2}}}}else{if(dl.button===0||dl.button==="0"){dn=1}else{if(dl.button&1){dn=2}else{if(dl.button&2){dn=3}}}}}return dn}function bT(dl){switch(cX(dl)){case 1:return"left";case 2:return"middle";case 3:return"right"
|
61 |
+
}}function a2(dl){return dl.target||dl.srcElement}function aC(dl){return function(dp){dp=dp||T.event;var dn=bT(dp);var dq=a2(dp);if(dp.type==="click"){var dm=false;if(dl&&dn==="middle"){dm=true}if(dq&&!dm){cG(dq)}}else{if(dp.type==="mousedown"){if(dn==="middle"&&dq){aS=dn;bA=dq}else{aS=bA=null}}else{if(dp.type==="mouseup"){if(dn===aS&&dq===bA){cG(dq)}aS=bA=null}else{if(dp.type==="contextmenu"){cG(dq)}}}}}}function aq(dn,dm){var dl=typeof dm;if(dl==="undefined"){dm=true}an(dn,"click",aC(dm),false);if(dm){an(dn,"mouseup",aC(dm),false);an(dn,"mousedown",aC(dm),false);an(dn,"contextmenu",aC(dm),false)}}function bD(dn,dq){ap=true;var dp,dm=a1(bz,"ignore"),dr=G.links,dl=null,ds=null;if(dr){for(dp=0;dp<dr.length;dp++){dl=dr[dp];if(!dm.test(dl.className)){ds=typeof dl.piwikTrackers;if("undefined"===ds){dl.piwikTrackers=[]}if(-1===M(dl.piwikTrackers,dq)){dl.piwikTrackers.push(dq);aq(dl,dn)}}}}}function aT(dm,dq,dr){if(cf){return true}cf=true;var ds=false;var dp,dn;function dl(){ds=true}n(function(){function dt(dv){setTimeout(function(){if(!cf){return
|
62 |
+
}ds=false;dr.trackVisibleContentImpressions();dt(dv)},dv)}function du(dv){setTimeout(function(){if(!cf){return}if(ds){ds=false;dr.trackVisibleContentImpressions()}du(dv)},dv)}if(dm){dp=["scroll","resize"];for(dn=0;dn<dp.length;dn++){if(G.addEventListener){G.addEventListener(dp[dn],dl,false)}else{T.attachEvent("on"+dp[dn],dl)}}du(100)}if(dq&&dq>0){dq=parseInt(dq,10);dt(dq)}})}var bC={enabled:true,requests:[],timeout:null,interval:2500,sendRequests:function(){var dl=this.requests;this.requests=[];if(dl.length===1){bF(dl[0],bJ)}else{dh(dl,bJ)}},canQueue:function(){return !m&&this.enabled},pushMultiple:function(dm){if(!this.canQueue()){dh(dm,bJ);return}var dl;for(dl=0;dl<dm.length;dl++){this.push(dm[dl])}},push:function(dl){if(!dl){return}if(!this.canQueue()){bF(dl,bJ);return}bC.requests.push(dl);if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.timeout=setTimeout(function(){bC.timeout=null;bC.sendRequests()},bC.interval);var dm="RequestQueue"+ax;if(!Object.prototype.hasOwnProperty.call(b,dm)){b[dm]={unload:function(){if(bC.timeout){clearTimeout(bC.timeout)
|
63 |
+
}bC.sendRequests()}}}}};bi();aM();this.hasConsent=function(){return bB};this.getVisitorId=function(){return aZ().uuid};this.getVisitorInfo=function(){return cP()};this.getAttributionInfo=function(){return bM()};this.getAttributionCampaignName=function(){return bM()[0]};this.getAttributionCampaignKeyword=function(){return bM()[1]};this.getAttributionReferrerTimestamp=function(){return bM()[2]};this.getAttributionReferrerUrl=function(){return bM()[3]};this.setTrackerUrl=function(dl){aE=dl};this.getTrackerUrl=function(){return aE};this.getPiwikUrl=function(){return O(this.getTrackerUrl(),bH)};this.addTracker=function(dl,dn){if(!J(dl)||null===dl){dl=this.getTrackerUrl()}var dm=new Q(dl,dn);I.push(dm);e.trigger("TrackerAdded",[this]);return dm};this.getSiteId=function(){return b6};this.setSiteId=function(dl){b3(dl)};this.resetUserId=function(){by=""};this.setUserId=function(dl){if(Y(dl)){by=dl}};this.setVisitorId=function(dm){var dl=/[0-9A-Fa-f]{16}/g;if(w(dm)&&dl.test(dm)){bO=dm}else{ak("Invalid visitorId set"+dm)
|
64 |
+
}};this.getUserId=function(){return by};this.setCustomData=function(dl,dm){if(W(dl)){ao=dl}else{if(!ao){ao={}}ao[dl]=dm}};this.getCustomData=function(){return ao};this.setCustomRequestProcessing=function(dl){cb=dl};this.appendToTrackingUrl=function(dl){c1=dl};this.getRequest=function(dl){return ct(dl)};this.addPlugin=function(dl,dm){b[dl]=dm};this.setCustomDimension=function(dl,dm){dl=parseInt(dl,10);if(dl>0){if(!J(dm)){dm=""}if(!w(dm)){dm=String(dm)}bm[dl]=dm}};this.getCustomDimension=function(dl){dl=parseInt(dl,10);if(dl>0&&Object.prototype.hasOwnProperty.call(bm,dl)){return bm[dl]}};this.deleteCustomDimension=function(dl){dl=parseInt(dl,10);if(dl>0){delete bm[dl]}};this.setCustomVariable=function(dm,dl,dq,dn){var dp;if(!J(dn)){dn="visit"}if(!J(dl)){return}if(!J(dq)){dq=""}if(dm>0){dl=!w(dl)?String(dl):dl;dq=!w(dq)?String(dq):dq;dp=[dl.slice(0,bt),dq.slice(0,bt)];if(dn==="visit"||dn===2){cF();aR[dm]=dp}else{if(dn==="page"||dn===3){bW[dm]=dp}else{if(dn==="event"){cm[dm]=dp}}}}};this.getCustomVariable=function(dm,dn){var dl;
|
65 |
+
if(!J(dn)){dn="visit"}if(dn==="page"||dn===3){dl=bW[dm]}else{if(dn==="event"){dl=cm[dm]}else{if(dn==="visit"||dn===2){cF();dl=aR[dm]}}}if(!J(dl)||(dl&&dl[0]==="")){return false}return dl};this.deleteCustomVariable=function(dl,dm){if(this.getCustomVariable(dl,dm)){this.setCustomVariable(dl,"","",dm)}};this.deleteCustomVariables=function(dl){if(dl==="page"||dl===3){bW={}}else{if(dl==="event"){cm={}}else{if(dl==="visit"||dl===2){aR={}}}}};this.storeCustomVariablesInCookie=function(){bQ=true};this.setLinkTrackingTimer=function(dl){bJ=dl};this.getLinkTrackingTimer=function(){return bJ};this.setDownloadExtensions=function(dl){if(w(dl)){dl=dl.split("|")}c8=dl};this.addDownloadExtensions=function(dm){var dl;if(w(dm)){dm=dm.split("|")}for(dl=0;dl<dm.length;dl++){c8.push(dm[dl])}};this.removeDownloadExtensions=function(dn){var dm,dl=[];if(w(dn)){dn=dn.split("|")}for(dm=0;dm<c8.length;dm++){if(M(dn,c8[dm])===-1){dl.push(c8[dm])}}c8=dl};this.setDomains=function(dl){ay=w(dl)?[dl]:dl;var dq=false,dn=0,dm;
|
66 |
+
for(dn;dn<ay.length;dn++){dm=String(ay[dn]);if(cH(cW,L(dm))){dq=true;break}var dp=cl(dm);if(dp&&dp!=="/"&&dp!=="/*"){dq=true;break}}if(!dq){ay.push(cW)}};this.enableCrossDomainLinking=function(){cO=true};this.disableCrossDomainLinking=function(){cO=false};this.isCrossDomainLinkingEnabled=function(){return cO};this.setCrossDomainLinkingTimeout=function(dl){a0=dl};this.getCrossDomainLinkingUrlParameter=function(){return t(av)+"="+t(br())};this.setIgnoreClasses=function(dl){bz=w(dl)?[dl]:dl};this.setRequestMethod=function(dl){dc=dl||ci};this.setRequestContentType=function(dl){cx=dl||aI};this.setReferrerUrl=function(dl){bn=dl};this.setCustomUrl=function(dl){a5=bV(bN,dl)};this.getCurrentUrl=function(){return a5||bN};this.setDocumentTitle=function(dl){bj=dl};this.setAPIUrl=function(dl){bH=dl};this.setDownloadClasses=function(dl){bL=w(dl)?[dl]:dl};this.setLinkClasses=function(dl){a9=w(dl)?[dl]:dl};this.setCampaignNameKey=function(dl){cr=w(dl)?[dl]:dl};this.setCampaignKeywordKey=function(dl){bG=w(dl)?[dl]:dl
|
67 |
+
};this.discardHashTag=function(dl){bP=dl};this.setCookieNamePrefix=function(dl){bk=dl;aR=bX()};this.setCookieDomain=function(dl){var dm=L(dl);if(bw(dm)){cZ=dm;bi()}};this.getCookieDomain=function(){return cZ};this.hasCookies=function(){return"1"===b5()};this.setSessionCookie=function(dn,dm,dl){if(!dn){throw new Error("Missing cookie name")}if(!J(dl)){dl=cp}bu.push(dn);dg(aU(dn),dm,dl,bp,cZ)};this.getCookie=function(dm){var dl=aD(aU(dm));if(dl===0){return null}return dl};this.setCookiePath=function(dl){bp=dl;bi()};this.getCookiePath=function(dl){return bp};this.setVisitorCookieTimeout=function(dl){cK=dl*1000};this.setSessionCookieTimeout=function(dl){cp=dl*1000};this.getSessionCookieTimeout=function(){return cp};this.setReferralCookieTimeout=function(dl){c7=dl*1000};this.setConversionAttributionFirstReferrer=function(dl){bv=dl};this.setSecureCookie=function(dl){bS=dl};this.disableCookies=function(){bl=true;if(b6){aF()}};this.areCookiesEnabled=function(){return !bl};this.setCookieConsentGiven=function(){if(bl&&!cR){bl=false;
|
68 |
+
if(b6&&aw){aM();var dl=ct("ping=1",null,"ping");bF(dl,bJ)}}};this.requireCookieConsent=function(){if(this.getRememberedCookieConsent()){return false}this.disableCookies();return true};this.getRememberedCookieConsent=function(){return aD(cD)};this.forgetCookieConsentGiven=function(){bY(cD,bp,cZ);this.disableCookies()};this.rememberCookieConsentGiven=function(dm){if(dm){dm=dm*60*60*1000}else{dm=30*365*24*60*60*1000}this.setCookieConsentGiven();var dl=new Date().getTime();dg(cD,dl,dm,bp,cZ,bS)};this.deleteCookies=function(){aF()};this.setDoNotTrack=function(dm){var dl=h.doNotTrack||h.msDoNotTrack;cR=dm&&(dl==="yes"||dl==="1");if(cR){this.disableCookies()}};this.alwaysUseSendBeacon=function(){cY=true};this.addListener=function(dm,dl){aq(dm,dl)};this.enableLinkTracking=function(dm){db=true;var dl=this;ch(function(){q(function(){bD(dm,dl)});n(function(){bD(dm,dl)})})};this.enableJSErrorTracking=function(){if(cU){return}cU=true;var dl=T.onerror;T.onerror=function(dr,dp,dn,dq,dm){ch(function(){var ds="JavaScript Errors";
|
69 |
+
var dt=dp+":"+dn;if(dq){dt+=":"+dq}at(ds,dt,dr)});if(dl){return dl(dr,dp,dn,dq,dm)}return false}};this.disablePerformanceTracking=function(){a3=false};this.setGenerationTimeMs=function(dl){cn=parseInt(dl,10)};this.setVisitStandardLength=function(dl){dl=Math.max(dl,5);c9=dl};this.enableHeartBeatTimer=function(dl){dl=Math.max(dl,5);a6=(dl||15)*1000;if(c0!==null){di()}};this.disableHeartBeatTimer=function(){bK();if(a6||aO){if(T.removeEventListener){T.removeEventListener("focus",bb);T.removeEventListener("blur",az)}else{if(T.detachEvent){T.detachEvent("onfocus",bb);T.detachEvent("onblur",az)}}}a6=null;aO=false};this.killFrame=function(){if(T.location!==T.top.location){T.top.location=T.location}};this.redirectFile=function(dl){if(T.location.protocol==="file:"){T.location=dl}};this.setCountPreRendered=function(dl){bf=dl};this.trackGoal=function(dl,dp,dn,dm){ch(function(){cV(dl,dp,dn,dm)})};this.trackLink=function(dm,dl,dp,dn){ch(function(){c3(dm,dl,dp,dn)})};this.getNumTrackedPageViews=function(){return cs
|
70 |
+
};this.trackPageView=function(dl,dn,dm){ca=[];cL=[];if(N(b6)){ch(function(){Z(aE,bH,b6)})}else{ch(function(){cs++;b0(dl,dn,dm)})}};this.trackAllContentImpressions=function(){if(N(b6)){return}ch(function(){q(function(){var dl=v.findContentNodes();var dm=cz(dl);bC.pushMultiple(dm)})})};this.trackVisibleContentImpressions=function(dl,dm){if(N(b6)){return}if(!J(dl)){dl=true}if(!J(dm)){dm=750}aT(dl,dm,this);ch(function(){n(function(){var dn=v.findContentNodes();var dp=ba(dn);bC.pushMultiple(dp)})})};this.trackContentImpression=function(dn,dl,dm){if(N(b6)){return}dn=a(dn);dl=a(dl);dm=a(dm);if(!dn){return}dl=dl||"Unknown";ch(function(){var dp=aG(dn,dl,dm);bC.push(dp)})};this.trackContentImpressionsWithinNode=function(dl){if(N(b6)||!dl){return}ch(function(){if(cf){n(function(){var dm=v.findContentNodesWithinNode(dl);var dn=ba(dm);bC.pushMultiple(dn)})}else{q(function(){var dm=v.findContentNodesWithinNode(dl);var dn=cz(dm);bC.pushMultiple(dn)})}})};this.trackContentInteraction=function(dn,dp,dl,dm){if(N(b6)){return
|
71 |
+
}dn=a(dn);dp=a(dp);dl=a(dl);dm=a(dm);if(!dn||!dp){return}dl=dl||"Unknown";ch(function(){var dq=aQ(dn,dp,dl,dm);if(dq){bC.push(dq)}})};this.trackContentInteractionNode=function(dm,dl){if(N(b6)||!dm){return}ch(function(){var dn=dd(dm,dl);if(dn){bC.push(dn)}})};this.logAllContentBlocksOnPage=function(){var dn=v.findContentNodes();var dl=v.collectContent(dn);var dm=typeof console;if(dm!=="undefined"&&console&&console.log){console.log(dl)}};this.trackEvent=function(dm,dp,dl,dn,dr,dq){ch(function(){at(dm,dp,dl,dn,dr,dq)})};this.trackSiteSearch=function(dl,dn,dm,dp){ca=[];ch(function(){b8(dl,dn,dm,dp)})};this.setEcommerceView=function(dp,dl,dn,dm){if(Y(dn)){dn=String(dn)}if(!J(dn)||dn===null||dn===false||!dn.length){dn=""}else{if(dn instanceof Array){dn=JSON_PIWIK.stringify(dn)}}bW[5]=["_pkc",dn];if(J(dm)&&dm!==null&&dm!==false&&String(dm).length){bW[2]=["_pkp",dm]}if(!Y(dp)&&!Y(dl)){return}if(Y(dp)){bW[3]=["_pks",dp]}if(!Y(dl)){dl=""}bW[4]=["_pkn",dl]};this.getEcommerceItems=function(){return JSON.parse(JSON.stringify(c2))
|
72 |
+
};this.addEcommerceItem=function(dq,dl,dn,dm,dp){if(Y(dq)){c2[dq]=[String(dq),dl,dn,dm,dp]}};this.removeEcommerceItem=function(dl){if(Y(dl)){dl=String(dl);delete c2[dl]}};this.clearEcommerceCart=function(){c2={}};this.trackEcommerceOrder=function(dl,dq,dp,dn,dm,dr){bZ(dl,dq,dp,dn,dm,dr)};this.trackEcommerceCartUpdate=function(dl){bs(dl)};this.trackRequest=function(dm,dp,dn,dl){ch(function(){var dq=ct(dm,dp,dl);bF(dq,bJ,dn)})};this.ping=function(){this.trackRequest("ping=1",null,null,"ping")};this.disableQueueRequest=function(){bC.enabled=false};this.setRequestQueueInterval=function(dl){if(dl<1000){throw new Error("Request queue interval needs to be at least 1000ms")}bC.interval=dl};this.queueRequest=function(dl){ch(function(){var dm=ct(dl);bC.push(dm)})};this.isConsentRequired=function(){return cA};this.getRememberedConsent=function(){var dl=aD(be);if(aD(cN)){if(dl){bY(be,bp,cZ)}return null}if(!dl||dl===0){return null}return dl};this.hasRememberedConsent=function(){return !!this.getRememberedConsent()
|
73 |
+
};this.requireConsent=function(){cA=true;bB=this.hasRememberedConsent();if(!bB){bl=true}x++;b["CoreConsent"+x]={unload:function(){if(!bB){aF()}}}};this.setConsentGiven=function(dm){bB=true;bY(cN,bp,cZ);var dn,dl;for(dn=0;dn<cL.length;dn++){dl=typeof cL[dn];if(dl==="string"){bF(cL[dn],bJ)}else{if(dl==="object"){dh(cL[dn],bJ)}}}cL=[];if(!J(dm)||dm){this.setCookieConsentGiven()}};this.rememberConsentGiven=function(dn){if(dn){dn=dn*60*60*1000}else{dn=30*365*24*60*60*1000}var dl=true;this.setConsentGiven(dl);var dm=new Date().getTime();dg(be,dm,dn,bp,cZ,bS)};this.forgetConsentGiven=function(){var dl=30*365*24*60*60*1000;bY(be,bp,cZ);dg(cN,new Date().getTime(),dl,bp,cZ,bS);this.forgetCookieConsentGiven();this.requireConsent()};this.isUserOptedOut=function(){return !bB};this.optUserOut=this.forgetConsentGiven;this.forgetUserOptOut=function(){var dl=false;this.rememberConsentGiven(0,dl)};e.trigger("TrackerSetup",[this])}function H(){return{push:af}}function c(au,at){var av={};var aq,ar;for(aq=0;
|
74 |
+
aq<at.length;aq++){var ao=at[aq];av[ao]=1;for(ar=0;ar<au.length;ar++){if(au[ar]&&au[ar][0]){var ap=au[ar][0];if(ao===ap){af(au[ar]);delete au[ar];if(av[ap]>1&&ap!=="addTracker"){ak("The method "+ap+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation: https://developer.piwik.org/guides/tracking-javascript-guide#multiple-piwik-trackers')}av[ap]++}}}}return au}var C=["addTracker","forgetCookieConsentGiven","requireCookieConsent","disableCookies","setTrackerUrl","setAPIUrl","enableCrossDomainLinking","setCrossDomainLinkingTimeout","setSessionCookieTimeout","setVisitorCookieTimeout","setSecureCookie","setCookiePath","setCookieDomain","setDomains","setUserId","setVisitorId","setSiteId","alwaysUseSendBeacon","enableLinkTracking","setCookieConsentGiven","requireConsent","setConsentGiven"];function ad(ao,aq){var ap=new Q(ao,aq);I.push(ap);_paq=c(_paq,C);for(E=0;E<_paq.length;E++){if(_paq[E]){af(_paq[E])
|
75 |
}}_paq=new H();e.trigger("TrackerAdded",[ap]);return ap}an(T,"beforeunload",ai,false);an(T,"message",function(au){if(!au||!au.origin){return}var aw,ar,ap;var ax=d(au.origin);var at=e.getAsyncTrackers();for(ar=0;ar<at.length;ar++){ap=d(at[ar].getPiwikUrl());if(ap===ax){aw=at[ar];break}}if(!aw){return}var aq=null;try{aq=JSON.parse(au.data)}catch(av){return}if(!aq){return}function ao(aA){var aC=G.getElementsByTagName("iframe");for(ar=0;ar<aC.length;ar++){var aB=aC[ar];var ay=d(aB.src);if(aB.contentWindow&&J(aB.contentWindow.postMessage)&&ay===ax){var az=JSON.stringify(aA);aB.contentWindow.postMessage(az,"*")}}}if(J(aq.maq_initial_value)){ao({maq_opted_in:aq.maq_initial_value&&aw.hasConsent(),maq_url:aw.getPiwikUrl(),maq_optout_by_default:aw.isConsentRequired()})}else{if(J(aq.maq_opted_in)){at=e.getAsyncTrackers();for(ar=0;ar<at.length;ar++){aw=at[ar];if(aq.maq_opted_in){aw.rememberConsentGiven()}else{aw.forgetConsentGiven()}}ao({maq_confirm_opted_in:aw.hasConsent(),maq_url:aw.getPiwikUrl(),maq_optout_by_default:aw.isConsentRequired()})
|
76 |
}}},false);Date.prototype.getTimeAlias=Date.prototype.getTime;e={initialized:false,JSON:JSON_PIWIK,DOM:{addEventListener:function(ar,aq,ap,ao){var at=typeof ao;if(at==="undefined"){ao=false}an(ar,aq,ap,ao)},onLoad:n,onReady:q,isNodeVisible:j,isOrWasNodeVisible:v.isNodeVisible},on:function(ap,ao){if(!y[ap]){y[ap]=[]}y[ap].push(ao)},off:function(aq,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){if(y[aq][ao]===ap){y[aq].splice(ao,1)}}},trigger:function(aq,ar,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){y[aq][ao].apply(ap||T,ar)}},addPlugin:function(ao,ap){b[ao]=ap},getTracker:function(ao,ap){if(!J(ap)){ap=this.getAsyncTracker().getSiteId()}if(!J(ao)){ao=this.getAsyncTracker().getTrackerUrl()}return new Q(ao,ap)},getAsyncTrackers:function(){return I},addTracker:function(ao,aq){var ap;if(!I.length){ap=ad(ao,aq)}else{ap=I[0].addTracker(ao,aq)}return ap},getAsyncTracker:function(ap,at){var ar;if(I&&I.length&&I[0]){ar=I[0]}else{return ad(ap,at)}if(!at&&!ap){return ar
|
77 |
}if((!J(at)||null===at)&&ar){at=ar.getSiteId()}if((!J(ap)||null===ap)&&ar){ap=ar.getTrackerUrl()}var aq,ao=0;for(ao;ao<I.length;ao++){aq=I[ao];if(aq&&String(aq.getSiteId())===String(at)&&aq.getTrackerUrl()===ap){return aq}}},retryMissedPluginCalls:function(){var ap=ah;ah=[];var ao=0;for(ao;ao<ap.length;ao++){af(ap[ao])}}};if(typeof define==="function"&&define.amd){define("piwik",[],function(){return e});define("matomo",[],function(){return e})}return e}())}
|
app/plugins/API/Menu.php
CHANGED
@@ -8,6 +8,7 @@
|
|
8 |
*/
|
9 |
namespace Piwik\Plugins\API;
|
10 |
|
|
|
11 |
use Piwik\DeviceDetector\DeviceDetectorCache;
|
12 |
use Piwik\Menu\MenuAdmin;
|
13 |
use Piwik\Menu\MenuTop;
|
@@ -51,7 +52,7 @@ class Menu extends \Piwik\Plugin\Menu
|
|
51 |
}
|
52 |
|
53 |
$ua = new OperatingSystem($_SERVER['HTTP_USER_AGENT']);
|
54 |
-
|
55 |
$parsedOS = $ua->parse();
|
56 |
|
57 |
if (!empty($parsedOS['short_name']) && in_array($parsedOS['short_name'], array(self::DD_SHORT_NAME_ANDROID, self::DD_SHORT_NAME_IOS))) {
|
8 |
*/
|
9 |
namespace Piwik\Plugins\API;
|
10 |
|
11 |
+
use Piwik\Container\StaticContainer;
|
12 |
use Piwik\DeviceDetector\DeviceDetectorCache;
|
13 |
use Piwik\Menu\MenuAdmin;
|
14 |
use Piwik\Menu\MenuTop;
|
52 |
}
|
53 |
|
54 |
$ua = new OperatingSystem($_SERVER['HTTP_USER_AGENT']);
|
55 |
+
$ua->setCache(StaticContainer::get('DeviceDetector\Cache\Cache'));
|
56 |
$parsedOS = $ua->parse();
|
57 |
|
58 |
if (!empty($parsedOS['short_name']) && in_array($parsedOS['short_name'], array(self::DD_SHORT_NAME_ANDROID, self::DD_SHORT_NAME_IOS))) {
|
app/plugins/CoreHome/angularjs/reporting-page/reportingpage.directive.html
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<div class="reporting-page">
|
2 |
|
3 |
-
<div piwik-activity-indicator loading="loading"
|
4 |
|
5 |
<div ng-show="hasNoPage">{{ 'CoreHome_NoSuchPage'|translate }}</div>
|
6 |
|
1 |
<div class="reporting-page">
|
2 |
|
3 |
+
<div piwik-activity-indicator loading="loading"></div>
|
4 |
|
5 |
<div ng-show="hasNoPage">{{ 'CoreHome_NoSuchPage'|translate }}</div>
|
6 |
|
app/plugins/CoreHome/angularjs/widget-loader/widgetloader.directive.html
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<div>
|
2 |
-
<div piwik-activity-indicator loading-message="loadingMessage" loading="loading"
|
3 |
|
4 |
<div ng-show="loadingFailed">
|
5 |
<h2 ng-if="widgetName">{{widgetName}}</h2>
|
1 |
<div>
|
2 |
+
<div piwik-activity-indicator loading-message="loadingMessage" loading="loading"></div>
|
3 |
|
4 |
<div ng-show="loadingFailed">
|
5 |
<h2 ng-if="widgetName">{{widgetName}}</h2>
|
app/plugins/CoreHome/stylesheets/layout.less
CHANGED
@@ -48,8 +48,13 @@ nav {
|
|
48 |
&:hover {
|
49 |
background-color: rgba(0,0,0,0.1);
|
50 |
}
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
53 |
}
|
54 |
}
|
55 |
|
48 |
&:hover {
|
49 |
background-color: rgba(0,0,0,0.1);
|
50 |
}
|
51 |
+
}
|
52 |
+
|
53 |
+
ul:not(#mobile-top-menu) {
|
54 |
+
.languageSelection {
|
55 |
+
.title {
|
56 |
+
color: @theme-color-header-text;
|
57 |
+
}
|
58 |
}
|
59 |
}
|
60 |
|
app/plugins/Login/Controller.php
CHANGED
@@ -30,6 +30,8 @@ use Piwik\View;
|
|
30 |
*/
|
31 |
class Controller extends \Piwik\Plugin\ControllerAdmin
|
32 |
{
|
|
|
|
|
33 |
/**
|
34 |
* @var PasswordResetter
|
35 |
*/
|
@@ -425,6 +427,7 @@ class Controller extends \Piwik\Plugin\ControllerAdmin
|
|
425 |
*/
|
426 |
public function confirmResetPassword()
|
427 |
{
|
|
|
428 |
$errorMessage = null;
|
429 |
|
430 |
$login = Common::getRequestVar('login', '');
|
@@ -453,6 +456,7 @@ class Controller extends \Piwik\Plugin\ControllerAdmin
|
|
453 |
*/
|
454 |
public function resetPasswordSuccess()
|
455 |
{
|
|
|
456 |
return $this->login($errorMessage = null, $infoMessage = Piwik::translate('Login_PasswordChanged'));
|
457 |
}
|
458 |
|
30 |
*/
|
31 |
class Controller extends \Piwik\Plugin\ControllerAdmin
|
32 |
{
|
33 |
+
const NONCE_CONFIRMRESETPASSWORD = 'loginConfirmResetPassword';
|
34 |
+
|
35 |
/**
|
36 |
* @var PasswordResetter
|
37 |
*/
|
427 |
*/
|
428 |
public function confirmResetPassword()
|
429 |
{
|
430 |
+
return;// not supported in WP
|
431 |
$errorMessage = null;
|
432 |
|
433 |
$login = Common::getRequestVar('login', '');
|
456 |
*/
|
457 |
public function resetPasswordSuccess()
|
458 |
{
|
459 |
+
$_POST = array();
|
460 |
return $this->login($errorMessage = null, $infoMessage = Piwik::translate('Login_PasswordChanged'));
|
461 |
}
|
462 |
|
app/plugins/Morpheus/templates/javascriptCode.twig
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<!-- Matomo -->
|
2 |
<script type="text/javascript">
|
3 |
-
var _paq = window._paq || [];
|
4 |
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
5 |
{$options} _paq.push(['trackPageView']);
|
6 |
_paq.push(['enableLinkTracking']);
|
1 |
<!-- Matomo -->
|
2 |
<script type="text/javascript">
|
3 |
+
var _paq = window._paq = window._paq || [];
|
4 |
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
5 |
{$options} _paq.push(['trackPageView']);
|
6 |
_paq.push(['enableLinkTracking']);
|
app/plugins/TagManager/Context/WebContext.php
CHANGED
@@ -233,10 +233,10 @@ class WebContext extends BaseContext
|
|
233 |
$embedCode = <<<INST
|
234 |
<!-- Matomo Tag Manager -->
|
235 |
<script type="text/javascript">
|
236 |
-
var _mtm = _mtm || [];
|
237 |
_mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
|
238 |
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
239 |
-
g.type='text/javascript'; g.async=true; g.
|
240 |
</script>
|
241 |
<!-- End Matomo Tag Manager -->
|
242 |
INST;
|
233 |
$embedCode = <<<INST
|
234 |
<!-- Matomo Tag Manager -->
|
235 |
<script type="text/javascript">
|
236 |
+
var _mtm = window._mtm = window._mtm || [];
|
237 |
_mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
|
238 |
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
239 |
+
g.type='text/javascript'; g.async=true; g.src='$path'; s.parentNode.insertBefore(g,s);
|
240 |
</script>
|
241 |
<!-- End Matomo Tag Manager -->
|
242 |
INST;
|
app/plugins/TagManager/Template/Tag/MatomoTag.web.js
CHANGED
@@ -65,7 +65,7 @@
|
|
65 |
// installed which another doesn't have.
|
66 |
libLoaded = true;
|
67 |
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
68 |
-
g.type='text/javascript'; g.async=true; g.
|
69 |
}
|
70 |
}
|
71 |
|
65 |
// installed which another doesn't have.
|
66 |
libLoaded = true;
|
67 |
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
68 |
+
g.type='text/javascript'; g.async=true; g.src=url+jsEndpoint; s.parentNode.insertBefore(g,s);
|
69 |
}
|
70 |
}
|
71 |
|
app/plugins/UsersManager/API.php
CHANGED
@@ -188,7 +188,17 @@ class API extends \Piwik\Plugin\API
|
|
188 |
public function setUserPreference($userLogin, $preferenceName, $preferenceValue)
|
189 |
{
|
190 |
Piwik::checkUserHasSuperUserAccessOrIsTheUser($userLogin);
|
191 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
}
|
193 |
|
194 |
/**
|
@@ -268,6 +278,18 @@ class API extends \Piwik\Plugin\API
|
|
268 |
if(false !== strpos($preference, self::OPTION_NAME_PREFERENCE_SEPARATOR)) {
|
269 |
throw new Exception("Preference name cannot contain underscores.");
|
270 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
return $login . self::OPTION_NAME_PREFERENCE_SEPARATOR . $preference;
|
272 |
}
|
273 |
|
188 |
public function setUserPreference($userLogin, $preferenceName, $preferenceValue)
|
189 |
{
|
190 |
Piwik::checkUserHasSuperUserAccessOrIsTheUser($userLogin);
|
191 |
+
|
192 |
+
if (!$this->model->userExists($userLogin)) {
|
193 |
+
throw new Exception('User does not exist: ' . $userLogin);
|
194 |
+
}
|
195 |
+
|
196 |
+
if ($userLogin === 'anonymous') {
|
197 |
+
Piwik::checkUserHasSuperUserAccess();
|
198 |
+
}
|
199 |
+
|
200 |
+
$nameIfSupported = $this->getPreferenceId($userLogin, $preferenceName);
|
201 |
+
Option::set($nameIfSupported, $preferenceValue);
|
202 |
}
|
203 |
|
204 |
/**
|
278 |
if(false !== strpos($preference, self::OPTION_NAME_PREFERENCE_SEPARATOR)) {
|
279 |
throw new Exception("Preference name cannot contain underscores.");
|
280 |
}
|
281 |
+
$names = array(
|
282 |
+
self::PREFERENCE_DEFAULT_REPORT,
|
283 |
+
self::PREFERENCE_DEFAULT_REPORT_DATE,
|
284 |
+
'hideSegmentDefinitionChangeMessage',// used in JS
|
285 |
+
'randomDoesNotExist',// for tests
|
286 |
+
'RandomNOTREQUESTED',// for tests
|
287 |
+
'preferenceName'// for tests
|
288 |
+
);
|
289 |
+
if (!in_array($preference, $names, true)) {
|
290 |
+
throw new Exception('Not supported preference name: ' . $preference);
|
291 |
+
}
|
292 |
+
|
293 |
return $login . self::OPTION_NAME_PREFERENCE_SEPARATOR . $preference;
|
294 |
}
|
295 |
|
app/vendor/composer/autoload_files.php
CHANGED
@@ -10,4 +10,5 @@ return array(
|
|
10 |
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
|
11 |
'bbf73f3db644d3dced353b837903e74c' => $vendorDir . '/php-di/php-di/src/DI/functions.php',
|
12 |
'6dcc7fc6910472564e7b11f0b5d852b5' => $vendorDir . '/szymach/c-pchart/src/Resources/data/constants.php',
|
|
|
13 |
);
|
10 |
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
|
11 |
'bbf73f3db644d3dced353b837903e74c' => $vendorDir . '/php-di/php-di/src/DI/functions.php',
|
12 |
'6dcc7fc6910472564e7b11f0b5d852b5' => $vendorDir . '/szymach/c-pchart/src/Resources/data/constants.php',
|
13 |
+
'aa3ddbfac31d504181d81bbbeb5838b9' => $baseDir . '/LegacyAutoloader.php',
|
14 |
);
|
app/vendor/composer/autoload_static.php
CHANGED
@@ -11,6 +11,7 @@ class ComposerStaticInita7390451fa333dcc08d2dd84c32bbfc6
|
|
11 |
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
12 |
'bbf73f3db644d3dced353b837903e74c' => __DIR__ . '/..' . '/php-di/php-di/src/DI/functions.php',
|
13 |
'6dcc7fc6910472564e7b11f0b5d852b5' => __DIR__ . '/..' . '/szymach/c-pchart/src/Resources/data/constants.php',
|
|
|
14 |
);
|
15 |
|
16 |
public static $prefixLengthsPsr4 = array (
|
11 |
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
12 |
'bbf73f3db644d3dced353b837903e74c' => __DIR__ . '/..' . '/php-di/php-di/src/DI/functions.php',
|
13 |
'6dcc7fc6910472564e7b11f0b5d852b5' => __DIR__ . '/..' . '/szymach/c-pchart/src/Resources/data/constants.php',
|
14 |
+
'aa3ddbfac31d504181d81bbbeb5838b9' => __DIR__ . '/../..' . '/LegacyAutoloader.php',
|
15 |
);
|
16 |
|
17 |
public static $prefixLengthsPsr4 = array (
|
assets/css/admin-style.css
CHANGED
@@ -23,6 +23,10 @@ ol.matomo-list {
|
|
23 |
min-height: auto;
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
26 |
.matomo-marketplace-notice .dashicons-video-alt3 {
|
27 |
display: inline-block;
|
28 |
}
|
23 |
min-height: auto;
|
24 |
}
|
25 |
|
26 |
+
.matomo-plugin-list .plugin-card-top .matomo-description {
|
27 |
+
min-height: 80px;
|
28 |
+
}
|
29 |
+
|
30 |
.matomo-marketplace-notice .dashicons-video-alt3 {
|
31 |
display: inline-block;
|
32 |
}
|
classes/WpMatomo/API.php
CHANGED
@@ -30,6 +30,7 @@ class API {
|
|
30 |
'/' . self::ROUTE_HIT . '/',
|
31 |
array(
|
32 |
'methods' => array( 'GET', 'POST' ),
|
|
|
33 |
'callback' => array( $this, 'hit' ),
|
34 |
)
|
35 |
);
|
@@ -169,6 +170,7 @@ class API {
|
|
169 |
array(
|
170 |
'methods' => $method,
|
171 |
'callback' => array( $this, 'execute_api_method' ),
|
|
|
172 |
'matomoModule' => $api_module,
|
173 |
'matomoMethod' => $api_method,
|
174 |
)
|
30 |
'/' . self::ROUTE_HIT . '/',
|
31 |
array(
|
32 |
'methods' => array( 'GET', 'POST' ),
|
33 |
+
'permission_callback' => '__return_true',
|
34 |
'callback' => array( $this, 'hit' ),
|
35 |
)
|
36 |
);
|
170 |
array(
|
171 |
'methods' => $method,
|
172 |
'callback' => array( $this, 'execute_api_method' ),
|
173 |
+
'permission_callback' => '__return_true', // permissions are checked in the method itself
|
174 |
'matomoModule' => $api_module,
|
175 |
'matomoMethod' => $api_method,
|
176 |
)
|
classes/WpMatomo/Admin/Summary.php
CHANGED
@@ -78,6 +78,9 @@ class Summary {
|
|
78 |
|
79 |
$matomo_dashboard = new Dashboard();
|
80 |
|
|
|
|
|
|
|
81 |
include dirname( __FILE__ ) . '/views/summary.php';
|
82 |
}
|
83 |
|
78 |
|
79 |
$matomo_dashboard = new Dashboard();
|
80 |
|
81 |
+
$wp_version = get_bloginfo( 'version' );
|
82 |
+
$matomo_is_version_pre55 = empty($wp_version) || version_compare($wp_version, '5.5.0') === -1;
|
83 |
+
|
84 |
include dirname( __FILE__ ) . '/views/summary.php';
|
85 |
}
|
86 |
|
classes/WpMatomo/Admin/TrackingSettings.php
CHANGED
@@ -96,6 +96,7 @@ class TrackingSettings implements AdminSettingsInterface {
|
|
96 |
'force_protocol',
|
97 |
'track_js_endpoint',
|
98 |
'track_api_endpoint',
|
|
|
99 |
);
|
100 |
|
101 |
if ( matomo_has_tag_manager() ) {
|
@@ -108,6 +109,13 @@ class TrackingSettings implements AdminSettingsInterface {
|
|
108 |
$values['add_post_annotations'] = array();
|
109 |
$values['tagmanger_container_ids'] = array();
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
if ( ! empty( $_POST[ self::FORM_NAME ]['track_mode'] ) ) {
|
112 |
$track_mode = $_POST[ self::FORM_NAME ]['track_mode'];
|
113 |
$previus_track_mode = $this->settings->get_global_option( 'track_mode' );
|
@@ -170,12 +178,24 @@ class TrackingSettings implements AdminSettingsInterface {
|
|
170 |
$site = new Site();
|
171 |
$idsite = $site->get_current_matomo_site_id();
|
172 |
|
|
|
|
|
173 |
$tracking_code_generator = new TrackingCodeGenerator( $this->settings );
|
174 |
$matomo_default_tracking_code = $tracking_code_generator->prepare_tracking_code( $idsite );
|
175 |
|
176 |
include dirname( __FILE__ ) . '/views/tracking.php';
|
177 |
}
|
178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
public function get_active_containers() {
|
180 |
// we don't use Matomo API here to avoid needing to bootstrap Matomo which is slow and could break things
|
181 |
$containers = array();
|
96 |
'force_protocol',
|
97 |
'track_js_endpoint',
|
98 |
'track_api_endpoint',
|
99 |
+
Settings::SITE_CURRENCY
|
100 |
);
|
101 |
|
102 |
if ( matomo_has_tag_manager() ) {
|
109 |
$values['add_post_annotations'] = array();
|
110 |
$values['tagmanger_container_ids'] = array();
|
111 |
|
112 |
+
$valid_currencies = $this->get_supported_currencies();
|
113 |
+
|
114 |
+
if ( empty( $_POST[ self::FORM_NAME ][Settings::SITE_CURRENCY] )
|
115 |
+
|| !array_key_exists( $_POST[ self::FORM_NAME ][Settings::SITE_CURRENCY], $valid_currencies ) ) {
|
116 |
+
$_POST[ self::FORM_NAME ][Settings::SITE_CURRENCY] = 'USD';
|
117 |
+
}
|
118 |
+
|
119 |
if ( ! empty( $_POST[ self::FORM_NAME ]['track_mode'] ) ) {
|
120 |
$track_mode = $_POST[ self::FORM_NAME ]['track_mode'];
|
121 |
$previus_track_mode = $this->settings->get_global_option( 'track_mode' );
|
178 |
$site = new Site();
|
179 |
$idsite = $site->get_current_matomo_site_id();
|
180 |
|
181 |
+
$matomo_currencies = $this->get_supported_currencies();
|
182 |
+
|
183 |
$tracking_code_generator = new TrackingCodeGenerator( $this->settings );
|
184 |
$matomo_default_tracking_code = $tracking_code_generator->prepare_tracking_code( $idsite );
|
185 |
|
186 |
include dirname( __FILE__ ) . '/views/tracking.php';
|
187 |
}
|
188 |
|
189 |
+
private function get_supported_currencies()
|
190 |
+
{
|
191 |
+
$all = include dirname( MATOMO_ANALYTICS_FILE ) . '/app/core/Intl/Data/Resources/currencies.php';
|
192 |
+
$currencies = array();
|
193 |
+
foreach ($all as $key => $single) {
|
194 |
+
$currencies[$key] = $single[0] . ' ' . $single[1];
|
195 |
+
}
|
196 |
+
return $currencies;
|
197 |
+
}
|
198 |
+
|
199 |
public function get_active_containers() {
|
200 |
// we don't use Matomo API here to avoid needing to bootstrap Matomo which is slow and could break things
|
201 |
$containers = array();
|
classes/WpMatomo/Admin/views/marketplace.php
CHANGED
@@ -51,8 +51,17 @@ $matomo_extra_url_params = '&' . http_build_query(
|
|
51 |
echo '<h2>' . esc_html( $matomo_feature_section['title'] ) . '</h2>';
|
52 |
echo '<div class="wp-list-table widefat plugin-install matomo-plugin-list"><div id="the-list">';
|
53 |
foreach ( $matomo_feature_section['features'] as $matomo_index => $matomo_feature ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
if ($matomo_show_offer && $matomo_feature['name'] === 'Premium Bundle') {
|
55 |
-
?><div class="plugin-card" style="">
|
56 |
<div style="border: 6px dashed red;text-align: center">
|
57 |
<h2 style="font-size: 24px;">
|
58 |
<a href="https://matomo.org/wp-premium-bundle/" target="_blank" rel="noreferrer noopener"><span style="color: black;">Limited time!</span><br><br><span style="color:red">300€ Off Premium Bundle</span></a></h2>
|
@@ -65,11 +74,7 @@ $matomo_extra_url_params = '&' . http_build_query(
|
|
65 |
</div><?php
|
66 |
continue;
|
67 |
}
|
68 |
-
|
69 |
-
$matomo_is_3_columns = count( $matomo_feature_section['features'] ) === 3;
|
70 |
-
if ( $matomo_is_3_columns ) {
|
71 |
-
$matomo_style = '';
|
72 |
-
}
|
73 |
?>
|
74 |
<div class="plugin-card" style="<?php echo $matomo_style; ?>">
|
75 |
<?php
|
51 |
echo '<h2>' . esc_html( $matomo_feature_section['title'] ) . '</h2>';
|
52 |
echo '<div class="wp-list-table widefat plugin-install matomo-plugin-list"><div id="the-list">';
|
53 |
foreach ( $matomo_feature_section['features'] as $matomo_index => $matomo_feature ) {
|
54 |
+
$matomo_style = '';
|
55 |
+
$matomo_is_3_columns = count( $matomo_feature_section['features'] ) === 3;
|
56 |
+
if ( $matomo_is_3_columns ) {
|
57 |
+
$matomo_style = 'width: calc(33% - 8px);min-width:282px;max-width:350px;';
|
58 |
+
if ( $matomo_index % 3 === 2 ) {
|
59 |
+
$matomo_style .= 'clear: inherit;margin-right: 0;margin-left: 16px;';
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
if ($matomo_show_offer && $matomo_feature['name'] === 'Premium Bundle') {
|
64 |
+
?><div class="plugin-card" style="<?php echo $matomo_style; ?>">
|
65 |
<div style="border: 6px dashed red;text-align: center">
|
66 |
<h2 style="font-size: 24px;">
|
67 |
<a href="https://matomo.org/wp-premium-bundle/" target="_blank" rel="noreferrer noopener"><span style="color: black;">Limited time!</span><br><br><span style="color:red">300€ Off Premium Bundle</span></a></h2>
|
74 |
</div><?php
|
75 |
continue;
|
76 |
}
|
77 |
+
|
|
|
|
|
|
|
|
|
78 |
?>
|
79 |
<div class="plugin-card" style="<?php echo $matomo_style; ?>">
|
80 |
<?php
|
classes/WpMatomo/Admin/views/summary.php
CHANGED
@@ -22,6 +22,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
22 |
/** @var string $report_date_selected */
|
23 |
/** @var bool $matomo_pinned */
|
24 |
/** @var bool $is_tracking */
|
|
|
25 |
/** @var \WpMatomo\Admin\Dashboard $matomo_dashboard */
|
26 |
global $wp;
|
27 |
|
@@ -31,6 +32,9 @@ $matomo_dashboard_nonce = wp_create_nonce(\WpMatomo\Admin\Summary::NONCE_DASHBOA
|
|
31 |
if ($matomo_pinned) {
|
32 |
echo '<div class="notice notice-success"><p>' . esc_html__( 'Dashboard updated.', 'matomo' ) . '</p></div>';
|
33 |
}
|
|
|
|
|
|
|
34 |
?>
|
35 |
<?php if ( ! $is_tracking ) { ?>
|
36 |
<div class="notice notice-warning"><p><?php esc_html_e( 'Matomo Tracking is not enabled.', 'matomo' ); ?></p></div>
|
@@ -72,8 +76,14 @@ $matomo_dashboard_nonce = wp_create_nonce(\WpMatomo\Admin\Summary::NONCE_DASHBOA
|
|
72 |
}
|
73 |
$shortcode = sprintf( '[matomo_report unique_id=%s report_date=%s limit=10]', $matomo_report_meta['uniqueId'], $report_date );
|
74 |
?>
|
75 |
-
<div class="postbox">
|
76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
<?php if ( ! empty( $matomo_report_meta['page'] ) ) { ?>
|
78 |
<button type="button" class="handlediv" aria-expanded="true"
|
79 |
title="<?php esc_html_e( 'Click to view the report in detail', 'matomo' ); ?>"><a
|
@@ -110,10 +120,7 @@ $matomo_dashboard_nonce = wp_create_nonce(\WpMatomo\Admin\Summary::NONCE_DASHBOA
|
|
110 |
" style="color: inherit;text-decoration: none;<?php if ($matomo_is_dashboard_widget) { echo 'opacity: 0.4 !important'; } ?>"
|
111 |
class="dashicons-before dashicons-admin-post" aria-hidden="true"></a></button>
|
112 |
|
113 |
-
|
114 |
-
style="cursor: help;"
|
115 |
-
title="<?php echo ! empty( $matomo_report_meta['documentation'] ) ? ( wp_strip_all_tags( $matomo_report_meta['documentation'] ) . ' ' ) : null; ?><?php esc_html_e( 'You can embed this report on any page using the shortcode:', 'matomo' ); ?> <?php echo esc_attr( $shortcode ); ?>"
|
116 |
-
><?php echo esc_html( $matomo_report_meta['name'] ); ?></h2>
|
117 |
<div>
|
118 |
<?php echo do_shortcode( $shortcode ); ?>
|
119 |
</div>
|
22 |
/** @var string $report_date_selected */
|
23 |
/** @var bool $matomo_pinned */
|
24 |
/** @var bool $is_tracking */
|
25 |
+
/** @var bool $matomo_is_version_pre55 */
|
26 |
/** @var \WpMatomo\Admin\Dashboard $matomo_dashboard */
|
27 |
global $wp;
|
28 |
|
32 |
if ($matomo_pinned) {
|
33 |
echo '<div class="notice notice-success"><p>' . esc_html__( 'Dashboard updated.', 'matomo' ) . '</p></div>';
|
34 |
}
|
35 |
+
if ($matomo_is_version_pre55) {
|
36 |
+
echo '<style type="text/css">.handle-actions { position: absolute; right: 0;top: 0;}</style>';
|
37 |
+
}
|
38 |
?>
|
39 |
<?php if ( ! $is_tracking ) { ?>
|
40 |
<div class="notice notice-warning"><p><?php esc_html_e( 'Matomo Tracking is not enabled.', 'matomo' ); ?></p></div>
|
76 |
}
|
77 |
$shortcode = sprintf( '[matomo_report unique_id=%s report_date=%s limit=10]', $matomo_report_meta['uniqueId'], $report_date );
|
78 |
?>
|
79 |
+
<div class="postbox ">
|
80 |
+
<div class="postbox-header">
|
81 |
+
<h2 class="hndle ui-sortable-handle"
|
82 |
+
style="cursor: help;"
|
83 |
+
title="<?php echo ! empty( $matomo_report_meta['documentation'] ) ? ( wp_strip_all_tags( $matomo_report_meta['documentation'] ) . ' ' ) : null; ?><?php esc_html_e( 'You can embed this report on any page using the shortcode:', 'matomo' ); ?> <?php echo esc_attr( $shortcode ); ?>"
|
84 |
+
>
|
85 |
+
<?php echo esc_html( $matomo_report_meta['name'] ); ?></h2>
|
86 |
+
<div class="handle-actions hide-if-no-js">
|
87 |
<?php if ( ! empty( $matomo_report_meta['page'] ) ) { ?>
|
88 |
<button type="button" class="handlediv" aria-expanded="true"
|
89 |
title="<?php esc_html_e( 'Click to view the report in detail', 'matomo' ); ?>"><a
|
120 |
" style="color: inherit;text-decoration: none;<?php if ($matomo_is_dashboard_widget) { echo 'opacity: 0.4 !important'; } ?>"
|
121 |
class="dashicons-before dashicons-admin-post" aria-hidden="true"></a></button>
|
122 |
|
123 |
+
</div></div>
|
|
|
|
|
|
|
124 |
<div>
|
125 |
<?php echo do_shortcode( $shortcode ); ?>
|
126 |
</div>
|
classes/WpMatomo/Admin/views/tracking.php
CHANGED
@@ -22,6 +22,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
22 |
/** @var array $matomo_default_tracking_code */
|
23 |
/** @var array $containers */
|
24 |
/** @var array $track_modes */
|
|
|
25 |
|
26 |
$matomo_form = new \WpMatomo\Admin\TrackingSettings\Forms( $settings );
|
27 |
$matomo_paths = new Paths();
|
@@ -111,19 +112,7 @@ if ( $was_updated ) {
|
|
111 |
$matomo_full_generated_tracking_group
|
112 |
);
|
113 |
|
114 |
-
$matomo_form->show_select(
|
115 |
-
'track_content',
|
116 |
-
__( 'Enable content tracking', 'matomo' ),
|
117 |
-
array(
|
118 |
-
'disabled' => esc_html__( 'Disabled', 'matomo' ),
|
119 |
-
'all' => esc_html__( 'Track all content blocks', 'matomo' ),
|
120 |
-
'visible' => esc_html__( 'Track only visible content blocks', 'matomo' ),
|
121 |
-
),
|
122 |
-
__( 'Content tracking allows you to track interaction with the content of a web page or application.', 'matomo' ) . ' ' . sprintf( esc_html__( 'See %1$sMatomo documentation%2$s.', 'matomo' ), '<a href="https://developer.matomo.org/guides/content-tracking" target="_BLANK">', '</a>' ),
|
123 |
-
'',
|
124 |
-
$matomo_is_not_tracking,
|
125 |
-
$matomo_full_generated_tracking_group
|
126 |
-
);
|
127 |
|
128 |
$matomo_form->show_checkbox( 'disable_cookies', esc_html__( 'Disable cookies', 'matomo' ), esc_html__( 'Disable all tracking cookies for a visitor.', 'matomo' ), $matomo_is_not_generated_tracking, $matomo_full_generated_tracking_group );
|
129 |
|
@@ -141,6 +130,20 @@ if ( $was_updated ) {
|
|
141 |
}
|
142 |
echo '<span class="dashicons dashicons-editor-help" style="cursor: pointer;" onclick="jQuery(\'#add_post_annotations-desc\').toggleClass(\'hidden\');"></span> <p class="description hidden" id="add_post_annotations-desc">' . sprintf( esc_html__( 'See %1$sMatomo documentation%2$s.', 'matomo' ), '<a href="https://matomo.org/docs/annotations/" target="_BLANK">', '</a>' ) . '</p></td></tr>';
|
143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
$matomo_form->show_input( 'add_download_extensions', esc_html__( 'Add new file types for download tracking', 'matomo' ), esc_html__( 'Add file extensions for download tracking, divided by a vertical bar (|).', 'matomo' ) . ' ' . sprintf( esc_html__( 'See %1$sMatomo documentation%2$s.', 'matomo' ), '<a href="https://developer.matomo.org/guides/tracking-javascript-guide#tracking-file-downloads" target="_BLANK">', '</a>' ), $matomo_is_not_generated_tracking, $matomo_full_generated_tracking_group );
|
145 |
|
146 |
$matomo_form->show_checkbox( 'limit_cookies', esc_html__( 'Limit cookie lifetime', 'matomo' ), esc_html__( 'You can limit the cookie lifetime to avoid tracking your users over a longer period as necessary.', 'matomo' ), $matomo_is_not_generated_tracking, $matomo_full_generated_tracking_group, true, 'jQuery(\'tr.matomo-cookielifetime-option\').toggleClass(\'matomo-hidden\');' );
|
22 |
/** @var array $matomo_default_tracking_code */
|
23 |
/** @var array $containers */
|
24 |
/** @var array $track_modes */
|
25 |
+
/** @var array $matomo_currencies */
|
26 |
|
27 |
$matomo_form = new \WpMatomo\Admin\TrackingSettings\Forms( $settings );
|
28 |
$matomo_paths = new Paths();
|
112 |
$matomo_full_generated_tracking_group
|
113 |
);
|
114 |
|
115 |
+
$matomo_form->show_select( \WpMatomo\Settings::SITE_CURRENCY, esc_html__( 'Currency', 'matomo' ), $matomo_currencies, esc_html__('Choose the currency which will be used in reports.', 'matomo'), '' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
|
117 |
$matomo_form->show_checkbox( 'disable_cookies', esc_html__( 'Disable cookies', 'matomo' ), esc_html__( 'Disable all tracking cookies for a visitor.', 'matomo' ), $matomo_is_not_generated_tracking, $matomo_full_generated_tracking_group );
|
118 |
|
130 |
}
|
131 |
echo '<span class="dashicons dashicons-editor-help" style="cursor: pointer;" onclick="jQuery(\'#add_post_annotations-desc\').toggleClass(\'hidden\');"></span> <p class="description hidden" id="add_post_annotations-desc">' . sprintf( esc_html__( 'See %1$sMatomo documentation%2$s.', 'matomo' ), '<a href="https://matomo.org/docs/annotations/" target="_BLANK">', '</a>' ) . '</p></td></tr>';
|
132 |
|
133 |
+
$matomo_form->show_select(
|
134 |
+
'track_content',
|
135 |
+
__( 'Enable content tracking', 'matomo' ),
|
136 |
+
array(
|
137 |
+
'disabled' => esc_html__( 'Disabled', 'matomo' ),
|
138 |
+
'all' => esc_html__( 'Track all content blocks', 'matomo' ),
|
139 |
+
'visible' => esc_html__( 'Track only visible content blocks', 'matomo' ),
|
140 |
+
),
|
141 |
+
__( 'Content tracking allows you to track interaction with the content of a web page or application.', 'matomo' ) . ' ' . sprintf( esc_html__( 'See %1$sMatomo documentation%2$s.', 'matomo' ), '<a href="https://developer.matomo.org/guides/content-tracking" target="_BLANK">', '</a>' ),
|
142 |
+
'',
|
143 |
+
$matomo_is_not_tracking,
|
144 |
+
$matomo_full_generated_tracking_group
|
145 |
+
);
|
146 |
+
|
147 |
$matomo_form->show_input( 'add_download_extensions', esc_html__( 'Add new file types for download tracking', 'matomo' ), esc_html__( 'Add file extensions for download tracking, divided by a vertical bar (|).', 'matomo' ) . ' ' . sprintf( esc_html__( 'See %1$sMatomo documentation%2$s.', 'matomo' ), '<a href="https://developer.matomo.org/guides/tracking-javascript-guide#tracking-file-downloads" target="_BLANK">', '</a>' ), $matomo_is_not_generated_tracking, $matomo_full_generated_tracking_group );
|
148 |
|
149 |
$matomo_form->show_checkbox( 'limit_cookies', esc_html__( 'Limit cookie lifetime', 'matomo' ), esc_html__( 'You can limit the cookie lifetime to avoid tracking your users over a longer period as necessary.', 'matomo' ), $matomo_is_not_generated_tracking, $matomo_full_generated_tracking_group, true, 'jQuery(\'tr.matomo-cookielifetime-option\').toggleClass(\'matomo-hidden\');' );
|
classes/WpMatomo/Settings.php
CHANGED
@@ -31,6 +31,7 @@ class Settings {
|
|
31 |
const OPTION_LAST_TRACKING_CODE_UPDATE = 'last_tracking_code_update';
|
32 |
const SHOW_GET_STARTED_PAGE = 'show_get_started_page';
|
33 |
const DELETE_ALL_DATA_ON_UNINSTALL = 'delete_all_data_uninstall';
|
|
|
34 |
const NETWORK_CONFIG_OPTIONS = 'config_options';
|
35 |
|
36 |
public static $is_doing_action_tracking_related = false;
|
@@ -56,6 +57,7 @@ class Settings {
|
|
56 |
self::OPTION_KEY_CAPS_ACCESS => array(),
|
57 |
self::NETWORK_CONFIG_OPTIONS => array(),
|
58 |
self::DELETE_ALL_DATA_ON_UNINSTALL => true,
|
|
|
59 |
// User settings: Stats configuration
|
60 |
// User settings: Tracking configuration
|
61 |
'track_mode' => 'disabled',
|
31 |
const OPTION_LAST_TRACKING_CODE_UPDATE = 'last_tracking_code_update';
|
32 |
const SHOW_GET_STARTED_PAGE = 'show_get_started_page';
|
33 |
const DELETE_ALL_DATA_ON_UNINSTALL = 'delete_all_data_uninstall';
|
34 |
+
const SITE_CURRENCY = 'site_currency';
|
35 |
const NETWORK_CONFIG_OPTIONS = 'config_options';
|
36 |
|
37 |
public static $is_doing_action_tracking_related = false;
|
57 |
self::OPTION_KEY_CAPS_ACCESS => array(),
|
58 |
self::NETWORK_CONFIG_OPTIONS => array(),
|
59 |
self::DELETE_ALL_DATA_ON_UNINSTALL => true,
|
60 |
+
self::SITE_CURRENCY => 'USD',
|
61 |
// User settings: Stats configuration
|
62 |
// User settings: Tracking configuration
|
63 |
'track_mode' => 'disabled',
|
classes/WpMatomo/Site/Sync.php
CHANGED
@@ -10,6 +10,8 @@
|
|
10 |
namespace WpMatomo\Site;
|
11 |
|
12 |
use Piwik\Access;
|
|
|
|
|
13 |
use Piwik\Config;
|
14 |
use Piwik\Plugins\SitesManager\Model;
|
15 |
use Piwik\Plugins\SitesManager;
|
@@ -54,6 +56,7 @@ class Sync {
|
|
54 |
add_action( 'update_option_siteurl', array( $this, 'sync_current_site_ignore_error' ) );
|
55 |
add_action( 'update_option_timezone_string', array( $this, 'sync_current_site_ignore_error' ) );
|
56 |
add_action( 'matomo_setting_change_track_ecommerce', array( $this, 'sync_current_site_ignore_error' ) );
|
|
|
57 |
}
|
58 |
|
59 |
public function sync_current_site_ignore_error()
|
@@ -130,8 +133,14 @@ class Sync {
|
|
130 |
}
|
131 |
|
132 |
$track_ecommerce = (int) $this->settings->get_global_option( 'track_ecommerce' );
|
|
|
133 |
$detected_timezone = $this->detect_timezone();
|
134 |
|
|
|
|
|
|
|
|
|
|
|
135 |
if ( ! empty( $idsite ) ) {
|
136 |
$this->logger->log( 'Matomo site is known for blog (' . $idsite . ')... will update' );
|
137 |
|
@@ -140,6 +149,7 @@ class Sync {
|
|
140 |
if ($site['name'] != $blog_name
|
141 |
|| $site['main_url'] != $blog_url
|
142 |
|| $site['ecommerce'] != $track_ecommerce
|
|
|
143 |
|| $site['timezone'] != $detected_timezone) {
|
144 |
|
145 |
/** @var \WP_Site $site */
|
@@ -147,6 +157,7 @@ class Sync {
|
|
147 |
'name' => $blog_name,
|
148 |
'main_url' => $blog_url,
|
149 |
'ecommerce' => $track_ecommerce,
|
|
|
150 |
'timezone' => $detected_timezone,
|
151 |
);
|
152 |
$sites_manager_model->updateSite( $params, $idsite );
|
@@ -170,7 +181,7 @@ class Sync {
|
|
170 |
$this->set_enable_sites_admin( 1 );
|
171 |
|
172 |
Access::doAsSuperUser(
|
173 |
-
function () use ( $blog_name, $blog_url, $detected_timezone, $track_ecommerce, &$idsite ) {
|
174 |
SitesManager\API::unsetInstance();
|
175 |
// we need to unset the instance to make sure it fetches the
|
176 |
// up to date dependencies eg current plugin manager etc
|
@@ -184,7 +195,8 @@ class Sync {
|
|
184 |
$search_category_parameters = null,
|
185 |
$excluded_ips = null,
|
186 |
$excluded_query_parameters = null,
|
187 |
-
$detected_timezone
|
|
|
188 |
);
|
189 |
}
|
190 |
);
|
10 |
namespace WpMatomo\Site;
|
11 |
|
12 |
use Piwik\Access;
|
13 |
+
use Piwik\API\Request;
|
14 |
+
use Piwik\Common;
|
15 |
use Piwik\Config;
|
16 |
use Piwik\Plugins\SitesManager\Model;
|
17 |
use Piwik\Plugins\SitesManager;
|
56 |
add_action( 'update_option_siteurl', array( $this, 'sync_current_site_ignore_error' ) );
|
57 |
add_action( 'update_option_timezone_string', array( $this, 'sync_current_site_ignore_error' ) );
|
58 |
add_action( 'matomo_setting_change_track_ecommerce', array( $this, 'sync_current_site_ignore_error' ) );
|
59 |
+
add_action( 'matomo_setting_change_site_currency', array( $this, 'sync_current_site_ignore_error' ) );
|
60 |
}
|
61 |
|
62 |
public function sync_current_site_ignore_error()
|
133 |
}
|
134 |
|
135 |
$track_ecommerce = (int) $this->settings->get_global_option( 'track_ecommerce' );
|
136 |
+
$site_currency = $this->settings->get_global_option( Settings::SITE_CURRENCY );
|
137 |
$detected_timezone = $this->detect_timezone();
|
138 |
|
139 |
+
$valid_currencies = \Piwik\Site::getCurrencyList();
|
140 |
+
if (!array_key_exists($site_currency, $valid_currencies)){
|
141 |
+
$site_currency = 'USD';
|
142 |
+
}
|
143 |
+
|
144 |
if ( ! empty( $idsite ) ) {
|
145 |
$this->logger->log( 'Matomo site is known for blog (' . $idsite . ')... will update' );
|
146 |
|
149 |
if ($site['name'] != $blog_name
|
150 |
|| $site['main_url'] != $blog_url
|
151 |
|| $site['ecommerce'] != $track_ecommerce
|
152 |
+
|| $site['currency'] != $site_currency
|
153 |
|| $site['timezone'] != $detected_timezone) {
|
154 |
|
155 |
/** @var \WP_Site $site */
|
157 |
'name' => $blog_name,
|
158 |
'main_url' => $blog_url,
|
159 |
'ecommerce' => $track_ecommerce,
|
160 |
+
'currency' => $site_currency,
|
161 |
'timezone' => $detected_timezone,
|
162 |
);
|
163 |
$sites_manager_model->updateSite( $params, $idsite );
|
181 |
$this->set_enable_sites_admin( 1 );
|
182 |
|
183 |
Access::doAsSuperUser(
|
184 |
+
function () use ( $blog_name, $blog_url, $detected_timezone, $track_ecommerce, &$idsite, $site_currency ) {
|
185 |
SitesManager\API::unsetInstance();
|
186 |
// we need to unset the instance to make sure it fetches the
|
187 |
// up to date dependencies eg current plugin manager etc
|
195 |
$search_category_parameters = null,
|
196 |
$excluded_ips = null,
|
197 |
$excluded_query_parameters = null,
|
198 |
+
$detected_timezone,
|
199 |
+
$site_currency
|
200 |
);
|
201 |
}
|
202 |
);
|
classes/WpMatomo/TrackingCode/TrackingCodeGenerator.php
CHANGED
@@ -282,7 +282,7 @@ g.type=\'text/javascript\'; g.async=true; g.src="' . $container_url . '"; s.pare
|
|
282 |
|
283 |
$script = '<!-- Matomo -->';
|
284 |
$script .= '<script ' . $data_cf_async . ' type="text/javascript">';
|
285 |
-
$script .= "var _paq = window._paq || [];\n";
|
286 |
$script .= implode( "\n", $options );
|
287 |
$script .= self::TRACKPAGEVIEW;
|
288 |
$script .= "_paq.push(['enableLinkTracking']);_paq.push(['alwaysUseSendBeacon']);";
|
282 |
|
283 |
$script = '<!-- Matomo -->';
|
284 |
$script .= '<script ' . $data_cf_async . ' type="text/javascript">';
|
285 |
+
$script .= "var _paq = window._paq = window._paq || [];\n";
|
286 |
$script .= implode( "\n", $options );
|
287 |
$script .= self::TRACKPAGEVIEW;
|
288 |
$script .= "_paq.push(['enableLinkTracking']);_paq.push(['alwaysUseSendBeacon']);";
|
config/config.php
CHANGED
@@ -21,6 +21,7 @@ return array(
|
|
21 |
$paths = new \WpMatomo\Paths();
|
22 |
return $paths->get_relative_dir_to_matomo($paths->get_upload_base_dir()) . '/';
|
23 |
},
|
|
|
24 |
'EnableDbVersionCheck' => false,
|
25 |
'path.geoip2' => function () {
|
26 |
$paths = new \WpMatomo\Paths();
|
21 |
$paths = new \WpMatomo\Paths();
|
22 |
return $paths->get_relative_dir_to_matomo($paths->get_upload_base_dir()) . '/';
|
23 |
},
|
24 |
+
'log.handlers' => array(), // required in the console
|
25 |
'EnableDbVersionCheck' => false,
|
26 |
'path.geoip2' => function () {
|
27 |
$paths = new \WpMatomo\Paths();
|
matomo.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Description: The #1 Google Analytics alternative that gives you full control over your data and protects the privacy for your users. Free, secure and open.
|
5 |
* Author: Matomo
|
6 |
* Author URI: https://matomo.org
|
7 |
-
* Version: 1.
|
8 |
* Domain Path: /languages
|
9 |
* WC requires at least: 2.4.0
|
10 |
* WC tested up to: 4.0.0
|
4 |
* Description: The #1 Google Analytics alternative that gives you full control over your data and protects the privacy for your users. Free, secure and open.
|
5 |
* Author: Matomo
|
6 |
* Author URI: https://matomo.org
|
7 |
+
* Version: 1.2.0
|
8 |
* Domain Path: /languages
|
9 |
* WC requires at least: 2.4.0
|
10 |
* WC tested up to: 4.0.0
|
plugins/WordPress/WordPress.php
CHANGED
@@ -142,11 +142,14 @@ class WordPress extends Plugin
|
|
142 |
{
|
143 |
if (is_multisite()
|
144 |
|| (defined('WP_DEBUG') && WP_DEBUG)
|
|
|
145 |
|| !matomo_has_compatible_content_dir()
|
146 |
|| (defined( 'MATOMO_SUPPORT_ASYNC_ARCHIVING') && !MATOMO_SUPPORT_ASYNC_ARCHIVING)
|
147 |
) {
|
148 |
// console wouldn't really work in multi site mode... therefore we prefer to archive in the same request
|
149 |
// WP_DEBUG also breaks things since it's logging things to stdout and then safe unserialise doesn't work
|
|
|
|
|
150 |
$supportsAsync = false;
|
151 |
}
|
152 |
}
|
142 |
{
|
143 |
if (is_multisite()
|
144 |
|| (defined('WP_DEBUG') && WP_DEBUG)
|
145 |
+
|| !empty($_SERVER['MATOMO_WP_ROOT_PATH'])
|
146 |
|| !matomo_has_compatible_content_dir()
|
147 |
|| (defined( 'MATOMO_SUPPORT_ASYNC_ARCHIVING') && !MATOMO_SUPPORT_ASYNC_ARCHIVING)
|
148 |
) {
|
149 |
// console wouldn't really work in multi site mode... therefore we prefer to archive in the same request
|
150 |
// WP_DEBUG also breaks things since it's logging things to stdout and then safe unserialise doesn't work
|
151 |
+
// disabling it also when server environment variable is set as it's likely only set in web requests through web server
|
152 |
+
// but not on the CLI
|
153 |
$supportsAsync = false;
|
154 |
}
|
155 |
}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: matomoteam
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5EJ2LHATAKCJ4&source=url
|
4 |
Tags: matomo,piwik,analytics,statistics,stats,tracking,ecommerce
|
5 |
Requires at least: 4.8
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 1.
|
8 |
Requires PHP: 7.2
|
9 |
License: GPLv3 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
@@ -30,6 +30,7 @@ Matomo is free, secure and open - your ethical user insights platform.
|
|
30 |
**How Matomo Analytics for Wordpress solves problems:**
|
31 |
|
32 |
* 100% data ownership, no one else can see your data
|
|
|
33 |
* Super easy to install. No coding or technical knowledge needed #nocode
|
34 |
* Free to use forever
|
35 |
* Designed to save you time as an out-of-box solution (including many Ecommerce stores)
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5EJ2LHATAKCJ4&source=url
|
4 |
Tags: matomo,piwik,analytics,statistics,stats,tracking,ecommerce
|
5 |
Requires at least: 4.8
|
6 |
+
Tested up to: 5.5
|
7 |
+
Stable tag: 1.2.0
|
8 |
Requires PHP: 7.2
|
9 |
License: GPLv3 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
30 |
**How Matomo Analytics for Wordpress solves problems:**
|
31 |
|
32 |
* 100% data ownership, no one else can see your data
|
33 |
+
* All data is stored in your WordPress and not sent to any third party or different country
|
34 |
* Super easy to install. No coding or technical knowledge needed #nocode
|
35 |
* Free to use forever
|
36 |
* Designed to save you time as an out-of-box solution (including many Ecommerce stores)
|