R/customEventNameEncode.R

Defines functions customEventNameEncode

## "Custom Name" -> "$custom_event:######".
customEventNameEncode <- function(
  account,
  event
  ) {
  if("customEvents" %in% names(account)) {
    code <- account$customEvents$custom_event_id[account$customEvents$event_name == event]
    if(length(code))
      event <- paste0("$custom_event:", code)
  }
  event
}

Try the RMixpanel package in your browser

Any scripts or data that you put into this service are public.

RMixpanel documentation built on May 1, 2019, 10:46 p.m.