# @mrkutly/taboola-react-plugin

> Plugin for implementing taboola in react projects

Latest version **1.2.1** (published 2019-10-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install @mrkutly/taboola-react-plugin
pnpm add @mrkutly/taboola-react-plugin
yarn add @mrkutly/taboola-react-plugin
bun add @mrkutly/taboola-react-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2019-10-18 |
| First published | 2019-05-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 311.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mark Sauer-Utley |
| Maintainers | mrkutly |

## Links

- npm: https://www.npmjs.com/package/@mrkutly/taboola-react-plugin
- Repository: https://github.com/mrkutly/taboola-react
- Homepage: https://github.com/mrkutly/taboola-react#readme
- Issues: https://github.com/mrkutly/taboola-react/issues
- npm.io page: https://npm.io/package/@mrkutly/taboola-react-plugin

## Dependencies (3)

- [react](https://npm.io/package/react.md) ^16.8.6
- [webpack](https://npm.io/package/webpack.md) ^2.6.1
- [prop-types](https://npm.io/package/prop-types.md) ^15.7.2

## Recent versions

- 1.2.1 (latest) — 2019-10-18
- 1.2.0 — 2019-10-18
- 1.1.0 — 2019-06-13
- 1.0.16 — 2019-06-06
- 1.0.15 — 2019-06-06
- 1.0.14 — 2019-05-20
- 1.0.13 — 2019-05-16
- 1.0.12 — 2019-05-13
- 1.0.11 — 2019-05-09
- 1.0.10 — 2019-05-09
- 1.0.9 — 2019-05-09
- 1.0.8 — 2019-05-07
- 1.0.7 — 2019-05-07
- 1.0.6 — 2019-05-07
- 1.0.5 — 2019-05-07
- … 5 more at https://npm.io/package/@mrkutly/taboola-react-plugin/versions

## README

# Taboola React Plugin - UNOFFICIAL - DO NOT USE

This [npm package](https://www.npmjs.com/package/@mrkutly/taboola-react-plugin) allows a publisher to easily load their taboola assets into their React application.

## Installation

Add the plugin to your project by running.
`npm install @mrkutly/taboola-react-plugin`

## Integration

To use the plugin, you will need to include your publisher loader script in the head tag of you index.html file (or inside the head tags of each of your pages if you are using SSR like in Gatsby or Next.js). The loader script will look something like this:

```javascript
(function(e, f, u, i) {
	if (!document.getElementById(i)) {
		e.async = 1;
		e.src = u;
		e.id = i;
		f.parentNode.insertBefore(e, f);
	}
})(
	document.createElement('script'),
	document.getElementsByTagName('script')[0],
	'//cdn.taboola.com/libtrc/taboola-training/loader.js',
	'tb_loader_script'
);
```

Then, import it into the component where you would like it to render:

```javascript
import Taboola from '@mrkutly/taboola-react-plugin';
```

Most of the props you pass it will be the params you received from Taboola for your asset. The only extra prop it needs it the URL of the current page (this allows us to accurately count your page views and crawl your article pages).

```jsx
import React from 'react';
import Taboola from '@mrkutly/taboola-react-plugin';

export default (props) => (
	<div>
		<h1>These dogs do amazing tricks<h1>
		<div>
			<p>This is the article about dogs<p>
            	</div>
		<Taboola
			currentUrl={'https://www.awesomenews.com/amazing-article-about-dogs-who-do-tricks'}
			publisher={'awesomenews'}
			pageType={'article'}
			placement={'Below Article Thumbnails'}
			mode={'thumbnails-a'}
			targetType={'mix'}
		/>
	</div>
);
```

And that should be all you need to do.

## Issues

For any issues, email mark.sauer.utley@gmail.com

---
_Source: https://npm.io/package/@mrkutly/taboola-react-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
