-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🎨 Create a plugin matomo for vue
- Loading branch information
1 parent
e1b417a
commit d773642
Showing
7 changed files
with
286 additions
and
48 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
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
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
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,18 +1,36 @@ | ||
import { VIcon } from "@gouvminint/vue-dsfr"; | ||
import { createPinia } from "pinia"; | ||
import { createApp } from "vue"; | ||
import App from "./App.vue"; | ||
|
||
import { createPinia } from "pinia"; | ||
import router from "./router/index"; | ||
import "@gouvfr/dsfr/dist/core/core.main.min.css"; | ||
import { VIcon } from "@gouvminint/vue-dsfr"; | ||
|
||
// Importation des styles DSFR et personnalisés | ||
import "@gouvfr/dsfr/dist/core/core.main.min.css"; | ||
import "@gouvfr/dsfr/dist/component/component.main.min.css"; | ||
import "@gouvfr/dsfr/dist/utility/utility.main.min.css"; | ||
|
||
import "@gouvminint/vue-dsfr/styles"; | ||
import "@gouvfr/dsfr/dist/scheme/scheme.min.css"; | ||
|
||
import "@gouvfr/dsfr/dist/utility/icons/icons.min.css"; | ||
import "./main.css"; | ||
import MatomoPlugin from "./plugins/MatomoPlugin"; | ||
|
||
const app = createApp(App); | ||
|
||
app.use(MatomoPlugin, { | ||
host: import.meta.env.VITE_MATOMO_URL, | ||
siteId: Number(import.meta.env.VITE_MATOMO_SITE_ID), | ||
router, | ||
debug: import.meta.env.DEBUG === "true", | ||
enableHeartBeatTimer: true, | ||
}); | ||
|
||
app.use(createPinia()); | ||
app.use(router); | ||
app.component("VIcon", VIcon); | ||
|
||
app.mount("#app"); | ||
|
||
createApp(App).use(createPinia()).component("VICon", VIcon).use(router).mount("#app"); | ||
router.afterEach((to) => { | ||
console.log("trackPageView", to.fullPath); | ||
app.config.globalProperties.$matomo?.trackPageView(to.fullPath); | ||
}); |
Oops, something went wrong.