DavidWells / DavidWells/analytics
Vue plugin
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 267
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I've made a Vue plugin for the analytics package.
- Plugin registration and the instance inheritance within Vue components is based on how Vuetify does it.
- This means all components inherit the same instance, but any component can have its instances overriden, and in that case all children will use the new instance instead.
- It also means that the plugin remembers if it was already installed for a particular Vue constructor.
- Plugin adds
$analyticsto Vue instance - Additions to Vue instance are covered by TypeScript
- Integrated with
vue-router- The plugin auto-tracks route changes if
routeris passed as an option toVue.use()
- The plugin auto-tracks route changes if
The usage is like so
import Vue from 'vue';
import VueAnalytics from './analytics-vue-plugin';
import router from './router';
// Install plugin
Vue.use(VueAnalytics, {
// Pass router to track route changes
router,
});
// Configure analytics
const analytics = new VueAnalytics({
mixpanelToken,
});
new Vue({
// Pass to Vue instance
analytics,
router,
vuetify,
render: (h: CreateElement): VNode => h(App),
}).$mount('#root');
I would like to contribute it to the project.
Does that fall within the scope of the project?
What would be the best course of action? Would it be fine to make a branch with it as suggested here https://github.com/DavidWells/analytics/blob/master/CONTRIBUTING.md?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review CONTRIBUTING.md and the proposed analytics-vue-plugin entry point described in the issue. First confirm whether a Vue integration is within the project's scope and how contributions should be structured; completion criteria are not defined because the issue only asks for maintainer guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100