Help with getting Canonical ga:pagePath in order to strip our query parameters

107 views
Skip to first unread message

Andy Page

unread,
Jan 25, 2014, 6:02:53 AM1/25/14
to google-analytics...@googlegroups.com
I've been using your excellent Magic script to build some nice reports in Google Spreadsheets.

I have come across an issue that I'm not sure how to fix.

Background
=============

On blogger people can access either via desktop or via mobile. Mobile page views appends a ?m=1 to the end of the URL.

eg

Now when I try to build a "Top Posts" spreadsheet, I'm getting the articles listed twice ie once for the desktop and once for the mobile.

Screenshot


As you can see in the above example the same article "American Horror Story: Coven - Chapter 12, "Go To Hell" - Early Review | Spoilers" is listed twice. (Once for the desktop hits and once for the mobile hits ie m=1)

Is there any easy way to either combine the results so that mobile and desktop pageviews are combine into one, or have some fancy filter to pre-remove the ?m=1 parts so that the totals reflect both hits. Or if there is a different dimension I should be using rather than ga:pagePath ie is there some sort of canonical dimension?

Thanks in advance for any help/advice.

Regards
Andy

chris@shufflepoint

unread,
Jan 25, 2014, 11:30:35 AM1/25/14
to google-analytics...@googlegroups.com
Three options:
1. use page title rather than page path in your query
2. setup the profile filters in GA to do this
3. post-process your API results to aggregate the results to what you consider a "page"

Andy Page

unread,
Jan 25, 2014, 12:29:23 PM1/25/14
to google-analytics...@googlegroups.com
Thanks Chris, much appreciated.

I think the profile is a great idea. I'll giv that a go.


--
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/cm2MUkMsISU/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/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages