File tree Expand file tree Collapse file tree 5 files changed +24
-7
lines changed
Expand file tree Collapse file tree 5 files changed +24
-7
lines changed Original file line number Diff line number Diff line change 6060 "jest-serializer-vue" : " ^2.0.2" ,
6161 "lint-staged" : " 10.3.0" ,
6262 "nuxt" : " ^2.12.2" ,
63- "plausible-tracker" : " ^0.2.2 " ,
63+ "plausible-tracker" : " ^0.3.1 " ,
6464 "prettier" : " ^2.0.5" ,
6565 "prismjs" : " ^1.20.0" ,
6666 "rollup" : " ^2.11.2" ,
Original file line number Diff line number Diff line change 44 :data-ea-type =" type"
55 data-ea-publisher =" maronato-github-iovue-toastification"
66 data-ea-keywords =" vue|frontend|design|javascript|typescript"
7+ @click =" track()"
78 />
89</template >
910
1011<script >
12+ import { trackEvent } from " ../plausible" ;
1113export default {
1214 props: {
1315 adId: {
@@ -19,5 +21,15 @@ export default {
1921 default: " text" ,
2022 },
2123 },
24+ methods: {
25+ track () {
26+ trackEvent (" Ad click" , {
27+ props: {
28+ placement: this .adId ,
29+ type: this .type ,
30+ },
31+ });
32+ },
33+ },
2234};
2335 </script >
Original file line number Diff line number Diff line change 11import Vue from "vue" ;
2- import { enableAutoPageviews } from "./plausible" ;
2+ import { enableAutoPageviews , enableAutoOutboundTracking } from "./plausible" ;
33import vuetify from "./vuetify" ;
44import App from "./App.vue" ;
55import Toast from "../src/index" ;
@@ -9,6 +9,7 @@ Vue.config.productionTip = false;
99Vue . use ( Toast ) ;
1010
1111enableAutoPageviews ( ) ;
12+ enableAutoOutboundTracking ( ) ;
1213
1314new Vue ( {
1415 vuetify,
Original file line number Diff line number Diff line change 11import Plausible from "plausible-tracker" ;
22
3- export const { enableAutoPageviews, trackEvent } = Plausible ( {
3+ export const {
4+ enableAutoPageviews,
5+ trackEvent,
6+ enableAutoOutboundTracking,
7+ } = Plausible ( {
48 domain : "maronato.github.io/vue-toastification" ,
59 apiHost : "https://plausible.maronato.dev" ,
610} ) ;
Original file line number Diff line number Diff line change @@ -9851,10 +9851,10 @@ pkg-up@^3.1.0:
98519851 dependencies:
98529852 find-up "^3.0.0"
98539853
9854- plausible-tracker@^0.2.2 :
9855- version "0.2.2 "
9856- resolved "https://registry.yarnpkg.com/plausible-tracker/-/plausible-tracker-0.2.2 .tgz#bdbbad038816bac5b14b5b2216a48c5ddec59598 "
9857- integrity sha512-DxTszs9U2GAGg799TXL/w4uRRSoxcBt9v08zQgQVrs1SYlR0c+fPFXKuN1lv6RPTSIiQ7/UbXteR4GWz/bcLRA ==
9854+ plausible-tracker@^0.3.1 :
9855+ version "0.3.1 "
9856+ resolved "https://registry.yarnpkg.com/plausible-tracker/-/plausible-tracker-0.3.1 .tgz#dd4e1f59cafc7bf1b00e30890567287b3f204efd "
9857+ integrity sha512-oXnVyfTF2gzkfK3iOZCRZEnf8sH4gBASaJhY+clwWW1orIybfQpfbgg4U5Bwj5dW/4iNstM4tx4jMCVUfMCUbg ==
98589858
98599859please-upgrade-node@^3.2.0:
98609860 version "3.2.0"
You can’t perform that action at this time.
0 commit comments