Setting up Google Analytics API for Statistics

I followed the video instructions to install Hivepress Statistics:

I’m confused on a couple points:

  1. I already have Google Analytics on our website. So I should not enter the View ID? But I should add the Tracking ID?
  2. What’s the purpose of connecting to the Google Analytics API? Is it necessary?

I opened our Google Developer Console and added a new project with the Google Analytics API enabled as instructed in the video. And I added our domain as an authorized Redirect URI. But I’m getting this error when trying to “grant access”:


Please make sure you add Google APIs How to enable Google APIs - HivePress Help Center.
You must add two fields (View ID and Tracking ID) as the instructions specify How to integrate Google Analytics - HivePress Help Center.
If you do not configure the Google Analytics API correctly, the Statistics extension will not work.

Thank you for the clarification about the API.

I’m still unclear about if I need to enter the View ID. I already have Google Analytics on this site through another plugin (Google Site Kit). So it sounds like I only need to enter the Tracking ID and authorize the API?

According to this help file, it sounds like I don’t need to enter it again?

Yes, if another plugin already loads the GA tracking code you can leave the Tracking ID field empty. Setting View ID and granting access to Google Analytics is required though.

@ihor just to clarify, I think you said it backwards.

The help file says to…

Enter the Tracking ID
Leave the View ID blank

Sorry if it’s not clear, I meant that View ID is always required, but Tracking ID is needed only if there are no other plugins related to Google Analytics that already load the tracking code:

Set Tracking ID only if there’s no tracking code on your site yet…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.