Skip to contents

Shinymetrics

Shinymetrics

Active bindings

token

Your shinymetrics token.

Methods


Method new()

Usage

Shinymetrics$new(
  token = Sys.getenv("SHINYMETRICS_TOKEN"),
  prod = getOption("SHINYMETRICS_PROD", FALSE),
  ignore_global = TRUE,
  ignore_consent = FALSE
)

Arguments

token

Your application token.

prod

Whether the events are tracked for production. These allow not polluting your dashboard with test data. It is FALSE by default.

ignore_global

Whether to ignore "global" events, these are events that target the entire HTML document, they tend to add noise. They mainly are events sent by HTMLwidgetsand the likes. It is advised to ignore them.

ignore_consent

Whether to ignore the consent and force tracking. make sure you do not violate and data privacy laws if you toggle this on.

Details

Initialize tracker


Usage

Shinymetrics$track_recommended()

Details

Recommended events to track.

Tracks the following:

  • input

  • output

  • error

  • file_download

  • page_view

  • busy_idle


Method track_connected()

Usage

Shinymetrics$track_connected(ignore = c(), only = c())

Arguments

ignore

inputIds or outputIds to ignore from the tracking. Must include the namespace. Cannot be used with only.

only

inputIds or outputIds to limit the tracking the tracking to. Must include the namespace. Cannot be used with ignore.

Details

Track "connected" event fired when Shiny's server connects.


Method track_disconnected()

Usage

Shinymetrics$track_disconnected(ignore = c(), only = c())

Arguments

ignore

inputIds or outputIds to ignore from the tracking. Must include the namespace. Cannot be used with only.

only

inputIds or outputIds to limit the tracking the tracking to. Must include the namespace. Cannot be used with ignore.

Details

Track "disconnected" event fired when Shiny's server disconnects.


Method track_session_initialialized()

Usage

Shinymetrics$track_session_initialialized(ignore = c(), only = c())

Arguments

ignore

inputIds or outputIds to ignore from the tracking. Must include the namespace. Cannot be used with only.

only

inputIds or outputIds to limit the tracking the tracking to. Must include the namespace. Cannot be used with ignore.

Details

Track "sessioninitialized" event fired when Shiny's session is initialized.


Method track_busy_idle()

Usage

Shinymetrics$track_busy_idle(ignore = c(), only = c())

Arguments

ignore

inputIds or outputIds to ignore from the tracking. Must include the namespace. Cannot be used with only.

only

inputIds or outputIds to limit the tracking the tracking to. Must include the namespace. Cannot be used with ignore.

Details

Track "busy" and "idle" event fired when the server is performing calculations and stops.


Method track_input()

Usage

Shinymetrics$track_input(ignore = c(), only = c())

Arguments

ignore

inputIds or outputIds to ignore from the tracking. Must include the namespace. Cannot be used with only.

only

inputIds or outputIds to limit the tracking the tracking to. Must include the namespace. Cannot be used with ignore.

Details

Track "inputchanged" event fired when an input value changes.


Method track_message()

Usage

Shinymetrics$track_message(ignore = c(), only = c())

Arguments

ignore

inputIds or outputIds to ignore from the tracking. Must include the namespace. Cannot be used with only.

only

inputIds or outputIds to limit the tracking the tracking to. Must include the namespace. Cannot be used with ignore.

Details

Track "message" event triggered when any messages are received from the server.


Method track_conditional()

Usage

Shinymetrics$track_conditional(ignore = c(), only = c())

Arguments

ignore

inputIds or outputIds to ignore from the tracking. Must include the namespace. Cannot be used with only.

only

inputIds or outputIds to limit the tracking the tracking to. Must include the namespace. Cannot be used with ignore.

Details

Track "conditional" triggered when shiny::conditionalPanel are updated.


Method track_bound()

Usage

Shinymetrics$track_bound(ignore = c(), only = c())

Arguments

ignore

inputIds or outputIds to ignore from the tracking. Must include the namespace. Cannot be used with only.

only

inputIds or outputIds to limit the tracking the tracking to. Must include the namespace. Cannot be used with ignore.

Details

Track "bound" triggered when an input or output is bound with the shiny server.


Method track_unbound()

Usage

Shinymetrics$track_unbound(ignore = c(), only = c())

Arguments

ignore

inputIds or outputIds to ignore from the tracking. Must include the namespace. Cannot be used with only.

