add analytics
This commit is contained in:
		
							
								
								
									
										12
									
								
								layouts/partials/analytics/google.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								layouts/partials/analytics/google.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| <script defer src="https://www.googletagmanager.com/gtag/js?id={{ site.Params.analytics.google.id }}"></script> | ||||
| <script> | ||||
|   document.addEventListener('DOMContentLoaded', () => { | ||||
|     window.dataLayer = window.dataLayer || []; | ||||
|     function gtag() { | ||||
|       dataLayer.push(arguments); | ||||
|     } | ||||
|  | ||||
|     gtag('js', new Date()); | ||||
|     gtag('config', '{{ site.Params.analytics.google.id }}'); | ||||
|   }); | ||||
| </script> | ||||
		Reference in New Issue
	
	Block a user
	 geekifan
					geekifan