OSC / nginx_stage

[MOVED] Stages & controls the per-user NGINX environment
https://github.com/OSC/ondemand/tree/master/nginx_stage
MIT License
0 stars 1 forks source link

Move GA tracking code to external source #3

Closed nickjer closed 8 years ago

nickjer commented 8 years ago

Updating the GA tracking JS code is untenable if nginx_stage is hosted at multiple sites. Hosting it from a CDN may be ideal as it can be maintained and updated without intervention from other sites.

This raises a couple of issues. Some of the variables captured by GA are produced server side...

_gaOodMetrics('set', 'userId', '$http_x_forwarded_user');
_gaOodMetrics('set', 'dimension1', '#{app_token}');
_gaOodMetrics('set', 'dimension2', '$http_x_forwarded_user');
_gaOodMetrics('set', 'dimension3', '$http_x_forwarded_proto://$http_x_forwarded_host');

If we do something like this...

<script src="https://osc.github.io/Open-OnDemand/assets/ood-portal-tracker.js"></script>

those variables will need to be passed to the script somehow.

nickjer commented 8 years ago

Decided this isn't necessary for now.