elastic / search-ui

Search UI. Libraries for the fast development of modern, engaging search experiences.
https://docs.elastic.co/search-ui
Apache License 2.0
1.92k stars 368 forks source link

Missing Analytics Plugin fields #1012

Closed llermaly closed 6 months ago

llermaly commented 9 months ago

Describe the bug After configuring the Analytics plugin I'm not getting all the enabled events.

To Reproduce Mi config looks like this:

    <Search
      config={{
        ...combinedConfig,
        plugins: [
          AnalyticsPlugin({
            client: getTracker(),
          }),
        ],
      }}
    />
  );
                    <SearchBox
                      autocompleteMinimumCharacters={3}
                      autocompleteResults={{
                        linkTarget: "_blank",
                        sectionTitle: "Results",
                        titleField: "title",
                        urlField: "url",
                        shouldTrackClickThrough: true,
                        clickThroughTags: ["autocomplete_click"],
                      }}
                      autocompleteSuggestions={true}
                      debounceLength={0}
                    />
                  }
                    <Results
                      titleField="title"
                      urlField="url"
                      thumbnailField="image_url"
                      shouldTrackClickThrough={true}
                      clickThroughTags={["result_click"]}
                    />

I'm capturing search, and click events, but autocomplete clickthrough is missing, also tags are missing. I wonder if it is possible to include to the result clickthrough event the document title/url.

Expected behavior I would expect autocomplete clickthrough events to make it to the behavior analytics, and also tags.

Which backends and packages are you using: Backend: Elasticsearch Packages: search-ui

Thanks!

llermaly commented 9 months ago

Just confirmed that the autocomplete events are coming through under document.index: autocomplete

It is possible to make tags show up as well? Same with document title/url for the clicks?

Thanks

botelastic[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Is this issue still important to you? If so, please leave a comment and let us know. As always, thank you for your contributions.