Skip to content

Instantly share code, notes, and snippets.

@fallengiants
Created January 18, 2024 20:39
Show Gist options
  • Select an option

  • Save fallengiants/f553564c0879b374f745e0cef174e8be to your computer and use it in GitHub Desktop.

Select an option

Save fallengiants/f553564c0879b374f745e0cef174e8be to your computer and use it in GitHub Desktop.
Tracky Search In Vega - just in case i lose it again
{
$schema: https://vega.github.io/schema/vega/v5.json
description: Timeline from CTA to HTTP Out
title: Event Timeline
config: {
autosize: fit
}
data: [
{
name: tracky
url:
{
"%context%": true
"%timefield%": "@timestamp"
body: { aggs:
{ time_buckets:
{ date_histogram:
field: "@timestamp"
interval: 1h
min_doc_count: 0
}
}
{ query:
{ bool:
{ must:
{ term : [
{ "page.app": "next-pwa-app" }
{ "event.type": "click" }
]
}
}
{ regexp: { "childCard.name": {
value: "*card"
boost: 1.0
case_insensitive: true
}
size: 0
}
}
index: "us-proddata*:filebeat-tracky_json_nginx--*"
query: { range: {order_date: {gte: "now-14d" }}}
}
}
{
name: tracky
url: {
"%context%": "page.app='next-pwa-app' AND event.type='click' AND childCard.name='*art'"
"%timefield%": "@timestamp"
index: "us-proddata*:filebeat-tracky_json_nginx--*"
query: { range: {order_date: {gte: "now-14d" }}}
}
}
{
name: mbnxt
url: {
"%context%"
{ name: click_event
type: date
from: tracky_data
zindex: 10
from: {
from: { }
values: [
{
field: @timestamp
as: click_time
}
{
field: childCard.name
as: widget_name
}
{
field: event.type
}
{
field: user.browserId
as: b_cookie_initial
}
{
field: page.app
as: itier_app
}
{
field: page.type
as: source_page
}
{
field: page.requestId
as: origin_request_id
}
]
}
marks: [
{
type: text
from: {
data: tracky_data
}
id: origin_request_id
name: datadump
x: 0
y: 0
font: Roboto Mono
lineBreak: \n
text: tracky_data
limit: 10000
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment