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.
- Host: GitHub
- URL: https://github.com/highlight/example-gatsby
- Owner: highlight
- License: 0bsd
- Created: 2021-07-27T23:58:56.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-09T05:24:12.000Z (almost 3 years ago)
- Last Synced: 2025-10-01T13:43:34.900Z (3 months ago)
- Language: CSS
- Homepage:
- Size: 7.55 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
);
```