Skip to content

Commit

Permalink
Add Analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
JStruk committed Sep 26, 2023
1 parent 04a0a91 commit 20ddcc3
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Env
.env
.env.example

# Logs
logs
*.log
Expand Down
15 changes: 15 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"dependencies": {
"lorem-ipsum": "^2.0.8",
"vue": "^3.2.38",
"vue-gtag": "^2.0.1",
"vue-json-pretty": "^2.2.3",
"vue-router": "^4.1.5"
},
Expand Down
10 changes: 9 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@ import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import './assets/style.css'
import VueGtag from 'vue-gtag'

const app = createApp(App)

app.use(router)

app.use(VueGtag,
{
appName: 'UtilsNinja',
pageTrackerScreenviewEnabled: true,
config: { id: import.meta.env.VITE_GOOGLE_ANALYTICS_MEASUREMENT_ID }
},
router
)
app.mount('#app')

0 comments on commit 20ddcc3

Please sign in to comment.