Merge pull request #98 from r0n22/master

Commit Piwik Tracking ID
This commit is contained in:
Denis Kisselev 2013-10-28 00:14:04 -07:00
commit 6b0fb5b7f0
5 changed files with 348 additions and 331 deletions

View File

@ -189,6 +189,14 @@ This will embed the piwik tracking code.
} }
``` ```
You can Also give a specific Piwik ID as well.
```json
{
"piwik_analytics_id": "43"
}
```
###Ignore: ###Ignore:
Set custom files and entire folders to ignore within your `/docs` folder. For files make sure to include the file extension in the name. For both files and folders, names are case-sensitive. Set custom files and entire folders to ignore within your `/docs` folder. For files make sure to include the file extension in the name. For both files and folders, names are case-sensitive.

View File

@ -189,6 +189,14 @@ This will embed the piwik tracking code.
} }
``` ```
You can Also give a specific Piwik ID as well.
```json
{
"piwik_analytics_id": "43"
}
```
###Ignore: ###Ignore:
Set custom files and entire folders to ignore within your `/docs` folder. For files make sure to include the file extension in the name. For both files and folders, names are case-sensitive. Set custom files and entire folders to ignore within your `/docs` folder. For files make sure to include the file extension in the name. For both files and folders, names are case-sensitive.

View File

@ -347,7 +347,7 @@ if ($homepage && $homepage_url !== '/') {
(function() { (function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://<?php echo $options['piwik_analytics'];?>/"; var u=(("https:" == document.location.protocol) ? "https" : "http") + "://<?php echo $options['piwik_analytics'];?>/";
_paq.push(["setTrackerUrl", u+"piwik.php"]); _paq.push(["setTrackerUrl", u+"piwik.php"]);
_paq.push(["setSiteId", "1"]); _paq.push(["setSiteId", <?php echo $options['piwik_analytics_id'];?>]);
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript"; 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); g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
})(); })();

View File

@ -44,6 +44,7 @@ function get_options() {
'clean_urls' => true, 'clean_urls' => true,
'google_analytics' => false, 'google_analytics' => false,
'piwik_analytics' => false, 'piwik_analytics' => false,
'piwik_analytics_id' => 1,
'ignore' => array(), 'ignore' => array(),
'languages' => array() 'languages' => array()
); );