mirror of
https://github.com/YunoHost-Apps/jappix_ynh.git
synced 2024-09-03 19:26:19 +02:00
33 lines
806 B
PHP
33 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 } ?>
|