API returning incorrect transactionsPerSession and transactionRevenue data when a custom filter pagepath added

Viewed 81

I am using the API to get analytics data display, For that first I am checking data and parameters in this ga-dev-tool. have checked both ways in ga-dev-tool.

When I try without pagepath its works properly and I get data of transactionsPerSession and transactionRevenue. But when I try with pagepath in the same way it's not working and giving 00 for all these 2 values.

https://ga-dev-tools.web.app/query-explorer/

https://ga-dev-tools.web.app/request-composer/

Here I have also attached images for result with query parameters :

Image 1

Image 2

Image 3

Image 4

2 Answers

Quoting from Google Analytics Help Document

Not every metric can be combined with every dimension. Each dimension and metric has a scope: user-level, session-level, or hit-level. In most cases, it only makes sense to combine dimensions and metrics that share the same scope. For example, Sessions is a session-based metric so it can only be used with session-level dimensions like Source or City. It would not be logical to combine Sessions with a hit-level dimension like Page.

Hence, it makes sense to combine Pagepath with Pageviews but not with Transaction related metrics.

enter image description here

If you want to get transection related data from API

Then You have to pass ga:landingPagePath

Instead of ga:pagePath in dimension Filter

Let me know if you still getting incorrect transactionsPerSession.

Related