diff --git a/CHANGELOG.md b/CHANGELOG.md index 87aa35c6bb..a29e3d25b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ## Unreleased +* Make deploying meta tags changes easier ([PR #4236](https://github.com/alphagov/govuk_publishing_components/pull/4236)) * Update metatags for GA4 ([PR #4222](https://github.com/alphagov/govuk_publishing_components/pull/4222)) * Set aria-label text in govuk_logo.html to "GOV.UK" ([PR #4217](https://github.com/alphagov/govuk_publishing_components/pull/4217)) * Fix cookie expiration date potentially relying on user's timezone ([PR #4219](https://github.com/alphagov/govuk_publishing_components/pull/4219)) diff --git a/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js b/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js index 69eb4958e4..04181f79e1 100644 --- a/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js +++ b/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js @@ -34,7 +34,7 @@ window.GOVUK.analyticsGa4.analyticsModules = window.GOVUK.analyticsGa4.analytics navigation_page_type: this.getMetaContent('navigation-page-type'), navigation_list_type: this.getMetaContent('navigation-list-type'), step_navs: this.getMetaContent('stepnavs'), - taxonomy_level1: this.getMetaContent('taxonomy_level1'), + taxonomy_level1: this.getMetaContent('taxonomy_level1') || this.getMetaContent('themes'), taxonomy_main: this.getMetaContent('taxon-slug'), taxonomy_main_id: this.getMetaContent('taxon-id'), taxonomy_all: this.getMetaContent('taxon-slugs'), @@ -49,8 +49,8 @@ window.GOVUK.analyticsGa4.analyticsModules = window.GOVUK.analyticsGa4.analytics publishing_government: this.removeHyphensAndDowncase(this.getMetaContent('publishing-government') || this.getMetaContent('ga4-publishing-government')), political_status: this.getMetaContent('political-status') || this.getMetaContent('ga4-political-status'), primary_publishing_organisation: this.getMetaContent('primary-publishing-organisation'), - organisations: this.getMetaContent('organisations'), - world_locations: this.getMetaContent('world-locations'), + organisations: this.getMetaContent('organisations') || this.getMetaContent('analytics:organisations'), + world_locations: this.getMetaContent('world-locations') || this.getMetaContent('analytics:world-locations'), /* The existence of a referrer parameter indicates that the page has been dynamically updated via an AJAX request and therefore we can use it to set the dynamic property appropriately. This value is used by PA's to differentiate