Skip to content

Commit

Permalink
fix(TDP-1777): Make analytics article_flag data lower case (newsuk#2916)
Browse files Browse the repository at this point in the history
* Make analytics article_flag data lower case

* Sync up styleguide versions

* Fix linting
  • Loading branch information
bibicollins1 committed Apr 19, 2022
1 parent a382c72 commit 5c4f49a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ export default Component =>
template: get(data, "template", "Default"),
registrationType: getRegistrationType(),
shared: getSharedStatus(),
article_flag: getIsLiveOrBreakingFlag(flags) || "no flag",
article_flag: getIsLiveOrBreakingFlag(flags)
? getIsLiveOrBreakingFlag(flags).toLowerCase()
: "no flag",
article_template_name: getIsLiveOrBreakingFlag(flags)
? "live template"
: "standard template"
Expand Down
2 changes: 1 addition & 1 deletion packages/context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"homepage": "https://github.com/newsuk/times-components#readme",
"dependencies": {
"@times-components/styleguide": "3.38.34"
"@times-components/styleguide": "3.38.35"
},
"devDependencies": {
"@babel/core": "7.4.4",
Expand Down
4 changes: 3 additions & 1 deletion packages/key-facts/src/key-facts.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const KeyFacts = ({ ast, section, headline, isLiveOrBreaking }) => {

const { children: keyFactsItems } = children[0];

const articleFlag = isLiveOrBreaking || "no flag";
const articleFlag = isLiveOrBreaking
? isLiveOrBreaking.toLowerCase()
: "no flag";

return (
<TrackingContextProvider
Expand Down

0 comments on commit 5c4f49a

Please sign in to comment.