Track authenticated users with Oracle Infinity on web
Introduction
This tutorial will demonstrate how to track authenticated users on your website using Oracle Infinity with the Oracle CX Tag by adding user-level tracking parameters to your tracking calls. For example, declaring a customer ID for a user can help you attribute revenue per user for an e-commerce website or trigger Actions against authenticated visitors.
Objectives
The objectives of the tutorial are to:
-
Implement the Oracle CX Tag on any pages where you can add items to your cart: This will load the Oracle CX tag library onto your page to allow tracking functionality.
-
Declare user-level tracking parameters in your tracking calls: User-level tracking parameters can be added in new or existing calls.
Prerequisites
Please see below for the prerequisites for this tutorial:
Create a Tag (for your Oracle CX Tag)
You must have created and configured a tag for your website:
-
Created a new tag for the Oracle CX Tag: This tag will be what you implement on your order confirmation page.
-
Enabled the Oracle Infinity Module: You must have enabled the Oracle Infinity module for your tag to ensure data collection is enabled.
-
Enabled the Tag Management Plugin: You must have enabled the Tag Management plugin for your tag to ensure the automatic view call is repressed (you will be firing the view call independently).
-
Promoted your Tag to Production: Your tag container must be promoted to production.
-
Your Tag URL: You must have your tag URL for your production configuration (this will be the actual endpoint you will implement on your webpage). It will be in the following format:
//c.oracleinfinity.io/acs/account/{YOUR_ACCOUNT_GUID}/js/{YOUR_TAG_ID}/odc.js?_ora.config=analytics:production
Already have an Oracle CX Tag on your website?
If you have already created a tag which is in use on your website, you don’t need to create a new specific one for this use case. You must make sure that either (a) the existing tag has already been implemented on the required page(s), or (b) you must create a new tag and implement this on the required page(s).
Step 1: Implement the Oracle CX Tag on your page(s)
If you haven’t already implemented the CX Tag on your desired page(s), you will need to add this to the page(s) in order to load the CX Tag Library so that you can initiate tracking requests to Oracle Infinity.
-
You should have a Tag URL as per the prerequisites which will use the following format:
//c.oracleinfinity.io/acs/account/{YOUR_ACCOUNT_GUID}/js/{YOUR_TAG_ID}/odc.js?_ora.config={_ora.config}
Account GUID, Tag ID and 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). Please see Environments for more detail. -
Implement the following code block in the
<head>
* of all pages you will be tracking (replacing{Account GUID}
,{Tag ID}
and{_ora.config}
as per your Tag URL). For example:Synchronous Implementation
<head> ... <!-- CX Tag - Library Load --> <script type="text/JavaScript" src="//c.oracleinfinity.io/acs/account/{Account GUID}/js/{Tag ID}/odc.js?_ora.config={_ora.config}"></script> ... </head>
Asynchronous Implementation
<head> ... <script type="text/JavaScript"> (function() { var accountGUID = "{Account GUID}"; var tagID = "{Tag ID}"; var config = "{_ora.config}"; // DO NOT EDIT BELOW THIS LINE for(var odc_requested=!1,scripts=document.getElementsByTagName("SCRIPT"),s=0;s<scripts.length;s++)scripts[s].src&&/oracleinfinity.*odc\.\js/.test(scripts[s].src)&&(odc_requested=!0);if(!odc_requested){var sc_scripts=document.getElementsByTagName("script")[0],sc=document.createElement("script");if(sc.async=!0,void 0===config)var config="";config&&(config="?_ora.config="+config),sc.src="//c.oracleinfinity.io/acs/account/"+accountGUID+"/js/"+tagID+"/odc.js"+config,sc_scripts.parentNode.insertBefore(sc,sc_scripts)} }()); </script> ... </head>
*Synchronous or Asynchronous?
If you are going to be using Oracle Maxymiser then you must 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, if you’re not using Oracle Maxymiser then this can be asynchronous and not necessarily in the<head>
.If this is not feasible, please see Oracle Maxymiser CX Tag Guidelines or contact Oracle Consulting Services about an engagement to support you with your tagging requirements for an asynchronous implementation.
Step 2: Declaring User-Level Parameters in your Tracking Calls
When a user has authenticated, you can add details about them in new or existing tracking calls (for example, you may wish to surface your customer ID for each authenticated visitor).
Available Parameters
You must decide which Parameters you wish to send to Oracle Infinity for cart additions.
Below is a table of suggested parameters you can send for authenticated users:
Suggested User-Level Parameters
Parameter | Parameter Name | Sample Value | Notes |
---|---|---|---|
wt.dcsvid |
External Visitor ID | CUST123 | See below* |
wt.customer_id |
Customer ID | CUST123 | Your ID for the customer |
wt.email |
Email Address | stevie.nicks@oracle.com | Raw email address |
wt.e_id_s |
Email Address (SHA-256 Hashed) | 9A0FF5B8ADEC41340B433CB2E343DA2DF0DFCBB7447301D97755B6568E41BB8B | SHA-256 Hashed Email Address |
wt.e_id_m |
Email Address (MD5 Hashed) | 0FED850BA5BC6D3A126270F5DFA43C15 | MD5-Hashed Email Address |
wt.mobile_phone |
Mobile Phone Number | +447809839594 | Raw phone number |
wt.riid |
Responsys Recipient ID (RIID) | 564228225 | Responsys Recipient ID |
wt.customer_type |
Customer Type | Premium | Customer Type |
*External Visitor ID
This parameter will override the default visitor ID generated per visitor by Oracle Infinity. Please see External Visitor ID for more details.
Declaring Parameters
Once you have chosen your Parameters you can declare them in new or existing calls. For example:
Sample View Call for Authenticated User on a Home Page
(function(){
// Declare Your Parameters
var cxDataObject = {};
cxDataObject["wt.page_name"] = "homepage"; // Custom parameter denoting page name
cxDataObject["wt.customer_id"] = "EXAMPLECUSTOMERID123"; // Customer ID
cxDataObject["wt.e_id_s"] = "9A0FF5B8ADEC41340B433CB2E343DA2DF0DFCBB7447301D97755B6568E41BB8B"; // SHA-256 hashed email address
cxDataObject["wt.customer_type"] = "VIP Customer"; // Custom parameter denoting type of customer
// DO NOT EDIT BELOW THIS LINE - ORA.click()
window.ORA = window.ORA || {productReady: []};
ORA.productReady.push(['analytics', function(cxDataObject) {return function() {return ORA.click({"data": cxDataObject})}}(cxDataObject)]);
})();
Step 3: Test your Parameters are being declared
Once you have declared the user-level parameters, you can validate the request by opening the Chrome DevTools Network Debugger:
- Open the Chrome DevTools Network Debugger.
- Ensure you are authenticated on your site (or meet the criteria for declaring your new parameters).
- Refresh the page.
- Filter by
dcs
in the debugger. - Select the
dcs.gif
request (this is the Oracle Infinity data collection call). - View the parameters being sent.
Viewing your Oracle Infinity data collection call
Step 4: Check Oracle Infinity is Receiving Data
You can now Check available data within Oracle Infinity for your purchase data as per the Parameters defined within your Click Call above (for example, data.wt.customer_id
).
Related Links
- Tracking Cart Adds with Oracle Infinity - Oracle Help Center Learn tutorial on tracking cart additions with Oracle Infinity.
- Tracking Purchases with Oracle Infinity - Oracle Help Center Learn tutorial on tracking purchases with Oracle Infinity.
- Checking available data within Oracle Infinity - Oracle Help Center Learn tutorial on how to checking available data within Oracle Infinity.
- Oracle Infinity Help Center - User Help Center for Oracle Infinity.
More Learning Resources
Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.
For product documentation, visit Oracle Help Center.
Track authenticated users with Oracle Infinity on Web
F44989-02
November 2021
Copyright © 2021, Oracle and/or its affiliates.