mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-08-14 02:42:05 +08:00
docs: add sample rate to reduce analytics data points
This commit is contained in:
@ -3,7 +3,17 @@ import { createApp } from "vue";
|
||||
import { createPinia } from "pinia";
|
||||
import Demo from "./Demo.vue";
|
||||
|
||||
inject();
|
||||
const SAMPLE_RATE = 0.5;
|
||||
|
||||
inject({
|
||||
beforeSend: event => {
|
||||
if (Math.random() > SAMPLE_RATE) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return event;
|
||||
}
|
||||
});
|
||||
|
||||
const pinia = createPinia();
|
||||
const app = createApp(Demo);
|
||||
|
Reference in New Issue
Block a user