React Component Adobe Target at.js extension
This extension returns a React component, to be used as container for content delivered by at.js
The extension returns a React component, that acts as a container for offers delivered by at.js.
Initially, it renders a hidden
<div> element, which is later made visible once the offer content is successfully fetched by
adobe.target.getOffer() and applied by
The returned React component is to be composed into React apps, e.g.:
The component is available as a UMD module, to be included into Webpack/Browserify builds.
npm i @adobe/target-react-component
;const Target = ;...<Target data-mbox="testMbox">Default mbox content</Target>
The following options can be set on the component as
||String||Yes||mbox name. It is mandatory if you want to track clicks. If not provided, an error will be logged and tracking event won't be attached.|
||Object||No||mbox parameters - an object of key-value pairs, that has the following structure:
||Number||No||timeout in milliseconds. If not specified, default adobe.target will be used. Default timeout is the one set via mbox.js settings. This value can be configured using mbox.js settings in Target Classic Admin UI Advanced Mode or in Bullseye UI.|
paramsattributes can be set as follows:
<Target data-mbox="myMbox" data-param1="value1" data-param2="value2" data-timeout="1"/>
Apache-2.0 Adobe Systems, Inc.