I would like to use the Google Analytics API to get the data displayed on the Acquisition Overview webpage. Especially, I need to get the sessions (formerly called visits) break by Default channel grouping : Direct, Organic Search, Referral, Social, Paid Search, Email, Display and (Other).
As explained here, these groups are based on regex. Therefore, it might be possible to recode these rules, but I would prefer to use these groups as a dimension.
I googled it and most of the answers are referring to Multi-Channel Funnels (MCF), but according to the MCF dimensions & metrics reference, it's more about conversion.
Does anyone know how to use the Google Analytics API (or GA MCF API) to get such data ?
Thanks a lot !
Acutaly I think you should be looking at the Core Reporting Api and dimensions and metrics
The thing that's going to be a little tricky is that first column. That column is Traffic Type and not something you can export directly. It is calculated based upon Source / medium.
Direct = Source not equal (direct) and Medium not equal to organic referral and cpc
Campaign = Source not equal to (direct) and Medium not equal to organic referral and cpc
organic = Medium is equal to organic
paid = medium is equal to cpc
I cant remember what social was I will have to look into that.
Here is the link where you can find the GA definitions for Default Channel Groupings:
https://support.google.com/analytics/answer/3297892?hl=en&ref_topic=3125765
When you go to this link, just click on the edit icon for the channel whose definition you want to see.
For example, for Social, the definition is:
Social Source Referral exactly matches Yes
OR
Medium matches regex ^(social|social-network|social-media|sm|social network|social media)$
Hope this helps.
Related
I've been trying to track the conversion rate of users acquired through organic search to direct (Users who discover the site through an organic medium and eventually start coming back to the site on their own through direct search). The way I decided to go about this was create a segment with a sequencing of the following kind-
The results that I get are very counter-intuitive which leads me to think that maybe my understanding of how sequencing works is not correct. What could I change to get a measure of organic to direct search conversion?
Changing the scope of the segment from 'Sessions' to 'Users' should fetch you the desired result.
I'm looking for a way to integrate all my DFP data (impressions, CTR, revenues, etc.) to my Google Analytics campaigns (and sources, medium, etc.).
From what I understand Google Analytics premium/360 has a feature which integrates with DFP data but I also see that it costs (at least) $150K/year which is a bit over my budget right now :)
It seems like a pretty common issue so I think I'm not the first one to need a functionality like that.
Otherwise what are my option to track if a specific marketing campaign is yielding the expected revenues ?
Thanks !
I recently ran an e-mail campaign with a partner, who sent me over a URL with their own UTM parameters so they could track performance on their side.
When I handed the information over to our e-mail team and checked as the campaign went live, it appeared that they, out of habit, had added their own UTM parameters on top of the ones sent over by the partner, resulting in a click-through URL that looked like the following -
http://spirit.cruises.com/?cm_mmc=partner_email-_-sprt-multi_product--20161028--clia_plan_a_cruise_month&utm_medium=partner_email**&utm_source**=sprt-multi_product**&utm_campaign**=20161028&utm_content=clia_plan_a_cruise_month**&utm_source**=responsys**&utm_medium**=email**&utm_campaign**=20161028_50pct__Dual_Cruise_Email
As you can see, there are duplicate source, medium, and campaign parameters.
Does anyone know what happens in this situation? Does Google Analytics count both, or just the first, or just the last, or none? What is best practice when there are two parties that want to track performance of a URL in a campaign, and they may have different naming conventions?
(This is my first question, so please be nice :) Thanks!)
GA counts the last set. The proper way to deal with this is to avoid the situation. Email Software is often set to automatically add utm parameters to links (do you do not have to do it manually), but then all email marketing software I know would allow to override the configured default parameters.
I am not sure how your partner could track performance "on their site" via utm parameters unless they have their own GA code integrated in your website (or do you mean that they have access to your GA ?).
If there are two sets of analytics code that require different campaign attribution you would have use differently named parameters - let's say utm_medium2, utm_source2 and utm_campaign2 - and manually override campaign attribution for the second tracker:
// add this to after your usual tracker
ga('create', 'UA-XXXXX-Y', 'auto', 'partnerTracker');
ga('partnerTracker.set','campaignName',<value of utm_campaign2>)
ga('partnerTracker.set','campaignMedium',<value of utm_medium2>)
ga('partnerTracker.set','campaignSource',<value of utm_source2>)
ga('partnerTracker.send','pageview')
That would send data to a second account and override campaign attribution fields. It seems quite unlikely that you have or want that, but if you want to allow your partner to independently track utm values on your website (and everything else with it) that would the way to go.
Frankly I think you should just remove your partners utm parameters. Utm parameters make only sense for the owner of the respective GA account, and that is probably you, not the partner.
I agree with the first answer except for that last point where has says to remove the partner's UTM parameters.
In your case, the destination for the link provided to you by your partner is NOT your own website. The link goes to your partner's website. Therefore, your GA account has zero relationship with the link he sent you.
The way we're getting around this (without doing anything in analytics) for our many partners that we send links to is by using different email subjects per partner. Most email platforms use the subject line (or the internally defined Campaign "Name") as the value for UTM_Campaign.
So different subjects that include the partner organization in them:
"Special discount for ABC Organization members!"
"Special discount for XYZ Company members"
We can then analyze each unique campaign name in GA.
I'm exploring Google Analytics features and I've noticed something surprising.
Unless I'm mistaken, the banner medium is associated with the default system channel group Display, although the Banner medium is associated with the ground (Other).
According to the Default channel definitions, the Display group use the regex ^(display|cpm|banner)$
The filters on regex seems to be case-insensitive(as explained here). As a result, when I try to get the data for the Google Analytics API when the filter ga:medium=~^(display|cpm|banner)$,ga:adDistributionNetwork==Content;ga:adFormat!=Text, I get results for both "banner" and "Banner" medium.
However, when I check on the Google Analytics website, the banner medium is in the Display group, and the Banner is in the (Other) group.
Could you please confirm me this point (and explain if possible :)) ?
Thanks a lot !
Banner is being placed under (Other) because it is capitalized. What you can do is create a filter that will convert any campaign parameters to lowerCase.
To do this:
Create a new filter > select "Custom Filter"
Select the Lowercase filter
And from the dropdown, select Campaign Medium
This will convert all of your campaign mediums to lowercase, and will place them in the correct channel grouping.
I'm doing some complex reports for google analytics and would like to ask you if the following is possible. The client wants to have just organic data for a bunch of metrics. Like pageviews, visitBounceRoutes, etc. The query I ended up with is the following:
https://www.googleapis.com/analytics/v3/data/ga?dimensions=ga:source,ga:medium,ga:keyword,ga:day,ga:month,ga:year&end-date=2013-11-20&fields=columnHeaders/name,rows,totalResults,totalsForAllResults&filters=ga:medium==organic&ids=ga:79067749&metrics=ga:pageviews,ga:pageviewsPerVisit,ga:visitors,ga:avgTimeOnSite,ga:newVisits,ga:visitBounceRate&start-date=2013-10-20
However the response is as follows:
'{"totalResults":0,"columnHeaders":[{"name":"ga:source"},{"name":"ga:medium"},{"name":"ga:keyword"},{"name":"ga:day"},{"name":"ga:month"},{"name":"ga:year"},{"name":"ga:pageviews"},{"name":"ga:pageviewsPerVisit"},{"name":"ga:visitors"},{"name":"ga:avgTimeOnSite"},{"name":"ga:newVisits"},{"name":"ga:visitBounceRate"}],"totalsForAllResults":{"ga:pageviews":"0","ga:pageviewsPerVisit":"0.0","ga:visitors":"0","ga:avgTimeOnSite":"0.0","ga:newVisits":"0","ga:visitBounceRate":"0.0"}}'
Can the dimensions ga:source,ga:medium,ga:keyword be mixed with the above metrics? It seems they can't since if I omit them the API returns an array of values 1 per each day within the specified range.
Where can I find more information about this and what categories are mixable? https://developers.google.com/analytics/devguides/reporting/core/dimsmets just shows all the available metrics but do not explains how they are combined and which one would be valid requests. I'm new at the analytics API and would be great any kind of help or guidance
Thanks a lot
Google Analytics Query Explorer is your friend for playing around with analytics dimensions/metrics/filters ;-)
Try http://ga-dev-tools.appspot.com/explorer/?dimensions=ga:source,ga:medium,ga:keyword,ga:day,ga:month,ga:year&metrics=ga:pageviews,ga:pageviewsPerVisit,ga:visitors,ga:avgTimeOnSite,ga:newVisits,ga:visitBounceRate&filters=ga:medium%253D%253Dorganic&start-date=2013-10-20&end-date=2013-11-20&max-results=100
Some thoughts:
Those dimensions & metrics should work -- maybe there was no organic data recorded during that time range?
Try removing the ga:medium==organic filter and see what your data looks like.
Does the profile you're using (ga:79067749) have any filters on it? If so, maybe try a different profile that has unfiltered data. (Analytics best practices -- make sure you have a profile with no filters applied that captures all data.)
As Mike said, there is no problem with the combination of metrics and dimensions you are using.
If you are entering the URL query directly in the browser problem might be the lack of URL encoding in your query string. For example, you need to convert == to %253D%253D
For example, instead of ga:medium==organic, you need ga:medium%253D%253Dorganic
If you build your query in the Google Analytics Query Explorer as Mike suggests, you can grab the direct link to your report by clicking the link symbol in the upper left: