forked from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize Website Load Time (alshedivat#435)
* Place js files after body tag * Add Analytics to the end of script * Minor nits and fixes Co-authored-by: Maruan Al-Shedivat <alshedivat.maruan@gmail.com>
- Loading branch information
1 parent
046894d
commit 74e4de3
Showing
4 changed files
with
30 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{% if site.enable_google_analytics %} | ||
<!-- Global site tag (gtag.js) - Google Analytics --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag() { dataLayer.push(arguments); } | ||
gtag('js', new Date()); | ||
|
||
gtag('config', '{{ site.google_analytics }}'); | ||
</script> | ||
{% endif %} | ||
|
||
|
||
{% if site.enable_panelbear_analytics %} | ||
<!-- Panelbear Analytics - We respect your privacy --> | ||
<script async src="https://cdn.panelbear.com/analytics.js?site={{site.panelbear_analytics}}"></script> | ||
<script> | ||
window.panelbear = window.panelbear || function() { (window.panelbear.q = window.panelbear.q || []).push(arguments); }; | ||
panelbear('config', { site: '{{site.panelbear_analytics}}' }); | ||
</script> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters