How to measure conversion rate of custom dimensions on Google Analytics? - google-analytics

I have added some custom dimensions via dataLayer (GTM). Now I'm creating reports in data studio and want to see unique purchases, revenue and conversion rate of these custom dimensions. I'm using ecommerce to track purchases. When I add one of my custom dimension as dimension and unique purchases as metric to create report, it gives me nothing. What should I do to have the report I want?

Have a look at this.
You're most likely pairing dimensions and metrics of incompatible scopes together. The scope of of the custom dimension always needs to be "wider" than the scope of the custom metric.

Related

How to get a list of available metrics and dimensions for use with the Google analytics API

There are several metrics and dimensions - let it be a list.
For example:
Year dimension and New Session measure.
How to get a list of available metrics and dimensions for this list via Google Analytics API java SDK V3 so that the error does not fall
"Selected dimensions and metrics cannot be queried together"?
Dimensions and metrics list
How to get a list of available metrics and dimensions for this list via Google Analytics API .
The first thing you need to understand is that the Google Analytics Core reporting API and the Google Analytics reporting APIs. Only return the data from within Google analytics. Neither has the power to return to you a list of dimensions and metrics.
To get a list of Dimensions and metrics that can be used in these APIs you should look at the Meta data api . It returns a list of all the dimensions and metrics that can be used with the Google Analytics APIs to query Google analytics data.
Example
GET https://www.googleapis.com/analytics/v3/metadata/ga/columns
Invalid dimension and metric reference.
"Selected dimensions and metrics cannot be queried together"?
Message means that some metrics and dimensions just cant be queried together because there isnt the proper data relation between them. There is no api that will tell you which dimensions and metrics can be queried together.
You have two options:
You can use the Dimensions & Metrics Explorer to check which dimensions and metrics can be used together they will be grayed out if they cant be used together.
You can just make a request as you have and check for an error.
Sulution: take json from here https://ga-dev-tools.appspot.com/ga_cubes.json - this is a list of cubes. For each cube it contains the set of dimensions and metrics that it consists of.
The algorithm is as follows:
We run through the List (for example Year dimension and New Session measure), and look if at least one of these cubes has all the dimensions and metrics from the list, then such metrics and dimensions are compatible, otherwise not.
So it works in https://ga-dev-tools.appspot.com/dimensions-metrics-explorer/
However, it is worth considering that some metrics work together only when there is an additional dimension. For example: ga:14dayUsers, ga:newUsers works only with days dimension.

Google Analytics - View doesn't report correct data when filtered with a Custom Dimension

I've set up a Custom Dimension at the website and the data is being registered correctly, as I am able to segment standard reports with a secondary dimension (using this Custom Dimension) and also to use this Custom Dimension as a segment.
However, when I set up a new View in GA filtering by this Custom Dimension, I see less than 20% of the data (sessions, pageviews, transactions, etc.) compared to what I see in a view without filters, but segmenting with the same Custom Dimension.
Has anybody had this kind of problem?
This can be an issue of the scope. For example, include view filter requires that filtered dimension be present in every hit. So if you're using session level custom dimension and only send it once per session then only 1 pageview will be there in filtered view. Contrary, Session segment requires that the filtered dimension appear at least once in the session and include all of the particular session hits.

Google Analytics - Doing a simple goal report

In the main report interface of Google Analytics under Goals > Overview it has a display of the goal name and the amount of completions for each goal.
What I want to do is replicate this in a custom report but I am having issues on how accomplish this. I have Goal Completions as a metric but it forces you to have a Dimension Drilldown and I can't see anything called Goal Name. Is there any way to replicate this very basic report?
The dimension set in custom reports will always give a drill down, thus by using something broad like year, you can see all your data in one row. If I wanted to use custom reports to show a overview of goals, I would do this...
Custom Report Setup
Custom Report
Goal Name would appear on metrics and google custom reports only show metrics to dimensions in report.
You can use any of below option for Dimensions
then you can select any of conversation rate of your goal from below metrics

