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

Add configuration object to ga('send')? #11

Open
janwerkhoven opened this issue Sep 21, 2015 · 3 comments
Open

Add configuration object to ga('send')? #11

janwerkhoven opened this issue Sep 21, 2015 · 3 comments

Comments

@janwerkhoven
Copy link

Is this possible to add a configuration object to the GA tracker??

We track multiple apps and need tofilter the data per app like below:

ga('send', 'screenview', {
  'appName': 'myAppName',
  'appId': 'myAppId',
  'appVersion': '1.0',
  'appInstallerId': 'myInstallerId',
  'screenName': 'my overridden screen name'
});

More details https://developers.google.com/analytics/devguides/collection/analyticsjs/screens

Is this possible?

PS: love your package, integrates nicely.

@givanse
Copy link
Contributor

givanse commented Sep 21, 2015

Same feature as in #7, right?

@janwerkhoven
Copy link
Author

In your README.md you use the following example:

import Ember from 'ember';
import config from './config/environment';
import googlePageview from './mixins/google-pageview';

var Router = Ember.Router.extend(googlePageview, {
  location: config.locationType
});

Router.map(function() {
  ...
});

export default Router;

Can I safely overwrite pageview to screenview and add my custom variables like below??

var Router = Ember.Router.extend(googlePageview, {
  location: config.locationType,
  notifyGoogleAnalytics: function() {
    return ga('send', 'screenview', {
      'appName': 'bookings',
      'appId': 'new',
      'appVersion': '1.0',
      'screenName': this.get('url')
    });
  }.on('didTransition')
});

@hergaiety
Copy link

+1

Wondering the same, we use custom dimensions it'd be great to push them along with the pageviews.

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

3 participants