mirror of
https://github.com/pierre42100/comunic
synced 2025-07-13 05:18:13 +00:00
First commit
This commit is contained in:
25
inc/gestion_piwik.php
Executable file
25
inc/gestion_piwik.php
Executable file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
if(!isset($_SESSION))
|
||||
die("Invalid call!");
|
||||
|
||||
//On vérifie si Piwik est bien activé
|
||||
if($enable_piwik == 1)
|
||||
{
|
||||
?><!-- Piwik -->
|
||||
<script type="text/javascript">
|
||||
var _paq = _paq || [];
|
||||
_paq.push(["setDoNotTrack", true]);
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="<?php echo $adresse_piwik; ?>";
|
||||
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
||||
_paq.push(['setSiteId', <?php echo $id_site_piwik; ?>]);
|
||||
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="<?php echo $adresse_piwik; ?>piwik/piwik.php?idsite=<?php echo $id_site_piwik; ?>" style="border:0;" alt="" /></p></noscript>
|
||||
<!-- End Piwik Code -->
|
||||
<?php
|
||||
}
|
Reference in New Issue
Block a user