Export data from google analytics attribution model - google-analytics

is there a way to export the data from google analytics Attribution Model comparison tool? I'm searching through all the dimensions an measures but i was unable to find the correct measure.
Is this data available through Core API?
Is there a combination of measures to calculate the different models?

You can use Google's MCF (Multiple Channel Funnel) API:
https://developers.google.com/analytics/devguides/reporting/mcf/v3/
The model you can use seems to be limited (Only First and Last) but at least you can export your funnel path and built your own attribution much easier.

Hey I have asked google for an answer, they don't have this developed yet but there is an open request ticket for it, it could take a few months. I will keep track of this. To get the exact same dimension and metrics, bigquery can do the job.

Related

where to find google analytics dimensions values

I'm trying to implement my own google analytics reporting UI where users pick metrics and dimensions and then pick the filters according to what the user have already chosen and my question is there any way to get all the dimensions values? for example the dimension "country" can take the value of all the countries(USA,Fance,etc...). I've did some research on google but found nothing. any help is appreciated!
I would suggest using something like Analytics Edge extension for Excel to do exactly what you're trying to do.
If that doesn't completely solve what you're doing, the extension does pull all the pullable fields from GA. It also gives you an insight into what kind of request it sends to G to pull the data. Very useful for debugging, but also for learning the reporting API.
Alternatively, there's documentation on the API here: https://developers.google.com/analytics/devguides/reporting/core/v4
Make sure you know whether you're using GA4 or GA UA. They have different APIs.

Unsampled data with Google Analytics API

I am trying to automate the weekly report. Currently, I am using Google Analytics website to get the data for my report. Sampling level is higher precision.
I tried to get the same data by Google analytics API set samplingLevel as HIGHER_PRECISION. However, I am still getting the sampled data.
For FASTER, Precision Level is roughly 25% whereas for DEFAULT and HIGHER_PRECISION sampling level is roughly 50%.
On Google Analytics website, it says 'This report is based on 100% of sessions'. Can I get the same level of accuracy with Google API? I am using Google Apps script.Response for HIGHER_PRECISION is not matching.
Sumit, the API and the Google Analytics UI are certainly different and similarly the sampling's effect on things is a different beast which must be handled properly to get anything useful out of it.
As was mentioned in the comment, you can achieve high precision unsampled reports by (typically) shortening your date range that you're querying for and then "walking" the data.
To walk the data, you are essentially just gradually incrementing that small date range as you move through the desired data.
The "unsampled reports API" is... well, not the best. Considering that's what they are avoiding giving the end user in the first place, the offering available is not a very good long term or large project friendly solution. I would recommend small date ranges and then doing a data walk.
Happy Coding
There are several solutions to avoid sampling issue in Google Analytics by automating the process of data export for short date ranges.
I prefer this tool, it's pretty simple to use: MadStats.io

Attribution model in Google Analytics reports

We use standard and custom reporting in Google Analytics. But for our reports we need another attribution model. In https://support.google.com/analytics/answer/1665189 we have found that Analytics uses Last Non-Direct Click model by default when attributing conversion value in non-Multi-Channel Funnels reports. But what about switching to another default model? Multi-Channel Funnels and Model Comparison Tool are not suitable. We need custom report with First Interaction model.
You can not change model atribution in the analytics report API
but u canu use mcf API, and create custom model
https://developers.google.com/analytics/devguides/reporting/mcf/dimsmets/?hl=ru
using dimension mcf:sourceMediumPath
We faced the same problem and it seems that you cannot change default attribution model for all other reports then MFC in Google Analytics Standard. There are basically two ways to workaround though:
You can play with MFC/Attribution reports and change attribution
models there and try to set up custom report with First Interaction
model that satisfies your needs(but not all the dimensions/metrics will be available).
You can stream hit level data to
some other storage(Google BigQuery, Amazon RedShift etc), and build
your attribution by your own from the raw data(but obviously some
level of programming skills is required, http://noca.cz/githubgabq
is a good python example to start with collecting data)

Is there a good alternative to Google Analytics that does not sample?

I want to pay my writers based on unique page views. Right now I am getting my data from Google Analytics. The frustrating thing is that the numbers given by Google Analytics are from sampling.
So is there a Analytics Service to get unique page views that does not sample its data?
Or as anyone try doing something similar to what I am trying to accomplish, what would you recommend I do?
I use Unsampler
Extract unsampled data from a Google Analytics Standard profile. Avoid sampling and get at your real data.
Try to use PIWIK - it is server side analytics system, but you will must save all data on your server - you need separate mysql data base.

Google Analytics, calculating an average for a custom metric

In Universal GA there are a number of pre-set metrics available to you that represent averages; things like 'avg time spent on page' and 'avg Bounce rate'. However when I create a custom metric, it seems there is no way to calculate the average of it, you always see the sum.
Is there a way to view the average of a metric rather than just the sum ?
I understand that Universal GA is still in public beta, is this just a feature that has been missed out ?
In the current version of Analytics you can now use "Calculated Metrics". Those can be used for creating averages, among other things. You cannot use them for min/max though, it is limited to rather simple calculations.
So if your CustomMetric is gathered at hit-level, you want to define your calculated metric CustomMetricAvg as
{{CustomMetric}} / {{Page Views}}
You didn't miss anything. Calculated metrics are not available.
There's now a Google Analytics feature request for this, please star it or add your comment (hopefully Google Analytics team will notice).
The other option is to export the data and do the calculations outside of Google Analytics. You could do a normal CSV/Excel export, use the Core Reporting API, or try the Magic Script.

Resources