-
Notifications
You must be signed in to change notification settings - Fork 0
/
ad_insights.view.lkml
380 lines (366 loc) · 12.2 KB
/
ad_insights.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
#####################################################################
# Owners: cesarenrique@, ivanantonio@, edherivan@
# Contact Method: Gchat/e-mail
# Created Date:
# Purpose: Contains information about Ad insights from Facebook to use for
# Data Analysis. The Insights API can return several metrics which are estimated or in-development.
# In some cases a metric may be both estimated and in-development.
#####################################################################
view: ad_insights {
fields_hidden_by_default: yes
derived_table: {
sql: SELECT *, GENERATE_UUID() as primary_key FROM `@{PROJECT_ID}.@{FADS_DATASET_NAME}.AdInsights` ;;
}
######### PRIMARY KEY #########
dimension: primary_key {
primary_key: yes
sql: ${TABLE}.primary_key;;
}
dimension: campaign_id {
group_label: "IDs"
description: "ID of the campaign"
type: number
sql: ${TABLE}.CampaignId ;;
}
dimension: ad_id {
type: number
group_label: "IDs"
description: "The ID number of your ad"
sql: ${TABLE}.AdId ;;
}
dimension: account_currency {
type: string
description: "Currency that is used by your ad account."
sql: ${TABLE}.AccountCurrency ;;
}
dimension: action_attribution_windows {
description: "The attribution window for the actions."
type: string
sql: ${TABLE}.ActionAttributionWindows ;;
}
dimension: ad_account_id {
type: string
group_label: "IDs"
description: "The ID number of your ad account, which groups your advertising activity. Your ad account includes your campaigns, ads and billing."
sql: ${TABLE}.AdAccountId ;;
}
dimension: ad_account_name {
type: string
description: "Name of your ad account"
sql: ${TABLE}.AdAccountName ;;
}
dimension: ad_effective_status {
description: "Status of the Ad: Paused, Active, Deleted"
type: string
sql: ${TABLE}.AdEffectiveStatus ;;
}
dimension: ad_name {
type: string
description: "Name of your ad"
sql: ${TABLE}.AdName ;;
}
dimension: ad_set_id {
description: "The unique ID of the ad set you're viewing in reporting."
type: number
group_label: "IDs"
sql: ${TABLE}.AdSetId ;;
}
dimension: ad_set_name {
description: "The name of the ad set you're viewing in reporting."
type: string
sql: ${TABLE}.AdSetName ;;
}
dimension: ad_source {
description: "Dummy data, using just facebook at the moment"
type: string
sql: "Facebook" ;;
}
dimension: buying_type {
description: "The method by which you pay for and target ads in your campaigns: through dynamic auction bidding,
fixed-price bidding, or reach and frequency buying."
type: string
sql: ${TABLE}.BuyingType ;;
}
dimension: campaign_name {
description: "Name of the campaign"
type: string
sql: ${TABLE}.CampaignName ;;
}
dimension: checkins {
description: "Number of visits to your page as a result of your ads."
type: string
sql: ${TABLE}.Checkins ;;
}
dimension: clicks {
description: "The number of clicks on your ads."
type: number
sql: ${TABLE}.Clicks ;;
}
dimension: conversion_rate_ranking {
description: "Calculates the likelihood that a person who viewed your ad will complete your optimization goal"
type: string
sql: ${TABLE}.ConversionRateRanking ;;
}
dimension: cost_per_estimated_ad_recallers {
description: "The average cost for each individual who is estimated to recall your ad"
type: string
sql: ${TABLE}.CostPerEstimatedAdRecallers ;;
}
dimension: cost_per_inline_link_click {
description: "The average cost of each inline link click"
type: string
sql: ${TABLE}.CostPerInlineLinkClick ;;
}
dimension: cost_per_inline_post_engagement {
description: "The average cost of each inline post engagement"
type: string
sql: ${TABLE}.CostPerInlinePostEngagement ;;
}
dimension: cost_per_unique_click {
description: "The average cost of each unique click"
type: string
sql: ${TABLE}.CostPerUniqueClick ;;
}
dimension: cost_per_unique_inline_link_click {
description: "The average cost of each unique inline link click"
type: string
sql: ${TABLE}.CostPerUniqueInlineLinkClick ;;
}
dimension: cost_per_conversion {
label: "CPC"
description: "Cost Per Conversion"
type: number
sql: ${TABLE}.CPC ;;
}
dimension: cost_per_mile {
label: "Cost Per Mile"
type: number
sql: ${TABLE}.CPM ;;
}
dimension: cost_per_point {
label: "CPP"
description: "Cost per Point"
type: number
sql: ${TABLE}.CPP ;;
}
dimension: click_through_rate{
label: "CTR"
description: "Click Through Rate"
type: number
sql: ${TABLE}.CTR ;;
}
dimension_group: date_end {
type: time
description: "Date campaign ended"
timeframes: [raw, date, week, month, quarter, year]
convert_tz: no
datatype: date
sql: ${TABLE}.DateEnd ;;
}
dimension: date_preset {
description: "Date Preset for campaigns"
type: string
sql: ${TABLE}.DatePreset ;;
}
dimension_group: date_start {
type: time
description: "Date campaign started"
timeframes: [raw, date, week, month, quarter, year]
convert_tz: no
datatype: date
sql: ${TABLE}.DateStart ;;
}
dimension: default_summary {
description: "Determine wheter to return a summary"
type: string
sql: ${TABLE}.DefaultSummary ;;
}
dimension: estimated_ad_recall_rate {
description: "The rate at which an estimated number of additional people, when asked, would remember seeing your ads within 2 days"
type: string
sql: ${TABLE}.EstimatedAdRecallRate ;;
}
dimension: estimated_ad_recallers {
description: "An estimate of the number of additional people who may remember seeing your ads, if asked, within 2 days"
type: number
sql: ${TABLE}.EstimatedAdRecallers ;;
}
dimension: event_responses {
type: string
description: "Response number per event"
sql: ${TABLE}.EventResponses ;;
}
dimension: frequency {
type: number
description: "Number of times the same ad is shown to a single user over a period of time"
sql: ${TABLE}.Frequency ;;
}
dimension: impressions {
type: number
description: "Number of times an ad is displayed within an app"
sql: ${TABLE}.Impressions ;;
}
dimension: inline_link_clicks {
type: string
description: "Number of clicks on links to select destinations or experiences"
sql: ${TABLE}.InlineLinkClicks ;;
}
dimension: inline_link_clicks_counter {
type: string
description: "Counter of clicks on links to select destinations or experiences"
sql: ${TABLE}.InlineLinkClicksCounter ;;
}
dimension: inline_post_engagement {
type: string
description: "Measure how many times users have engaged with your post through likes, shares, comments, link clicks, and other forms of engagement."
sql: ${TABLE}.InlinePostEngagement ;;
}
dimension: instant_experience_clicks_to_open {
description: "The number of clicks on your ad that open an Instant Experience."
type: number
sql: ${TABLE}.InstantExperienceClicksToOpen ;;
}
dimension: instant_experience_clicks_to_start {
description: "The number of times an interactive component in an Instant Experience starts"
type: number
sql: ${TABLE}.InstantExperienceClicksToStart ;;
}
dimension: instant_experience_outbound_clicks {
description: "The number of clicks on links in an Instant Experience that take people off Facebook-owned properties"
type: string
sql: ${TABLE}.InstantExperienceOutboundClicks ;;
}
dimension: level {
type: string
description: "Level type of a campaign"
sql: ${TABLE}.Level ;;
}
dimension: link_clicks {
sql: CAST(${TABLE}.LinkClicks AS NUMERIC) ;;
}
dimension: objective {
description: "The objective reflecting the goal you want to achieve with your advertising"
type: string
sql: ${TABLE}.Objective ;;
}
dimension: offer_saves {
description: "The number of people who saved your offer."
type: string
sql: ${TABLE}.OfferSaves ;;
}
dimension: outbound_clicks {
description: "The number of clicks on links that take people off Facebook-owned properties."
type: string
sql: ${TABLE}.OutboundClicks ;;
}
dimension: page_engagements {
description: "The number of actions taken on your Facebook Page, Instagram profile or any of your content, attributed to your ads."
type: string
sql: ${TABLE}.PageEngagements ;;
}
dimension: page_likes {
description: "The number of likes of your Facebook Page attributed to your ads."
type: string
sql: ${TABLE}.PageLikes ;;
}
dimension: page_mentions {
description: "The number of mentios of your Facebook Page attributed to your ads."
type: string
sql: ${TABLE}.PageMentions ;;
}
dimension: page_photo_views {
description: "The number of times people click to view photos on a Facebook page or post that are attributed to ads."
type: string
sql: ${TABLE}.PagePhotoViews ;;
}
dimension: page_tab_views {
description: "Measures the number of times a page's tabs are viewed as a result of ads"
type: string
sql: ${TABLE}.PageTabViews ;;
}
dimension: post_comments {
description: "Counts all comments attributed to your ads, including ones that were deleted"
type: string
sql: ${TABLE}.PostComments ;;
}
dimension: post_engagements {
description: "This metric lets you measure interactions with posts on your Facebook page and Instagram profile, and compare them to engagement with other ads or campaigns"
type: string
sql: ${TABLE}.PostEngagements ;;
}
dimension: post_reactions {
description: "Counts the total number of times people react to a Facebook ad by clicking on an emoji to indicate their feelings"
type: string
sql: ${TABLE}.PostReactions ;;
}
dimension: post_shares {
description: "Counts the number of times a Facebook ad is shared on Facebook"
type: string
sql: ${TABLE}.PostShares ;;
}
dimension: quality_ranking {
description: "Explains how your ad's perceived quality compared to ads competing for the same audience."
type: string
sql: ${TABLE}.QualityRanking ;;
}
dimension: reach {
description: "The number of Accounts Center accounts that saw your ads at least once"
type: number
sql: ${TABLE}.Reach ;;
}
dimension: region {
description: "Shows where people were when they saw your ad"
type: string
sql: ${TABLE}.Region ;;
}
dimension: spend {
description: "The total amount of money spent on an ad campaign, ad set, or ad within a specific time period"
type: number
sql: ${TABLE}.Spend ;;
}
dimension: target {
description: "Specifies the group of people you want to see your ad and who are most likely to be interested in your business"
type: string
sql: ${TABLE}.Target ;;
}
dimension: time_increment {
description: "Specifies time breakdowns to see how your ads perform at different times of the day"
type: string
sql: ${TABLE}.TimeIncrement ;;
}
dimension: unique_clicks {
description: "Represents the number of individual users who have clicked on your ad at least once"
type: number
sql: ${TABLE}.UniqueClicks ;;
}
dimension: unique_ctr {
description: "Estimates the percentage of people who viewed an ad and clicked on a link"
type: string
sql: ${TABLE}.UniqueCTR ;;
}
dimension: unique_inline_link_click_counter {
description: "Count of the number of users who clicked on links in an ad's content"
type: string
sql: ${TABLE}.UniqueInlineLinkClickCounter ;;
}
dimension: unique_inline_link_clicks {
description: "The number of users who clicked on links in the ad's content"
type: string
sql: ${TABLE}.UniqueInlineLinkClicks ;;
}
dimension: unique_link_clicks_counter {
description: "An estimated count of how many people clicked on a link in an ad"
type: string
sql: ${TABLE}.UniqueLinkClicksCounter ;;
}
dimension: does_use_async {
description: "Indicates if users are able to create ads and send multiple ad requests without blocking"
type: yesno
sql: ${TABLE}.UseAsync ;;
}
dimension: video3_second_views {
description: "Count the number of times a video plays for at least three seconds"
type: string
sql: ${TABLE}.Video3SecondViews ;;
}
}