only

inputIds or outputIds to limit the tracking the tracking to. Must include the namespace. Cannot be used with ignore.

Details

Track "unbound" triggered when an input or output is no longer bound with the shiny server.


Method track_output()

Usage

Shinymetrics$track_output(ignore = c(), only = c())

Arguments

ignore

inputIds or outputIds to ignore from the tracking. Must include the namespace. Cannot be used with only.

only

inputIds or outputIds to limit the tracking the tracking to. Must include the namespace. Cannot be used with ignore.

Details

Track the "value" event which is triggered when an output receives a value from the server (when an output is updated).


Method track_error()

Usage

Shinymetrics$track_error(ignore = c(), only = c())

Arguments

ignore

inputIds or outputIds to ignore from the tracking. Must include the namespace. Cannot be used with only.

only

inputIds or outputIds to limit the tracking the tracking to. Must include the namespace. Cannot be used with ignore.

Details

Track the "error" event, triggered when an error is propagated to an output


Method track_output_invalidated()

Usage

Shinymetrics$track_output_invalidated(ignore = c(), only = c())

Arguments

ignore

inputIds or outputIds to ignore from the tracking. Must include the namespace. Cannot be used with only.

only

inputIds or outputIds to limit the tracking the tracking to. Must include the namespace. Cannot be used with ignore.

Details

Track "outputinvalidated" event triggered, when an output’s value is invalidated on the server.


Method track_recalculating()

Usage

Shinymetrics$track_recalculating(ignore = c(), only = c())

Arguments

ignore

inputIds or outputIds to ignore from the tracking. Must include the namespace. Cannot be used with only.

only

inputIds or outputIds to limit the tracking the tracking to. Must include the namespace. Cannot be used with ignore.

Details

Track "recalculating" triggered before an output value is recalculated.


Method track_recalculated()

Usage

Shinymetrics$track_recalculated(ignore = c(), only = c())

Arguments

ignore

inputIds or outputIds to ignore from the tracking. Must include the namespace. Cannot be used with only.

only

inputIds or outputIds to limit the tracking the tracking to. Must include the namespace. Cannot be used with ignore.

Details

Track "recalculating" triggered after an output value has been recalculated.


Method track_visual_change()

Usage

Shinymetrics$track_visual_change(ignore = c(), only = c())

Arguments

ignore

inputIds or outputIds to ignore from the tracking. Must include the namespace. Cannot be used with only.

only

inputIds or outputIds to limit the tracking the tracking to. Must include the namespace. Cannot be used with ignore.

Details

Track "visualchange" triggered when an output is resized, hidden, or shown.


Method track_update_input()

Usage

Shinymetrics$track_update_input(ignore = c(), only = c())

Arguments

ignore

inputIds or outputIds to ignore from the tracking. Must include the namespace. Cannot be used with only.

only

inputIds or outputIds to limit the tracking the tracking to. Must include the namespace. Cannot be used with ignore.

Details

Track "updateinput" event is triggered when an input is updated from the server, e.g., when you call shiny::updateTextInput() in R to update the label or value of a text input.


Method track_page_view()

Usage

Shinymetrics$track_page_view(ignore = c(), only = c())

Arguments

ignore

inputIds or outputIds to ignore from the tracking. Must include the namespace. Cannot be used with only.

only

inputIds or outputIds to limit the tracking the tracking to. Must include the namespace. Cannot be used with ignore.

Details

Track when a page is loaded.


Method track_file_download()

Usage

Shinymetrics$track_file_download(ignore = c(), only = c())

Arguments

ignore

inputIds or outputIds to ignore from the tracking. Must include the namespace. Cannot be used with only.

only

inputIds or outputIds to limit the tracking the tracking to. Must include the namespace. Cannot be used with ignore.

Details

Track "filedownload" event triggered when a file is downloaded via the shiny::downloadButton().


Method track_custom()

Usage

Shinymetrics$track_custom(
  type,
  id = NULL,
  value = NULL,
  session = shiny::getDefaultReactiveDomain()
)

Arguments

type

Type of event that is pushed.

id

A unique identifier for your custom event, used to identify specific events of a certain type.

value

Value of the event, this is converted to a character.

session

A valid Shiny session.

Details

Track custom events.


Method include()

Usage

Shinymetrics$include()

Details

Include the tracking code in your UI.