Analytics
2.9K members online now
2.9K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
 
Guide Me
star_border
Reply

Equivalent API report for goal conversions by specific URL

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi - In GA I can set up a report to look at the number of conversions for a specific goal. I add a segment, and in conditions I set the 'page' to the URL of the page which generated the goal conversion. For example, looking at how many people contacted us after visiting a specific page I would select Goal9 and add a segment, condition, 'Page':/example-1.

 

I'm trying to set up an equivalent report through the API and I'm struggling to set the condition. I've returned results on the goal by setting it as a metric - 'ga:goal9Completions', but when I try to add a segment using 'ga:condition::gaSmiley Tongueage==/example-1/' I get invalid parameter/value.

 

Where am I going wrong?

 

Many thanks

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author David L
December 2015

Re: Equivalent API report for goal conversions by specific URL

[ Edited ]
Top Contributor
# 2
Top Contributor

Hi David,

you have to use 'sessions::condition' instead of 'ga:condition' and 'pagePath' instead of 'page' in you API request - so

  

sessions::condition::ga:pagePath==/example-1/

 

should do the job. Be sure to use the Google Analytixcs Query Explorer [1] to get things easy.

Christoph

[1] https://ga-dev-tools.appspot.com/query-explorer/

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author David L
December 2015

Re: Equivalent API report for goal conversions by specific URL

[ Edited ]
Top Contributor
# 2
Top Contributor

Hi David,

you have to use 'sessions::condition' instead of 'ga:condition' and 'pagePath' instead of 'page' in you API request - so

  

sessions::condition::ga:pagePath==/example-1/

 

should do the job. Be sure to use the Google Analytixcs Query Explorer [1] to get things easy.

Christoph

[1] https://ga-dev-tools.appspot.com/query-explorer/

Re: Equivalent API report for goal conversions by specific URL

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
That was great Christoph - thanks very much!

Re: Equivalent API report for goal conversions by specific URL

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
Hi, I need to do the same thing. Is there a way to do it without the API request? If not, do you have a good page where I can learn how to do that? Thanks

Re: Equivalent API report for goal conversions by specific URL

Top Contributor
# 5
Top Contributor
Hi Andreea,

what exactly are you trying to get without API?

Christoph