landingPagePath query for multiple URLs

373 views
Skip to first unread message

Markus Steen Palomar

unread,
Oct 8, 2014, 12:30:49 PM10/8/14
to google-analytics...@googlegroups.com
Hello All,

I'm very new in using GA API and specifically struggling when using the query landingPagePath. 

Basically I want to pull SEO visits from specific URLs of my website but not 100% sure if I can do it by adding every URL in the query all together. See the example below (not working by the way).

ga:medium==organic;ga:landingPagePath=~london/s/482/fa/find.squery;ga:landingPagePath=~/spain/r58.htm

Thanks in advance for your help.

Markus
Message has been deleted

Adrian

unread,
Oct 8, 2014, 12:57:35 PM10/8/14
to google-analytics...@googlegroups.com
Hi Markus,

you already know the GA QueryExplorer? It's a helpful tool to test your queries in advance. 


for your specific request, why you do not use a regex OR function, this should work fine:

ga:landingPagePath=~(london/s/482/fa/)|(/spain/r58.htm)

| = OR

Best, Adrian 

Markus Steen Palomar

unread,
Oct 10, 2014, 12:12:57 PM10/10/14
to google-analytics...@googlegroups.com
Hi Adrian,

Thanks for answering to my post. You are correct and I can pull multiple URLs by using the query you suggest.

The problem I have now is that apparently the "regular expression must be less than or equal to 128 characters" making it impossible for me to pull data from many URLs.

Do you know how to resolve this issue?

Thanks again.

Markus

Mike Sullivan

unread,
Oct 11, 2014, 2:27:57 PM10/11/14
to google-analytics...@googlegroups.com
You can get past the 128 character limit by using the filter OR (,) instead of the Regex OR (|). Read the section on Combining Filters:

ga:landingPagePath=~london/s/482/fa/,ga:landingPagePath=~/spain/r58.htm

There is still a limit, though, in the overall length of the query URL. You can try a combination of the two approaches to reduce the overall length as much as possible.

Markus

unread,
Oct 13, 2014, 1:04:52 PM10/13/14
to google-analytics...@googlegroups.com
Thanks for your answer Mike. It worked well and managed to pull visits from 30 URLs.

--
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/9OCGwyeYgcc/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.

Reply all
Reply to author
Forward
0 new messages