source("R/event_dispatcher.r")
source("R/event_heartbeat.r")
handle <- function(op, data, client) {
switch(toString(op),
"9"={start_connection(client)},
"10"={heartbeat(data$d$heartbeat_interval, client)},
"0"={dispatch(data, client)},
{print(op)} #identify
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.