New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

govuk_frontend_toolkit

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

govuk_frontend_toolkit - npm Package Compare versions

Comparing version 4.13.0 to 4.14.0

6

CHANGELOG.md

@@ -0,1 +1,7 @@

# 4.14.0
- Allow use of multiple GA customDimensionIndex. See [this section](https://github.com/alphagov/govuk_frontend_toolkit/blob/master/docs/javascript.md#using-google-custom-dimensions-with-your-own-statistical-model) of the documentation for more information.
- Configurable duration (in days) for AB Test cookie. See [this section](https://github.com/alphagov/govuk_frontend_toolkit/blob/master/docs/javascript.md#multivariate-test-framework) of the documentation for more information.
- Allow base scripts to run within a module loader. See [this PR](https://github.com/alphagov/govuk_frontend_toolkit/pull/290) for more information.
# 4.13.0

@@ -2,0 +8,0 @@

1

javascripts/govuk/analytics/download-link-tracker.js
(function(global) {
"use strict";
var $ = global.jQuery;
var GOVUK = global.GOVUK || {};

@@ -5,0 +6,0 @@

(function(global) {
"use strict";
var $ = global.jQuery;
var GOVUK = global.GOVUK || {};

@@ -5,0 +6,0 @@

(function(global) {
"use strict";
var $ = global.jQuery;
var GOVUK = global.GOVUK || {};

@@ -5,0 +6,0 @@

22

javascripts/govuk/multivariate-test.js

@@ -21,2 +21,3 @@ (function(global) {

this._loadOption(options, 'contentExperimentId', null);
this._loadOption(options, 'cookieDuration', 30);

@@ -73,3 +74,3 @@ if (this.runImmediately) {

cohort = this.chooseRandomCohort();
GOVUK.cookie(this.cookieName(), cohort, {days: 30});
GOVUK.cookie(this.cookieName(), cohort, {days: this.cookieDuration});
}

@@ -80,10 +81,19 @@ return cohort;

MultivariateTest.prototype.setCustomVar = function(cohort) {
if (this.customDimensionIndex) {
GOVUK.analytics.setDimension(
this.customDimensionIndex,
this.cookieName() + "__" + cohort
);
if (this.customDimensionIndex &&
this.customDimensionIndex.constructor === Array) {
for (var index = 0; index < this.customDimensionIndex.length; index++) {
this.setDimension(cohort, this.customDimensionIndex[index])
}
} else if (this.customDimensionIndex) {
this.setDimension(cohort, this.customDimensionIndex)
}
};
MultivariateTest.prototype.setDimension = function(cohort, dimension) {
GOVUK.analytics.setDimension(
dimension,
this.cookieName() + "__" + cohort
);
};
MultivariateTest.prototype.setUpContentExperiment = function(cohort) {

@@ -90,0 +100,0 @@ var contentExperimentId = this.contentExperimentId;

{
"name": "govuk_frontend_toolkit",
"version": "4.13.0",
"version": "4.14.0",
"description": "npm package for using the GOV.UK frontend toolkit",

@@ -5,0 +5,0 @@ "repository": {

@@ -1,1 +0,1 @@

4.13.0
4.14.0
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc