app/assets/javascripts/govuk/analytics/analytics.js in govuk_frontend_toolkit-4.14.1 vs app/assets/javascripts/govuk/analytics/analytics.js in govuk_frontend_toolkit-4.15.0
- old
+ new
@@ -7,10 +7,12 @@
// https://github.com/alphagov/govuk_frontend_toolkit/blob/master/docs/analytics.md#create-an-analytics-tracker
var Analytics = function(config) {
this.trackers = [];
if (typeof config.universalId != 'undefined') {
- this.trackers.push(new GOVUK.GoogleAnalyticsUniversalTracker(config.universalId, config.cookieDomain));
+ var universalId = config.universalId;
+ delete config.universalId;
+ this.trackers.push(new GOVUK.GoogleAnalyticsUniversalTracker(universalId, config));
}
};
Analytics.prototype.sendToTrackers = function(method, args) {
for (var i = 0, l = this.trackers.length; i < l; i++) {