res <- httr::GET(
paste0(url_, "/apps"),
httr::authenticate(
user = secret_key,
password = ""
),
query = list(
app_name = app_name_
),
encode = "json"
)
app <- jsonlite::fromJSON(
httr::content(res, "text", encoding = "UTF-8")
)
app_uid_ <- app$uid
res <- httr::GET(
url = paste0(url_, "/daily-sessions"),
query = list(
app_uid = app_uid_
),
httr::authenticate(
user = secret_key,
password = ""
)
)
dat <- jsonlite::fromJSON(
httr::content(res, "text", encoding = "UTF-8")
)
new_sessions <- dat %>%
filter(type == "info", message == "session_start", page == "server:")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.