1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jappix_ynh.git synced 2024-09-03 19:26:19 +02:00
jappix_ynh/source/server/analytics.php
titoko@titoko.fr 979b376609 update 1.0.1
2014-03-12 14:52:47 +01:00

32 lines
806 B
PHP

<?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 } ?>