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
- Host: GitHub
- URL: https://github.com/stackql/docusaurus-plugin-hubspot
- Owner: stackql
- License: mit
- Created: 2021-11-03T03:23:49.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-24T04:33:07.000Z (over 2 years ago)
- Last Synced: 2024-05-01T11:44:45.911Z (over 1 year ago)
- Topics: docusaurus, docusaurus-v2, hubspot, javascript, plugin, react
- Language: JavaScript
- Size: 7.81 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)."