feat: added google analytics
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
This commit is contained in:
		
							parent
							
								
									596753ce42
								
							
						
					
					
						commit
						a110a6b212
					
				
							
								
								
									
										5
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										5
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -12117,6 +12117,11 @@ | |||||||
|       "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.11.tgz", |       "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.11.tgz", | ||||||
|       "integrity": "sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ==" |       "integrity": "sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ==" | ||||||
|     }, |     }, | ||||||
|  |     "vue-analytics": { | ||||||
|  |       "version": "5.22.1", | ||||||
|  |       "resolved": "https://registry.npmjs.org/vue-analytics/-/vue-analytics-5.22.1.tgz", | ||||||
|  |       "integrity": "sha512-HPKQMN7gfcUqS5SxoO0VxqLRRSPkG1H1FqglsHccz6BatBatNtm/Vyy8brApktZxNCfnAkrSVDpxg3/FNDeOgQ==" | ||||||
|  |     }, | ||||||
|     "vue-cli-plugin-vuetify": { |     "vue-cli-plugin-vuetify": { | ||||||
|       "version": "2.0.5", |       "version": "2.0.5", | ||||||
|       "resolved": "https://registry.npmjs.org/vue-cli-plugin-vuetify/-/vue-cli-plugin-vuetify-2.0.5.tgz", |       "resolved": "https://registry.npmjs.org/vue-cli-plugin-vuetify/-/vue-cli-plugin-vuetify-2.0.5.tgz", | ||||||
|  | |||||||
| @ -16,6 +16,7 @@ | |||||||
|     "register-service-worker": "^1.7.1", |     "register-service-worker": "^1.7.1", | ||||||
|     "roboto-fontface": "*", |     "roboto-fontface": "*", | ||||||
|     "vue": "^2.6.11", |     "vue": "^2.6.11", | ||||||
|  |     "vue-analytics": "^5.22.1", | ||||||
|     "vue-cryptojs": "^2.1.4", |     "vue-cryptojs": "^2.1.4", | ||||||
|     "vue-headful": "^2.1.0", |     "vue-headful": "^2.1.0", | ||||||
|     "vue-router": "^3.1.6", |     "vue-router": "^3.1.6", | ||||||
|  | |||||||
| @ -8,6 +8,7 @@ import '@fortawesome/fontawesome-free/css/all.css' | |||||||
| import './plugins/crypto-js' | import './plugins/crypto-js' | ||||||
| import './plugins/toast-snackbar' | import './plugins/toast-snackbar' | ||||||
| import './plugins/vue-headful' | import './plugins/vue-headful' | ||||||
|  | import './plugins/vue-analytics' | ||||||
| 
 | 
 | ||||||
| Vue.config.productionTip = false | Vue.config.productionTip = false | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										8
									
								
								src/plugins/vue-analytics.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								src/plugins/vue-analytics.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,8 @@ | |||||||
|  | import Vue from 'vue' | ||||||
|  | import VueAnalytics from 'vue-analytics' | ||||||
|  | 
 | ||||||
|  | if(process.env.VUE_APP_GANALYTICS){ | ||||||
|  |     Vue.use(VueAnalytics, { | ||||||
|  |         id: process.env.VUE_APP_GANALYTICS | ||||||
|  |     }) | ||||||
|  | } | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user