Click tracking with resultView - any examples out there

Hi,

I'm using search-ui and am trying to enable link click tracking, using resultView as below.

<Results
titleField="title"
urlField="url"
shouldTrackClickThrough={true}
clickThroughTags={['Documents']}
resultView={ResultView}
/>

However, I am trouble getting started and wondered if there are any examples combining click tracking with resultView to assist getting started?

Hey @georgina. All you should need to do is ensure that onClickLink is being called when the link is clicked. You can see the default view for an example: https://github.com/elastic/search-ui/blob/master/packages/react-search-ui-views/src/Result.js#L78

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.