1
0
Fork 0
mirror of https://gitlab.com/Oreolek/black_phone.git synced 2024-06-16 23:20:59 +03:00

Piwik analytics

This commit is contained in:
Alexander Yakovlev 2016-01-03 10:25:22 +07:00
parent 3e7530dbe0
commit c1184ef6e1
3 changed files with 19 additions and 1 deletions

View file

@ -7,6 +7,7 @@ undum.game.init = (character, system) ->
event.preventDefault()
undum.processClick($(this).attr("href"))
)
_paq.push(['setCustomDimension', 1, false])
# If you use only once() links you can use this "hack":
document.onmousedown = (e) ->
e.target.click()
@ -16,7 +17,7 @@ undum.game.init = (character, system) ->
# Another thing to bear in mind: this game is not a typical Undum game.
# It deliberately repeats the situations, so you can repeat "once" links once you re-enter the situation.
# So this game has no need in repeatable links at all and this hack is useful.
character.sandbox.view_smash = 1
character.sandbox.code = ""
character.sandbox.knows_the_code = 0

View file

@ -350,6 +350,7 @@ situation "exitdoor",
situation "finale",
before: () ->
_paq.push(['setCustomDimension', 1, true])
$("#tools_wrapper").hide()
update_ways(this.ways)
optionText: "Use the Phone"

View file

@ -75,5 +75,21 @@
<div id="content_library"></div>
<script type="text/javascript" src="game/undum.js"></script>
<script type="text/javascript" src="game/bundle.js"></script>
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["setDomains", ["*.oreolek.ru/my_games","*.itch.io","*.itch.io"]]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//webstats.oreolek.ru/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 3]);
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="//webstats.oreolek.ru/piwik.php?idsite=3" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
</body>
</html>