mirror of
https://gitlab.com/Oreolek/cloak-salet.git
synced 2024-05-02 00:59:39 +03:00
Piwik Analytics
This commit is contained in:
parent
a429afdb48
commit
c9bd8f7a8a
|
@ -137,6 +137,9 @@ actlink = (content, ref) ->
|
|||
sysroom = (name, options) ->
|
||||
options.canSave = false
|
||||
options.enter = () ->
|
||||
if salet.interactive and _paq?
|
||||
# Piwik analytics: room stats
|
||||
_paq.push(['trackPageView', name])
|
||||
$(".action").hide()
|
||||
options.exit = () ->
|
||||
if document.querySelector('#current-room')
|
||||
|
@ -179,6 +182,9 @@ croom = (name, spec) ->
|
|||
"""
|
||||
retval += '</div>'
|
||||
spec.enter = () ->
|
||||
if salet.interactive and _paq?
|
||||
# Piwik analytics: room stats
|
||||
_paq.push(['trackPageView', name])
|
||||
salet.character.update_sidebar()
|
||||
if @onEnter?
|
||||
@onEnter()
|
||||
|
|
|
@ -116,8 +116,12 @@ croom "bar",
|
|||
$("#content").toggleClass("narrow")
|
||||
$(".ways").hide()
|
||||
if salet.here().chaos == 0
|
||||
if salet.interactive and _paq?
|
||||
_paq.push(['setCustomDimension', 1, true]);
|
||||
return "message_x".l()
|
||||
else
|
||||
if salet.interactive and _paq?
|
||||
_paq.push(['setCustomDimension', 1, false]);
|
||||
return "message_ruined".l()
|
||||
examine: () ->
|
||||
salet.here().units[0].act()
|
||||
|
|
16
html/en.html
16
html/en.html
|
@ -6,6 +6,22 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href='https://fonts.googleapis.com/css?family=PT+Sans:400,400italic|PT+Sans+Caption' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
<!-- Piwik -->
|
||||
<script type="text/javascript">
|
||||
var _paq = _paq || [];
|
||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="https://webstats.oreolek.ru/";
|
||||
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
||||
_paq.push(['setSiteId', 'BryJq']);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
<noscript><p><img src="https://webstats.oreolek.ru/piwik.php?idsite=BryJq&rec=1" style="border:0;" alt="" /></p></noscript>
|
||||
<!-- End Piwik Code -->
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
|
|
|
@ -6,6 +6,22 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href='https://fonts.googleapis.com/css?family=PT+Sans:400,400italic|PT+Sans+Caption' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
<!-- Piwik -->
|
||||
<script type="text/javascript">
|
||||
var _paq = _paq || [];
|
||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="https://webstats.oreolek.ru/";
|
||||
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
||||
_paq.push(['setSiteId', 'BryJq']);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
<noscript><p><img src="https://webstats.oreolek.ru/piwik.php?idsite=BryJq&rec=1" style="border:0;" alt="" /></p></noscript>
|
||||
<!-- End Piwik Code -->
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
|
|
Loading…
Reference in a new issue