Monitus UI Library

Google Analytics  4

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

static Class jMUI.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. Should now alawys be "_gaq".
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 jMUI.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 jMUI.ga.track_event_attached_to_object(this);
Parameters:
pObject <jquery object> the object to attach the event data to.
pTrackerObject <string|object> the name of the tracker object variable, or the actual tracker object. Should now alawys be "_gaq".
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. OBSOLETE: use jMUI.ga.queue_variable instead
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: jMUI.ga.kvariable_scope_visitor, jMUI.ga.kvariable_scope_session or jMUI.ga.kvariable_scope_page (UA: unused)
Returns: void

queue_variable

static void queue_variable ( pName , pValue , pSlot , pScope , pGAName )
Queues custom variable values so they can be used when the tracker object is finally created.
Parameters:
pName <string> the variable name.
pValue <string> the value set for the variable.
pSlot <number> the variable slot to use. (GA only)
pScope <number> the variable's scope. One of: jMUI.ga.kvariable_scope_visitor, jMUI.ga.kvariable_scope_session or jMUI.ga.kvariable_scope_page (GA only)
pGAName <string> the variable name to send to GA; if undefined or empty, will be set to pName.
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 variable, or the actual tracker object. Should now alawys be "_gaq".
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 <jquery 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 © 2017 Yahoo! Inc. All rights reserved.