-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add organisation meta tag if current page is org #397
Conversation
@sihugh I think this will fix: https://trello.com/c/cbRSHmA9/30-add-organisation-id-to-custom-dimensions-in-google-analytics . Can you take a look, I'm not sure how it's currently set up in Whitehall so there may be a better fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tijmenb Potentially, although from what I could see only organisations actually have a value for |
f273de1
to
8455545
Compare
@tijmenb I've adjusted the logic slightly so we only set |
8455545
to
7a5e905
Compare
7a5e905
to
d847e79
Compare
else | ||
organisations = [] | ||
organisations += links[:organisations] || [] | ||
organisations += links[:worldwide_organisations] || [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if you could replace the conditional by adding this line?
organisations += [content_item] if content_item[:document_type] == "organisation"
d847e79
to
b109023
Compare
b109023
to
c84bef8
Compare
Adds the govuk:analytics:organisations meta tag if the current page is an org (has an analytics_identifier value in the content item)
c84bef8
to
9dbc23b
Compare
Trello: https://trello.com/c/cbRSHmA9/30-add-organisation-id-to-custom-dimensions-in-google-analytics
Adds the govuk:analytics:organisations meta tag if the current page is an org (has an analytics_identifier value in the content item)
Component guide for this PR:
https://govuk-publishing-compon-pr-397.herokuapp.com/component-guide