Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
Fix Google Analytics, Fix Tether error, Add jQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
sstenchlak committed Feb 21, 2021
1 parent 002f3e8 commit 6717c64
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 49 deletions.
4 changes: 2 additions & 2 deletions conf/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

$conf['email_webmaster'] = 'webmaster@fykos.cz';
$conf['ga_trackcode'] = 'UA-27814405-1';
$conf['ga_trackcode'] = '';
$conf['login_url'] = '/login';
$conf['logout_url'] = '/login/logout';
$conf['register_url'] = '/user/registrace';
Expand All @@ -18,4 +18,4 @@
$conf['msg_en'] = "";

$conf['flast-links_cs']="";
$conf['flast-links_en']="";
$conf['flast-links_en']="";
24 changes: 18 additions & 6 deletions main.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,27 @@ class="no-js">
<?php tpl_metaheaders() ?>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<?php echo tpl_favicon(array('favicon')) ?>

<script
src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
integrity="sha256-4+XzXVhsDmqanXGHaHvgh1gMQKX40OUvDEBTu8JcmNs="
crossorigin="anonymous"></script>
<script>window.Tether = window.Tether || {};</script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js"
integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn"
crossorigin="anonymous"></script>

<?php if (tpl_getConf('ga_trackcode')): ?>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=<?php echo tpl_getConf('ga_trackcode'); ?>"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', '<?php echo tpl_getConf('ga_trackcode'); ?>');
</script>
<?php endif; ?>

</head>

<body data-act="<?php echo $ACT; ?>"
Expand Down Expand Up @@ -100,11 +117,6 @@ class="content dokuwiki__content container-fluid <?php echo ($ACT == 'show' &&
<div class="no">
<?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?>
</div>
<script type="text/javascript"><!--
_ga.create('<?php echo tpl_getConf('ga_trackcode'); ?>', '<?php echo $_SERVER['HTTP_HOST']; ?>');
_gaq.push(['_trackPageview']);
//-->
</script>
</body>
</html>
<?php
Expand Down
41 changes: 0 additions & 41 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,44 +24,3 @@ jQuery(() => {

return true;
});

/**
* Customized Google Analytics tracking code
* Version 5.00
*
* Copyright (c) 2008-2010 H1.cz s.r.o.
* Copyright (c) 2010 Medio Interactive, s.r.o.
* See http://www.h1.cz/ga for more information.
*/
var _gaq = _gaq || [];
(function () {
var a = document.createElement('script');
a.type = 'text/javascript';
a.async = true;
a.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(a, s);
})();
var _ga = {
e: ['seznam.cz:q', 'seznam.cz:w', 'atlas.centrum.cz:q', 'searchatlas.centrum.cz:q', 'atlas.cz:q', 'centrum.cz:q', '1188.cz:q', 'jyxo.cz:q', 'mapy.cz:ssq', 'najisto.centrum.cz:what', 'takeit.cz:q', 'tiscali.cz:query', 'volny.cz:search', 'zacatek.cz:q', 'webhledani.cz:q', 'zlatestranky.cz:search', 'zoohoo.cz:q', '1.cz:q', 'akcni-cena.cz:search', 'b2bc.cz:XSearching', 'ceno.cz:q', 'cenyzbozi.cz:q', 'dobra-koupe.cz:searchtext', 'elektro.cz:w', 'elektrus.cz:h', 'eshop-katalog.cz:hledej', 'foxter.cz:search', 'heureka.cz:h[fraze]', 'hledam-zbozi.cz:q', 'hledejceny.cz:search', 'hyperceny.cz:q', 'ishopy.eu:search', 'koupis.cz:q', 'lepsiceny.cz:q', 'levnenakupy.cz:searchword', 'mojse.cz:search_text', 'monitor.cz:qw', 'naakup.cz:hledat', 'najdicenu.cz:ss', 'nakupte.cz:what', 'nejlepsiceny.cz:t', 'nejlepsinakupy.cz:q', 'nejnakup.cz:q', 'onlinezbozi.cz:search', 'porovnejcenu.cz:phrase', 'seznamobchodu.cz:search', 'seznamzbozi.cz:st', 'shoops.cz:s', 'shopy.cz:s', 'srovname.cz:hledat', 'srovnanicen.cz:q', 'srovnavadlo.cz:q', 'taxa.cz:keyword', 'usetrim.cz:q', 'vybereme.cz:q', 'zalevno.cz:q', 'zbozi.eshop-katalog.cz:hledej', 'zbozi.poptavky.cz:cond[fulltext]', 'zbozi.portik.cz:vyraz', 'zbozi.cz:q', 'atlas.sk:phrase', 'centrum.sk:q', 'azet.sk:q', 'azet.sk:sq', 'morfeo.sk:q', 'surf.sk:kw', 'szm.sk:ws', 'zoohoo.sk:q', 'zoznam.sk:s', 'cenoveinfo.sk:SearchProductName', 'e-nakupovanie.sk:searchword', 'heureka.sk:h[fraze]', 'najdicenu.sk:ss', 'najnakup.sk:q', 'nakup.24hod.sk:q', 'srovname.sk:hledat', 'superdeal.sk:q', 'tovar.sk:q', 'google:q', 'google:as_q', 'google:as_oq', 'google:as_epq', 'google:as_lq', 'google:as_rq', 'ananzi.co.za:qt', 'anzwers.com.au:search', 'araby.com:q', 'bbc.co.uk:q', 'britishinformation.com:search', 'club-internet.fr:q', 'elmundo.es:q', 'eniro.se:geo_area', 'excite.co.uk:q', 'excite.com:q', 'gigablast.com:q', 'hotbot.co.uk:query', 'hotbot.com:query', 'iafrica.funnel.co.za:q', 'icq.com:q', 'kelkoo:contextKeywords', 'looksmart.com:qt', 'maktoob.com:q', 'myway.com:searchfor', 'mywebsearch.com:searchfor', 'najdi.si:q', 'netsprint.pl:q', 'onet.pl:qt', 'orange.co.uk:q', 'rambler.ru:query', 'search.com:q', 'searcheurope.com:query', 'searchy.co.uk:search_term', 'sky.com:term', 'suche.web.de:su', 'tesco.net:q', 'tiscali.co.uk:query', 'virginmedia.com', 'q', 'wolframalpha.com:i', 'zinza.com:query'],
create: function (a, b, c) {
if (!b) {
b = 'auto';
}
if (c) {
c += '.';
} else {
c = '';
}
_gaq.push([c + '_setAccount', a]);
_gaq.push([c + '_setDomainName', b]);
_gaq.push([c + '_setAllowAnchor', true]);
var s, i;
for (i = this.e.length - 1; i >= 0; i--) {
s = this.e[i].split(':');
_gaq.push([c + '_addOrganic', s[0], s[1], true])
}
}
};


0 comments on commit 6717c64

Please sign in to comment.