tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
298
fork
atom
a tool for shared writing and social publishing
298
fork
atom
overview
issues
31
pulls
3
pipelines
add referrer host to tinybird conf
awarm.space
1 month ago
282238e5
7dea6c9c
+12
1 changed file
expand all
collapse all
unified
split
lib
tinybird.ts
+12
lib/tinybird.ts
reviewed
···
94
94
date_from: p.string().optional(),
95
95
date_to: p.string().optional(),
96
96
path: p.string().optional(),
97
97
+
referrer_host: p.string().optional(),
97
98
},
98
99
tokens: [PROD_READ_TOKEN],
99
100
nodes: [
···
116
117
{% if defined(path) %}
117
118
AND path = {{String(path)}}
118
119
{% end %}
120
120
+
{% if defined(referrer_host) %}
121
121
+
AND domain(referrer) = {{String(referrer_host)}}
122
122
+
{% end %}
119
123
GROUP BY day
120
124
ORDER BY day ASC
121
125
`,
···
146
150
date_from: p.string().optional(),
147
151
date_to: p.string().optional(),
148
152
path: p.string().optional(),
153
153
+
referrer_host: p.string().optional(),
149
154
limit: p.int32().optional(10),
150
155
},
151
156
nodes: [
···
169
174
{% if defined(path) %}
170
175
AND path = {{String(path)}}
171
176
{% end %}
177
177
+
{% if defined(referrer_host) %}
178
178
+
AND domain(referrer) = {{String(referrer_host)}}
179
179
+
{% end %}
172
180
GROUP BY referrer_host
173
181
ORDER BY pageviews DESC
174
182
LIMIT {{Int32(limit, 10)}}
···
199
207
domains: p.string(),
200
208
date_from: p.string().optional(),
201
209
date_to: p.string().optional(),
210
210
+
referrer_host: p.string().optional(),
202
211
limit: p.int32().optional(10),
203
212
},
204
213
nodes: [
···
216
225
{% end %}
217
226
{% if defined(date_to) %}
218
227
AND fromUnixTimestamp64Milli(timestamp) <= parseDateTimeBestEffort({{String(date_to)}})
228
228
+
{% end %}
229
229
+
{% if defined(referrer_host) %}
230
230
+
AND domain(referrer) = {{String(referrer_host)}}
219
231
{% end %}
220
232
GROUP BY path
221
233
ORDER BY pageviews DESC