Google Analytics Netlify Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//create jwt object | |
const jwt = new google.auth.JWT(process.env.GA_CLIENT_EMAIL, null, process.env.GA_PRIVATE_KEY, 'https://www.googleapis.com/auth/analytics.readonly'); | |
//authorize using jwt object | |
await jwt.authorize() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment