Skip to content

fix(headless): missing actionCause analytics #5408

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

Closed

Conversation

gleblanc-coveo
Copy link
Contributor

Adds the missing actionCause property to the analytics section sent when calling the /generate endpoint.

SVCC-5132


Following a bug report where the actionCause is missing from calls.

Note that right now, since this is only used when calling the /generate endpoint which is triggered by submitting to the search box, that's the event we're sending.

In the rest of the solution, it's either using specific events like this from SearchPageEvents or taking the event description from an event description object. We don't have the event description easily accessible right now, but if in the future we also use this endpoint for other event types, we'll have to take this into account.

Adds the missing `actionCause` property to the analytics section sent when calling the /generate endpoint.

SVCC-5132
@developer-experience-bot
Copy link
Contributor

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 249.8 249.9 0
commerce 362.7 362.7 0
search 420.9 420.9 0
insight 412 412.1 0
recommendation 260.7 260.7 0
ssr 414.5 414.6 0
ssr-commerce 379.2 379.2 0

Comment on lines +382 to +385
navigatorContext,
{
actionCause: SearchPageEvents.searchboxSubmit,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

So we are saying that 100% of the time we send a call to the /generate endpoint, the action cause is going to be searchbox submit. Out of curiosity, isn't the actionCause also in the state? I suppose it gets retrieved from the state when a search call is being made.

I'm asking because it might be a blind spot for us in the way we look at the data. For example, if we analyse the analytics of the /generate endpoint and see x% have no query text, we might not be able to link it to the fact that they come from a filter selection or something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't able to find the actionCause or eventDescription in the state, let me know if it's there.

My first thought was to use the action cause from the state but I wasn't able to find it here or higher up in the call chain.

I had a brief chat with @dmgauthier who was in the office and I proposed to him that we go this way for now, but it's really flaky but if we can have it the other way if would be much better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've had confirmation that the event cause can change so this needs to be fixed.

@gleblanc-coveo
Copy link
Contributor Author

Closing this for now.
I need to do more investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants