taboola-react-web
Taboola React Plugin for the Open Web - BETA. Using this plugin is subject to Taboola's terms of use and privacy policy. Embed Taboola in React projects.
Install
npm install --save @taboola/taboola-react-web
Usage
If you have access to HTML/SSR, please include this as this will help speed up.
<script async src="https://cdn.taboola.com/libtrc/{YOUR_PUBLISHER_ID}/loader.js" id="tb_loader_script"></script>
Main Workflow
import TaboolaComponent from '@taboola/taboola-react-web'
function Article() {
return (
<TaboolaComponent
canonicalUrl={yourPageCanonicalUrl}
publisherId="your-id-as-a-publisher"
pageType="article"
mode="taboola-mode-name"
containerId="id-for-container"
placement="Taboola Placement Name"
targetType="mix"
custSeg="subscriber"
>
);
}
Props
Props | Type | Default | Required |
---|---|---|---|
canonicalUrl | string | ${yourCurrentUrl} |
no |
publisherId | string | undefined | yes |
pageType | string | undefined | yes |
mode | string | undefined | yes |
containerId | string | ${mode}-${placement} |
no |
placement | string | undefined | yes |
targetType | string | mix | no |
custSeg | string | none | no |
License
MIT © Taboola