-
Notifications
You must be signed in to change notification settings - Fork 42
/
0_pages.view.lkml
98 lines (80 loc) · 1.77 KB
/
0_pages.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
view: pages {
sql_table_name: segment.pages ;;
dimension: id {
primary_key: yes
type: string
sql: ${TABLE}.id ;;
}
dimension: event_id {
type: string
sql: CONCAT(${received_raw}, ${uuid}) ;;
}
dimension: anonymous_id {
type: string
sql: ${TABLE}.anonymous_id ;;
}
dimension: context_campaign_content {
type: string
sql: ${TABLE}.context_campaign_content ;;
}
dimension: context_campaign_medium {
type: string
sql: ${TABLE}.context_campaign_medium ;;
}
dimension: context_campaign_name {
type: string
sql: ${TABLE}.context_campaign_name ;;
}
dimension: name {
type: string
sql: ${TABLE}.name ;;
}
dimension_group: received {
type: time
timeframes: [raw, time, date, week, month]
sql: ${TABLE}.received_at ;;
}
dimension: referrer {
type: string
sql: ${TABLE}.referrer ;;
}
dimension: title {
type: string
sql: ${TABLE}.title ;;
}
dimension: url {
type: string
sql: ${TABLE}.url ;;
}
dimension: user_id {
type: string
# hidden: true
sql: ${TABLE}.user_id ;;
}
dimension: uuid {
type: number
value_format_name: id
sql: ${TABLE}.uuid ;;
}
measure: count {
type: count
drill_fields: [id, context_campaign_name, name, users.id]
}
measure: count_visitors {
type: count_distinct
sql: ${page_facts.looker_visitor_id} ;;
}
measure: count_pageviews {
type: count
drill_fields: [context_campaign_name]
}
measure: avg_page_view_duration_minutes {
type: average
value_format_name: decimal_1
sql: ${page_facts.duration_page_view_seconds}/60.0 ;;
}
measure: count_distinct_pageviews {
type: number
sql: COUNT(DISTINCT CONCAT(${page_facts.looker_visitor_id}, ${url})) ;;
}
}