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

getting Cannot read property 'alias' of undefined #74

Closed
introvert opened this issue Mar 22, 2016 · 1 comment
Closed

getting Cannot read property 'alias' of undefined #74

introvert opened this issue Mar 22, 2016 · 1 comment

Comments

@introvert
Copy link

Hello,

I'm having issues when calling the alias function (I'm using Mixpanel and GoogleTagManager adapter) from a unauthenticatedRouteMixin mixin that I use for my app routes. It looks like Ember.get(this, 'metrics') is undefined.

The error occurres when I do:

const metrics = Ember.get(this, 'metrics');
metrics.alias(distinct_id);

Here's my configuration:

    metricsAdapters: [
      {
        name: 'GoogleTagManager',
        environments: ['development', 'production'],
        config: {
          id: 'GTM-KKHS44'
        }
      },
      {
        name: 'Mixpanel',
        environments: ['development', 'production'],
        config: {
          token: 'bcb8f05d6f6fbac46a206227b4ec7'
        }
      }
    ],

The other methods - identify, trackEvent and trackPage seems to be working fine..

Why is that?

Thanks

@introvert
Copy link
Author

Nevermind, it was a problem with my code..

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

1 participant