ember-cli-google-analytics
ember-cli-google-analytics copied to clipboard
Add configuration object to ga('send')?
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.
Same feature as in #7, right?
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')
});
+1
Wondering the same, we use custom dimensions it'd be great to push them along with the pageviews.