Google Core Analytics API - Data accuracy - google-analytics

I have a Console App. which downloads the Acquisitions Report by querying the Google Analytics Core API.
Here is a screenshot of my query as shown on Google Analytics Query Explorer:
I am unable to obtain a complete match of Goal Completions data between the API Data Output and the Analytics web interface. The variance is not too high but it exists. The Query Explorer and my Code Extract both match, but again, both of them mismatch with the data shown on the Analytics Web Interface.
All query parameters match 100%; including dates, Profile ID, ..etc.
I read articles online such as this one and this one, which elaborate on the inaccuracy of the Goal Completions data in google analytics, I wonder, could this be likely what is happening here?
Could this be related to bots and spiders? How do I exclude these from the query by using code?
Many thanks.

Related

Can we access the benchmarking report/data from Google Analytics reporting API?

I am trying to access the Google analytics data for Benchmarking reports via API or programmatically
I couldn't find this in the reporting API or metadata API. Am I missing something?
The google analytics website uses the Google analytics api to get its data. So as long as you find the exact same dimensions and metrics you used in the report you are talking about then yes you could recreate the report using the Reporting API. Some of the reports contain calculated fields which you will have to calculate yourself by requesting the data that is needed for the calculation in order to get the correct results.
If you want the actual results to be computed for you and see the graph itself the answer is no. The api is just raw data you have to do all the calculations and display yourself.

Discrepant Google Analytics Data In PowerBI When Using Built In Connector

I was tasked with creating multiple PowerBI reports and dashboards that encompass our website data from Google Analytics (GA). I started with our primary website, and used the built in custom connector from PowerBI to consume this data. This connector, however, is "supported" by Google, and I'm having some issues with the data.
Google Analytics Data
PowerBI Data
As you can see in these two screenshots, some of the data matches, and some of it does not. The time frame for both screenshots show for Nov. 2019. I understand there may be a little bit of data discrepancy; however, the custom connector in PowerBI does not allow for me to show the unique users. This is one of the most important attributes to any websites as it is more accurate showing how many individuals are actually visiting your website due to the cookies on their machine. Another big data issue I noticed is the bounce rate is almost twice as much as the actual bounce rate in GA.
Is there any way to bring in the Unique User and Bounce Rate metric accurately? The marketing team currently uses DashThis, and it shows this data, so I know it's possible- I just don't know how it's being done.
So Power bi's connector for google analytics has a sampling issue and an API Calls limit. The standard limitations and quotas for Google Analytics API requests are documented in Limits and Quotas on API Requests. However, Power BI Desktop and Power BI service allow you to use the following enhanced number of queries.
Queries per day: 1,500,000, Queries per 100 seconds: 4,000
Might be better to connect Google analytics to a data warehouse such as Google BigQuery, which will help you get access to historical data that you won't be able to get with Power bi's connector. I'd suggest using a third-party connector.

Can't get proprely amount of Users in API

When i use personal reports in Google Analytics i see different numbers of users in the report than when i get them with API.
Support of GA answered, that this is ok, because system use different ways to count users in report when i use GA and in data which i got from API.
Is there any way to get same number of users by API, which i can see on site of GA in my personal report? Because now, when i try to get users with API for same period and with same dimensions i get different number of users, than i can see in personal report on GA site.

Accessing Google Analytics Reports using the API

I know how to use the Google API to access different metrics and dimensions to query for specific data. However, I am faced with a different scenario. I would like to know if there is any mechanism to access the reports/custom reports that are already created using the Google Analytics web user interface.
Our client has created about 15 different reports and now wants us to simply get the data into his own database rather than having to log into the Google Analytics website and run the report and export the data.
Can anyone please guide me on this?
Not sure if this is exactly what you are thinking, but you can always use the Reporting API to extract the data using python/javascript/etc and then store the data locally in your database. For more info, check out the Google Analytics Query Explorer and try out different combinations of dimensions and metrics to be able to extract the data. You can then use any number of different Core Reporting API Client libraries to access the analytics database.

How to query Google Analytics using Javascript

We're want to query Google Analytics remotely, to retrieve (and display) a list of most popular pages (in a certain period) on a website. The examples I've looked at, for querying Analytics using Javascript, seem to require an user/person to login. Is this correct? Is there a way of skipping this step, and querying Analtyics unattended?
Thanks,
Toby
No. the data inside Google Analytics is potentially strategic and the tool doesn't provide non-logged in access at any time.
In order to do what you want the best approach is probably to query the data using your credentials on the server side and store the data on a database. Run that again every night or so.
Then you just query the database and generate the count to display on the frontend.
You don't want to do that on javascript because you would be exposing your credentials to anyone visiting your site to query all your Google Analytics data.

Resources