forked from llooker/segment_ads
-
Notifications
You must be signed in to change notification settings - Fork 0
/
adwords_campaign_performance_reports.view.lkml
637 lines (541 loc) · 15.6 KB
/
adwords_campaign_performance_reports.view.lkml
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
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
view: campaign_performance_reports {
sql_table_name: adwords.campaign_performance_reports ;;
dimension: id {
primary_key: yes
hidden: yes
type: string
sql: ${TABLE}.id ;;
}
filter: campaign_select {
suggest_dimension: campaigns.name
}
dimension: campaign_comparitor {
type: string
sql: CASE WHEN {% condition campaign_select %} ${campaigns.name} {% endcondition %}
THEN ${campaigns.name}
ELSE 'Rest Of Population'
END ;;
}
dimension: adwords_customer_id {
type: string
sql: ${TABLE}.adwords_customer_id ;;
hidden: yes
}
dimension: base_campaign_id {
type: string
sql: ${TABLE}.base_campaign_id ;;
hidden: yes
}
dimension: budget_id {
type: string
sql: ${TABLE}.budget_id ;;
hidden: yes
}
dimension: campaign_id {
type: string
# hidden: yes
sql: ${TABLE}.campaign_id ;;
}
measure: total_campaigns {
type: count_distinct
sql: ${campaign_id} ;;
drill_fields: [campaigns.name, total_cost]
}
dimension: uuid {
type: number
value_format_name: id
sql: ${TABLE}.uuid ;;
hidden: yes
}
measure: count {
type: count
drill_fields: [id, campaigns.id, campaigns.name]
}
##### Time Dimensions #####
dimension_group: start {
type: time
timeframes: [
raw,
time,
date,
week,
month,
quarter,
year
]
sql: ${TABLE}.date_start ;;
}
dimension_group: stop {
type: time
timeframes: [
raw,
time,
date,
week,
month,
quarter,
year
]
hidden: yes
sql: ${TABLE}.date_stop ;;
}
dimension_group: received {
type: time
timeframes: [
raw,
time,
date,
week,
month,
quarter,
year
]
sql: ${TABLE}.received_at ;;
hidden: yes
}
dimension_group: uuid_ts {
type: time
timeframes: [
raw,
time,
date,
week,
month,
quarter,
year
]
sql: ${TABLE}.uuid_ts ;;
hidden: yes
}
##### Campaign-Specific Metrics #####
dimension: advertising_channel_sub_type {
type: string
sql: ${TABLE}.advertising_channel_sub_type ;;
hidden: yes
}
dimension: daily_budget {
value_format_name: usd
description: "The daily budget. This column reflects the entire shared budget if the campaign draws from a shared budget."
type: number
sql: ${TABLE}.amount/1000000 ;;
}
dimension: is_active_campaign {
type: yesno
sql: ${TABLE}.campaign_status = 'Status_Active' ;;
}
dimension: campaign_trial_type {
type: string
sql: ${TABLE}.campaign_trial_type ;;
hidden: yes
#only value in test data is BASE
description: "The type of campaign. This shows if the campaign is a trial campaign or not."
}
dimension: impression_reach {
type: string
description: "Number of unique cookies that were exposed to your ad over a given time period, or the special value < 100 if the number of cookies is less than 100."
hidden: yes
#only value in table is '--'
sql: ${TABLE}.impression_reach ;;
}
dimension: invalid_clicks {
type: number
sql: ${TABLE}.invalid_clicks ;;
hidden: yes
}
measure: total_invalid_clicks {
type: sum
sql: ${invalid_clicks} ;;
description: "Number of clicks Google considers illegitimate and doesn't charge you for."
}
dimension: is_budget_explicitly_shared {
type: yesno
hidden: yes
sql: ${TABLE}.is_budget_explicitly_shared = 'true' ;;
}
dimension: url_custom_parameters {
type: string
hidden: yes
#only value is '--'
sql: ${TABLE}.url_custom_parameters ;;
}
##### Active View #####
dimension: active_view_impressions {
type: number
sql: ${TABLE}.active_view_impressions ;;
hidden: yes
}
measure: total_active_view_impressions {
type: sum
sql: ${active_view_impressions} ;;
description: "How often your ad has become viewable on a Display Network site."
hidden: yes
}
dimension: active_view_measurability {
type: number
value_format_name: percent_2
hidden: yes
sql: ${TABLE}.active_view_measurability ;;
}
measure: average_daily_active_view_measurability {
type: average
hidden: yes
sql: ${active_view_measurability} ;;
description: "The ratio of impressions that could be measured by Active View over the number of served impressions."
}
dimension: active_view_measurable_cost {
type: number
value_format_name: usd
sql: ${TABLE}.active_view_measurable_cost/1000000 ;;
hidden: yes
}
measure: total_active_view_measurable_cost {
type: sum
sql: ${active_view_measurable_cost} ;;
value_format_name: usd
hidden: yes
description: "The cost of the impressions you received that were measurable by Active View."
}
dimension: active_view_measurable_impressions {
type: number
sql: ${TABLE}.active_view_measurable_impressions ;;
hidden: yes
}
measure: total_active_view_measurable_impressions {
type: sum
description: "The number of times your ads are appearing on placements in positions where they can be seen."
sql: ${active_view_measurable_impressions} ;;
hidden: yes
}
dimension: active_view_viewability {
type: number
value_format_name: percent_2
sql: ${TABLE}.active_view_viewability ;;
hidden: yes
}
measure: average_daily_active_view_viewability {
type: average
value_format_name: percent_2
sql: ${active_view_viewability} ;;
hidden: yes
description: "The percentage of time when your ad appeared on an Active View enabled site (measurable impressions) and was viewable (viewable impressions)."
}
##### All Conversions #####
##### (Best estimate of the total number of conversions that AdWords drives.
##### Includes website, cross-device, and phone call conversions.
dimension: all_conversion_rate {
type: number
sql: ${TABLE}.all_conversion_rate ;;
value_format_name: percent_2
hidden: yes
}
measure: average_daily_all_conversion_rate {
type: average
sql: ${all_conversion_rate} ;;
value_format_name: percent_2
hidden: yes
description: "All Conversions divided by total clicks that can be conversion-tracked. Note: this is a best estimate performed by Google."
}
dimension: all_conversion_value {
type: number
sql: ${TABLE}.all_conversion_value ;;
hidden: yes
}
measure: total_all_conversion_value {
type: sum
sql: ${all_conversion_value} ;;
description: "The total value of all of your conversions, including those that are estimated. Note: this is a best estimate performed by Google."
hidden: yes
}
dimension: all_conversions {
type: number
sql: ${TABLE}.all_conversions ;;
hidden: yes
}
measure: total_all_conversions {
type: sum
sql: ${all_conversions} ;;
description: "Best estimate of the total number of conversions that AdWords drives. Includes website, cross-device, and phone call conversions. Note: this is a best estimate performed by Google."
}
dimension: value_per_all_conversion {
type: number
sql: ${TABLE}.value_per_all_conversion ;;
hidden: yes
}
measure: average_daily_value_per_all_conversion {
description: "The value, on average, of all conversions. "
type: average
hidden: yes
sql: ${value_per_all_conversion} ;;
}
##### Standard Metrics #####
dimension: average_cost {
type: number
sql: ${TABLE}.average_cost/1000000 ;;
hidden: yes
}
measure: average_daily_cost {
description: "The average amount you pay per interaction. This amount is the total cost of your ads divided by the total number of interactions."
type: average
value_format_name: usd
sql: ${average_cost} ;;
}
dimension: average_position {
type: number
sql: ${TABLE}.average_position ;;
value_format_name: decimal_2
hidden: yes
}
measure: average_daily_ad_position {
type: average
sql: ${average_position} ;;
value_format_name: decimal_2
description: "Your ad's position relative to those of other advertisers."
}
dimension: average_time_on_site {
type: number
sql: ${TABLE}.average_time_on_site ;;
hidden: yes
}
measure: average_daily_time_on_site {
type: average
description: "Total duration of all sessions (in seconds) / number of sessions, by day."
sql: ${average_time_on_site} ;;
hidden: yes
}
dimension: bounce_rate {
type: number
sql: ${TABLE}.bounce_rate ;;
value_format_name: percent_2
hidden: yes
}
measure: average_daily_bounce_rate {
type: average
value_format_name: percent_2
description: "Percentage of clicks where the user only visited a single page on your site."
sql: ${bounce_rate} ;;
hidden: yes
}
dimension: clicks {
type: number
sql: ${TABLE}.clicks ;;
hidden: yes
}
measure: total_clicks {
type: sum
sql: ${clicks} ;;
description: "The number of clicks."
drill_fields: [start_date, total_impressions,total_clicks,total_conversions, total_cost]
}
dimension: conversion_value {
type: number
sql: ${TABLE}.conversion_value ;;
hidden: yes
}
measure: average_daily_conversion_value {
type: average
sql: ${conversion_value} ;;
hidden: yes
description: "The sum of conversion values for all conversions."
}
dimension: conversions {
type: number
sql: ${TABLE}.conversions ;;
hidden: yes
}
measure: total_conversions {
type: sum
description: "The number of conversions for all conversion actions that you have opted into optimization."
sql: ${conversions} ;;
drill_fields: [start_date, total_conversions, total_cost]
}
dimension: cost {
type: number
sql: ${TABLE}.cost/1000000 ;;
value_format_name: usd
hidden: yes
}
measure: total_cost {
type: sum
description: "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period."
sql: ${cost} ;;
value_format_name: usd
drill_fields: [start_date, campaigns.name, total_cost]
}
measure: average_cost_per_conversion {
type: number
sql: ${total_cost}*1.0 / NULLIF(${total_conversions},0) ;;
value_format_name: usd
drill_fields: [start_date, campaigns.name, total_cost]
}
measure: average_conversion_rate {
type: number
sql: ${total_conversions}*1.0 / NULLIF(${total_clicks},0) ;;
value_format_name: percent_2
drill_fields: [start_date,average_conversion_rate]
}
dimension: engagements {
type: number
sql: ${TABLE}.engagements ;;
hidden: yes
}
measure: total_engagements {
type: sum
hidden: yes
description: "The number of engagements. An engagement occurs when a viewer expands your Lightbox ad."
sql: ${engagements} ;;
}
dimension: impression_assisted_conversions {
type: number
sql: ${TABLE}.impression_assisted_conversions ;;
hidden: yes
}
measure: total_impression_assisted_conversions {
description: "Total number of conversions for which this object triggered assist impressions prior to the last click."
type: sum
sql: ${impression_assisted_conversions} ;;
}
dimension: impressions {
type: number
sql: ${TABLE}.impressions ;;
hidden: yes
}
measure: total_impressions {
type: sum
description: "Count of how often your ad has appeared on a search results page or website on the Google Network."
sql: ${impressions} ;;
drill_fields: [start_date, total_impressions, total_clicks,total_conversions, total_cost]
}
dimension: interaction_types {
description: "The types of interactions that are reflected in the Interactions, Interaction Rate, and Average Cost columns."
type: string
sql: ${TABLE}.interaction_types ;;
hidden: yes
}
dimension: interactions {
type: number
hidden: yes
sql: ${TABLE}.interactions ;;
}
measure: total_interactions {
type: sum
sql: ${interactions} ;;
description: "The number of interactions. An interaction is the main user action associated with an ad format—clicks for text and shopping ads, views for video ads, and so on."
}
measure: average_interaction_rate{
type: number
sql: ${total_interactions}*1.0/nullif(${total_impressions},0) ;;
value_format_name: percent_2
drill_fields: [campaigns.name, average_interaction_rate]
}
dimension: view_through_conversions {
type: number
sql: ${TABLE}.view_through_conversions ;;
hidden: yes
}
measure: total_view_through_conversions {
description: "The total number of view-through conversions. These happen when a customer sees a Display network ad, then later completes a conversion on your site without interacting with (e.g. clicking on) another ad."
type: sum
sql: ${view_through_conversions} ;;
hidden: yes
}
##### Click-Assisted #####
##### Assist clicks occur only when more than one search ad has been clicked prior to a conversion.
##### Understanding sssist clicks can prevent optimization mistakes
##### such as the pausing of keywords that start a search which ultimately ends up in a conversion.
dimension: click_assisted_conversions {
type: number
sql: ${TABLE}.click_assisted_conversions ;;
hidden: yes
}
measure: total_click_assisted_conversions {
type: sum
description: "The total number of conversions for which this keyword, ad, ad group, or campaign contributed one or more assist clicks."
sql: ${click_assisted_conversions} ;;
}
dimension: click_assisted_conversion_value {
type: number
sql: ${TABLE}.click_assisted_conversion_value ;;
hidden: yes
}
measure: total_click_assisted_conversion_value {
type: sum
description: "The total *value* of all conversions for which this keyword, ad, ad group, or campaign triggered assist clicks."
sql: ${click_assisted_conversion_value} ;;
hidden: yes
}
dimension: click_assisted_conversions_over_last_click_conversions {
type: number
sql: ${TABLE}.click_assisted_conversions_over_last_click_conversions ;;
hidden: yes
}
measure: average_daily_percent_assister_vs_closer {
description: "Ratio of this ad being a click assisted converter to it being the last click converter. Higher ratio = assister, lower ratio = closer"
type: average
value_format_name: percent_2
sql: ${click_assisted_conversions_over_last_click_conversions} ;;
}
##### Gmail #####
# dimension: gmail_forwards {
# type: number
# sql: ${TABLE}.gmail_forwards ;;
# hidden: yes
# }
#
# measure: total_gmail_forwards {
# type: sum
# sql: ${gmail_forwards} ;;
# }
#
# dimension: gmail_saves {
# type: number
# sql: ${TABLE}.gmail_saves ;;
# hidden: yes
# }
#
# measure: total_gmail_saves {
# type: sum
# sql: ${gmail_saves} ;;
# }
#
# dimension: gmail_secondary_clicks {
# type: number
# sql: ${TABLE}.gmail_secondary_clicks ;;
# hidden: yes
# }
#
# measure: total_gmail_secondary_clicks {
# type: sum
# sql: ${gmail_secondary_clicks} ;;
# }
##### Video #####
#not populated
# dimension: video_quartile_100_rate {
# type: number
# sql: ${TABLE}.video_quartile_100_rate ;;
# }
#
# dimension: video_quartile_25_rate {
# type: number
# sql: ${TABLE}.video_quartile_25_rate ;;
# }
#
# dimension: video_quartile_50_rate {
# type: number
# sql: ${TABLE}.video_quartile_50_rate ;;
# }
#
# dimension: video_quartile_75_rate {
# type: number
# sql: ${TABLE}.video_quartile_75_rate ;;
# }
#
# dimension: video_view_rate {
# type: number
# sql: ${TABLE}.video_view_rate ;;
# }
#
# dimension: video_views {
# type: number
# sql: ${TABLE}.video_views ;;
# }
}