forked from acouzens/open5gs
Changes new GA4 in Google Analytics
This commit is contained in:
parent
ce7d631064
commit
8b10dc1edc
|
@ -22,7 +22,7 @@ baseurl: "/open5gs" # the subpath of your site, e.g. /blog
|
||||||
url: "https://open5gs.org" # the base hostname & protocol for your site, e.g. http://example.com
|
url: "https://open5gs.org" # the base hostname & protocol for your site, e.g. http://example.com
|
||||||
author: "Sukchan Lee"
|
author: "Sukchan Lee"
|
||||||
github_username: open5gs
|
github_username: open5gs
|
||||||
google_analytics: UA-139225646-2
|
google_analytics: G-12MQZTB3JH
|
||||||
|
|
||||||
# Build settings
|
# Build settings
|
||||||
markdown: kramdown
|
markdown: kramdown
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
<script>
|
{% if jekyll.environment == "production" %}
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
|
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
<script>
|
||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
window.dataLayer = window.dataLayer || [];
|
||||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
|
||||||
|
|
||||||
ga('create', '{{ site.google_analytics }}', 'auto');
|
function gtag() {
|
||||||
ga('send', 'pageview');
|
dataLayer.push(arguments);
|
||||||
|
}
|
||||||
</script>
|
gtag('js', new Date());
|
||||||
|
gtag('config', '{{ site.google_analytics }}');
|
||||||
|
</script>
|
||||||
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue