ember-cli-google-analytics
ember-cli-google-analytics copied to clipboard
More configuration options when initializing ga
I needed to add more configuration statements in my Analytics initialization, so here is my implementation
ENV.googleAnalytics = {
webPropertyId: process.env.GOOGLE_ANALYTICS_ID,
extraCreateParams: {"allowLinker": true},
extraRequires: ["linker"],
extraStatements: [{
action: "linker:autoLink",
args: ["arg1", {arg2: val2}]
}]
};
Will result in
ga('create', 'token', 'auto', {"allowLinker":true});
ga('require', 'linker');
ga('linker:autoLink', 'arg1', {arg2: val2});
Everything is compatible with the existing code
👍
Would love to use this lib but need the linker statement. +1
Hi, How do I set domain name for GA.Kindly can one help me . _gaq.push(['_setDomainName', 'example.com']);
Thanks, Rekha