Not getting this to work in Drupal 9

Created on 30 April 2021, about 3 years ago
Updated 30 January 2023, over 1 year ago

Hi,

I followed the instructions which are not very clear to understand for someone who hasn't used this before. I'd be happy to assist with more comprehensive documentation but would need to get this working for myself first.

I have installed the module with composer

Went to: https://developers.google.com/analytics/devguides/reporting/core/v4/quic...

and followed the instructions under Point 1

Starting with: https://console.cloud.google.com/flows/enableapi?apiid=analyticsreportin... as per the instructions in Point 1 to enable the API and create the credentials

I downloaded the json file that was created

I added the email that was generated to allow read and analyze permission on the google analytics account.

Settings in the module:
I uploaded the renamed file: client_secrets.json and also included the absolute path to the file in the field provided.
Application name is the name I created under service account details
View ID - I'm not sure what this needs to be. I used my Google Analytics 8 digit number under View on this page https://ga-dev-tools.appspot.com/account-explorer/ There is also a Table ID which includes ga: followed by the 8 digit number under view.
Sort Dimensions I have ga:pageviews
sort mode I have Descending
Date Range: 6 months
Number of items to fetch: 50
Not selected Independent Cron
Not selected Debug mode.

I'm not getting any pageview values when I create Views with a column for Page Views.

What am I missing?

πŸ’¬ Support request
Status

Closed: works as designed

Version

2.0

Component

Documentation

Created by

πŸ‡ΏπŸ‡¦South Africa nravens

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States davedg629

    Couple things to add here in case others are having issues getting this module to work:

    1. When you follow the instructions to set up the Service Account in Google, make sure to add the user that is created (google gives you an email address to use) to your Google Analytics account.

    2. You need to enable the Google Analytics Reporting API for your Google API project. If you turn on database logging, you'll get a 403 error when you run cron if you haven't enabled the API. The error includes a link to enable the API.

Production build 0.69.0 2024