Skip to content

Commit

Permalink
Merge pull request #1053 from alphagov/hub-167-fix-for-broken-reference
Browse files Browse the repository at this point in the history
HUB-167: Fix for a broken reference to the track function
  • Loading branch information
rachelthecodesmith authored Aug 15, 2018
2 parents a6c799d + 65a21cc commit 169e8c0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/assets/javascripts/modules/track-radio-group.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,18 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
dataType: 'jsonp',
timeout: 3000
}).then(function(data){
GOVUK.Modules.TrackRadioGroup.trackVerifyUser(element, data);
reportVerifyUser(element, data);
}, function(e){console.log("error", e)})
}

this.trackVerifyUser = function (element, data) {
if (data != null && data.value === true) {
GOVUK.analytics.trackEvent('verify-hint', 'shown', { transport: 'beacon'});
track(element, data.value);
reportVerifyUser(element, data);
}

function reportVerifyUser(element, data) {
if (data != null && data.value === true) {
GOVUK.analytics.trackEvent('verify-hint', 'shown', { transport: 'beacon'});
track(element, data.value);
}
}
}
Expand Down

0 comments on commit 169e8c0

Please sign in to comment.