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

fix(quantic): improved the logic that displays view events as links #4579

Merged
merged 7 commits into from
Oct 28, 2024

Conversation

mmitiche
Copy link
Contributor

@mmitiche mmitiche commented Oct 22, 2024

SFINT-5774

The issue

some view events come without a clickuri , for example the following view event:

        {
            "name": "VIEW",
            "value": "{\"content_id_key\":\"@sfid\",\"content_id_value\":\"5005G00001xAKeBQAW\",\"language\":\"en-US\",\"title\":\"Case Detail\"}",
            "time": "1729109478897"
        },

this events yielded the following behaviour: opening an invalid page in salesforce.

Screen.Recording.2024-10-22.at.1.45.31.PM.mov

usually the view events come with the following format:

        {
            "name": "VIEW",
            "value": "{\"content_id_key\":\"@clickableuri\",\"content_id_value\":\"https://lvu08-dev-ed.my.site.com/searchtest/s/contactsupport?t=1729109128406\",\"language\":\"en-US\",\"title\":\"Contact Support\"}",
            "time": "1729109212672"
        },

where content_id_key contains the clickableuri so we are able to display this event as link

The solution

I updated the logic of the QuanticUserAction component to only display a view event as link only when content_id_key contains the @clickableuri.
This is equivalent to the previous implementation of user actions.

  • when content_id_key does not contain the @clickableuri
Screenshot 2024-10-22 at 1 33 37 PM
  • when content_id_key contains the @clickableuri
Screenshot 2024-10-22 at 1 34 12 PM

Copy link
Contributor

@SimonMilord SimonMilord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, we forgot to catch that :s
just a small suggestion

@erocheleau
Copy link
Collaborator

some view events come without a clickuri , for example the following view event:

The view events with a link are actually the exception and not the rule. A View event typically will have a @contentIdKey that should be a Coveo field name (example sfid) and the value would be that value for this result in the coveo index so it can be found again.

As a very last resort, the page view tracker will send the current page's url when it can't find anything else to pick.

However I see you simply replicated what was in the search-ui-extensions repo so that's perfect ;)

Copy link

github-actions bot commented Oct 23, 2024

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 236.6 236.6 0
commerce 341.5 341.5 0
search 412.3 412.3 0
insight 401.6 401.6 0
recommendation 248.8 248.8 0
ssr 406 406 0
ssr-commerce 353.6 353.6 0

SSR Progress

Use case SSR (#) CSR (#) Progress (%)
search 39 44 89
recommendation 0 4 0
case-assist 0 6 0
insight 0 27 0
commerce 0 15 0
Detailed logs search : buildInteractiveResult
search : buildInteractiveInstantResult
search : buildInteractiveRecentResult
search : buildInteractiveCitation
search : buildGeneratedAnswer
recommendation : missing SSR support
case-assist : missing SSR support
insight : missing SSR support
commerce : missing SSR support

@mmitiche mmitiche added this pull request to the merge queue Oct 28, 2024
Merged via the queue into master with commit 1461a93 Oct 28, 2024
99 checks passed
@mmitiche mmitiche deleted the SFINT-5774 branch October 28, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants