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

Allow configuration of name of Mixpanel page viewed event #122

Open
wireframe opened this issue Feb 2, 2017 · 1 comment
Open

Allow configuration of name of Mixpanel page viewed event #122

wireframe opened this issue Feb 2, 2017 · 1 comment

Comments

@wireframe
Copy link

Instead of hardcoding the event name page viewed, allow this to be configurable via the ember-metrics configuration object.

example implementation:

  trackPage(options = {}) {
    const config = get(this, 'config');
    let { trackPageEventName } = config;
    trackPageEventName = trackPageEventName || 'page viewed';
    const event = { event: trackPageEventName };
    const mergedOptions = assign(event, options);

    this.trackEvent(mergedOptions);
  },
@poteto
Copy link
Collaborator

poteto commented Feb 21, 2017

Thanks! Would you like to open a PR for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants