CX Tag Tracking Reference
The Oracle CX Tag is a JavaScript library which can be used to enable and configure various Oracle CX products on your website (for example, Oracle Infinity).
This guide focuses on implementation for Oracle Infinity.
See our Web Quick Start Guides to get the tag up and running quickly on your website.
Contents
CX Tag Features
This section details some of the core features of the CX Tag.
CX Tag Library Loader
Implementation
In order for the CX Tag to function, you need your CX Tag Library URL (see Generating Tags). This will look like this:
//d.oracleinfinity.io/infy/acs/account/{Account GUID}/js/{Tag ID}/odc.js?_ora.config={_ora.config}
{Account GUID}
identifies your account. All your tags will use the same account GUID so that all data collected for your account is stored together.{Tag ID}
allows you to assign access rights to your Oracle Infinity Tags and put them into a hierarchical format.{_ora.config}
denotes which Environment the tag is pointing towards (for example,analytics:test
to allow you to point towards different tag configurations per Environment, for example, Test and Production). See What are Environments? for more detail.
You can use the above URL to load the JavaScript library within the <head>
* as per the code template below:
Synchronous recommended
Synchronous CX Tag Library Load
Asynchronous
Implement this in the <head>
synchronously as per above to ensure the page content can be manipulated before it is visible to the user. However, this can be asynchronous and not necessarily in the <head>
.
If this is not feasible, contact Oracle Consulting about an engagement to support you with your tagging requirements.
Testing
When you load the CX Tag Library, you can validate this is working by Inspecting the Network Activity in your browser and filtering for the odc.js for any requests.
-
Inspect the Network in your browser for odc.js:
Debugging the CX Tag Library
View Call ora.view()
Implementation
See CX Tag Quick Start : Triggering Virtual Page Views and Events.
Once you have implemented the CX Tag Library Loader on your website, in order to tell Oracle Infinity that someone has is viewing a page, you can make a View call (and optionally pass useful information about the user or the page in the request).
Making a Call
You can make a simple request using the following syntax:
Example Product View
ORA.productReady.push()
The code under // DO NOT EDIT BELOW
is used to ensure that the tracking call will dispatch regardless of whether the CX Tag Library (odc.js
) has loaded or not. This allows the developer to not worry about whether the ORA.view()
function exists or not.
You can also declare custom parameters. Refer to Data collection parameter syntax for details.
Testing
When you trigger a View Call, you can validate this is working by Inspecting the Network Activity in your browser and filtering for the dcs.gif for any requests.
-
Inspect the Network in your browser for dcs.gif:
Debugging your Infinity Requests
If you have declared parameters, you’ll be able to see these later in the request as query-string parameters:
Seeing Your Parameters in the CX Tag Request
wt.dl=0
and Click Calls by wt.dl=1
All view calls will have the parameter wt.dl=0
whereas Click Calls will have the parameter wt.dl=1
.
Click/Event Calls ORA.click()
Implementation
See CX Tag Quick Start : Triggering Virtual Page Views and Events.
Once you have implemented the CX Tag Library Loader on your website, in order to tell Oracle Infinity that someone has performed an action (for example, a user his clicked on a menu item or has hovered over an image) you can make a Click call (and optionally pass useful information about the user, the page or the action itself in the request).
Making a Call
You can make a simple request using the following syntax:
Example Add To Cart Event
ORA.productReady.push()
The code under // DO NOT EDIT BELOW
is used to ensure that the tracking call will dispatch regardless of whether the CX Tag Library (odc.js
) has loaded or not. This allows the developer to not worry about whether the ORA.click()
function exists or not.
You can also declare custom parameters. Refer to Data collection parameter syntax for details.
Testing
See Testing View Calls for instructions on how to test Click/Event calls.
Frequently Asked Questions
What does a typical implementation of the CX Tag on a website look like?
See our Web Quick Start Guides for implementation instructions using popular tag managers.
See below for a standard implementation:
Plain
What are Environments?
Environments allow you to run your tag in multiple configurations. In this example, you can have one version of a tag for a Test environment, where you can test and tag configurations you have in a test environment, and then another environment for your live site (Production), where you would promote your Test configuration to if working as you expected in the Test environment.
This is documented in more detail in Generating Tags, but you can see the different configurations you have for the different environments within the Data Collection Application:
Configs per Environments within the Data Collection Application
What’s the difference between View and Click calls?
View calls will send a parameter of wt.dl=0
to denote a page view whereas Click/Event calls will send a parameter of wt.dl=1 to denote this is an event/click. It is important to only use View calls for page views as these can affect metrics such as Bounce Rate within Oracle Infinity Analytics.
Please see View and Click within the Oracle Infinity Help Center for full tracking documentation.
How do I work with Single Page Applications (SPAs)?
If your website is a single page application (that is, you are asynchronously changing the content on the page as viewers navigate instead of loading an entirely new page) then you can simply track this by using the CX Tag.
Simply:
-
Generate your Oracle CX Tag (ensuring the Tag Management Plugin is turned on).
-
Load the CX Tag Library Loader code upon page load (or the equivalent within a Tag Manager - see Quick Start Guides).
-
As the initial view loads, trigger a View call (with any parameters you’d like to declare in the request).
-
As users change view, trigger additional View calls in order to tell Oracle Infinity that the user is viewing a new page.
You can trigger Click/Event Calls as per normal in order tell Oracle Infinity that the user has performed any actions you wish to capture (for example, added an item to their basket).
How do I work with E-Commerce Data?
See CX Tag Quick Start : Firing E-Commerce data with the CX Tag.
Advanced Tracking - Learn advanced tracking methods for the Infinity Module such as ORA.collect() and Mutations.