generated from kingyue737/vitify-next
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from spothound/googleAnalytics
Add google analytics
- Loading branch information
Showing
4 changed files
with
39 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,32 @@ | ||
import { createApp, type Plugin } from 'vue' | ||
import App from './App.vue' | ||
import '@/assets/styles/index.css' | ||
import vue3GoogleLogin from 'vue3-google-login' | ||
const apiUrl = import.meta.env.VUE_APP_API_URL || 'https://api.thepawnsjourney.live'; | ||
import { createApp, type Plugin } from 'vue'; | ||
import App from './App.vue'; | ||
import '@/assets/styles/index.css'; | ||
import vue3GoogleLogin from 'vue3-google-login'; | ||
import { createGtm } from '@gtm-support/vue-gtm'; | ||
import router from './router'; // Import your router here | ||
|
||
const apiUrl = import.meta.env.VUE_APP_API_URL || 'https://api.thepawnsjourney.live'; | ||
|
||
const app = createApp(App) | ||
const app = createApp(App); | ||
|
||
Object.values( | ||
import.meta.glob<Plugin>('./plugins/*.ts', { | ||
eager: true, | ||
import: 'default', | ||
}), | ||
).forEach((v) => app.use(v)) | ||
).forEach((v) => app.use(v)); | ||
|
||
app.use(vue3GoogleLogin, { | ||
clientId: '368514305696-6nuvllac0utemf8ad4ch38j6h002ih3g.apps.googleusercontent.com' | ||
}) | ||
clientId: '368514305696-6nuvllac0utemf8ad4ch38j6h002ih3g.apps.googleusercontent.com', | ||
}); | ||
|
||
app.use(createGtm({ | ||
id: 'G-G-SE7XN0JDRV', | ||
vueRouter: router | ||
})); | ||
|
||
app.use(router); | ||
|
||
// make a dummy request to the API to bring it up if needed | ||
fetch(`${apiUrl}/`) | ||
fetch(`${apiUrl}/`); | ||
|
||
app.mount('#app') | ||
app.mount('#app'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters