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/php/analytics.php
titoko titoko 96663cd7da add source
2013-11-27 12:56:15 +01:00

32 lines
No EOL
767 B
PHP
Executable file

<?php
/*
Jappix - An open social platform
This is the Jappix analytics tracking code
-------------------------------------------------
License: AGPL
Author: Valérian Saliou
Last revision: 05/03/12
*/
// 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 } ?>