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

Filling Google Analytic ID during grunt build #605

Closed
remicastaing opened this issue Sep 29, 2014 · 4 comments
Closed

Filling Google Analytic ID during grunt build #605

remicastaing opened this issue Sep 29, 2014 · 4 comments
Labels

Comments

@remicastaing
Copy link
Contributor

The Google Analytic in client/index.html script:

<script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-XXXXX-X');
      ga('send', 'pageview');
</script>

is the same for development, test, production, etc. purpose. Wouldn't it be better to not hard code the UA-XXXXX-X ID, to have a separate config file and to fill the ID during the grunt buildprocess (or grunt build).

@JaKXz
Copy link
Collaborator

JaKXz commented Sep 30, 2014

👍

@JaKXz JaKXz added the bug label Sep 30, 2014
@kingcody
Copy link
Member

I like it, what if we simply use ejs/jade?

@simonh1000
Copy link

This is equivalent to #562

@remicastaing
Copy link
Contributor Author

Yes, totally right.

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

Successfully merging a pull request may close this issue.

4 participants