Google Analytics Premium BigQuery export schema in JSON format

Wednesday, August 19, 2015 Unknown

Do you need to upload an export from Google Analytics to a new BigQuery-table? You don't have the time to create the json-format of this table from the documentation? You're in luck! Now you can just copy/paste it from here:
[
    {
        "name": "trafficSource",
        "type": "RECORD",
        "fields": [
            {
                "name": "source",
                "type": "STRING"
            },
            {
                "name": "medium",
                "type": "STRING"
            },
            {
                "name": "keyword",
                "type": "STRING"
            },
            {
                "name": "campaign",
                "type": "STRING"
            },
            {
                "name": "adContent",
                "type": "STRING"
            },
            {
                "name": "referralPath",
                "type": "STRING"
            }
        ]
    },
    {
        "name": "hits",
        "type": "RECORD",
        "mode": "REPEATED",
        "fields": [
            {
                "name": "eventInfo",
                "type": "RECORD",
                "fields": [
                    {
                        "name": "eventLabel",
                        "type": "STRING"
                    },
                    {
                        "name": "eventValue",
                        "type": "TIMESTAMP"
                    },
                    {
                        "name": "eventCategory",
                        "type": "STRING"
                    },
                    {
                        "name": "eventAction",
                        "type": "STRING"
                    }
                ]
            },
            {
                "name": "customDimensions",
                "type": "RECORD",
                "mode": "REPEATED",
                "fields": [
                    {
                        "name": "index",
                        "type": "TIMESTAMP"
                    },
                    {
                        "name": "value",
                        "type": "STRING"
                    }
                ]
            },
            {
                "name": "minute",
                "type": "TIMESTAMP"
            },
            {
                "name": "appInfo",
                "type": "RECORD",
                "fields": [
                    {
                        "name": "installerId",
                        "type": "STRING"
                    },
                    {
                        "name": "appName",
                        "type": "STRING"
                    },
                    {
                        "name": "exitScreenName",
                        "type": "STRING"
                    },
                    {
                        "name": "appId",
                        "type": "STRING"
                    },
                    {
                        "name": "landingScreenName",
                        "type": "STRING"
                    },
                    {
                        "name": "name",
                        "type": "STRING"
                    },
                    {
                        "name": "appVersion",
                        "type": "STRING"
                    },
                    {
                        "name": "id",
                        "type": "STRING"
                    },
                    {
                        "name": "version",
                        "type": "STRING"
                    },
                    {
                        "name": "screenDepth",
                        "type": "STRING"
                    },
                    {
                        "name": "screenName",
                        "type": "STRING"
                    },
                    {
                        "name": "appInstallerId",
                        "type": "STRING"
                    }
                ]
            },
            {
                "name": "transaction",
                "type": "RECORD",
                "fields": [
                    {
                        "name": "affiliation",
                        "type": "STRING"
                    },
                    {
                        "name": "localTransactionShipping",
                        "type": "TIMESTAMP"
                    },
                    {
                        "name": "currencyCode",
                        "type": "STRING"
                    },
                    {
                        "name": "localTransactionRevenue",
                        "type": "TIMESTAMP"
                    },
                    {
                        "name": "transactionCoupon",
                        "type": "STRING"
                    },
                    {
                        "name": "transactionTax",
                        "type": "TIMESTAMP"
                    },
                    {
                        "name": "transactionId",
                        "type": "STRING"
                    },
                    {
                        "name": "localTransactionTax",
                        "type": "TIMESTAMP"
                    },
                    {
                        "name": "transactionRevenue",
                        "type": "TIMESTAMP"
                    },
                    {
                        "name": "transactionShipping",
                        "type": "TIMESTAMP"
                    }
                ]
            },
            {
                "name": "hour",
                "type": "TIMESTAMP"
            },
            {
                "name": "hitNumber",
                "type": "TIMESTAMP"
            },
            {
                "name": "customVariables",
                "type": "RECORD",
                "mode": "REPEATED",
                "fields": [
                    {
                        "name": "index",
                        "type": "TIMESTAMP"
                    },
                    {
                        "name": "customVarName",
                        "type": "STRING"
                    },
                    {
                        "name": "customVarValue",
                        "type": "STRING"
                    }
                ]
            },
            {
                "name": "contentInfo",
                "type": "RECORD",
                "fields": [
                    {
                        "name": "contentDescription",
                        "type": "STRING"
                    }
                ]
            },
            {
                "name": "exceptionInfo",
                "type": "RECORD",
                "fields": [
                    {
                        "name": "isFatal",
                        "type": "BOOLEAN"
                    },
                    {
                        "name": "description",
                        "type": "STRING"
                    }
                ]
            },
            {
                "name": "item",
                "type": "RECORD",
                "fields": [
                    {
                        "name": "productSku",
                        "type": "STRING"
                    },
                    {
                        "name": "itemQuantity",
                        "type": "TIMESTAMP"
                    },
                    {
                        "name": "localItemRevenue",
                        "type": "TIMESTAMP"
                    },
                    {
                        "name": "transactionId",
                        "type": "STRING"
                    },
                    {
                        "name": "itemRevenue",
                        "type": "TIMESTAMP"
                    },
                    {
                        "name": "currencyCode",
                        "type": "STRING"
                    },
                    {
                        "name": "productCategory",
                        "type": "STRING"
                    },
                    {
                        "name": "productName",
                        "type": "STRING"
                    }
                ]
            },
            {
                "name": "time",
                "type": "STRING"
            },
            {
                "name": "customMetrics",
                "type": "RECORD",
                "mode": "REPEATED",
                "fields": [
                    {
                        "name": "index",
                        "type": "TIMESTAMP"
                    },
                    {
                        "name": "value",
                        "type": "TIMESTAMP"
                    }
                ]
            },
            {
                "name": "type",
                "type": "STRING"
            },
            {
                "name": "page",
                "type": "RECORD",
                "fields": [
                    {
                        "name": "pageTitle",
                        "type": "STRING"
                    },
                    {
                        "name": "hostname",
                        "type": "STRING"
                    },
                    {
                        "name": "pagePath",
                        "type": "STRING"
                    },
                    {
                        "name": "searchKeyword",
                        "type": "STRING"
                    },
                    {
                        "name": "searchCategory",
                        "type": "STRING"
                    }
                ]
            },
            {
                "name": "isInteraction",
                "type": "BOOLEAN"
            },
            {
                "name": "product",
                "type": "RECORD",
                "mode": "REPEATED",
                "fields": [
                    {
                        "name": "localProductPrice",
                        "type": "INTEGER"
                    },
                    {
                        "name": "localProductRefundAmount",
                        "type": "INTEGER"
                    },
                    {
                        "name": "localProductRevenue",
                        "type": "INTEGER"
                    },
                    {
                        "name": "productBrand",
                        "type": "STRING"
                    },
                    {
                        "name": "productPrice",
                        "type": "INTEGER"
                    },
                    {
                        "name": "productQuantity",
                        "type": "INTEGER"
                    },
                    {
                        "name": "productRefundAmount",
                        "type": "INTEGER"
                    },
                    {
                        "name": "productRevenue",
                        "type": "INTEGER"
                    },
                    {
                        "name": "productSKU",
                        "type": "STRING"
                    },
                    {
                        "name": "productVariant",
                        "type": "STRING"
                    },
                    {
                        "name": "v2ProductCategory",
                        "type": "STRING"
                    },
                    {
                        "name": "v2ProductName",
                        "type": "STRING"
                    },
                    {
                        "name": "isImpression",
                        "type": "BOOLEAN"
                    }
                ]
            },
            {
                "name": "promotion",
                "type": "RECORD",
                "mode": "REPEATED",
                "fields": [
                    {
                        "name": "promoCreative",
                        "type": "STRING"
                    },
                    {
                        "name": "promoId",
                        "type": "STRING"
                    },
                    {
                        "name": "promoName",
                        "type": "STRING"
                    },
                    {
                        "name": "promoPosition",
                        "type": "STRING"
                    }
                ]
            },
            {
                "name": "eCommerceAction",
                "type": "RECORD",
                "fields": [
                    {
                        "name": "action_type",
                        "type": "STRING"
                    },
                    {
                        "name": "option",
                        "type": "STRING"
                    },
                    {
                        "name": "step",
                        "type": "INTEGER"
                    }
                ]
            },
            {
                "name": "referer",
                "type": "STRING"
            }
        ]
    },
    {
        "name": "device",
        "type": "RECORD",
        "fields": [
            {
                "name": "javaEnabled",
                "type": "BOOLEAN"
            },
            {
                "name": "browserVersion",
                "type": "STRING"
            },
            {
                "name": "screenColors",
                "type": "STRING"
            },
            {
                "name": "flashVersion",
                "type": "STRING"
            },
            {
                "name": "language",
                "type": "STRING"
            },
            {
                "name": "operatingSystemVersion",
                "type": "STRING"
            },
            {
                "name": "screenResolution",
                "type": "STRING"
            },
            {
                "name": "operatingSystem",
                "type": "STRING"
            },
            {
                "name": "isMobile",
                "type": "BOOLEAN"
            },
            {
                "name": "browser",
                "type": "STRING"
            },
            {
                "name": "mobileDeviceBranding",
                "type": "STRING"
            },
            {
                "name": "deviceCategory",
                "type": "STRING"
            }
        ]
    },
    {
        "name": "visitNumber",
        "type": "TIMESTAMP"
    },
    {
        "name": "customDimensions",
        "type": "RECORD",
        "mode": "REPEATED",
        "fields": [
            {
                "name": "index",
                "type": "TIMESTAMP"
            },
            {
                "name": "value",
                "type": "STRING"
            }
        ]
    },
    {
        "name": "fullVisitorId",
        "type": "STRING"
    },
    {
        "name": "date",
        "type": "TIMESTAMP"
    },
    {
        "name": "totals",
        "type": "RECORD",
        "fields": [
            {
                "name": "hits",
                "type": "TIMESTAMP"
            },
            {
                "name": "newVisits",
                "type": "TIMESTAMP"
            },
            {
                "name": "pageviews",
                "type": "TIMESTAMP"
            },
            {
                "name": "visits",
                "type": "TIMESTAMP"
            },
            {
                "name": "timeOnSite",
                "type": "TIMESTAMP"
            },
            {
                "name": "screenviews",
                "type": "INTEGER"
            },
            {
                "name": "uniqueScreenviews",
                "type": "INTEGER"
            },
            {
                "name": "timeOnScreen",
                "type": "INTEGER"
            },
            {
                "name": "transactions",
                "type": "INTEGER"
            },
            {
                "name": "bounces",
                "type": "INTEGER"
            },
            {
                "name": "transactionRevenue",
                "type": "INTEGER"
            },
            {
                "name": "totalTransactionRevenue",
                "type": "INTEGER"
            }
        ]
    },
    {
        "name": "visitStartTime",
        "type": "STRING"
    },
    {
        "name": "visitId",
        "type": "STRING"
    },
    {
        "name": "geoNetwork",
        "type": "RECORD",
        "fields": [
            {
                "name": "continent",
                "type": "STRING"
            },
            {
                "name": "subContinent",
                "type": "STRING"
            },
            {
                "name": "country",
                "type": "STRING"
            },
            {
                "name": "region",
                "type": "STRING"
            },
            {
                "name": "metro",
                "type": "STRING"
            }
        ]
    }
]

0 comments: