Skip to content

Commit

Permalink
add google_analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
tshepang authored and peng1999 committed Nov 17, 2022
1 parent cf76a75 commit c823085
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
{% if config.extra.even_google_analytics is defined %}
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ config.extra.even_google_analytics }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', '{{ config.extra.even_google_analytics }}');
</script>
{% endif %}
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">

Expand Down

0 comments on commit c823085

Please sign in to comment.