Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Example for Vue.js Instrumentation #89

Closed
dustinlarimer opened this Issue Oct 2, 2017 · 6 comments

Comments

Projects
None yet
3 participants
@dustinlarimer
Copy link
Contributor

dustinlarimer commented Oct 2, 2017

@tbarn tbarn added the hacktoberfest label Oct 2, 2017

@tesarwijaya

This comment has been minimized.

Copy link
Contributor

tesarwijaya commented Oct 6, 2017

hello @dustinlarimer i might help with this issue, but still confusing with the approach. in this issue you reference using vue plugin but then i see in react example using flux, because i think vue equivalent of flux is vuex. if you want an implementation using vuex, i can help you.

@dustinlarimer

This comment has been minimized.

Copy link
Contributor Author

dustinlarimer commented Oct 9, 2017

@tesarwijaya thanks for the offer – Vuex looks super cool.. perhaps it might look something like this?

const Keen = require('keen-tracking');
const client = new Keen({
  /* Configure */
});
client.extendEvents(() => {
  /* Baseline Data Model */
});

const keenPlugin = store => {
  // called when the store is initialized
  store.subscribe((mutation, state) => {
    client.deferEvent('app-actions', {
      'mutation': mutation,
      'state': state
    });
  });
};

Is there a better approach to this? Vue.js is rather new to me, so if you have any suggestions I'd love to hear them! Perhaps there are multiple instrumentation strategies to cover in addition to Vuex?

@tesarwijaya

This comment has been minimized.

Copy link
Contributor

tesarwijaya commented Oct 11, 2017

that's exactly what i want to try. and i think that is ideal to approach.

@dustinlarimer

This comment has been minimized.

Copy link
Contributor Author

dustinlarimer commented Oct 11, 2017

Great! If you would like to tackle it, then go right ahead 🚀

@tesarwijaya

This comment has been minimized.

Copy link
Contributor

tesarwijaya commented Oct 12, 2017

gonna make PR asap 👍

@dustinlarimer

This comment has been minimized.

Copy link
Contributor Author

dustinlarimer commented Oct 13, 2017

@tesarwijaya thanks for your help on this! Please shoot an email to dustin@keen.io 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.