Gatsby
Seeka can be installed on Gatsby sites via the NPM package.
-
Install the browser SDK NPM package.
-
Install the Seeka Gatsby plugin with one of the below commands.
# Yarn classic (v1) yarn add @seeka-labs/gatsby-plugin-seeka@latest # NPM npm install --save @seeka-labs/gatsby-plugin-seeka@latest
-
Append below environment variables to your
.env
file. You can find your details in the Seeka app..envGATSBY_SEEKA_CONVERGE_PUBLICKEY=(copy value from seeka.app) GATSBY_SEEKA_ORGANISATION_ID=(copy value from seeka.app) GATSBY_SEEKA_INSTANCE_ID=(copy value from seeka.app)
-
Add the following to your
gatsby-config.js
file.gatsby-config.jsmodule.exports = { /// ... existing configuration plugins: [ /// ... existing plugins + { + resolve: '@seeka-labs/gatsby-plugin-seeka', + options: { + publicKey: process.env.GATSBY_SEEKA_CONVERGE_PUBLICKEY, + org: process.env.GATSBY_SEEKA_ORGANISATION_ID, + id: process.env.GATSBY_SEEKA_INSTANCE_ID + } + } ] }
-
Page views will automatically tracked. To track other events and enrich identities, see the tracking events and tracking identities in React docs.
Debugging / diagnosis
To identify if your integration is running correctly, see the diagnosing section for more information on how to enable debugging and diagnosis mode.