Search code examples
google-analyticsgatsbygatsby-plugin

How can I integrate Google Analytics to an older version of GatsbyJS?


I'm using GatsbyJS 2.22 and the two existing Google Analytics plugins seems incompatible with my version. Is there any way to install an older version of the plugin?


Solution

  • Just use the @ flag:

    npm install gatsby-plugin-google-analytics@1.2.0
    

    Change 1.2.0 for the desired version.

    Keep in mind that maybe some plugins or dependencies will not be compatible with the desired version.