-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathq_entrance.view.lkml
executable file
·164 lines (143 loc) · 4.3 KB
/
q_entrance.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
view: q_entrance {
# Qubit LookML | Retail | V2
derived_table: {
sql:
SELECT
*
FROM
`qubit-client-{{q_view_v01.project._parameter_value}}.{{q_view_v01.site._parameter_value}}__v2.livetap_entrance`
WHERE
{% condition q_view_v01.time_data_points_date %} property_event_ts {% endcondition %}
;;
}
dimension: view_id {
type: string
sql: ${TABLE}.view_id ;;
hidden: yes
primary_key: yes
}
dimension: session_id {
type: string
sql: ${TABLE}.session_id ;;
hidden: yes
}
dimension: context_entrance_number {
type: number
sql: ${TABLE}.context_entranceNumber ;;
label: "Entrance Number"
description: "Entrance number of the visitor, in a lifetime. QP fields: context_entranceNumber"
}
dimension: context_id {
type: string
sql: ${TABLE}.context_id ;;
label: "Visitor ID"
description: "ID unique to the visitor. QP fields: context_id"
}
dimension: context_session_number {
type: number
sql: ${TABLE}.context_sessionNumber ;;
label: "Session Number"
hidden: yes
}
dimension: entrance_id {
type: string
sql: ${TABLE}.entrance_id ;;
label: "Entrance ID"
hidden: yes
}
dimension_group: time_data_points {
label: ""
type: time
timeframes: [time, hour_of_day, date, day_of_week, week, week_of_year, month, month_name, quarter_of_year, year]
sql: ${TABLE}.property_event_ts ;;
group_label: "⏰ Date & Time"
description: "Timestamp of an entrance. QP field: meta_serverTs (with applied UTC offset for your timezone)"
hidden: yes
}
dimension: meta_url {
type: string
sql: ${TABLE}.meta_url ;;
hidden: yes
}
dimension: referrer_keywords {
type: string
sql: ${TABLE}.referrer_keywords ;;
hidden: yes
group_label: "Referrer"
label: "Keywords"
description: "Referrer Keywords - as emitted. QP fields: referrer_keywords"
}
dimension: referrer_label {
type: string
sql: ${TABLE}.referrer_label ;;
group_label: "Referrer"
label: "Label"
description: "Label carried by the referrer - as emitted. QP fields: referrer_label"
}
dimension: referrer_network {
type: string
sql: ${TABLE}.referrer_network ;;
group_label: "Referrer"
label: "Network"
description: "network of the referrer - as emitted, usually populated for affiliates. QP fields: referrer_network"
}
dimension: referrer_type {
type: string
sql: ${TABLE}.referrer_type ;;
group_label: "Referrer"
label: "Type"
description: "Entrance referrer type, e.g. DIRECT, EMAIL, SEO. QP fields: referrer_type"
}
dimension: referrer_url {
type: string
sql: ${TABLE}.referrer_url ;;
group_label: "Referrer"
label: "URL"
description: "URL of referrer. QP fields: referrer_url"
}
dimension: source {
type: string
sql: ${TABLE}.utm_source ;;
group_label: "UTM"
label: "Source"
description: "Google's utm_source parameter extracted out of the referrer URL. QP fields: referrer_url"
}
dimension: medium {
type: string
sql: ${TABLE}.utm_medium ;;
group_label: "UTM"
label: "Medium"
description: "Google's utm_medium parameter extracted out of the referrer URL. QP fields: referrer_url"
}
dimension: content {
type: string
sql: ${TABLE}.utm_content ;;
group_label: "UTM"
label: "Content"
description: "Google's utm_content parameter extracted out of the referrer URL. QP fields: referrer_url"
}
dimension: campaign {
type: string
sql: ${TABLE}.utm_campaign ;;
group_label: "UTM"
label: "Campaign"
description: "Google's utm_campaign parameter extracted out of the referrer URL. QP fields: referrer_url"
}
dimension: term {
type: string
sql: ${TABLE}.utm_term ;;
group_label: "UTM"
label: "Term"
description: "Google's utm_term parameter extracted out of the referrer URL. QP fields: referrer_url"
}
measure: entrance_visitors {
type: number
sql: COUNT(DISTINCT ${TABLE}.context_id) ;;
description: "Count of unique visitor_ids. QP fields: context_id"
}
measure: entrances {
type: number
sql: COUNT(DISTINCT ${TABLE}.entrance_id) ;;
description: "Count of unique combinations of a visitor_id and an entrance_number. QP fields: context_id, context_entranceNumber"
}
}