Welcome to mirror list, hosted at ThFree Co, Russian Federation.

analytics.php « server - github.com/jappix/jappix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 74045f35e9f982e03f893f00886a37f994105e87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php

/*

Jappix - An open social platform
This is the Jappix analytics tracking code

-------------------------------------------------

License: AGPL
Author: Valérian Saliou

*/

// Someone is trying to hack us?
if(!defined('JAPPIX_BASE')) {
    exit;
}

if((ANALYTICS_TRACK == 'on') && ANALYTICS_URL && ANALYTICS_ID && is_numeric(ANALYTICS_ID)) { ?>
    <!-- BEGIN ANALYTICS -->
    <script type="text/javascript">
        document.write(unescape("%3Cscript src='<?php echo ANALYTICS_URL; ?>piwik.js' type='text/javascript'%3E%3C/script%3E"));
    </script>

    <script type="text/javascript">
        try {
            Piwik.getTracker("<?php echo ANALYTICS_URL; ?>piwik.php", <?php echo ANALYTICS_ID; ?>).trackPageView();
        } catch(err) {}
    </script>
    <!-- END ANALYTICS -->
<?php } ?>