build_query: Build the query

View source: R/build_query.R

build_queryR Documentation

Build the query

Description

Build the query

Usage

build_query(
  date_from,
  date_to,
  website_id,
  columns,
  filters = NULL,
  metric_filters = NULL,
  offset = 0,
  max_lines = 0
)

Arguments

date_from

Start date of query

date_to

End date of query

website_id

website_id from piwik

columns

tibble containing columns and transformations (metrics and dimensions)

filters

list containing filter, best built by build_filter

metric_filters

list containing filter, best built by build_filter

offset

offset

max_lines

limit

Value

query as list

Examples

columns <- tibble::tribble(
  ~column, ~transformation,
  "event_url", "to_path",
  "event_url", "to_domain",
  "website_name", "",
  "timestamp", "",
  "timestamp", "to_hour_of_day",
  "page_views", ""
  )
  build_query(lubridate::ymd("2021-01-01"), lubridate::ymd("2021-01-19"),
              "xxx", columns)


piwikproR documentation built on Sept. 1, 2022, 5:07 p.m.