How to get Traffic source data in universal analytics?
I'm trying the following code in firebug console:-
ga(function(tracker) {
var src = tracker.get('campaignSource');
console.log(src);
});
But it always logs 'undefined'.
The field 'campaignMedium' also returns 'undefined'.
But I get correct values for some fields like 'clientId' or 'screenResolution' or 'language'.
Is there some other process to get these infromation?
P.S: I'm using https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#trafficsources for reference of field names.
--
You received this message because you are subscribed to the Google Groups "google-analytics-analyticsjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-ana...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
JS code to parse referrals / domains / cookies
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-analyticsjs+unsub...@googlegroups.com.
Hi Nick,
I guess we all understand that this is handled server side and are aware that we can set campaign data via URL tagging or using fields in analytics.js code (vs. setting campaignParams with ga.js).
But going with Frank’s example:
If someone
lands on a page with campaign tagging, e.g. domain.tld/example.html?utm_source=source&utm_medium=medium
we can't extract the previous traffic/campaign data (as it currently is
possible with __utmz cookie), can we?
So in order to work with a similar solution as mentioned above we would have to set our
"own" traffic/campaign cookie that probably will not be 100%
compliant with the data in Analytics (which would be ok for such purposes if
set up properly).
Simple example:
--
You received this message because you are subscribed to the Google Groups "google-analytics-analyticsjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-ana...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-analyticsjs+unsub...@googlegroups.com.
ga('set', 'referrer', 'http://subdomain.site.com/facebooksigninreturn');
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-ana...@googlegroups.com.
Hi,All the session data is calculated on the server with Universal Analytics.Currently there is no way to get this in the analytics.js tracking code.-Nick
On Wed, Nov 6, 2013 at 2:25 PM, Frank B. <frank.b...@googlemail.com> wrote:
Hi Kaushik, same question here.
With ga.js I always extracted traffic source/campaign data from the __umtz cookie but no clue how to get this information with analytics.js.
Tried out the get method, too, same results... did take a look at the analytics.js code but as my JavaScript skills are very, very basic I couldn't figure anything out.
--
You received this message because you are subscribed to the Google Groups "google-analytics-analyticsjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-analyticsjs+unsub...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "google-analytics-analyticsjs" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-analytics-analyticsjs/NtwQFQAZ2Oo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-analytics-ana...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.