I'm trying to query basic productlevel dimension from GA in combination with custom dimensions at the product level and I can't get it to work:( Any help and/or suggestions are more than welcome! (current query is below)
SELECT
date,
hits.product.v2ProductName AS productName,
hits.product.productSKU AS SKU,
MAX(IF(hits.product.customDimensions.index=126,hits.product.customDimensions.value, null)) WITHIN hits AS customDimesion126,
COUNT(hits.transaction.transactionId)
FROM
TABLE_DATE_RANGE([XXX.ga_sessions_],TIMESTAMP('2016-10-16'), TIMESTAMP('2016-10-16'))
WHERE
hits.transaction.transactionId IS NOT NULL
GROUP BY
date,
productName,
SKU