I'm trying to query the Google Analytics Reporting API with the following dimensions:
ga:productSku, ga:productName, ga:productBrand, ga:productVariant, ga:date, ga:transactionId
and metrics:
ga:itemQuantity, ga:uniquePurchases, ga:itemRevenue
About 60 rows are returned when querying at this level, but when I remove both ga:productBrand and ga:productVariant, about 1640 rows are returned.
My question is, why does adding the two columns cut so much data out?
Google analytics is a multidimensional database, not a relational database. The only way you will get data back is if all the data exists for all of the dimensions and metrics you are requesting.
There is appartly a lot less data avaiable for
ga:productSku, ga:productName, ga:productBrand, ga:productVariant, ga:date, ga:transactionId
and metrics:
ga:itemQuantity, ga:uniquePurchases, ga:itemRevenue
than there is for
ga:productSku, ga:productName, ga:date, ga:transactionId
and metrics:
ga:itemQuantity, ga:uniquePurchases, ga:itemRevenue
Which would imply that some of your data does not have ga:productBrand, ga:productVariant, associated with it.