For the complete documentation index, see llms.txt. This page is also available as Markdown.

Communication

Configure Web Components communication with FactFinder.

Documentation

Add ff-communication to every page that uses FactFinder Web Components. Configure the server endpoint and channel.

<ff-communication
  url="https://web-components.fact-finder.de/FACT-Finder"
  version="ng"
  api="v5"
  channel="bergfreunde-co-uk"
  default-query="backpack"
  search-immediate
></ff-communication>

url, version, and channel are required. FactFinder NG also requires api.

Define these attributes first, in this order: url, version, api, then channel. Browser attribute processing differs.

default-query sets the query used on page load. search-immediate starts that query after initialization.

Wait for initialization

ffCommunicationReady fires when communication configuration has propagated. Subscribe before loading the Web Components bundle.

document.addEventListener("ffCommunicationReady", (event) => {
  const factfinder = event.factfinder;
  const searchImmediate = event.searchImmediate;

  // Call this only when you want to trigger the configured default search.
  // searchImmediate();
});

The event guarantees initialized core, polyfills, configuration, and ready data receivers.

API code

Properties

Properties
Name
Description

url (String, required)

FactFinder URL, including the context name. Define this first.

version (String, required)

FactFinder major and minor version. Define this second.

api (String)

NG REST API version. Required for version="ng".

channel (String, required)

Channel configured in the FactFinder backend.

search-immediate (Boolean)

Starts a search when components load.

use-url-parameters (String, default "true")

Controls whether FactFinder parameters are added to the URL.

default-query (String, default *)

Query used when a search has no query.

only-search-params (Boolean)

Adds only search-related parameters to the URL.

parameter-whitelist (String)

Comma-separated URL parameters to retain.

category-page (String)

URL-encoded, non-removable category filter for NG.

add-params / add-tracking-params (String)

URL-encoded parameters for search or tracking requests.

keep-filters (Boolean)

Retains filters set before a search.

keep-url-params (String)

Comma-separated URL parameters to include in requests.

use-asn / use-campaigns (String, default "true")

Includes ASN data or campaign results.

use-found-words (String, default "false")

Returns words that produced result matches.

disable-cache (String, default "false")

Ignores search result caches.

use-personalization, use-semantic-enhancer, use-aso (String, default "true")

Enables request personalization, semantic enrichment, or search optimization.

use-browser-history (String, default "true")

Adds searches to browser history.

user-id, purchaser-id, market-id, sid (String)

Identifiers used in supported FactFinder requests.

use-seo / seo-prefix

Enables the SEO API and configures its path prefix.

search-url, suggest-url, recommendation-url, tag-cloud-url, tracking-url, campaign-url, compare-url, similar-records-url, get-records-url

Custom service endpoints.

ignore-page (String, default "false")

Omits the page parameter from pagination requests.

currency-code, currency-country-code, currency-fields, currency-min-digits, currency-max-digits, add-unit-to-filter-elements

Currency display configuration.

sort-url-parameters-alphabetically (String, default "false")

Sorts URL parameters and values alphabetically.

use-filter-url / filter-url-prefix

Adds categoryPath to the URL path.

mustache-delimiters (String)

Comma-separated Mustache template delimiters.

Events

Events
Name
Description

ffCommunicationReady

Fires on document when ff-communication connects to the DOM.

Last updated

Was this helpful?