staccato v0.2.0 Staccato.Hit behaviour View Source
Link to this section Summary
Functions
Collect all params for a hit
Link to this section Functions
Link to this function
social(tracker, options)
View Source
Collect all params for a hit
Examples
iex> tracker = Staccato.tracker("X-YYYYY-1", "stub_client_id")
iex> hit = Staccato.Hit.pageview(tracker, %{
iex> path: "/page-path",
iex> hostname: "mysite.com",
iex> title: "A Page!",
iex> user_ip: "127.0.0.1"
iex> })
iex> Staccato.Hit.to_params(hit)
%{
"v" => 1,
"t" => :pageview,
"tid" => "X-YYYYY-1",
"dh" => "mysite.com",
"dp" => "/page-path",
"dt" => "A Page!",
"uip" => "127.0.0.1",
"cid" => "stub_client_id"
}