Skip to content

Commit

Permalink
Merge pull request #1218 from alphagov/sengi/window-govuk
Browse files Browse the repository at this point in the history
Fix undefined window.GOVUK object.
  • Loading branch information
sengi authored Feb 15, 2024
2 parents 333aea5 + 6739312 commit 796dfdd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@
ga('send', eventParams)
}
}
};
};
<% else %>
var analyticsInit = function() { /* Analytics not configured. */ };
var analyticsInit = function() { /* Analytics not configured. */ };
<% end %>
window.GOVUK = window.GOVUK || {};
window.GOVUK.analyticsInit = analyticsInit;
</script>

Expand Down

0 comments on commit 796dfdd

Please sign in to comment.