Monitus UI Library

Google Analytics  4

Monitus UI Library > ga > MUI.ga
Search:
 
Filters

static Class MUI.ga

The GA (Google Analytics) module provides utilities to work with Google Analytics.

Properties

kvariable_scope_page - final Number

Page Scope.
Default Value: 3

kvariable_scope_session - final Number

Session Scope.
Default Value: 2

kvariable_scope_visitor - final Number

Visitor Scope.
Default Value: 1

Methods

append_queued_variables

static void append_queued_variables ( pTrackerObject )
Adds the previously queued variables to the tracker object.
Parameters:
pTrackerObject <object> the tracker object.
Returns: void

attach_tracking_info

static void attach_tracking_info ( pObject , pTrackerObject , pEventCategory , pEventAction , pEventLabel , pEventValue , pNonInteraction )
Allows you to attach all the event tracking information to an object on a page; then, when you are ready to send the event, you can use MUI.ga.track_event_attached_to_object. Particularely useful for buttons, and onclick events: you attach the event data on the butotn, and then it's onclick function simply calls return MUI.ga.track_event_attached_to_object(this);
Parameters:
pObject <object> the object to attach the event data to.
pTrackerObject <string|object> the name of the tracker object variabl, or the actual tracker object.
pEventCategory <string> the category for this event; can be an inflatable template.
pEventAction <string> the action for this event; can be an inflatable template.
pEventLabel <string> the label for this event; can be an inflatable template.
pEventValue <number> the value of this event.
pNonInteraction <bool> when false, event has an impact on bounce rate. When true, the event will not be used in bounce rate calculations. Default: "false"
Returns: void

queue_custom_variable

static void queue_custom_variable ( pSlot , pName , pValue , pScope )
Queues custom variable values so they can be used when the tracker object is finally created.
Parameters:
pSlot <number> the variable slot to use.
pName <string> the variable name.
pValue <string> the value set for the variable.
pScope <number> the variable's scope. One of: MUI.ga.kvariable_scope_visitor, MUI.ga.kvariable_scope_session or MUI.ga.kvariable_scope_page
Returns: void

track_event

static void track_event ( pTrackerObject , pEventCategory , pEventAction , pEventLabel , pEventValue , pNonInteraction )
Wrapper function for the GA _trackEvent function; using this function instead, the tracker object does not have to be created when you call thetrack event, and you can use form inflated values.
Parameters:
pTrackerObject <string|object> the name of the tracker object variabl, or the actual tracker object.
pEventCategory <string> the category for this event; can be an inflatable template.
pEventAction <string> the action for this event; can be an inflatable template.
pEventLabel <string> the label for this event; can be an inflatable template.
pEventValue <number> the value of this event.
pNonInteraction <bool> when false, event has an impact on bounce rate. When true, the event will not be used in bounce rate calculations. Default: "false"
Returns: void

track_event_attached_to_object

static true track_event_attached_to_object ( pObject )
Track an event using the data previously saved on the target object.
Parameters:
pObject <object> the object to use as the data source for the event call.
Returns: true
returns TRUE so it can easily be used in an onclick or onsubmit handler.


Copyright © 2013 Yahoo! Inc. All rights reserved.