Home > widget-integration > InstantSearchController > saveClickedSuggestionTerm

InstantSearchController.saveClickedSuggestionTerm() method

Save clicked suggestion term to localStorage for AIML analytics.

The collection-filter module reads this value to attach suggestion, parent_request_id, and item_rank parameters to search API requests.

**Legacy**: setLocalStorage(CLICK_SUGGESTION_TERM, title) in render callback **New**: Dedicated method for extensibility and testability

Signature:

protected saveClickedSuggestionTerm(term: string): void;

Parameters

Parameter

Type

Description

term

string

Suggestion term that was clicked

Returns:

void