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

https://github.com/highlight/example-gatsby

An example Gatsby application using Highlight.
https://github.com/highlight/example-gatsby

Last synced: 2 months ago
JSON representation

An example Gatsby application using Highlight.

Awesome Lists containing this project

README

          

# Gatsby 3 and Highlight Example Application

## Install the Highlight Gatsby Plugin

```sh
npm install @highlight-run/gatsby-plugin-highlight

# or using Yarn
yarn add @highlight-run/gatsby-plugin-highlight
```

## Register Highlight as a Plugin

In your `gatsby-config.js`:

```js
module.exports = {
plugins: [
{
resolve: "@highlight-run/gatsby-plugin-highlight",
options: {
orgID: 'MY_ORG_ID',
// See all the options here: https://docs.highlight.run/reference#options
disableNetworkRecording: false,
disableConsoleRecording: false,
enableStrictPrivacy: false,
environment: 'production',
version: '5.2.3',
networkRecording: true,
}
},
]
}
```

## Calling Highlight Methods

If you need to call any [Highlight methods](https://docs.highlight.run/reference#track), you can do so by importing `H` from `highlight.run`

```jsx
// In Component.jsx
import { H } from 'highlight.run';

const Component = () => (
{
H.track('fancyButtonClicked');
}}>
My fancy button

);
```