forked from llooker/braze_message_engagement_block
-
Notifications
You must be signed in to change notification settings - Fork 0
/
braze_currents_block_message_engagement.model.lkml
373 lines (336 loc) · 12.8 KB
/
braze_currents_block_message_engagement.model.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
#########################
# Connection
#########################
connection: "snowflake"
label: "E - Block Braze Events"
#########################
# Conversion Views
#########################
include: "users_campaigns_conversion.view.lkml"
include: "users_campaigns_enrollincontrol.view.lkml"
include: "users_canvas_conversion.view.lkml"
include: "users_canvas_entry.view.lkml"
#########################
# Email Views
#########################
include: "users_messages_email_bounce.view.lkml"
include: "users_messages_email_click.view.lkml"
include: "users_messages_email_delivery.view.lkml"
include: "users_messages_email_markasspam.view.lkml"
include: "users_messages_email_open.view.lkml"
include: "users_messages_email_send.view.lkml"
include: "email_messaging_cadence.view"
include: "email_messaging_frequency.view"
include: "users_messages_email_softbounce.view.lkml"
include: "users_messages_email_unsubscribe.view.lkml"
include: "email_fact.view.lkml"
include: "message_variation_name.view.lkml"
#########################
# IAM Views
#
# Note: Uncomment the block below when doing In-App Message analytics
#########################
include: "users_messages_inappmessage_click.view.lkml"
include: "users_messages_inappmessage_impression.view.lkml"
#
#########################
#########################
# Newsfeed Views
#
# Note: Uncomment the block below when doing Newsfeed analytics
#########################
#
# include: "users_behaviors_app_newsfeedimpression.view.lkml"
# include: "users_messages_newsfeedcard_click.view.lkml"
# include: "users_messages_newsfeedcard_impression.view.lkml"
#
#########################
#########################
# Push Views
#########################
include: "users_messages_pushnotification_bounce.view.lkml"
include: "users_messages_pushnotification_iosforeground.view.lkml"
include: "users_messages_pushnotification_open.view.lkml"
include: "users_messages_pushnotification_send.view.lkml"
include: "push_messaging_frequency.view"
include: "push_messaging_cadence.view"
include: "push_fact.view.lkml"
#########################
# Uninstall Views
#
# Note: Uncomment the block below when doing Uninstall analytics
#########################
# include: "users_behaviors_uninstall.view.lkml"
#
#########################
#########################
# Webhook Views
#
# Note: Uncomment the block below when doing Webhook message analytics
#########################
#
include: "users_messages_webhook_send.view.lkml"
#
#########################
#########################
# Dashboards
#########################
include: "email_funnel.dashboard"
include: "push_funnel.dashboard"
include: "email_performance_dashboard.dashboard"
include: "message_engagement_dashboard.dashboard"
include: "email_marketing_pressure.dashboard"
include: "push_marketing_pressure.dashboard"
#########################
# Campaign Conversions Explore
#
# Note: Uncomment the block below when doing Campaign Conversion analytics
#########################
explore: users_campaigns_conversion {
label: "Campaign Conversions"
view_label: "Campaign Conversions"
join: users_campaigns_enrollincontrol { # only joining so we can have a "user in control" dimension--all its dimensions are hidden"
view_label: "Enrolled in Control"
type: left_outer
relationship: many_to_one
sql_on: ${users_campaigns_conversion.user_id}=${users_campaigns_enrollincontrol.user_id}
AND
${users_campaigns_conversion.message_variation_id}=${users_campaigns_enrollincontrol.message_variation_id};;
}
}
#########################
#########################
# Canvas Conversions Explore
#
# Note: Uncomment the block below when doing Canvas Conversion analytics
#########################
explore: users_canvas_conversion {
label: "Canvas Conversions"
view_label: "Canvas Conversions"
join: users_canvas_entry {
view_label: "Canvas Conversions"
type: left_outer
relationship: many_to_one
sql_on: ${users_canvas_conversion.user_id}=${users_canvas_entry.user_id}
AND
${users_canvas_conversion.canvas_variation_id}=${users_canvas_entry.canvas_variation_id};;
}
}
#########################
#########################
# Email Events Explore
#########################
# explore: users_messages_email_send {
# label: "Email Events"
# view_label: "Emails Sent"
# join: users_messages_email_delivery {
# view_label: "Email Delivery"
# type: left_outer
# relationship: one_to_one
# sql_on: ${users_messages_email_send.email_address}=${users_messages_email_delivery.email_address}
# AND
# (${users_messages_email_send.message_variation_id}=${users_messages_email_delivery.message_variation_id}
# OR
# ${users_messages_email_send.canvas_step_id}=${users_messages_email_delivery.canvas_step_id});;
# }
# join: users_messages_email_open {
# view_label: "Email Opens"
# type: left_outer
# relationship: one_to_many
# sql_on: ${users_messages_email_send.email_address}=${users_messages_email_open.email_address}
# AND
# (${users_messages_email_send.message_variation_id}=${users_messages_email_open.message_variation_id}
# OR
# ${users_messages_email_send.canvas_step_id}=${users_messages_email_open.canvas_step_id}) ;;
# }
# join: users_messages_email_click {
# view_label: "Email Clicks"
# type: left_outer
# relationship: one_to_many
# sql_on: ${users_messages_email_send.email_address}=${users_messages_email_click.email_address}
# AND
# (${users_messages_email_send.message_variation_id}=${users_messages_email_click.message_variation_id}
# OR
# ${users_messages_email_send.canvas_step_id}=${users_messages_email_click.canvas_step_id}) ;;
# }
# join: users_messages_email_unsubscribe {
# view_label: "Email Unsubscribes"
# type: left_outer
# relationship: one_to_many
# sql_on: ${users_messages_email_send.email_address}=${users_messages_email_unsubscribe.email_address}
# AND
# (${users_messages_email_send.message_variation_id}=${users_messages_email_unsubscribe.message_variation_id}
# OR
# ${users_messages_email_send.canvas_step_id}=${users_messages_email_unsubscribe.canvas_step_id});;
# }
# join: users_messages_email_bounce {
# view_label: "Email Bounces"
# type: left_outer
# relationship: one_to_one
# sql_on: ${users_messages_email_send.email_address}=${users_messages_email_bounce.email_address}
# AND
# (${users_messages_email_send.message_variation_id}=${users_messages_email_bounce.message_variation_id}
# OR
# ${users_messages_email_send.canvas_step_id}=${users_messages_email_bounce.canvas_step_id});;
# }
# join: users_messages_email_softbounce {
# view_label: "Email Bounces"
# type: left_outer
# relationship: one_to_one
# sql_on: ${users_messages_email_send.email_address}=${users_messages_email_softbounce.email_address}
# AND
# (${users_messages_email_send.message_variation_id}=${users_messages_email_softbounce.message_variation_id}
# OR
# ${users_messages_email_send.canvas_step_id}=${users_messages_email_softbounce.canvas_step_id});;
# }
# join: users_messages_email_markasspam {
# view_label: "Emails Marked as Spam"
# type: left_outer
# relationship: one_to_one
# sql_on: ${users_messages_email_send.email_address}=${users_messages_email_markasspam.email_address}
# AND
# (${users_messages_email_send.message_variation_id}=${users_messages_email_markasspam.message_variation_id}
# OR
# ${users_messages_email_send.canvas_step_id}=${users_messages_email_markasspam.canvas_step_id});;
# }
# }
explore: email_fact {
label: "Email Events"
view_label: "Email Events"
join: message_variation_name {
type: left_outer
relationship: one_to_one
sql_on: ${email_fact.send_message_variation_id} = ${message_variation_name.message_variation_id} ;;
}
}
#########################
# Email Marketing Pressure
#########################
explore: email_messaging_frequency {}
explore: email_messaging_cadence {}
#########################
# IAM Events Explore
#
# Note: Uncomment the block below when doing In-App Message analytics
#########################
explore: users_messages_inappmessage_impression {
label: "In-App Message Events"
view_label: "IAM Impressions"
join: users_messages_inappmessage_click {
view_label: "IAM Clicks"
type: left_outer
relationship: one_to_many
sql_on: ${users_messages_inappmessage_impression.user_id}=${users_messages_inappmessage_click.user_id}
AND
(${users_messages_inappmessage_impression.message_variation_id}=${users_messages_inappmessage_click.message_variation_id}
OR
${users_messages_inappmessage_impression.canvas_step_id}=${users_messages_inappmessage_click.canvas_step_id}) ;;
}
}
#########################
#########################
# Newsfeed Card Events Explore
#
# Note: Uncomment the block below when doing Newsfeed analytics
#########################
#
# explore: users_messages_newsfeedcard_impression {
# label: "Newsfeed Card Events"
# view_label: "Newsfeed Card Impressions"
# join: users_messages_newsfeedcard_click {
# view_label: "Newsfeed Card Clicks"
# type: left_outer
# relationship: one_to_many
# sql_on: ${users_messages_newsfeedcard_impression.user_id}=${users_messages_newsfeedcard_click.user_id}
# AND
# ${users_messages_newsfeedcard_impression.card_id}=${users_messages_newsfeedcard_click.card_id}
# AND
# ${users_messages_newsfeedcard_impression.device_id}=${users_messages_newsfeedcard_click.device_id};;
# }
# }
#
#########################
#########################
# Newsfeed Impression Events Explore
#
# Note: Uncomment the block below when doing Newsfeed analytics
#########################
#
# explore: users_behaviors_app_newsfeedimpression {
# label: "Newsfeed Impressions"
# view_label: "Newsfeed Impressions"
# }
#
#########################
#########################
# Push Events Explore
#########################
# explore: users_messages_pushnotification_send {
# label: "Push Events"
# view_label: "Push Sent"
# join: users_messages_pushnotification_open {
# view_label: "Push Opens"
# type: left_outer
# relationship: one_to_many
# sql_on: ${users_messages_pushnotification_send.user_id}=${users_messages_pushnotification_open.user_id}
# AND
# (${users_messages_pushnotification_send.message_variation_id}=${users_messages_pushnotification_open.message_variation_id}
# OR
# ${users_messages_pushnotification_send.canvas_step_id}=${users_messages_pushnotification_open.canvas_step_id}) ;;
# }
# join: users_messages_pushnotification_bounce {
# view_label: "Push Bounces"
# type: left_outer
# relationship: one_to_one
# sql_on: ${users_messages_pushnotification_send.user_id}=${users_messages_pushnotification_bounce.user_id}
# AND
# (${users_messages_pushnotification_send.message_variation_id}=${users_messages_pushnotification_bounce.message_variation_id}
# OR
# ${users_messages_pushnotification_send.canvas_step_id}=${users_messages_pushnotification_bounce.canvas_step_id}) ;;
# }
########################
# Note: Uncomment the block below when doing iOS foreground analytics
########################
#
# join: users_messages_pushnotification_iosforeground {
# view_label: "iOS Foreground Opens"
# type: left_outer
# relationship: one_to_many
# sql_on: ${users_messages_pushnotification_send.user_id}=${users_messages_pushnotification_iosforeground.user_id}
# AND
# (${users_messages_pushnotification_send.message_variation_id}=${users_messages_pushnotification_iosforeground.message_variation_id}
# OR
# ${users_messages_pushnotification_send.canvas_step_id}=${users_messages_pushnotification_iosforeground.canvas_step_id}) ;;
# }
########################
# }
explore: push_fact {
label: "Push Events"
view_label: "Push Events"
}
#########################
# Push Marketing Pressure
#########################
explore: push_messaging_frequency {}
explore: push_messaging_cadence {}
#########################
# Uninstall Events Explore
#
# Note: Uncomment the block below when doing Uninstall analytics
#########################
# explore: users_behaviors_uninstall {
# label: "Uninstall Events"
# view_label: "Uninstall Events"
# }
#
#########################
#########################
# Webhook Events Explore
#
# Note: Uncomment the block below when doing Webhook message analytics
#########################
explore: users_messages_webhook_send {
label: "Webhook Events"
view_label: "Webhook Send Events"
}
#########################