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

Best way to prevent data being sent for specific users or situation ? #158

Open
ervinebalo opened this issue May 13, 2016 · 1 comment
Open
Labels

Comments

@ervinebalo
Copy link

I am building a web app and I am the dev and the admin of the site.

During dev, I don't my browsing data to be sent to GA. Unless, of course, I am testing new tracking implementation.

Then in the production site, while administering the site, what's the best way for me to not send my growing data? I know in GA I can filter IP addresses but that won't work for me because I have users under the same network that I would like their browsing data tracked.

Thanks!

@Toxantron
Copy link
Contributor

Is your web app build as an SPA? The module comes with an opt-out feature and offline mode and my suggestion would be to use server side scripting to set some configuration variables. Either by adding GET variables to the page you bookmark as admin or by simply having an additional index page.

In index.html

<script>
  var optOut = true;
</script>

<!-- or with PHP -->
<script>
  var optOut = <?php echo isset($_GET['disable']) ? "true" : "false" ?>;
</script> 

In your app.js:

AnalyticsProvider.startOffline(optOut);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants