Skip to content

Commit

Permalink
feat(TDP-1742): Add article-template-name to article tracking (newsuk…
Browse files Browse the repository at this point in the history
…#2914)

* Add article-template-name to article tracking

* Fix linting and snapshots

* Fix styleguide version mismatch in context package

* Small refactor
  • Loading branch information
bibicollins1 committed Apr 12, 2022
1 parent 06ff4b8 commit b52a4c6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Array [
"attrs": Object {
"articleId": "198c4b2f-ecec-4f34-be53-c89f83bc1b44",
"article_flag": "no flag",
"article_template_name": "standard template",
"article_topic_tags": Array [
"Football",
"Manchester United FC",
Expand Down Expand Up @@ -47,6 +48,7 @@ Array [
"attrs": Object {
"articleId": "198c4b2f-ecec-4f34-be53-c89f83bc1b44",
"article_flag": "no flag",
"article_template_name": "standard template",
"article_topic_tags": Array [
"Football",
"Manchester United FC",
Expand Down Expand Up @@ -85,6 +87,7 @@ Array [
"attrs": Object {
"articleId": "198c4b2f-ecec-4f34-be53-c89f83bc1b44",
"article_flag": "no flag",
"article_template_name": "standard template",
"article_topic_tags": Array [
"Football",
"Manchester United FC",
Expand Down Expand Up @@ -123,6 +126,7 @@ Array [
"attrs": Object {
"articleId": "198c4b2f-ecec-4f34-be53-c89f83bc1b44",
"article_flag": "no flag",
"article_template_name": "standard template",
"article_topic_tags": Array [
"Football",
"Manchester United FC",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ export default Component =>
template: get(data, "template", "Default"),
registrationType: getRegistrationType(),
shared: getSharedStatus(),
article_flag: getIsLiveOrBreakingFlag(flags) || "no flag"
article_flag: getIsLiveOrBreakingFlag(flags) || "no flag",
article_template_name: getIsLiveOrBreakingFlag(flags)
? "live template"
: "standard template"
};
},
trackingObjectName: "Article"
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.32"
"@times-components/styleguide": "3.38.33"
},
"devDependencies": {
"@babel/core": "7.4.4",
Expand Down

0 comments on commit b52a4c6

Please sign in to comment.