Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

jitsu-google-analytics-source

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jitsu-google-analytics-source

Google Analytics Source for Jitsu

latest
Source
npmnpm
Version
0.9.0
Version published
Maintainers
1
Created
Source

Google Analytics connector for Jitsu

This dir contains a Google Analytics connector for Jitsu which is based on Jitsu SDK

Dev tips

For testing the connector you'll need either OAuth or Service Account credentials.

  • Testing using OAuth:
    • You'll need to provide Client Secret / Client Id (you can obtain in in Google Cloud Console) and get a refresh token. Jitsu developed a small CLI utility to obtain Google OAuth tokens
    • To dump the data to stdout and make sure the data looks good run the following:
      yarn execute -c '{ "view_id" : "XXX", "auth.type" : "OAuth", "auth.client_id" : "XXX", "auth.client_secret" : "XXX", "auth.refresh_token" : "XXX" }' -s '{ dimensions: ["ga:dateHourMinute", "ga:pagePath", "ga:operatingSystem", "ga:browser", "ga:country", "ga:source"], metrics:["ga:pageviews", "ga:totalEvents", "ga:users"]}'
      
  • Testing using Service Account
    • Create a service account in Google Cloud Console
    • Share google resource (such as document or analytics property) with this account (account email will look like [username]@jitsu-customers.iam.gserviceaccount.com)
    • To dump the data to stdout and make sure the data looks good run the source with your Service Account JSON key as shown below:
      yarn execute -c '{ "view_id" : "XXX", "auth.type" : "Service Account", "auth.service_account_key": "{ \"type\": \"service_account\", \"project_id\": \"tracker-XXX\", \"private_key_id\": \"XXX\", \"private_key\": \"-----BEGIN PRIVATE KEY-----\nXXX\n-----END PRIVATE KEY-----\n\", \"client_email\": \"XXX\", \"client_id\": \"XXX\", \"auth_uri\": \"XXX\", \"token_uri\": \"XXX", \"auth_provider_x509_cert_url\": \"XXX\", \"client_x509_cert_url\": \"XXX" }" }' -s '{ dimensions: ["ga:dateHourMinute", "ga:pagePath", "ga:operatingSystem", "ga:browser", "ga:country", "ga:source"], metrics:["ga:pageviews", "ga:totalEvents", "ga:users"]}'
      

FAQs

Package last updated on 08 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts