Skip to content

Commit

Permalink
Adds support for Vercel page insights (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
zetxek authored Nov 2, 2024
1 parent cb3673c commit e2d3390
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions exampleSite/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ theme = "adritian-free-hugo-theme"

homepageExperienceCount = 6

# controls vercel page insights - disabled by default
vercelPageInsights = false

[params.google_analytics]
code = "UA-XXXXX-Y"
enabled = false
Expand Down
8 changes: 8 additions & 0 deletions layouts/partials/base-foot.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,12 @@
<script defer src='{{ "js/library/smooth-scroll.polyfills.min.js" | absURL }}'></script>
<script defer src='{{ "js/sticky-header.js" | absURL }}'></script>
<script defer src='{{ "js/smooth-scroll-init.js" | absURL }}'></script>
<!-- vercel insights -->
{{ $vercelPageInsights := .Site.Params.vercelPageInsights }}
{{ if $vercelPageInsights }}
<script defer src='{{ "js/library/bootstrap.min.js" | absURL }}'></script>
<script>
window.si = window.si || function () { (window.siq = window.siq || []).push(arguments); };
</script>
<script defer src="/_vercel/speed-insights/script.js"></script>
{{ end }}

0 comments on commit e2d3390

Please sign in to comment.