This repository has been archived by the owner on Jul 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
conf.py
410 lines (405 loc) · 20.8 KB
/
conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
VIEW_ID = '103185238'
TABLE_PREFIX = 'ga_sessions_'
CSV_PREFIX = "ga_sessions_"
SQLITE_DATABASE_NAME = 'ga.db'
PK_DIMENSIONS = [{'name': 'ga:dimension8'}, {'name': 'ga:dimension10'}]
GOAL_CONVERSIONS_DIMENSIONS = [{'name': 'ga:goalCompletionLocation'},
{'name': 'ga:goalPreviousStep1'},
{'name': 'ga:goalPreviousStep2'},
{'name': 'ga:goalPreviousStep3'}, ]
DIMENSIONS_METRICS_COMBINATIONS = {
"USER": {
"dimensions": [{'name': 'ga:userType'},
{'name': 'ga:sessionCount'},
{'name': 'ga:daysSinceLastSession'},
{'name': 'ga:userDefinedValue'},
{'name': 'ga:userBucket'}],
"metrics": [],
# USER_METRICSは指定すると、
# googleapiclient.errors.HttpError: <HttpError 400 when requesting https://analyticsreporting.googleapis.com/v4/reports:batchGet?alt=json returned "Selected dimensions and metrics cannot be queried together.">
# エラーとなる。計算できないようなので設定しない
# [{"expression": "ga:users"},
# {"expression": "ga:newUsers"},
# {"expression": "ga:percentNewSessions"},
# {"expression": "ga:1dayUsers"},
# {"expression": "ga:7dayUsers"},
# {"expression": "ga:14dayUsers"},
# {"expression": "ga:28dayUsers"},
# {"expression": "ga:30dayUsers"},
# {"expression": "ga:sessionsPerUser"}]
},
"SESSION": {
"dimensions": [{'name': 'ga:sessionDurationBucket'}],
"metrics": [{'expression': 'ga:sessions'},
{'expression': 'ga:bounces'},
{'expression': 'ga:bounceRate'},
{'expression': 'ga:sessionDuration'},
{'expression': 'ga:avgSessionDuration'},
{'expression': 'ga:uniqueDimensionCombinations'},
{'expression': 'ga:hits'}]
},
"TRAFFIC_SOURCES": {
"dimensions": [{'name': 'ga:referralPath'},
{'name': 'ga:fullReferrer'},
{'name': 'ga:campaign'},
{'name': 'ga:source'},
{'name': 'ga:medium'},
{'name': 'ga:sourceMedium'},
{'name': 'ga:keyword'},
{'name': 'ga:adContent'},
{'name': 'ga:socialNetwork'},
{'name': 'ga:hasSocialSourceReferral'},
{'name': 'ga:campaignCode'}
],
"metrics": [{'expression': 'ga:organicSearches'}, ]
},
"GOAL_CONVERSIONS_ALL": {
"dimensions": GOAL_CONVERSIONS_DIMENSIONS,
"metrics": [{'expression': 'ga:goalStartsAll'},
{'expression': 'ga:goalCompletionsAll'},
{'expression': 'ga:goalValueAll'},
{'expression': 'ga:goalValuePerSession'},
{'expression': 'ga:goalConversionRateAll'},
{'expression': 'ga:goalAbandonsAll'},
{'expression': 'ga:goalAbandonRateAll'}, ]
},
"GOAL_CONVERSIONS_1": {
"dimensions": GOAL_CONVERSIONS_DIMENSIONS,
"metrics": [{'expression': 'ga:goal1Starts'},
{'expression': 'ga:goal1Completions'},
{'expression': 'ga:goal1Value'},
{'expression': 'ga:goal1ConversionRate'},
{'expression': 'ga:goal1Abandons'},
{'expression': 'ga:goal1AbandonRate'}, ]
},
"GOAL_CONVERSIONS_2": {
"dimensions": GOAL_CONVERSIONS_DIMENSIONS,
"metrics": [{'expression': 'ga:goal2Starts'},
{'expression': 'ga:goal2Completions'},
{'expression': 'ga:goal2Value'},
{'expression': 'ga:goal2ConversionRate'},
{'expression': 'ga:goal2Abandons'},
{'expression': 'ga:goal2AbandonRate'}, ]
},
"GOAL_CONVERSIONS_3": {
"dimensions": GOAL_CONVERSIONS_DIMENSIONS,
"metrics": [{'expression': 'ga:goal3Starts'},
{'expression': 'ga:goal3Completions'},
{'expression': 'ga:goal3Value'},
{'expression': 'ga:goal3ConversionRate'},
{'expression': 'ga:goal3Abandons'},
{'expression': 'ga:goal3AbandonRate'}, ]
},
"GOAL_CONVERSIONS_4": {
"dimensions": GOAL_CONVERSIONS_DIMENSIONS,
"metrics": [{'expression': 'ga:goal4Starts'},
{'expression': 'ga:goal4Completions'},
{'expression': 'ga:goal4Value'},
{'expression': 'ga:goal4ConversionRate'},
{'expression': 'ga:goal4Abandons'},
{'expression': 'ga:goal4AbandonRate'}, ]
},
"GOAL_CONVERSIONS_5": {
"dimensions": GOAL_CONVERSIONS_DIMENSIONS,
"metrics": [{'expression': 'ga:goal5Starts'},
{'expression': 'ga:goal5Completions'},
{'expression': 'ga:goal5Value'},
{'expression': 'ga:goal5ConversionRate'},
{'expression': 'ga:goal5Abandons'},
{'expression': 'ga:goal5AbandonRate'}, ]
},
"PLATFORM_OR_DEVICE": {
"dimensions": [{'name': 'ga:browser'},
{'name': 'ga:browserVersion'},
{'name': 'ga:operatingSystem'},
{'name': 'ga:operatingSystemVersion'},
{'name': 'ga:mobileDeviceBranding'},
{'name': 'ga:mobileDeviceModel'},
{'name': 'ga:mobileInputSelector'},
{'name': 'ga:mobileDeviceInfo'},
{'name': 'ga:mobileDeviceMarketingName'},
{'name': 'ga:deviceCategory'},
{'name': 'ga:browserSize'},
{'name': 'ga:dataSource'}, ],
"metrics": []
},
"GEO_NETWORK": {
"dimensions": [{'name': 'ga:continent'},
{'name': 'ga:subContinent'},
{'name': 'ga:country'},
{'name': 'ga:region'},
{'name': 'ga:metro'},
{'name': 'ga:city'},
{'name': 'ga:latitude'},
{'name': 'ga:longitude'},
{'name': 'ga:networkDomain'},
{'name': 'ga:networkLocation'},
{'name': 'ga:cityId'},
{'name': 'ga:continentId'},
{'name': 'ga:countryIsoCode'},
{'name': 'ga:metroId'},
{'name': 'ga:regionId'},
{'name': 'ga:regionIsoCode'},
{'name': 'ga:subContinentCode'}, ],
"metrics": []
},
"SYSTEM": {
"dimensions": [
{'name': 'ga:flashVersion'},
{'name': 'ga:javaEnabled'},
{'name': 'ga:language'},
{'name': 'ga:screenColors'},
{'name': 'ga:sourcePropertyDisplayName'},
{'name': 'ga:sourcePropertyTrackingId'},
{'name': 'ga:screenResolution'},
],
"metrics": []
},
"PAGE_TRACKING": {
"dimensions": [
{'name': 'ga:hostname'},
{'name': 'ga:pagePath'},
{'name': 'ga:pagePathLevel1'},
{'name': 'ga:pagePathLevel2'},
{'name': 'ga:pagePathLevel3'},
{'name': 'ga:pagePathLevel4'},
{'name': 'ga:pageTitle'},
{'name': 'ga:landingPagePath'},
{'name': 'ga:secondPagePath'},
{'name': 'ga:exitPagePath'},
{'name': 'ga:previousPagePath'},
{'name': 'ga:pageDepth'}, ],
"metrics": [
{'expression': 'ga:pageValue'},
{'expression': 'ga:entrances'},
{'expression': 'ga:entranceRate'},
{'expression': 'ga:pageviews'},
{'expression': 'ga:pageviewsPerSession'},
{'expression': 'ga:uniquePageviews'},
{'expression': 'ga:timeOnPage'},
{'expression': 'ga:avgTimeOnPage'},
{'expression': 'ga:exits'},
{'expression': 'ga:exitRate'}, ]
},
"EVENT_TRACKING": {
"dimensions": [
{'name': 'ga:eventCategory'},
{'name': 'ga:eventAction'},
{'name': 'ga:eventLabel'}, ],
"metrics": [
{'expression': 'ga:totalEvents'},
{'expression': 'ga:uniqueEvents'},
{'expression': 'ga:eventValue'},
{'expression': 'ga:avgEventValue'},
{'expression': 'ga:sessionsWithEvent'},
{'expression': 'ga:eventsPerSessionWithEvent'}]
},
"CUSTOM_VARIABLES_OR_COLUMNS": {
"dimensions": [
{'name': 'ga:dimension1'},
{'name': 'ga:dimension2'},
{'name': 'ga:dimension3'},
{'name': 'ga:dimension4'},
{'name': 'ga:dimension5'},
{'name': 'ga:dimension6'},
{'name': 'ga:dimension7'},
{'name': 'ga:dimension8'},
{'name': 'ga:dimension9'},
{'name': 'ga:dimension10'},
{'name': 'ga:dimension11'},
{'name': 'ga:dimension12'},
{'name': 'ga:dimension13'},
{'name': 'ga:dimension14'},
{'name': 'ga:dimension15'},
{'name': 'ga:dimension16'},
{'name': 'ga:dimension17'},
{'name': 'ga:dimension18'},
{'name': 'ga:dimension19'},
{'name': 'ga:dimension20'}
],
"metrics": []
}
# ------------------------------------
# Adwords は Skip
# ------------------------------------
}
DATA_FRAME_APPLY_SETTINGS = {
"dimension10" : {
"raise_error": True,
"apply_func": lambda x: convert_datetime(x)
}
}
MERGE_DATA_FRAME_APPLY_SETTINGS = {
"pagePath": {
"raise_error": True,
"apply_func": lambda x: '' if str(x) == 'nan' else 'https://www.monotalk.xyz' + str(x),
"key_after_convert": "fullPagePath"
}
}
import datetime
def convert_datetime(x):
try:
x = int(x) / 1000
return datetime.datetime.fromtimestamp(x);
except TypeError:
return x
except ValueError:
return x
from google.cloud import bigquery
GBQ_SCHEMA = [
bigquery.SchemaField('avgSessionDuration','FLOAT','NULLABLE'),
bigquery.SchemaField('bounceRate','FLOAT','NULLABLE'),
bigquery.SchemaField('bounces','INTEGER','NULLABLE'),
bigquery.SchemaField('hits', 'INTEGER', 'NULLABLE'),
bigquery.SchemaField('sessionDuration', 'FLOAT', 'NULLABLE'),
bigquery.SchemaField('sessionDurationBucket', 'INTEGER', 'NULLABLE'),
bigquery.SchemaField('sessions', 'INTEGER', 'NULLABLE'),
bigquery.SchemaField('uniqueDimensionCombinations', 'INTEGER', 'NULLABLE'),
bigquery.SchemaField('continent', 'STRING', 'NULLABLE'),
bigquery.SchemaField('country', 'STRING', 'NULLABLE'),
bigquery.SchemaField('metro', 'STRING', 'NULLABLE'),
bigquery.SchemaField('region', 'STRING', 'NULLABLE'),
bigquery.SchemaField('subContinent', 'STRING', 'NULLABLE'),
bigquery.SchemaField('visits', 'INTEGER', 'NULLABLE'),
bigquery.SchemaField('city', 'STRING', 'NULLABLE'),
bigquery.SchemaField('latitude', 'FLOAT', 'NULLABLE'),
bigquery.SchemaField('longitude', 'FLOAT', 'NULLABLE'),
bigquery.SchemaField('networkDomain', 'STRING', 'NULLABLE'),
bigquery.SchemaField('cityId', 'STRING', 'NULLABLE'),
bigquery.SchemaField('continentId', 'STRING', 'NULLABLE'),
bigquery.SchemaField('countryIsoCode', 'STRING', 'NULLABLE'),
bigquery.SchemaField('networkLocation', 'STRING', 'NULLABLE'),
bigquery.SchemaField('metroId', 'INTEGER', 'NULLABLE'),
bigquery.SchemaField('regionId', 'STRING', 'NULLABLE'),
bigquery.SchemaField('regionIsoCode', 'STRING', 'NULLABLE'),
bigquery.SchemaField('subContinentCode', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goalAbandonRateAll', 'FLOAT', 'NULLABLE'),
bigquery.SchemaField('goalAbandonsAll', 'INTEGER', 'NULLABLE'),
bigquery.SchemaField('goalCompletionLocation', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goalCompletionsAll', 'INTEGER', 'NULLABLE'),
bigquery.SchemaField('goalConversionRateAll', 'FLOAT', 'NULLABLE'),
bigquery.SchemaField('goalPreviousStep1', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goalPreviousStep2', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goalPreviousStep3', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goalStartsAll', 'INTEGER', 'NULLABLE'),
bigquery.SchemaField('goalValueAll', 'FLOAT', 'NULLABLE'),
bigquery.SchemaField('goalValuePerSession', 'FLOAT', 'NULLABLE'),
bigquery.SchemaField('goal1Starts', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal1Completions', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal1Value', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal1ConversionRate', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal1Abandons', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal1AbandonRate', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal2AbandonRate', 'FLOAT', 'NULLABLE'),
bigquery.SchemaField('goal2Abandons', 'INTEGER', 'NULLABLE'),
bigquery.SchemaField('goal2Completions', 'INTEGER', 'NULLABLE'),
bigquery.SchemaField('goal2ConversionRate', 'FLOAT', 'NULLABLE'),
bigquery.SchemaField('goal2Starts', 'INTEGER', 'NULLABLE'),
bigquery.SchemaField('goal2Value', 'FLOAT', 'NULLABLE'),
bigquery.SchemaField('goal3Starts', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal3Completions', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal3Value', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal3ConversionRate', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal3Abandons', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal3AbandonRate', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal4Starts', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal4Completions', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal4Value', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal4ConversionRate', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal4Abandons', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal4AbandonRate', 'STRING', 'NULLABLE'),
bigquery.SchemaField('browser', 'STRING', 'NULLABLE'),
bigquery.SchemaField('browserVersion', 'STRING', 'NULLABLE'),
bigquery.SchemaField('operatingSystem', 'STRING', 'NULLABLE'),
bigquery.SchemaField('operatingSystemVersion', 'STRING', 'NULLABLE'),
bigquery.SchemaField('mobileDeviceBranding', 'STRING', 'NULLABLE'),
bigquery.SchemaField('mobileDeviceInfo', 'STRING', 'NULLABLE'),
bigquery.SchemaField('mobileDeviceModel', 'STRING', 'NULLABLE'),
bigquery.SchemaField('mobileInputSelector', 'STRING', 'NULLABLE'),
bigquery.SchemaField('browserSize', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dataSource', 'STRING', 'NULLABLE'),
bigquery.SchemaField('deviceCategory', 'STRING', 'NULLABLE'),
bigquery.SchemaField('mobileDeviceMarketingName', 'STRING', 'NULLABLE'),
bigquery.SchemaField('flashVersion', 'STRING', 'NULLABLE'),
bigquery.SchemaField('javaEnabled', 'BOOLEAN', 'NULLABLE'),
bigquery.SchemaField('language', 'STRING', 'NULLABLE'),
bigquery.SchemaField('screenColors', 'STRING', 'NULLABLE'),
bigquery.SchemaField('sourcePropertyDisplayName', 'STRING', 'NULLABLE'),
bigquery.SchemaField('sourcePropertyTrackingId', 'STRING', 'NULLABLE'),
bigquery.SchemaField('screenResolution', 'STRING', 'NULLABLE'),
bigquery.SchemaField('avgTimeOnPage', 'FLOAT', 'NULLABLE'),
bigquery.SchemaField('entranceRate', 'FLOAT', 'NULLABLE'),
bigquery.SchemaField('entrances', 'INTEGER', 'NULLABLE'),
bigquery.SchemaField('exitRate', 'FLOAT', 'NULLABLE'),
bigquery.SchemaField('exits', 'INTEGER', 'NULLABLE'),
bigquery.SchemaField('hostname', 'STRING', 'NULLABLE'),
bigquery.SchemaField('pagePath', 'STRING', 'NULLABLE'),
bigquery.SchemaField('pagePathLevel1', 'STRING', 'NULLABLE'),
bigquery.SchemaField('pageValue', 'FLOAT', 'NULLABLE'),
bigquery.SchemaField('pageviews', 'INTEGER', 'NULLABLE'),
bigquery.SchemaField('pageviewsPerSession', 'FLOAT', 'NULLABLE'),
bigquery.SchemaField('timeOnPage', 'FLOAT', 'NULLABLE'),
bigquery.SchemaField('uniquePageviews', 'INTEGER', 'NULLABLE'),
bigquery.SchemaField('pagePathLevel2', 'STRING', 'NULLABLE'),
bigquery.SchemaField('pagePathLevel3', 'STRING', 'NULLABLE'),
bigquery.SchemaField('pagePathLevel4', 'STRING', 'NULLABLE'),
bigquery.SchemaField('landingPagePath', 'STRING', 'NULLABLE'),
bigquery.SchemaField('pageTitle', 'STRING', 'NULLABLE'),
bigquery.SchemaField('secondPagePath', 'STRING', 'NULLABLE'),
bigquery.SchemaField('exitPagePath', 'STRING', 'NULLABLE'),
bigquery.SchemaField('pageDepth', 'INTEGER', 'NULLABLE'),
bigquery.SchemaField('previousPagePath', 'STRING', 'NULLABLE'),
bigquery.SchemaField('eventCategory', 'STRING', 'NULLABLE'),
bigquery.SchemaField('eventAction', 'STRING', 'NULLABLE'),
bigquery.SchemaField('eventLabel', 'STRING', 'NULLABLE'),
bigquery.SchemaField('totalEvents', 'STRING', 'NULLABLE'),
bigquery.SchemaField('uniqueEvents', 'STRING', 'NULLABLE'),
bigquery.SchemaField('eventValue', 'STRING', 'NULLABLE'),
bigquery.SchemaField('avgEventValue', 'STRING', 'NULLABLE'),
bigquery.SchemaField('sessionsWithEvent', 'STRING', 'NULLABLE'),
bigquery.SchemaField('eventsPerSessionWithEvent', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension1', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension2', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension3', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension4', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension5', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension6', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension7', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension8', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension9', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension10', 'TIMESTAMP', 'NULLABLE'),
bigquery.SchemaField('dimension11', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension12', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension13', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension14', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension15', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension16', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension17', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension18', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension19', 'STRING', 'NULLABLE'),
bigquery.SchemaField('dimension20', 'STRING', 'NULLABLE'),
bigquery.SchemaField('fullPagePath', 'STRING', 'NULLABLE'),
bigquery.SchemaField('adContent','STRING', 'NULLABLE'),
bigquery.SchemaField('campaign', 'STRING','NULLABLE'),
bigquery.SchemaField('campaignCode', 'STRING', 'NULLABLE'),
bigquery.SchemaField('daysSinceLastSession', 'STRING', 'NULLABLE'),
bigquery.SchemaField('fullReferrer', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal5AbandonRate', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal5Abandons', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal5Completions', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal5ConversionRate', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal5Starts', 'STRING', 'NULLABLE'),
bigquery.SchemaField('goal5Value', 'STRING', 'NULLABLE'),
bigquery.SchemaField('hasSocialSourceReferral', 'STRING', 'NULLABLE'),
bigquery.SchemaField('keyword', 'STRING', 'NULLABLE'),
bigquery.SchemaField('medium', 'STRING', 'NULLABLE'),
bigquery.SchemaField('organicSearches', 'STRING', 'NULLABLE'),
bigquery.SchemaField('sessionCount', 'STRING', 'NULLABLE'),
bigquery.SchemaField('socialNetwork', 'STRING', 'NULLABLE'),
bigquery.SchemaField('source', 'STRING', 'NULLABLE'),
bigquery.SchemaField('sourceMedium', 'STRING', 'NULLABLE'),
bigquery.SchemaField('userBucket', 'STRING', 'NULLABLE'),
bigquery.SchemaField('userDefinedValue', 'STRING', 'NULLABLE'),
bigquery.SchemaField('userType', 'STRING', 'NULLABLE'),
bigquery.SchemaField('referralPath', 'STRING', 'NULLABLE'),
]