var express = require('express');
var app = express();

var forceSsl = function (req, res, next) {
  if (req.headers['x-forwarded-proto'] !== 'https') {
    res.header("Strict-Transport-Security", "max-age=31536000");
    return res.redirect(['https://', req.get('Host'), req.url].join(''));
  }
  return next();
};

app.set('port', (process.env.PORT || 5000));

app.use(forceSsl);
app.get('/config.js', function(request, response) {

  var config = " \
    'use strict'; \
    angular.module('config', []) \
      .constant('config', { \
        'endpoint'    : '" + process.env.ALERTA_ENDPOINT + "', \
        'provider'    : '" + process.env.PROVIDER + "', \
        'client_id'   : '" + process.env.CLIENT_ID + "', \
        'gitlab_url'  : '" + process.env.GITLAB_URL + "' \
      });";

  response.send(config);
});
app.use(express.static(__dirname + '/app'));

app.listen(app.get('port'), function() {
  console.log("Node app is running at localhost:" + app.get('port'));
});


@@ -767,16 +767,77 @@
 AB_URL +
+ %22', %5C%0A        'tracking_id' : '%22 + process.env.TRACKING_ID +
  %22' %5C%0A  
@@ -1037,9 +1037,8 @@
 ));%0A%7D);%0A
-%0A

Make tracking ID a config option for Heroku deploys