title: How do I set environment variable in Meteor's provided server?
body: <p>I'd like to test meteor google analytics package on a remote server.</p>
  
  <p><strong>settings.json</strong></p>
  
  <pre><code>{
    "public" : {
      "ga": {
        "account":"UA-dfgddhdh-5"
      }
    }
  }
  </code></pre>
  
  <p>In a local server, I just pass in <code>--settings</code> option. I looked at <a href="http://meteorpedia.com/read/Environment_Variables" rel="nofollow">http://meteorpedia.com/read/Environment_Variables</a> and <a href="http://docs.meteor.com/#/full/meteor_settings" rel="nofollow">http://docs.meteor.com/#/full/meteor_settings</a> but it's still unclear what I should do to set this environment variable inside <code>meteor deploy</code>. Thank you for your help!</p>
  
  <p>EDIT:</p>
  
  <pre><code>if (Meteor.isServer) {
    Meteor.startup(function () {
      var settings = JSON.parse(
        '{"public" : {"ga": {"account":"UA-5555555-5"}}}'
      );
      process.env.METEOR_SETTINGS = settings;
    });
  }
  </code></pre>
  
  <p>Is this the right approach? Also, <a href="https://github.com/datariot/meteor-ganalytics" rel="nofollow">https://github.com/datariot/meteor-ganalytics</a> package requires this setting before the package itself is loaded. How do I ensure it?</p>