Adding google analytics
This commit is contained in:
parent
3d0a669de6
commit
9cba493280
@ -141,6 +141,13 @@ Include custom links in the sidebar.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
###Google Analytics:
|
||||||
|
This will embed the google analytics tracking code.
|
||||||
|
|
||||||
|
{
|
||||||
|
"google_analytics": "UA-XXXXXXXXX-XX"
|
||||||
|
}
|
||||||
|
|
||||||
## Running Locally
|
## Running Locally
|
||||||
|
|
||||||
You can run the docs locally using <a href="http://gruntjs.com/" target="_blank">Grunt.js</a> I assume you are familiar with how to use Grunt and have the latest version of PHP 5.4 installed which is able to run a webserver.
|
You can run the docs locally using <a href="http://gruntjs.com/" target="_blank">Grunt.js</a> I assume you are familiar with how to use Grunt and have the latest version of PHP 5.4 installed which is able to run a webserver.
|
||||||
|
@ -141,6 +141,13 @@ Include custom links in the sidebar.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
###Google Analytics:
|
||||||
|
This will embed the google analytics tracking code.
|
||||||
|
|
||||||
|
{
|
||||||
|
"google_analytics": "UA-XXXXXXXXX-XX"
|
||||||
|
}
|
||||||
|
|
||||||
## Running Locally
|
## Running Locally
|
||||||
|
|
||||||
You can run the docs locally using <a href="http://gruntjs.com/" target="_blank">Grunt.js</a> I assume you are familiar with how to use Grunt and have the latest version of PHP 5.4 installed which is able to run a webserver.
|
You can run the docs locally using <a href="http://gruntjs.com/" target="_blank">Grunt.js</a> I assume you are familiar with how to use Grunt and have the latest version of PHP 5.4 installed which is able to run a webserver.
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
"theme": "navy",
|
"theme": "navy",
|
||||||
"repo": "justinwalsh/daux.io",
|
"repo": "justinwalsh/daux.io",
|
||||||
"twitter": ["justin_walsh", "todaymade"],
|
"twitter": ["justin_walsh", "todaymade"],
|
||||||
|
"google_analytics": "UA-12653604-10",
|
||||||
"links": {
|
"links": {
|
||||||
"Github Repo": "https://github.com/justinwalsh/daux.io",
|
"Github Repo": "https://github.com/justinwalsh/daux.io",
|
||||||
"Help/Support/Bugs": "https://github.com/justinwalsh/daux.io/issues",
|
"Help/Support/Bugs": "https://github.com/justinwalsh/daux.io/issues",
|
||||||
|
13
index.php
13
index.php
@ -266,5 +266,18 @@ if ($homepage && $homepage_url !== '/') {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
|
|
||||||
|
<? if ($options['google_analytics']) { ?>
|
||||||
|
<script>
|
||||||
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||||
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||||
|
|
||||||
|
ga('create', '<?=$options['google_analytics'];?>', '<?=$_SERVER['HTTP_HOST'];?>');
|
||||||
|
ga('send', 'pageview');
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<? } ?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -34,7 +34,8 @@ function get_options() {
|
|||||||
'repo' => false,
|
'repo' => false,
|
||||||
'twitter' => array(),
|
'twitter' => array(),
|
||||||
'links' => array(),
|
'links' => array(),
|
||||||
'colors' => false
|
'colors' => false,
|
||||||
|
'google_analytics' => false
|
||||||
);
|
);
|
||||||
|
|
||||||
// Load User Config
|
// Load User Config
|
||||||
|
Loading…
Reference in New Issue
Block a user