Event Category query

485 views
Skip to first unread message

Markus Steen Palomar

unread,
Oct 10, 2014, 12:29:09 PM10/10/14
to google-analytics...@googlegroups.com
Hi guys,

I'm trying to pull total SEO enquiries to my website by using as Event Category "property inquiry".

I tried the following query which is not returning anything unfortunately. 

Metrics ga:totalEvents
Filters ga:eventCategory==property%20inquiry;ga:medium==organic

Does anyone know why this is happening?

Thanks in advance.

Markus

Mike Sullivan

unread,
Oct 11, 2014, 2:20:44 PM10/11/14
to google-analytics...@googlegroups.com
The way to troubleshoot a filter is to put the dimensions used in the filter into the query itself, and confirm that the values you are filtering for exist in the results the way you expect them.

i.e. query for ga:totalEvents,ga:eventCatgeory,ga:medium with no filter and see what you get.

Markus

unread,
Oct 15, 2014, 11:45:10 AM10/15/14
to google-analytics...@googlegroups.com

Hi Mike,

I get the following error when trying the query you are suggesting. 

1 report failed due to errors

  • Week 40 property inquiry test: Invalid dimension or metric: ga:eventCategory==property%20inquiry
This is the full query I entered as Metric:

ga:totalEvents,ga:eventCategory==property%20inquiry,ga:medium==organic

Thanks,
Markus

--
You received this message because you are subscribed to a topic in the Google Groups "Google Analytics Reporting API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-analytics-data-export-api/GvXR3BGTCiY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-analytics-data-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Adrian Heinrich

unread,
Oct 15, 2014, 11:58:25 AM10/15/14
to google-analytics...@googlegroups.com
Hi Markus,

I guess you have somehow a mistake in you original filter. 

Metrics ga:totalEvents
Filters ga:eventCategory==property%20inquiry;ga:medium==organic

Check the query explorer (http://ga-dev-tools.appspot.com/explorer/) and enter as a metric: 

ga:totalEvents

and as a dimension: 

ga:eventCategory

and check the dimension result for 'property inquiry'. Copy & paste to your original filter and try again...

Best, Adrian



--
You received this message because you are subscribed to the Google Groups "Google Analytics Reporting API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-data-...@googlegroups.com.

Markus

unread,
Oct 15, 2014, 12:33:02 PM10/15/14
to google-analytics...@googlegroups.com
Hi Adrian,

Thanks for getting back to me.

I followed your advice and the query explorer returns, among others, the following results for ga:eventCategory:

property inquiryX
registrationX
renewal cartX

In order to pull data for property inquiry I understand that my original query is valid (although doesn't work):

ga:eventCategory==property%20inquiry

What do you think?

Thanks,
Markus

Mike Sullivan

unread,
Oct 15, 2014, 1:28:53 PM10/15/14
to google-analytics...@googlegroups.com
It's been a long time since I suffered with the API at this level -- just remembered: do NOT substitute %20 for space....use + instead.

property+inquiry probably works fine....

To unsubscribe from this group and all its topics, send an email to google-analytics-data-export-api+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Google Analytics Reporting API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-data-export-api+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Analytics Reporting API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-analytics-data-export-api/GvXR3BGTCiY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-analytics-data-export-api+unsubscribe@googlegroups.com.

Markus

unread,
Oct 15, 2014, 2:49:33 PM10/15/14
to google-analytics...@googlegroups.com
Ok guys, I found a solution. I used "=~" instead of "==" in the query and it's pulling the data correctly. Also used "Filter" instead of "Dimension".

Metric ga:totalEvents
Filter ga:eventCategory=~inquiry;ga:medium==organic

Thanks a lot for your help.

Best,
Markus

To unsubscribe from this group and all its topics, send an email to google-analytics-data-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages