Getting the SOURCE of a REFERRAL PATH

325 views
Skip to first unread message

JoshL

unread,
Sep 16, 2009, 1:25:52 PM9/16/09
to google-analytics-api - GA Data Export API
All,

This is very strange to me. When I pull referral paths from the API
it DOES NOT inlclude the source!? So I get a lot of /California/how-
many-questions-are-on-a-california-written-driving-test-q44533.aspx
without having a clue where it came from.

Any idea on how to determine the source?

Regards,

JL

Nick

unread,
Sep 17, 2009, 2:54:39 PM9/17/09
to google-analytics-api - GA Data Export API
ga:source ?

JoshL

unread,
Sep 18, 2009, 7:20:42 PM9/18/09
to google-analytics-api - GA Data Export API
Yeah - I think we figured it out. You basically need to take each
individual source of traffic and use it as a filter pulling the metric
cut by the referralPath dimension.

This seems to be a common theme with the API that's hard to wrap our
heads around - the number of extra calls we need to make to the API.
It seems that you guys could save a TON of server calls by either
grouping related data together (such as child nodes for referrers
under sources of traffic) and by returning all the various
permutations of a dimension request. If we could do something where
we define some kind of SUB DIMENSION against any stated dimension, it
would save having to rehit the API.

Just a thought :)

/j

Nick

unread,
Sep 24, 2009, 3:10:02 PM9/24/09
to google-analytics-api - GA Data Export API
Hi Josh,

One thought is if you only wanted referrers, you could use a filter
where medium==referral. That way all the sources would be real
domains. See if this works:
http://code.google.com/apis/analytics/docs/gdata/gdataExplorer.html?dimensions=ga%253Asource%252Cga%253AreferralPath&metrics=ga%253Avisits&filters=ga%253Amedium%253D%253Dreferral&start-date=2009-09-10&end-date=2009-09-24&max-results=50

Another option, is to not aggregate in the API, and instead setup a
profile filter through Google Analytics admin interface so that you
prepend the referral domain into the source. that way the data the API
retrieves already has this information:
http://www.reubenyau.com/google-analytics-hack-obtaining-full-referring-url/

Providing groupings is something we have look at through the API.
There is a similar feature request for allowing results obtained from
a GA API filter to be mutated into dimensions which then can get
metrics for those dimensions. That *should* solve the need for making
multiple queries in your case. Help us prioritize this feature by
adding use cases in our issue tracker:
http://code.google.com/p/gdata-issues/issues/detail?id=1430&colspec=API%20ID%20Type%20Status%20Priority%20Stars%20Summary

Hope this helps,
-Nick
Reply all
Reply to author
Forward
0 new messages