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

Suggestion for only loading in production env? #17

Open
jgentes opened this issue Dec 4, 2014 · 2 comments
Open

Suggestion for only loading in production env? #17

jgentes opened this issue Dec 4, 2014 · 2 comments

Comments

@jgentes
Copy link

jgentes commented Dec 4, 2014

I'm getting a lot of data from my development activity. Is there a quick way to exclude it unless in production?

Bower has a nice 'devDependencies' option but I'm not sure about the reverse.

@baffleinc
Copy link

I'm using PHP, so in my code I do the following:

`` //where $production_hosts is an array of hosts I want it to run on`

then,

<?php if($is_production) : ?>

    <script type="text/javascript">
      // segment.io code
      analytics.load("xxxxxxxx");
      analytics.page()
      }}();
    </script>

<?php endif; ?>

@jgentes
Copy link
Author

jgentes commented Dec 23, 2014

Thanks for that, I appreciate the tip.

On Sun, Dec 14, 2014 at 4:01 PM, baffleinc [email protected] wrote:

I'm using PHP, so in my code I do the following:

` //where
$production_hosts is an array of hosts I want it to run on

then,


<script type="text/javascript"> // segment.io code analytics.load("xxxxxxxx"); analytics.page() }}(); </script>

<?php endif; ?>```

—
Reply to this email directly or view it on GitHub
https://github.com/arnaudbreton/angular-segmentio/issues/17#issuecomment-66936588
.

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

2 participants