Skip to contents

Retrieves raw event data from the Mixpanel Export API for a specified date range.

Usage

fetch_mixpanel(params, env_path)

Arguments

params

a named list containing API parameters (from_date, to_date, client_agency, etc.)

env_path

path to the .env file containing credentials. Default is ".env.local"

Value

A character string containing newline-delimited JSON, or NULL if the request fails

Examples

if (FALSE) { # \dontrun{
params <- list(from_date = "2025-11-16", to_date = "2025-12-19")
raw_data <- fetch_mixpanel(params)
} # }