govuk_publishing_components 23.12.3 → 23.13.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d8c74adc692bb0b7466ea5eba32bd121b8bf4470b7cb78c71732f5de5143e35
|
4
|
+
data.tar.gz: c2ac6affcff44c35c9c47652945181cc59906db32e575ca25b937a120af59d0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d615bae60cc517e98114ebf4185fc9686d45b0860e3bf38988827a77e1338b84c2e3e13cc1b04a1841c99157d5bba8f4f751ab6046c6ff4eee7d87b9640952bf
|
7
|
+
data.tar.gz: 1ab8e32b4933e8de6642a5e30d48071d5590bfff81d72c6068d3b7093bf905b3025a6762f2c664171fc6e6b0e547ce1e10cf7e5fd439571e832080cd2f5eacd0
|
@@ -4,11 +4,43 @@ body: |
|
|
4
4
|
This takes a content-store links hash like object which it can then turn into
|
5
5
|
the correct analytics identifier metadata tags.
|
6
6
|
|
7
|
-
|
7
|
+
These are additionally used by the <a href="https://github.com/alphagov/govuk-browser-extension">GOV.UK browser extension</a> to provide details about a given page.
|
8
|
+
|
9
|
+
The code which reads the meta tags can be found <a href="https://github.com/alphagov/govuk_publishing_components/blob/master/app/assets/javascripts/govuk_publishing_components/analytics/custom-dimensions.js">in custom-dimensions.js</a>.
|
8
10
|
accessibility_criteria: |
|
9
11
|
The analytics meta tags component should not be visible to any users.
|
10
12
|
display_html: true
|
11
13
|
examples:
|
14
|
+
with_core_tags:
|
15
|
+
data:
|
16
|
+
content_item:
|
17
|
+
document_type: "html_publication"
|
18
|
+
publishing_app: "whitehall"
|
19
|
+
schema_name: "html_publication"
|
20
|
+
content_id: "00000000-0000-0000-0000-00000000000"
|
21
|
+
navigation_page_type: "Taxon Page"
|
22
|
+
section: "business tax"
|
23
|
+
withdrawn_notice: true
|
24
|
+
with_content_history_tags:
|
25
|
+
description: |
|
26
|
+
The tags in this object will generate the `content-has-history` tag, set to true. This tag is triggered when either, within `content_item`:
|
27
|
+
|
28
|
+
1. `public_updated_at` and `first_public_at` within `details` are both present and they aren't the same value
|
29
|
+
2. `change_history` within `details` is present and it has a value of more than 1
|
30
|
+
|
31
|
+
See below example for specific details.
|
32
|
+
data:
|
33
|
+
content_item:
|
34
|
+
public_updated_at: "2021-01-15T12:30:45.000+00:00"
|
35
|
+
details:
|
36
|
+
first_public_at: "2020-11-03T09:15:00.000+00:00"
|
37
|
+
change_history: "5"
|
38
|
+
with_date_and_postcode_stripping_for_static_analytics:
|
39
|
+
data:
|
40
|
+
content_item:
|
41
|
+
local_assigns:
|
42
|
+
strip_dates_pii: true
|
43
|
+
strip_postcodes_pii: true
|
12
44
|
with_organisations:
|
13
45
|
data:
|
14
46
|
content_item:
|
@@ -24,3 +56,69 @@ examples:
|
|
24
56
|
links:
|
25
57
|
world_locations:
|
26
58
|
- analytics_identifier: WL3
|
59
|
+
with_political_tags:
|
60
|
+
data:
|
61
|
+
content_item:
|
62
|
+
details:
|
63
|
+
political: true
|
64
|
+
government:
|
65
|
+
current: true
|
66
|
+
slug: "2010-to-2015-conservative-and-liberal-democrat-coalition-government"
|
67
|
+
with_historic_political_tags:
|
68
|
+
data:
|
69
|
+
content_item:
|
70
|
+
details:
|
71
|
+
political: true
|
72
|
+
government:
|
73
|
+
current: false
|
74
|
+
slug: "2010-to-2015-conservative-and-liberal-democrat-coalition-government"
|
75
|
+
with_non-political_tags:
|
76
|
+
data:
|
77
|
+
content_item:
|
78
|
+
details:
|
79
|
+
political: false
|
80
|
+
government:
|
81
|
+
slug: "2010-to-2015-conservative-and-liberal-democrat-coalition-government"
|
82
|
+
with_taxonomy_added_via_document_type:
|
83
|
+
description: |
|
84
|
+
You can trigger taxonomy tag rendering by either including a `document_type` attributes of "taxon" or including the `parent_taxons` or `taxons` attributes under the `links` attribute.
|
85
|
+
data:
|
86
|
+
content_item:
|
87
|
+
content_id: "00000000-0000-0000-0000-000000000000"
|
88
|
+
document_type: "taxon"
|
89
|
+
base_path: "/example-of-taxons"
|
90
|
+
with_taxonomy_added_via_links:
|
91
|
+
data:
|
92
|
+
content_item:
|
93
|
+
links:
|
94
|
+
taxons:
|
95
|
+
- content_id: "11111111-1111-1111-1111-111111111111"
|
96
|
+
document_type: "taxon"
|
97
|
+
base_path: "/disabilities-benefits"
|
98
|
+
- content_id: "22222222-2222-2222-2222-222222222222"
|
99
|
+
document_type: "taxon"
|
100
|
+
base_path: "/childcare-parenting/childrens-social-care-providers"
|
101
|
+
links:
|
102
|
+
parent_taxons:
|
103
|
+
- content_id: "33333333-3333-3333-3333-333333333333"
|
104
|
+
document_type: "taxon"
|
105
|
+
base_path: "/childcare-parenting"
|
106
|
+
with_multiple_step_by_step_tags:
|
107
|
+
data:
|
108
|
+
content_item:
|
109
|
+
links:
|
110
|
+
part_of_step_navs:
|
111
|
+
- content_id: "00000000-0000-0000-0000-000000000000"
|
112
|
+
- content_id: "11111111-1111-1111-1111-111111111111"
|
113
|
+
with_primary_step_by_step_tag:
|
114
|
+
data:
|
115
|
+
content_item:
|
116
|
+
links:
|
117
|
+
part_of_step_navs:
|
118
|
+
- content_id: "00000000-0000-0000-0000-000000000000"
|
119
|
+
with_secondary_step_by_step_tag:
|
120
|
+
data:
|
121
|
+
content_item:
|
122
|
+
links:
|
123
|
+
secondary_to_step_navs:
|
124
|
+
- content_id: "22222222-2222-2222-2222-222222222222"
|
@@ -31,6 +31,8 @@ module GovukPublishingComponents
|
|
31
31
|
meta_tags["govuk:publishing-application"] = content_item[:publishing_app] if content_item[:publishing_app]
|
32
32
|
meta_tags["govuk:schema-name"] = content_item[:schema_name] if content_item[:schema_name]
|
33
33
|
meta_tags["govuk:content-id"] = content_item[:content_id] if content_item[:content_id]
|
34
|
+
meta_tags["govuk:navigation-page-type"] = content_item[:navigation_page_type] if content_item[:navigation_page_type]
|
35
|
+
meta_tags["govuk:section"] = content_item[:section] if content_item[:section]
|
34
36
|
meta_tags["govuk:withdrawn"] = "withdrawn" if content_item[:withdrawn_notice].present?
|
35
37
|
meta_tags["govuk:content-has-history"] = "true" if has_content_history?
|
36
38
|
meta_tags["govuk:static-analytics:strip-dates"] = "true" if should_strip_dates_pii?(content_item, local_assigns)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 23.
|
4
|
+
version: 23.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|