Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

@sekmet/gatsby-source-google-analytics-reporting-api

0.2.7 • Public • Published

Gatsby source for Google Anatytics Reporting API

Install

npm i gatsby-source-google-analytics-reporting-api

Configure

In gatsby-config.js:

    {
      resolve: `gatsby-source-google-analytics-reporting-api`,
      options: {
        email: process.env.CLIENT_EMAIL,
        key: require('fs').readFileSync('private.key'),
        viewId: `115350264`,
        startDate: `2009-01-01`,
      }
    },

Usage

    pageViews(path: {eq: $slug}) {
      totalCount
    }

License

MIT

Install

npm i @sekmet/gatsby-source-google-analytics-reporting-api

DownloadsWeekly Downloads

3

Version

0.2.7

License

MIT

Unpacked Size

4.33 kB

Total Files

4

Last publish

Collaborators

  • avatar