Sha256: a1c26bc9c1ae93e6792f47e2d8ff9a10dc97ae83d55a0fede7fc98393aa5ac28
Contents?: true
Size: 723 Bytes
Versions: 13
Compression:
Stored size: 723 Bytes
Contents
(function(Modules) { "use strict"; Modules.AutoTrackEvent = function() { this.start = function(element) { var options = {nonInteraction: 1}, // automatic events shouldn't affect bounce rate category = element.data('track-category'), action = element.data('track-action'), label = element.data('track-label'), value = element.data('track-value'); if (typeof label === "string") { options.label = label; } if (value || value === 0) { options.value = value; } if (GOVUK.analytics && GOVUK.analytics.trackEvent) { GOVUK.analytics.trackEvent(category, action, options); } } }; })(window.GOVUK.Modules);
Version data entries
13 entries across 13 versions & 1 rubygems