Segmenting by Custom Dimensions

February 02, 2015
By Bounteous
SELECT
     fullVisitorId AS Client_ID,
     LAST(IF(
          hits.customDimensions.index=2,
          hits.customDimensions.value, 
          "Regular")) WITHIN RECORD AS Customer_Type
FROM [google.com:analytics-bigquery:LondonCycleHelmet.ga_sessions_20130910]
HAVING Customer_Type = "Platinum"