An open API service indexing awesome lists of open source software.

https://github.com/stackql/docusaurus-plugin-hubspot

Plugin to enable Hubspot with Docusaurus
https://github.com/stackql/docusaurus-plugin-hubspot

docusaurus docusaurus-v2 hubspot javascript plugin react

Last synced: 3 months ago
JSON representation

Plugin to enable Hubspot with Docusaurus

Awesome Lists containing this project

README

          

# docusaurus-plugin-hubspot

Plugin for [Docusaurus](https://docusaurus.io/) to [install the HubSpot Tracking code](https://knowledge.hubspot.com/reports/install-the-hubspot-tracking-code). Allowing HubSpot to monitor your Docusaurus site traffic.

The following script tag is inserted into the head tag

```html

```

## Installation

Install the package using your preferred package manager

### npm

```bash
npm install --save docusaurus-plugin-hubspot
```

### Yarn

```bash
yarn add docusaurus-plugin-hubspot
```

### pnpm

```bash
pnpm add docusaurus-plugin-hubspot
```

## Configuration

| Name | Type | Default | Description |
| :---------: | :-------: | :----------: |:---------------------: |
| `hubId` | `number` | **Required** | [Hub ID](https://knowledge.hubspot.com/account-management/manage-multiple-hubspot-accounts#check-your-current-account) identifies your company's account |
| `async` | `boolean` | `true` | sets the async attribute on the script tag |
| `defer` | `boolean` | `true` | sets the defer attribute on the script tag |

### Example configuration

To configure the plugin add the plugins and options to `docusaurus.config.js`

```js
{
plugins: [
[
'docusaurus-plugin-hubspot',
{
hubId: YOUR_HUB_ID,
async: true,
defer: true,
}
],
...
]
}
```

## Troubleshooting

If you are experiencing issues refer to HubSpot Support article for "[Troubleshoot the HubSpot tracking code](https://knowledge.hubspot.com/reports/how-do-i-know-if-my-hubspot-tracking-code-is-working)."