Google Analytics custom dimension and metrics

Can i create custom dimension or metric with google analytics Management API? (Or other API...)
On January 23, 2015 the Google Analytics team released a change allowing for the creating of custom dimensions and metrics via the Management API.
Custom dimensions and metrics in the Management API allow you to create, get, list, update and patch custom dimensions and metrics for a Google Analytics property.
It is split up into two sections of the api Custom dimensions and custom metrics.
Not sure what language you where using so I cant help you with any sample code. I suggest you check the documentation.
Nope. Full reference for the Management API is here.
It doesn't include custom dimensions. Would be nice though, I agree.
The Provisioning API lets you create accounts, but that is in closed beta to AdWords partners at the moment. But however an account is created, the Management API is the one that lets you edit features such as filters at the moment, so would be where custom dimensions/metric control should also sit when available.
The collection APIs then let you send data to your custom metrics and dimensions once you have created them in the admin section of your web property.
Custom Dimensions and Metrics can be created in php for sure https://github.com/google/google-api-php-client
$dimension = new Google_Service_Analytics_CustomDimension();
$dimension->setName('[name]');
$dimension->setScope('[scope]');
$dimension->setActive(TRUE);
$client->management_customDimensions->insert('[webPropertyId]', '[analytics-account]', $dimension);
"$client->management_customMetrics" can be used in a similar way for metrics.
Gathering Data
In order to send data Google provides collection APIs and SDKs.
Configuring Accounts
Google Analytics provides programmatic access and management to configuration data through the Management API and account creation capabilities through the Provisioning API.
Reading Data
Google Analytics provides a simple and powerful APIs to retrieve report data from Google Analytics.
To answer the OP: you create custom dimensions and metrics via the collection API.
Dimensions: Describe data
A dimension is a descriptive attribute or characteristic of an object that can be given different values. For example, a geographic location could have dimensions called Latitude, Longitude, or City Name. Values for the City Name dimension could be San Francisco, Berlin, or Singapore.
Browser, Exit Page, Screens, and Session Duration are all examples of dimensions that appear by default in Google Analytics. Dimensions appear all of your reports, though you might see different ones depending on the specific report. Use them to help organize, segment, and analyze your data. In some reports, you can add and remove dimensions to see different aspects of your data.
Metrics: Measure data
Metrics are individual elements of a dimension that can be measured as a sum or a ratio. For example, the dimension City can be associated with a metric like Population, which would have a sum value of all the residents of the specific city.
Screenviews, Page per Session, and Average Session Duration are examples of metrics in Google Analytics.
Dimensions vs Metrics: What’s the difference?
Definitions: Goals, Metrics, KPIs, Dimensions, Targets

Google Analytics: Using custom variables to track growing values

I believe custom variables in Google Analytics can only be used to track the distribution of different values for that variable over time.
Suppose I have a forum and want to track the total number of posts made in that forum. Could I track them over time with Google Analytics, too? And how?
Custom Variables are a user-based dimension. So, traditionally, instead of measuring forum posts, they'd instead identify users who post on forums. That doesn't seem like what you're trying to measure.
Instead, you should consider looking at Event Tracking. Specifically, they allow for the tracking of 4 separate data points (per hit): 3 strings and a integer value.
So, you could use this to track when posts happen, or when comments happen on those posts, and then aggregate the values by whatever dimension you like using the API. You'd just need to bind the event to occur at the times you intend, with the data you want to track.
So, an example event call for you, tied to whenever someone posts a comment on a forum topic:
_gaq.push(['_trackEvent', 'Form Posts', 'Comment', topic_name, 1]);
You could then use the API to query particular views to tabulate whatever aspect of the event you want to aggregate. You can simulate those calls with the Google Analytics API Query Explorer. In this example, you could get number of Comments per day using Dimension set to ga:date, Metric set to ga:totalEvents, and then set the filter field to ga:eventAction==Comment

Resources