Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

Deprecation warning / new version

Looking for a more robust and up-to-date version of this Gatsby Segment plugin? The following plugin has a few additional features and will be kept up to date as Gatsby migrates to v2:

Also note this repo will be deprecated in the near future in favor of the one above. Currently, we cannot guarantee this repo works with Gatsby v2.


A Gatsby plugin for Segment.


In your gatsby-config.js, add:

module.exports = {
  plugins: [
    // your other plugins...
      resolve: 'gatsby-plugin-segment',
      options: {
        writeKey: 'YOUR WRITE KEY'



© 2023 Gatsby, Inc.