Namespace gn_tracking
gn_tracking
Defined in: gn_tracking.js.
Constructor Attributes | Constructor Name and Description |
---|---|
gn_tracking uses an object literal notation: configuration objects sit snugly inside it,
alongside the various functions it exposes.
|
Field Attributes | Field Name and Description |
---|---|
<static> |
gn_tracking.config
Internal config object; holds a Google object or string, a quantcast CSV string, and a ComScore object
|
<static> |
gn_tracking.flags
Internal flag store;, used mostly to kill successive calls to init
|
Method Attributes | Method Name and Description |
---|---|
<static> |
gn_tracking.add_script(url, callback)
Aaah, the big deal here, add_script asyncronously adds a script object to the head, monitors its load status,
and then queues a callback to be executed when it's complete
|
<static> |
gn_tracking.comscore()
Loads the required ComScore script, and queues a callback to be fired when the script loads
|
<static> |
gn_tracking.google()
Loads the required GA script, and queues a callback to be fired when the script loads
|
<static> |
gn_tracking.init(config)
Accepts a config param, and then for each item in the config object, calls its matching function
|
<static> |
gn_tracking.is_empty(value)
Accepts a variable and attempts to determine if it's truly 'empty'.
|
<static> |
gn_tracking.quantcast()
Loads the required quantcast script, and queues a callback to be fired when the script loads
|
Namespace Detail
gn_tracking
gn_tracking uses an object literal notation: configuration objects sit snugly inside it,
alongside the various functions it exposes.
In reality, init() is the only function you should need to access directly
Field Detail
<static>
gn_tracking.config
Internal config object; holds a Google object or string, a quantcast CSV string, and a ComScore object
<static>
gn_tracking.flags
Internal flag store;, used mostly to kill successive calls to init
Method Detail
<static>
gn_tracking.add_script(url, callback)
Aaah, the big deal here, add_script asyncronously adds a script object to the head, monitors its load status,
and then queues a callback to be executed when it's complete
- Parameters:
- {String} url
- Script to be attached to the page
- {Function} callback
- Function to be executed when the script is fully loaded
<static>
gn_tracking.comscore()
Loads the required ComScore script, and queues a callback to be fired when the script loads
<static>
gn_tracking.google()
Loads the required GA script, and queues a callback to be fired when the script loads
<static>
gn_tracking.init(config)
Accepts a config param, and then for each item in the config object, calls its matching function
- Parameters:
- {Object} config
- The config object; see the internal ga_tracking.config object for a reference to its structure
<static>
gn_tracking.is_empty(value)
Accepts a variable and attempts to determine if it's truly 'empty'. Mostly used as Object's length property lies
- Parameters:
- value
- Any primitive or basic datatype (string, number, boolan, array, object, etc.)
<static>
gn_tracking.quantcast()
Loads the required quantcast script, and queues a callback to be fired when the script loads