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

Campaign

Campaign components render feedback, advisor flows, and redirects from FactFinder responses. Use them to present targeted content when campaign conditions match.

Documentation

Adding Feedback campaigns

Feedback campaigns can be displayed using ff-campaign-feedbacktext elements. You may add multiple elements, and they can be placed anywhere in the document.

Through the label attribute, you define which campaigns can be displayed by the element. The attribute's value must match one of the campaigns' labels that are defined in FactFinder.

If multiple campaigns are configured to target the same label, the ff-campaign-feedbacktext element with the corresponding label will serve as the outlet to all these campaigns.

Remember that a campaign's trigger condition must still be satisfied before it can be displayed by ff-campaign-feedbacktext. If multiple campaigns with the same label are triggered simultaneously, the campaign appearing last in the FactFinder response will be displayed.

The only necessary data binding is {{text}}.

If you are using HTML feedback texts, you need to use the {{{triple curly brace syntax}}}.

<ff-campaign-feedbacktext label="above products">
    {{text}}
    <!--or mixed content-->
    <!--<div>{{text}}</div>-->
</ff-campaign-feedbacktext>

Display results from stand-alone campaign triggers

By default, ff-campaign-feedbacktext only displays campaigns that are part of a search result. However, there is the option to trigger campaigns independent of searches. These are landing page, product and shopping cart campaigns.

In order to display these kind of campaigns, you have to add a corresponding attribute. The element will then only respond to the specified trigger and no longer react to search results.

Attribute
Triggered by element

is-landing-page-campaign

ff-campaign-landing-page

is-product-campaign

ff-campaign-product

is-shopping-cart-campaign

ff-campaign-shopping-cart

Note that only one attribute at a time is allowed.

Adding Advisor campaigns

To integrate advisor campaigns, you need the following elements:

  • ff-campaign-advisor

  • ff-campaign-advisor-question

  • ff-campaign-advisor-answer

Whenever there is an active advisor campaign in the search result, the ff-campaign-advisor element will display it.

ff-campaign-advisor

ff-campaign-advisor is the outer element that contains ff-campaign-advisor-question and ff-campaign-advisor-answer. It offers two optional attributes, name and not, to limit which campaigns the element shall display.

With name, you can restrict the element to display only particular advisor campaigns. The attribute takes a comma-separated list of campaign names that you configure in your FactFinder UI.

The not attribute takes a comma-separated list of campaign names that shall be ignored.

When both name and not are set, only the name attribute will be considered. not will be ignored.

ff-campaign-advisor-question

ff-campaign-advisor-question is used as a template for each question configured in FactFinder. It is rendered at the position you define it in the HTML.

To enable data binding to the underlying question object from the FactFinder response, you must place a data-question attribute (without a value) on a child element of ff-campaign-advisor-question.

If the text of your question contains HTML, use triple curly braces. Double curly braces render the contained text verbatim without interpreting it as HTML.

ff-campaign-advisor-answer

ff-campaign-advisor-answer is used as a template for each answer in the applied advisor campaign. It must be nested inside ff-campaign-advisor-question, where it is rendered at the position it is defined in the HTML.

Unlike ff-campaign-advisor-question, it does not require further attributes and data binding to the underlying answer object is available inside the entire ff-campaign-advisor-answer element.

Again, use triple curly braces for data binding if your answer text contains HTML.

Adding Redirect campaigns

The ff-campaign-redirect element redirects the browser to a destination specified in a redirect campaign. If the latest request to FactFinder triggered a redirect campaign, all further processing of the response will be cancelled and the redirect will happen immediately.

To ensure it is executed before any other elements, ff-campaign-redirect should be placed directly after the opening <body> tag.

Internally, the element uses document.location.replace.

API

ff-campaign-feedbacktext

Properties

Name
Description

label (String) (default: "")

Binds the element to a campaign label defined in the FactFinder UI.

is-landing-page-campaign (Boolean)

Displays only landing-page campaigns from Landing Page Campaign.

is-product-campaign (Boolean)

Displays only product campaigns from Product Campaign.

is-shopping-cart-campaign (Boolean)

Displays only shopping-cart campaigns from Shopping Cart Campaign.

Events

Name
Description

dom-updated

This event is triggered when the element has received new data and the template for this element and all sub elements have been punched out.

ff-campaign-advisor

Properties

Name
Description

name (String) (default: "")

A comma-separated list of campaign names from the FactFinder UI. Restricts the element to those campaigns.

not (String) (default: empty)

A comma-separated list of campaign names that do not trigger this element.

Events

Name
Description

dom-updated

This event is triggered when the element has received new data and the template for this element and all sub elements have been punched out.

Last updated

Was this helpful?