commit
1c687f6a6e
@ -149,6 +149,13 @@ This will embed the google analytics tracking code.
|
|||||||
{
|
{
|
||||||
"google_analytics": "UA-XXXXXXXXX-XX"
|
"google_analytics": "UA-XXXXXXXXX-XX"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
###Piwik Analytics:
|
||||||
|
This will embed the piwik tracking code.
|
||||||
|
|
||||||
|
{
|
||||||
|
"piwik_analytics": "my-url-for-piwik.com"
|
||||||
|
}
|
||||||
|
|
||||||
## Running Locally
|
## Running Locally
|
||||||
|
|
||||||
|
17
index.php
17
index.php
@ -279,5 +279,20 @@ if ($homepage && $homepage_url !== '/') {
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<?php if ($options['piwik_analytics']) { ?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var _paq = _paq || [];
|
||||||
|
_paq.push(["trackPageView"]);
|
||||||
|
_paq.push(["enableLinkTracking"]);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://<?php echo $options['piwik_analytics'];?>/";
|
||||||
|
_paq.push(["setTrackerUrl", u+"piwik.php"]);
|
||||||
|
_paq.push(["setSiteId", "1"]);
|
||||||
|
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
|
||||||
|
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
<?php } ?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -35,7 +35,8 @@ function get_options() {
|
|||||||
'twitter' => array(),
|
'twitter' => array(),
|
||||||
'links' => array(),
|
'links' => array(),
|
||||||
'colors' => false,
|
'colors' => false,
|
||||||
'google_analytics' => false
|
'google_analytics' => false,
|
||||||
|
'piwik_analytics' => false
|
||||||
);
|
);
|
||||||
|
|
||||||
// Load User Config
|
// Load User Config
|
||||||
@ -261,4 +262,4 @@ function get_tree($path = '.', $clean_path = '', $title = ''){
|
|||||||
|
|
||||||
return $tree;
|
return $tree;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user