@taboola/taboola-react-web

0.5.0 • Public • Published

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.

NPM JavaScript Style Guide

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

Readme

Keywords

none

Package Sidebar

Install

npm i @taboola/taboola-react-web

Weekly Downloads

4

Version

0.5.0

License

MIT

Unpacked Size

13.8 kB

Total Files

6

Last publish

Collaborators

  • tomer.b
  • daniel_tb