File tree Expand file tree Collapse file tree 3 files changed +6
-19
lines changed
_includes/framework/global/seo Expand file tree Collapse file tree 3 files changed +6
-19
lines changed Original file line number Diff line number Diff line change 1+ ruby-2.7.2
Original file line number Diff line number Diff line change @@ -69,8 +69,7 @@ title: "Coding with Calvin"
6969
7070category_dir : ' category'
7171
72- analytics :
73- google_analytics_id : " G-KSJFBF9RTY"
72+ google_analytics_id : " G-KSJFBF9RTY"
7473
7574disqus :
7675 shortname : " calvinallen" # Your disqus shortcode. leave this blank to disable comments globally
Original file line number Diff line number Diff line change 11{% if jekyll.environment == "production" %}
2- {% assign gid = site.env.NETLIFY_GOOGLE_ANALYTICS_ID %}
3- {% if gid %}
4- < script async src ="https://www.googletagmanager.com/gtag/js?id={{ gid }} "> </ script >
2+ {% if site.google_analytics_id %}
3+ < script async src ="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics_id }} "> </ script >
54 < script >
65 window . dataLayer = window . dataLayer || [ ] ;
76 function gtag ( ) {
87 dataLayer . push ( arguments ) ;
98 }
109 gtag ( 'js' , new Date ( ) ) ;
11- gtag ( 'config' , '{{ $gid }}' ) ;
10+ gtag ( 'config' , '{{ site.google_analytics_id }}' ) ;
1211 </ script >
13- {% else %}
14- {% if site.google_analytics_id %}
15- < script async src ="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics_id }} "> </ script >
16- < script >
17- window . dataLayer = window . dataLayer || [ ] ;
18- function gtag ( ) {
19- dataLayer . push ( arguments ) ;
20- }
21- gtag ( 'js' , new Date ( ) ) ;
22- gtag ( 'config' , '{{ site.google_analytics_id }}' ) ;
23- </ script >
24- {% endif %}
2512 {% endif %}
26- {% endif %}
13+ {% endif %}
You can’t perform that action at this time.
0 commit comments