Product Campaign
`ff-campaign-product` triggers campaigns for a specific product. Pair it with campaign display components to render returned campaign content.
Documentation
With the ff-campaign-product element, you can invoke product campaigns that you defined in your FactFinder UI. Typically, this element is placed on the product detail page.
<ff-campaign-product product-id="12345" id-type="productNumber"></ff-campaign-product>The product-id specifies the product ID for which a campaign shall be invoked.
The optional id-type defines the type of ID being referenced. It can be set to either:
productNumber(default)id
These values are defined by the FactFinder REST API's /campaign/{channel}/product endpoint.
While the element triggers the campaign, it does not display anything.
Visualization of the triggered campaign is done through the ff-campaign-feedbacktext and ff-campaign-pushed-products elements. To display product campaigns, they must be given the is-product-campaign attribute.
<ff-campaign-product product-id="1234"></ff-campaign-product>
<ff-campaign-feedbacktext is-product-campaign label="your-label">
{{{text}}}
</ff-campaign-feedbacktext>
<ff-campaign-pushed-products is-product-campaign>
<ff-record-list subscribe="false">
<template data-role="record">
<ff-record>...</ff-record>
</template>
</ff-record-list>
</ff-campaign-pushed-products>For more information, see Adding Feedback campaigns and Pushed Products.
API
ff-campaign-product
Properties
product-id (Number) (default: empty)
When set, an AJAX request retrieves product campaigns for the given product ID.
id-type (String) Options: "id", "productNumber" (default: "productNumber")
Specifies which ID type product-id represents.
Last updated
Was this helpful?