Event Tracking Functions
Please see Tracking Reference to learn about using the core features of Oracle Infinity tracking and testing your tracking calls.
You can use the following functions to manually configure the Infinity tag to collect click tracking data and not trigger an automated page load message to be sent to the Oracle Infinity data collection servers:
ORA.click(params)
: Interact with click activity and contain all analytics data sent on the view requestORA.collect(params)
: Manually collect event data to construct custom click track callsORA.view(params)
: Refer to a viewing of a particular presentation (or wrapper) around a collect call
ORA.click(params)
The ORA.click
function is used to interact with click activity and contain all analytics data sent on the view request, except where overridden in the params
object. This only alters the data on that specific request rather than on all subsequent requests (changes to data by clicks are self contained).
Important: If you do not specify a value for ORA.click
, it defaults to wt.dl=1
(click event).
You can specify the following options:
params {object}
: Takes an object that can include the following objects expressed as key-value pairs:
config
: Specifies the following call configuration details:endpoints
(Optional): URLs to send data to (if noprotocolType
is defined, it defaults togif
). Thetimeout
option specifies thegif
request timeout in milliseconds before thefail
callback is executed. If you do not set a timeout, the default value of 2000 milliseconds is used.callbacks
(Optional): Specifies functions to be called upon the success or the failure of the attempted actionmutation
(Optional): The mutation to run on the click event.
data
(Optional): Specifies an array of key value pairs, which are associated with this event to be tracked. Any of the same fields in the payload will be replaced by the specified value.
![Closed](../../Skins/Default/Stylesheets/Images/transparent.gif)
ORA.click({
"config": {
"endpoints": [
{
"endpoint": "http://dc.oracleinfinity.io/account_GUID",
"protocolType": "gif",
"timeout": 5000"
}
],
"callbacks":{
"success":successCallback,
"fail":failCallback
},
"mutation": function(msg){
msg.setParam('wt.test','abc');
},
}
})
ORA.collect(params)
This is a manual collection event. This call allows you to construct custom track calls. The ORA.collect
call does not inherit any data such as the visitor, session, and sessionization information.
You can specify the following options:
params {object}
: Takes an object that can include the following objects expressed as key-value pairs:
applyMutations
(Optional): If set to true, this Boolean option tells the collect call to apply registered mutations to the payload. Its default value is false, which means that no information from plugins that use mutations to modify payload data will be present.config
: Specifies the following call configuration details:endpoints
(Required): URLs to send data to (If noprotocolType
is defined, it defaults togif
). Thetimeout
option specifies thegif
request timeout in milliseconds before thefail
callback is executed. If you do not set a timeout, the default value of 2000 milliseconds is used.callbacks
(Optional): Specifies functions to be called upon the success or the failure of the attempted action
data
: Specifies an array of key value pairs, which are associated with this event to be tracked.sendSessionInfo
(Optional): If set to true, this Boolean option tells the collect call to automatically pass visitor information along with the collect payload. Its default value is false.
![Closed](../../Skins/Default/Stylesheets/Images/transparent.gif)
ORA.collect({
"config": {
"endpoints": [
{
"endpoint": "http://myendpoint.example.com/endpoint.php",
"protocolType": "gif",
"timeout": 5000
}
],
"callbacks":{
"success": successCallback,
"fail": failCallback
},
"applyMutations": true,
"sendSessionInfo": false
},
"data":{
"wt.ti":"my page title",
"wt.my_event":"my custom event parameter",
"custom_param":"my custom parameter"
},
})
![Closed](../../Skins/Default/Stylesheets/Images/transparent.gif)
function successCallback(args){
console.log(args["endpoints"]);
console.log(args["payload"]);
console.log(args["timeout"]);
console.log(args["success"]);
console.log(args["fail"]);
};
function failCallback(args){
console.log(args["endpoints"]);
console.log(args["payload"]);
console.log(args["timeout"]);
console.log(args["success"]);
console.log(args["fail"]);
};
ORA.view(params)
The ORA.view
function is used to send an Infinity view event to the endpoint. This call is identical to the ORA.click
function with the exception of wt.dl=0
.
Values placed in its data
object are added to the data payload. To alter or update the data normally being sent, use Mutations.
You can specify the following options:
params {object}
: Takes an object that can include the following objects expressed as key-value pairs:
config
: Specifies the following call configuration details:endpoints
(Optional): URLs to send data to (If noprotocolType
is defined, it defaults togif
). Thetimeout
option specifies thegif
request timeout in milliseconds before thefail
callback is executed. If you do not set a timeout, the default value of 2000 milliseconds is used.callbacks
(Optional): Specifies functions called upon the success or the failure of the attempted action
data
(Optional): Specifies an array of key value pairs, which are associated with this event to be tracked. Any of the same fields found viapageAnalysis
are overridden by the specified values.
![Closed](../../Skins/Default/Stylesheets/Images/transparent.gif)
ORA.view({
"config": {
"endpoints": [
{
"endpoint": "http://dc.oracleinfinity.io/account_GUID",
"protocolType": "gif",
"timeout": 5000
}
],
"callbacks":{
"success":successCallback,
"fail":failCallback
}
}
})
Oracle CX Tag - Implementation - Implementation Guidelines for the Oracle CX Tag.
Oracle CX Tag - Tracking Reference - Core tracking features and testing guidelines for Oracle Infinity.
Oracle CX Tag - Infinity Tag Mutations - Guidance on mutations for Infinity tracking.