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 analytics to be sent when running on localhost #1

Closed
chrisgame opened this issue Nov 6, 2014 · 1 comment · Fixed by #2
Closed

Allow analytics to be sent when running on localhost #1

chrisgame opened this issue Nov 6, 2014 · 1 comment · Fixed by #2

Comments

@chrisgame
Copy link

When running in development or test modes it would be cool if the ga object was created with cookie domain set to none

ga('create', 'UA-XXXX-Y', { 'cookieDomain': 'none' });

This would allow testing when running on localhost

@pgrippi
Copy link
Owner

pgrippi commented Nov 6, 2014

I released version 1.1.0, you can now set this in your environment.js file:

ENV.googleAnalytics = {
  webPropertyId: 'UA-XXXX-Y'
};

if (environment === 'development') {
  ENV.googleAnalytics.cookieDomain = 'none';
}

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

Successfully merging a pull request may close this issue.

2 participants