Home > widget-integration > PLACEMENT

PLACEMENT variable

Widget placement locations for analytics and behavior customization.

Defines where the filter widget is rendered on the site, affecting analytics tracking and behavior patterns.

Signature:

PLACEMENT: {
	readonly product_page: "product_page";
	readonly search_page: "search_page";
	readonly instant_search: "instant_search";
}

Remarks

Technical Support teams can use these values to customize widget behavior based on placement context.

Example

window.boostWidgetIntegration.extend('FilterAPI', (FilterAPI) => {
  return class extends FilterAPI {
    async getProductByFilter(params, additions) {
      // Add placement-specific parameter
      const placement = this.getPlacement();
      if (placement === PLACEMENT.product_page) {
        params.show_related = true;
      }
      return super.getProductByFilter(params, additions);
    }
  };
});