You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(headless): change citation from custom to click event (#4492)
[SVCC-4170](https://coveord.atlassian.net/browse/SVCC-4170)
Change Citation Click from Custom Event to Click Event:
- Bump `coveo.analytics` to `2.30.39`.
- Use the new `logGeneratedAnswerCitationClick` event.
- This new method make the click event assume a `document position` of 1
for the purpose of the click event and click rank.
- Changes are made both in the search page client as well as the insight
client.
Future click event example:
```
{
"language": "en",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36",
"collectionName": "default", -- Deprecated
"documentAuthor": "unknown", -- Available in stream response?
"documentPosition": 1, -- Hardcoded to 1
"documentTitle": "Relevance Generative Answering", -- In stream API response
"documentUri": "https://levelup.coveo.com/learn/courses/relevance-generative-answering", -- In stream API response as URI
"documentUriHash": "bK2L18lxLvsUB5h4", - Depecreated
"documentUrl": "https://levelup.coveo.com/learn/courses/relevance-generative-answering", -- In stream API response as Click URI
"sourceName": "Level Up", -- Needs to be added stream API response
"queryPipeline": "Customer Zero Community search - RGA Update V3",
"originContext": "buildersearchpage", -- Same as custom event
"originLevel1": "Connect RGA V3 Testing", -- Same as custom event
"originLevel2": "default", -- Same as custom event
"originLevel3": "https://search.cloud.coveo.com/builder/", -- Same as custom event
"customData": {
"coveoHeadlessVersion": "2.78.0", -- Inherited
"generativeQuestionAnsweringId": "queryStream01_coveosearch_1ffa0550-3d4b-4d09-9574-8c4225b1edf9",
--TO ADD"contentIDKey": "permanentid",
--TO ADD"contentIDValue": "29bd12f1-12fb-4ac4-9463-66e37a0cb686",
"coveoAtomicVersion": "2.77.1" -- Inherited
--From Stream API"citationId": "42.20035$https://levelup.coveo.com/learn/courses/relevance-generative-answering-3541ae00-8d76-4b85-aa02-75478f4b6a6e",
},
"facetState": [],
"anonymous": false,
"clientId": "d4a6b215-241a-40f2-ad82-4890895843ad",
"actionCause": "openGeneratedAnswerSource", -- New actionCause
"searchQueryUid": "6549c762-4b4d-466d-ba16-bfe3b8d21928" -- From search event
}
```
[SVCC-4170]:
https://coveord.atlassian.net/browse/SVCC-4170?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Copy file name to clipboardExpand all lines: packages/headless/src/features/generated-answer/__snapshots__/generated-answer-analytics-actions.test.ts.snap
+2-2
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ exports[`generated answer analytics actions > when analyticsMode is \`next\` > s
Copy file name to clipboardExpand all lines: packages/headless/src/features/generated-answer/__snapshots__/generated-answer-insight-analytics-actions.test.ts.snap
+2-2
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ exports[`generated answer insight analytics actions > when analyticsMode is \`ne
88
88
"title": "example title",
89
89
"uniqueFieldName": "permanentid",
90
90
"uniqueFieldValue": "citation_permanentid",
91
-
"url": undefined,
91
+
"url": "example: click uri",
92
92
},
93
93
"responseId": "123",
94
94
},
@@ -114,7 +114,7 @@ exports[`generated answer insight analytics actions > when analyticsMode is \`ne
0 commit comments