From 2ad00cded4b50d9b10b8688e8bd03ef7661f3f4b Mon Sep 17 00:00:00 2001 From: Tijmen Brommet Date: Thu, 11 Oct 2018 16:43:08 +0100 Subject: [PATCH] Send the current user's organisation to GA This is currently done in Signon, and I'm assuming that this is fine to happen in all admin applications. --- CHANGELOG.md | 1 + .../components/_admin_analytics.html.erb | 7 +++++++ .../components/docs/admin_analytics.yml | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f09749cac..ba23589be8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ## Unreleased +* Add option to send the `user_organisation` in admin analytics component (PR #577) * Add a bottom margin to the error-alert component (PR #578) * Update the way we include Javascript and Stylesheets in the admin layout component. Make sure to follow the [installation instructions](docs/install-and-use.md) (PR #571) if your using the admin layout component. diff --git a/app/views/govuk_publishing_components/components/_admin_analytics.html.erb b/app/views/govuk_publishing_components/components/_admin_analytics.html.erb index 69bdbdcd85..6b0f720ef9 100644 --- a/app/views/govuk_publishing_components/components/_admin_analytics.html.erb +++ b/app/views/govuk_publishing_components/components/_admin_analytics.html.erb @@ -1,3 +1,5 @@ +<% user_organisation ||= nil %> + diff --git a/app/views/govuk_publishing_components/components/docs/admin_analytics.yml b/app/views/govuk_publishing_components/components/docs/admin_analytics.yml index 4d609404c3..55f83b1f7c 100644 --- a/app/views/govuk_publishing_components/components/docs/admin_analytics.yml +++ b/app/views/govuk_publishing_components/components/docs/admin_analytics.yml @@ -6,4 +6,5 @@ accessibility_criteria: | display_html: true examples: default: - data: {} + data: + user_organisation: "HMRC"