Different Values Between API and Web Google Analytics - google-analytics-api

I am trying to automate the extraction of information from google analytics. I compare the result of the api and the web they are different. Although I'm applying the same filters in the web panel and the api.
I think the filters are correct because I get the same campaigns as a result, but with different values.
If someone can help me or explain the problem, I would appreciate it.
Result Query Explorer
Result analytic dashboard

Related

How to get around salesforce API limit

I am building a chrome extension/third-party app that needs to read data from salesforce.
One way is to make a API call directly to salesforce whenever a user needs to query something, but this will create a large number of API calls.
What I attempted to do is to pull a ton of data from salesforce into a Google Sheet using the reports API, on an hourly basis, then query the data through Google App Script. But Salesforce's 2000 row limits for Reports and SOQL API, as well as the runtime limits posed by Google App Script, make my life difficult :(
What are the best ways to get data from salesforce for third party extensions?
Appreciate your help!
The bulk API can fulfill your needs as it hasn't a limitation on the number of returned rows.

reporting api v4 unique events metric issue

I just want to ask you about the Reporting API v4 because I'm seeing different values between API response and web reporting view (Google Analytics dashboard). The metric is unique events.
This is the query using API Explorer
API Explorer query screenshot
And here is the API Explorer result (if you want to see the query, read my first comment below, please notice green and red highlighted)
API Explorer result screenshot
On the other hand I'm using the web report viewer and for unique events I'm always seeing different values (also I used many other filters, with different scenarios, always returning different data in unique events metric), but (the weird thing) is total events value is ok (in all cases). I used the same dates for API and web view calls (also I applied same filters on web reporting, also I tested using other metrics and the values are the same, so there is no layer 8 issue)
Web reporting screenshot
Do you know what's going on here? I don't know which value is correct, I don't know if API or web reporting is failing.
Best.-
Please check this changelog entry - https://developers.google.com/analytics/devguides/changelog#event_tracking and this support article - https://support.google.com/analytics/answer/7084499?hl=en
It's all connected to the changes in unique events-connected metrics from September '16 (you can read more about it on Analytics Blog under "Improving Google Analytics Events with Unique Events" post).
Right now:
WEB UI "Unique Events" = API "ga:uniqueEventsTemporary";
WEB UI "Unique Dimension Combinations" = API
"ga:uniqueDimensionCombinations" and "ga:uniqueEvents".
This is the query using API Explorer (I posted in an answer because I couldn't do in question, only 2 links allowed)
API Explorer query screenshot

Find users with a particular license in Azure Graph REST

Has anyone queried the Azure Graph REST API by licenses? I can't find any examples using REST online. We use REST for our operations and a need has come up to generate license reports and I'd like to be able to execute queries based on license codes.
Any help would be appreciate. Thanks for your time.
According to your description, it seems that you’d like to filter users by assignedLicenses that is a multi-valued complex type. From this documentation, we could find that currently the API seems not support querying of (filtering) a multi-valued complex type (assignedLicenses).
As a workaround, you could try to get users from API and leave the filtering on the client side.

Google AdWords - How to correctly use Auto-Tagging and UTM variables in AdWords?

Let me preface this question with a little background information:
I have a web based system that takes in data from the Google Analytics API and displays that information based upon each clients needs via a web interface.
I use unique URLs for each source/campaign ( Google AdWords, LinkedIn, Facebook, Display Ad Networks, etc. ) containing 'utm' variables and the system generated values. Example: url.com/?utm_source=Google&utm_medium=PPC&utm_content=1234&utm_campaign=This-is-the-campaign-name
Google Analytics is the repository, since a large majority of clients use it on their websites, it's a natural fit to use them as the workhorse for data capturing.
All of the clients have active Google AdWords campaigns, connected Google Analytics accounts, and they have enabled Auto-Tagging.
When I test a Google text ad, the link that is populated in the web browser is similar to the following: url.com/?utm_source=Google&utm_medium=PPC&utm_content=1234&utm_campaign=This-is-the-campaign-name&gclid=123xyz
My current dilemma is centered around AdWords campaigns with Auto-Tagging enabled. The data capture process for all sources ( excluding Google AdWords ) works fine. I have unique tracking codes populated in the 'utm_content' variable, therefore when I call the Google Analytics API, this tracking code acts as my unique identifier. For all Google AdWords campaigns, I update all the destination links within the ad creative to include the system generated URLs that also include the prepopulated values. When viewing the reporting in Google Analytics, the variables/values are non-existent, it is as if Google completely disregards these values and uses a back-channel from Google AdWords to Google Analytics to input the campaign properties. For these Google AdWords campaigns, the visits are not lost, but rather they are associated to the standard Google AdWords campaign/ad group in Google Analytics.
Here is a list of things that I do know:
From what I have read, disabling Auto-Tagging would fix this issue and allow the 'utm' variables and their values to be passed from Google AdWords into Google Analytics. The consequence of disabling Auto-Tagging would be the loss of click to conversion and cost data.
KISSmetrics has documented a similar issue when working with clients that also use Google Analytics. Links that contain the 'gclid', Example: url.com/?gclid=123xyz ( Auto-Tagging enabled ), will not have any additional information logged ( campaign source, medium, etc. ). Links that also contain the 'utm' variables, Example: url.com/?utm_source=Google&utm_medium=PPC&utm_content=1234&utm_campaign=This-is-the-campaign-name&gclid=123xyz, this information is passed to KISSmetrics. For this second scenario, I am assuming the KISSmetrics javascript is reading the URL variables and values.
Here is what I am trying to achieve:
I am trying to avoid having to add a proprietary javascript that reads the URL variables and values and then posts that information to an external URL.
I do not want to add line items to the current Google Analytics javascript ( example: custom variables ).
I am looking for an 'out-of-the-box' solution that perhaps takes into consideration AdWords ValueTrack parameters. My familiarity with these variables is limited, therefore I can not determine if one of these values can be used as a unique identifier to later reference when I access the data using the Google Analytics API. Or as an alternative, using a Google AdWords dimension to do the same. See http://developers.google.com/analytics/devguides/reporting/core/dimsmets/adwords.
I would like to determine if it is possible to continue with the methodology of generating unique URLs, assigning them to Google AdWords campaigns, and taking the results of those campaigns from Google Analytics via their API, without compromising the click to conversion and cost data ( disabling Auto-Tagging ).
Thanks in advance for reading through my plight and any feedback you provide will be greatly appreciated.
So you are correct. When Google Analytics sees both UTM params and the auto-tagging GCLID, it discards the UTM params in favor of the GCLID.
However... acknowledging that this is an issue, especially since AdWords advertisers that use their Conversion Import feature often use both UTM and GCLID, they enabled an override switch in Google Analytics accounts that allows the use of both.
You can learn more about it in their FAQ at https://support.google.com/analytics/answer/1033981?hl=en
I think this should solve your problem.
Jon

Why is custom variable data in the Google Analytics Data Export API data different from my Google Analytics dashboard?

I have a custom variable defined on my site and the data is being recorded properly in my Google Analytics account. When I go to access the data via the Google Data Feed Query Explorer, the data I get isn't the same. Really, this is only the case with 'Visits' and any metrics calculated using it.
This is what I see in my dashboard:
http://www.screencast.com/t/QJl21ZOmpw
This is what I see in the query explorer:
http://www.screencast.com/t/WNGLiUUWum
I made sure the time frame matches and have pulled the same metrics. 'Hits' (aka pageviews) match up perfectly every time. Visits is obviously off and seems to be messing up other metrics that depend on it, such as 'Pages/Visit' (aka pageviews per visit).
I have reviewed the code and the custom variable is being set prior to recording the pageview. Am I missing something? My understanding is that Google Uses this exact same API to run their Analytics Dashboard, so why am I getting different data?
Try removing the visitors metric from your feed in the Query Explorer. A "Visitor" is different than a "Visit". I believe the stats of the Google Analytics screenshot have nothing to do with visitors. And including this metric might actually limit your result set to the unique visitors (I think).