Skip to content
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 event and click tracking to bullet list link #9654

Merged
merged 66 commits into from
Jan 18, 2022
Merged
Show file tree
Hide file tree
Changes from 58 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
468c6f6
add event tracking to bullet link
nicola-d-bbc Nov 8, 2021
6169f53
add event tracking tests to bullet list
nicola-d-bbc Nov 9, 2021
3902fb8
tracking only links
nicola-d-bbc Nov 10, 2021
ca6914f
feat: only send request when link is present
MuhammadAHussain Nov 11, 2021
7b8785b
Merge branch 'latest' into list-link-tracking
pvaliani Nov 15, 2021
b0125bc
updates test typos
pvaliani Nov 15, 2021
30a431f
fixes test typo
pvaliani Nov 15, 2021
ed9092e
adds click tracking for each link
pvaliani Nov 15, 2021
17205b4
updates unit tests for click tracking
pvaliani Nov 15, 2021
2cd5956
refactors use of pathOr after code review
pvaliani Nov 15, 2021
e47da9e
Merge branch 'latest' into list-link-tracking
pvaliani Nov 15, 2021
fc06ec5
fixes issue where click is registered with no links
pvaliani Nov 15, 2021
e1f94c6
fixes issue where click is registered with no links
pvaliani Nov 15, 2021
8c8a5ee
wip
MuhammadAHussain Nov 15, 2021
3bf52b7
feat: pass click tracker as prop
MuhammadAHussain Nov 16, 2021
8129a5b
updates unit tests for gist component
pvaliani Nov 17, 2021
aa2bda0
Merge branch 'latest' into list-link-tracking
MuhammadAHussain Nov 17, 2021
da4cc73
chore: address pr comments
MuhammadAHussain Nov 18, 2021
171b0ad
feat: add test cases for onClick
MuhammadAHussain Nov 19, 2021
f19f984
Merge branch 'latest' into list-link-tracking
MuhammadAHussain Nov 22, 2021
abd3e86
Merge branch 'latest' into list-link-tracking
amoore108 Nov 23, 2021
6e80663
Merge branch 'latest' into list-link-tracking
amoore108 Nov 23, 2021
6dd907a
Merge branch 'latest' into list-link-tracking
amoore108 Nov 24, 2021
9d3e706
Merge branch 'latest' into list-link-tracking
pvaliani Nov 25, 2021
0c12812
refactor: use HOCS to handling click tracking
MuhammadAHussain Nov 26, 2021
cd8fedb
Merge branch 'latest' into list-link-tracking
MuhammadAHussain Nov 26, 2021
72ac796
Merge branch 'latest' into list-link-tracking
nicola-d-bbc Dec 3, 2021
b5acc91
testing different approaches
nicola-d-bbc Dec 3, 2021
869c723
Merge branch 'latest' into list-link-tracking
pvaliani Dec 6, 2021
e51172a
Merge branch 'latest' into list-link-tracking
nicola-d-bbc Dec 7, 2021
5da6083
added position id to bullet tracking
nicola-d-bbc Dec 8, 2021
1c88758
only join position if linkUrl
nicola-d-bbc Dec 8, 2021
af869e6
Merge branch 'latest' into list-link-tracking
nicola-d-bbc Dec 8, 2021
a735d1a
adds addIndexOfTypeToBlocks function
Jan 6, 2022
4981954
add patched postcss version to resolutions
Jan 7, 2022
99c64d2
refactor to addIndexToBlockGroups
Jan 11, 2022
77bce34
remove unnecessary props from fixture
Jan 12, 2022
167505f
added group index to bullet list tracking
nicola-d-bbc Jan 12, 2022
aaca0e7
refactor tests
Jan 12, 2022
a7e1979
Merge branch 'list-link-tracking' of https://github.com/bbc/simorgh i…
Jan 12, 2022
781bf83
updated tests
nicola-d-bbc Jan 12, 2022
43778f8
Merge branch 'list-link-tracking' of github.com:bbc/simorgh into list…
nicola-d-bbc Jan 12, 2022
6d118ca
Merge branch 'latest' of github.com:bbc/simorgh into list-link-tracking
nicola-d-bbc Jan 12, 2022
ae1d520
add more tests and function documentation
Jan 12, 2022
20debb3
Merge branch 'list-link-tracking' of https://github.com/bbc/simorgh i…
Jan 12, 2022
d9642c4
remove console logs
nicola-d-bbc Jan 12, 2022
f6ad4aa
Merge branch 'list-link-tracking' of github.com:bbc/simorgh into list…
nicola-d-bbc Jan 12, 2022
e83a6de
update jsdoc for function
Jan 13, 2022
cc93311
Merge branch 'list-link-tracking' of https://github.com/bbc/simorgh i…
Jan 13, 2022
3a62e2c
move isListWithLink to utils
Jan 13, 2022
8fec38f
add new unit tests
Jan 13, 2022
3e9e237
make unit tests fixtures less generic
Jan 13, 2022
51aad5f
rename fn in unit test
Jan 13, 2022
fc07e23
fix import order
nicola-d-bbc Jan 13, 2022
2492333
Merge branch 'latest' into list-link-tracking
nicola-d-bbc Jan 13, 2022
54a6504
update test descriptions
nicola-d-bbc Jan 13, 2022
24a9168
Merge branch 'latest' into list-link-tracking
nicola-d-bbc Jan 13, 2022
0095ef9
Merge branch 'list-link-tracking' of github.com:bbc/simorgh into list…
nicola-d-bbc Jan 13, 2022
36f1d6e
Merge branch 'latest' into list-link-tracking
nicola-d-bbc Jan 13, 2022
eaab8ed
Merge branch 'latest' into list-link-tracking
nicola-d-bbc Jan 13, 2022
6ef5db8
Merge branch 'latest' into list-link-tracking
nicola-d-bbc Jan 13, 2022
153f8e9
rename var
Jan 14, 2022
a64af22
add punctuation
Jan 14, 2022
58303d6
Merge branch 'latest' into list-link-tracking
nicola-d-bbc Jan 14, 2022
6c103de
Merge branch 'latest' into list-link-tracking
paruchurisilpa Jan 17, 2022
0419fd3
Merge branch 'latest' into list-link-tracking
paruchurisilpa Jan 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
260 changes: 260 additions & 0 deletions data/pidgin/cpsAssets/tori-23463103.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
{
"metadata":{
"id":"urn:bbc:ares::asset:pidgin/tori-23463103",
"locators":{
"assetUri":"/pidgin/tori-23463103",
"cpsUrn":"urn:bbc:content:assetUri:pidgin/tori-23463103",
"curie":"http://www.bbc.co.uk/asset/ad52fc1a-e429-48a6-8cf7-0c65aa66d707",
"assetId":"23463103"
},
"type":"STY",
"createdBy":"pidgin-v6",
"language":"pcm",
"lastUpdated":1635946336211,
"firstPublished":1635328490000,
"lastPublished":1635328490000,
"timestamp":1635328490000,
"options":{
"isIgorSeoTagsEnabled":false,
"includeComments":false,
"allowRightHandSide":true,
"isFactCheck":false,
"allowDateStamp":true,
"suitableForSyndication":true,
"hasNewsTracker":false,
"allowRelatedStoriesBox":true,
"isKeyContent":false,
"allowHeadline":true,
"allowAdvertising":true,
"hasContentWarning":false,
"isBreakingNews":false,
"allowPrintingSharingLinks":true
},
"analyticsLabels":{
"cps_asset_type":"sty",
"counterName":"pidgin.news.story.23463103.page",
"cps_asset_id":"23463103",
"contentId":"urn:bbc:cps:curie:asset:ad52fc1a-e429-48a6-8cf7-0c65aa66d707"
},
"tags":{

},
"version":"v1.3.14",
"blockTypes":[
"paragraph",
"list"
],
"includeComments":false,
"atiAnalytics":{
"producerName":"PIDGIN",
"producerId":"70"
},
"readTime":1,
"siteUri":"/pidgin"
},
"content":{
"blocks":[
{
"text":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - Link 1 below",
"markupType":"plain_text",
"type":"paragraph"
},
{
"numbered":false,
"items":[
{
"text":"<link><caption>Link</caption><url href=\"https://www.bbc.co.uk\" platform=\"highweb\"/><url href=\"https://www.bbc.co.uk\" platform=\"enhancedmobile\"/></link>",
"markupType":"candy_xml",
"type":"listItem"
},
{
"text":"<itemMeta>pidgin/tori-23462373</itemMeta>",
"meta":[
{
"headlines":{
"shortHeadline":"Pollution tag test - CPS",
"headline":"Pollution tag test - CPS",
"overtyped":"Pollution tag test - CPS"
},
"locators":{
"href":"https://www.bbc.com/pidgin/tori-23462373"
},
"summary":"Pollution Tag test on CPS",
"timestamp":1635162444000,
"language":"pcm",
"passport":{
"category":{
"categoryId":"http://www.bbc.co.uk/ontologies/applicationlogic-news/News",
"categoryName":"News"
},
"taggings":[

]
},
"id":"urn:bbc:ares::asset:pidgin/tori-23462373",
"type":"cps"
}
],
"markupType":"candy_xml",
"type":"listItem"
}
],
"type":"list"
},
{
"text":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"markupType":"plain_text",
"type":"paragraph"
},
{
"numbered":false,
"items":[
{
"text":"No links",
"markupType":"plain_text",
"type":"listItem"
},
{
"text":"No links",
"markupType":"plain_text",
"type":"listItem"
}
],
"type":"list"
},
{
"text":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"markupType":"plain_text",
"type":"paragraph"
},
{
"numbered":false,
"items":[
{
"text":"Link 2",
"markupType":"plain_text",
"type":"listItem"
},
{
"text":"<itemMeta>pidgin/tori-23462373</itemMeta>",
"meta":[
{
"headlines":{
"shortHeadline":"Pollution tag test - CPS",
"headline":"Pollution tag test - CPS",
"overtyped":"Pollution tag test - CPS"
},
"locators":{
"href":"https://www.bbc.com/pidgin/tori-23462373"
},
"summary":"Pollution Tag test on CPS",
"timestamp":1635162444000,
"language":"pcm",
"passport":{
"category":{
"categoryId":"http://www.bbc.co.uk/ontologies/applicationlogic-news/News",
"categoryName":"News"
},
"taggings":[

]
},
"id":"urn:bbc:ares::asset:pidgin/tori-23462373",
"type":"cps"
}
],
"markupType":"candy_xml",
"type":"listItem"
}
],
"type":"list"
},
{
"text":"Link 3",
"markupType":"plain_text",
"type":"paragraph"
},
{
"numbered":false,
"items":[
{
"text":"<link><caption>Link</caption><url href=\"https://www.bbc.co.uk\" platform=\"highweb\"/><url href=\"https://www.bbc.co.uk\" platform=\"enhancedmobile\"/></link>",
"markupType":"candy_xml",
"type":"listItem"
},
{
"text":"<itemMeta>pidgin/tori-23462373</itemMeta>",
"meta":[
{
"headlines":{
"shortHeadline":"Pollution tag test - CPS",
"headline":"Pollution tag test - CPS",
"overtyped":"Pollution tag test - CPS"
},
"locators":{
"href":"https://www.bbc.com/pidgin/tori-23462373"
},
"summary":"Pollution Tag test on CPS",
"timestamp":1635162444000,
"language":"pcm",
"passport":{
"category":{
"categoryId":"http://www.bbc.co.uk/ontologies/applicationlogic-news/News",
"categoryName":"News"
},
"taggings":[

]
},
"id":"urn:bbc:ares::asset:pidgin/tori-23462373",
"type":"cps"
}
],
"markupType":"candy_xml",
"type":"listItem"
},
{
"text":"<link><caption>External Link</caption><altText>ITV</altText><url href=\"https://www.itv.com\" platform=\"highweb\"/></link>",
"markupType":"candy_xml",
"type":"listItem"
}
],
"type":"list"
}
]
},
"promo":{
"headlines":{
"shortHeadline":"Bullet pointATI test",
"headline":"Bullet point ATI test"
},
"locators":{
"assetUri":"/pidgin/tori-23463103",
"cpsUrn":"urn:bbc:content:assetUri:pidgin/tori-23463103",
"curie":"http://www.bbc.co.uk/asset/ad52fc1a-e429-48a6-8cf7-0c65aa66d707",
"assetId":"23463103"
},
"summary":"Bullet point ATI test",
"timestamp":1635328490000,
"language":"pcm",
"id":"urn:bbc:ares::asset:pidgin/tori-23463103",
"type":"cps"
},
"relatedContent":{
"section":{
"subType":"index",
"name":"Tori",
"uri":"/pidgin/tori",
"type":"simple"
},
"site":{
"subType":"site",
"name":"BBC Pidgin",
"uri":"/pidgin",
"type":"simple"
},
"groups":[

]
}
}
Loading