Skip to main content
All CollectionsInstall LiveSession
Install LiveSession on GatsbyJS
Install LiveSession on GatsbyJS

Install LiveSession on Gatsby.js site

Kamil avatar
Written by Kamil
Updated over a week ago

LiveSession and Gatsby integration

LiveSession provides a plugin that lets you install script even more easily.

In your project run

npm i @livesession/gatsby-plugin-livesession


yarn add @livesession/gatsby-plugin-livesession

Go to gatsby-config.js file and add a plugin, everything that you need is trackID:

// gatsby-config.js 
plugins: [{
resolve: '@livesession/gatsby-plugin-livesession',
options: {
trackID: YOUR_LIVESESSION_TRACKID, // Required, string
keystrokes: true || false, // Optional, default to false
rootHostname: '', // Optional

Plugin adds script only in production mode.

If you want to know more about options you can pass into config, go to LiveSesion Developers page.

Did this answer your question?