Skip to content

Commit

Permalink
Add busuanzi statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
halfrost committed Oct 19, 2020
1 parent e1274a4 commit 0f3fc01
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config/_default/params.toml
Expand Up @@ -75,7 +75,7 @@ privacy_pack = false

# Enable visitors to edit pages?
# `repo` defines the repository URL. `editable` defines which page types can be edited.
edit_page = {repo_url = "https://github.com/gcushen/hugo-academic", content_dir = "", repo_branch = "master", editable = {docs = true, page = false, post = false}}
edit_page = {repo_url = "https://github.com/halfrost/resume", content_dir = "", repo_branch = "master", editable = {docs = true, page = false, post = false}}

# Show related content at the bottom of pages?
show_related = {docs = true, page = false, post = true, project = true, publication = true, talk = true}
Expand Down Expand Up @@ -269,8 +269,8 @@ plugins_js = []
## Marketing
############################
[marketing]
google_analytics = "UA-82753806-6"
google_tag_manager = "UA-82753806-6"
google_analytics = ""
google_tag_manager = ""

############################
## Content Management System
Expand Down
14 changes: 14 additions & 0 deletions layouts/partials/custom_head.html
@@ -0,0 +1,14 @@
{{/* Do not directly modify this file! */}}
{{/* Instead, create a `layouts/partials/custom_head.html` file in your site and add your code to it. */}}

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-82753806-6"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-82753806-6');
</script>

{{/* This partial is included in `themes/academic/layouts/partials/site_head.html`. */}}
4 changes: 4 additions & 0 deletions layouts/partials/custom_js.html
@@ -0,0 +1,4 @@
{{/* Do not directly modify this file! */}}
{{/* Instead, create a `layouts/partials/custom_js.html` file in your site and add your code to it. */}}
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
{{/* This partial is included in `themes/academic/layouts/partials/site_js.html`. */}}
3 changes: 3 additions & 0 deletions layouts/partials/site_footer.html
Expand Up @@ -25,6 +25,9 @@
</span>
</p>

<p class="copyright statistics" style="font-size: 0.9rem;">
<span id="busuanzi_container_site_pv">Cumulative Page Views <span id="busuanzi_value_site_pv"></span>&nbsp; | Unique Visitors <span id="busuanzi_value_site_uv"></span></span>
</p>
{{/* Display copyright license. */}}
{{ partial "site_footer_license" . }}
</footer>

0 comments on commit 0f3fc01

Please sign in to comment.