Google Tag Manager

This Quick Start guide will show you how to get up and running with data collection on your website using the Oracle CX Tag. Once you’re collecting data you can move on to leveraging your data in the Infinity platform.

Working with a Single Page Application? Please see the Oracle CX Tag Tracking Reference - Single Page Applications for tips on how to implement the Oracle CX Tag in a Single Page Application.

Want to learn about the CX Tag by video?

View CX Tag Quick Start Videos.

In this topic:

Steps

1. Create a Tag

You will now need your code snippet so you can implement the CX Tag on your website:

1.1 Generate Tag

Can’t see Data Collection?

You will need to speak to someone within your company who has Oracle Infinity Administrator access within your internal team to ensure you have the correct permissions to access this.

  • In the Oracle Infinity User Interface, visit the Data Collection application (you can access this from the menu button in the top-left hand side).

  • Click Create Tag:

    Create Your Tag

    An image of creating image

  • Follow the on-screen instructions (ensuring the Infinity Behavior Tracking Option is selected) then click Create.

    On-Screen Instructions

    An image of on-screen instructions

Tag Name and Tag ID?

Tag Name can be named anything you like. It allows you to assign access rights to your Oracle Infinity Tags and put them into a hierarchical format. Typically, it’s best to have a separate tag name per website but for this Quick Start you can just give it any name you like.

The Tag ID is your ID for the tag (and is joined to Tag Name). It will be suggested for you but can override if you like. This will be what is implemented on your website so it cannot be changed once generated.

  • You will now see two boxes are available, representing tags for your Test and Production environments:

    Your Tag Environments

    An image of your tag enviroments

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.

See Data Collection Application - Tag Containers and Publishing for more information.

1.2 Enable Tag Management Plugin

By default, the CX Tag will trigger page views upon page load for us. However, we want to stop this behavior as we will be firing these page views ourselves. To do this, we’re going to enable the Tag Management System Plugin:

  • Click on the Infinity box underneath Test.

    Tag Configuration for the CX Tag

    An image of your tag enviroment

  • On the right-hand side, click Plugins Added then click + Add Plugin:

    Adding your plugin

    An image of adding your plugin

  • Scroll through the list to find Tag Management System and click on it to select it then click Add Selected Plugins

  • Ensure you click on the Tag Management System plugin to toggle it on:

    Toggling the Plugin

    An image of toggling the plugin

  • Click Save.

Make sure you toggle ON the Tag Management Plugin.

When you add the plugin, it won’t be on by default so ensure you toggle it on before you save:

Toggling the Plugin

An image of toggling the plugin

If you don’t, the CX Tag may not fire any calls/may fire multiple calls.

2. Get your CX Tag URL for your Test Environment

Test Environment for your CX Tag Library

In this quick start, we will be implementing the Test environment version of your CX Tag Library (ideally on a test website you have).

We would also recommend you implement the Production environment version of the tag on your live website as well so that you can optionally promote the test configuration from this guide to your live website as per Publishing your Configuration to your Live Site.

You will now need your endpoint URL so you can implement the CX Tag on a test website:

  • Go back to the Data Collection application.

  • Look for your tag then click on it to open your tag configuration:

    Finding Your Tag

    An image of your URL link

  • Click on the … in the Test configuration to retrieve your endpoint URL for the Test environment:

    An image of your URL Link

Finding Your Tag

  • Your Oracle CX Tag Library location should now be copied to your clipboard (for example, //d.oracleinfinity.io/infy/acs/account/{Account GUID}/js/{Tag ID}/odc.js?_ora.config=analytics:test, where {Account GUID } is your Account GUID, {Tag ID} is your Tag ID and _ora.config=analytics:test denotes this is for your Test environment):

    Your Test Environment URL

    An image of your Test Enviroment URL

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 (to allow you to point towards different tag configurations per Environment, for example, Test and Production)

3. Implement Oracle CX Tag Library

What is the Oracle CX Tag Library?

The Oracle CX Tag Library provides the necessary features your browser will need to deploy the modules you wish to use on the page (for example, the Infinity Module - used to track users on your website).

In this example, we will first be ensuring the Oracle CX Tag Library is implemented on the page so that we can fire View Calls to send tracking calls to Infinity so you can track visitors landing on your page (you can also fire Event Calls to track further interactions on the page).

Are you using Oracle Maxymiser?

If you are going to be using Oracle Maxymiser then you must also implement the Oracle CX Tag Library in directly on the page in the <head>. Please see Implementing directly on your Website in Next Steps.

We now need to load the Oracle CX Tag Library on the page. To do this, we’re going to:

Implement the library via a Custom HTML tag within Google Tag Manager.

Set it to Trigger on All Pages (Page View):

3.1 Implement the library by Custom HTML Tag

Create a Custom HTML tag and use the following code template to implement Test environment version of your Oracle CX Tag Library on the page:

Sample Oracle CX Tag Library Code

<script type="text/JavaScript"> (function() { var accountGUID = "{Account GUID}"; var tagID = "{Tag ID}"; var config = "analytics:test"; // 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="//d.oracleinfinity.io/infy/acs/account/"+accountGUID+"/js/"+tagID+"/odc.js"+config,sc_scripts.parentNode.insertBefore(sc,sc_scripts)} }()); </script>
<script type="text/JavaScript"> (function() { var accountGUID = "{Account GUID}"; var tagID = "{Tag ID}"; var config = "analytics:test"; // DO NOT EDIT BELOW THIS LINE // Check if odc.js loaded var odc_requested = false; var scripts = document.getElementsByTagName('SCRIPT'); for (var s = 0 ; s < scripts.length; s++){ // find the script tags with a source that has odc.js? if (scripts[s].src && /oracleinfinity.*odc\.\js/.test(scripts[s].src)) { odc_requested = true; } } // Conditionally odc.js if(!odc_requested){ var sc_scripts = document.getElementsByTagName('script')[0]; var sc = document.createElement('script'); sc.async = true; if(typeof config === "undefined"){var config = "";} if(config){config = "?_ora.config=" + config}; sc.src = "//d.oracleinfinity.io/infy/acs/account/"+ accountGUID+"/js/"+tagID+"/odc.js"+config; sc_scripts.parentNode.insertBefore(sc, sc_scripts); } }()); </script>
Replace {Account GUID} and {Tag ID} with your values.

You can populate these with the value from your CX Tag endpoint. For example, you can find them in your endpoint as per the below:

//d.oracleinfinity.io/infy/acs/account/{Account GUID}/js/{Tag ID}/odc.js?_ora.config=analytics:test

Oracle CX Tag Library in Google Tag Manager as a Custom HTML Tag

An image of CX libraryin GTM as a custome HTML Tag

3.2 Set the Tag to Trigger on All Pages

  • Save your new tag.

4. Implement View Tag

What are View Calls?

View Calls send tracking calls to Oracle Infinity to declare that a visitor has viewed the page (it will capture information about the page such as the URL, Page Title, and anything else you wish to declare).

Want to fire Event calls?
If you wish to fire event data for additional interactions on the page (for example, clicking on buttons), see Send Event Calls below.

Want to Map Parameters into your Calls?

You can pass in your own variables as Parameters within your calls (for example, Customer ID, product ID etc.). Please see Sending Parameters within your Calls in Next Steps.

4.1 Create “ora.load” Trigger

When using Google Tag Manager, the Oracle CX Tag Library will automatically trigger a Custom Event called ora.load when it is ready to accept tracking calls. You want to trigger Infinity Views when this event fires so that we can correctly track users viewing your pages. To do this, create the following trigger using an event name of “ora.load” and give it a sensible name like “Oracle CX Tag - ora.load”:

ora.load trigger

An image of ora.load trigger

4.2 Create Tag

Now that we have the ora.load Trigger, you can implement View calls as a Custom HTML tag which will fire when users land on a page:

Create Tag

An image of creating a tag

Sample View Call Template

<!-- CX Tag - Page View --> <script type="text/JavaScript"> (function() { // Declare cxDataObject var cxDataObject = {}; // DO NOT EDIT BELOW THIS LINE - ORA.view() window.ORA = window.ORA || { productReady: [] }; ORA.productReady.push(['analytics', function (cxDataObject) {return function () {return ORA.view({"data": cxDataObject});};}(cxDataObject)]); })(); </script>

5. Publish your changes

Publish your changes in Google Tag Manager to push the tags live on your website.

6. Validate Tracking in your Browser

Want to check for data within the Oracle Infinity platform?

See Testing the CX Tag within the Streams (Legacy) user interface.
See Verifying and Debugging the CX Tag.

When you trigger the CX tag, you can validate this is working by Inspecting the Network Activity in your browser and filtering for the dcs.gif for any requests.

Testing your CX Tag in your browser

  • Inspect the Network in your browser for dcs.gif:

    Debugging your Infinity Requests

    An image of 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

An image of seeing your parameters in the CX Tag request

Not Seeing Calls as Expected?

Have you:

7. (Optional) Publish your Configuration to your Live Site

7.1 Ensure your Live Website is using the Production Environment Tag

Have you already implemented the Production environment tag on your Live Website?

If you haven’t implemented a production environment version of your CX Tag on your live site then follow these steps to publish this on your live website.

This is as simple as changing the endpoint URL for your CX Tag on your site from the Test environment endpoint to your Production environment endpoint:

  • Go to your Tag and click to retrieve your Production Environment endpoint:

    Retrieving your Production Environment Endpoint

    An image of retrieving your tag's production enviroment endpoint

This will look like //d.oracleinfinity.io/infy/acs/account/{Account GUID}/js/{Tag ID}/odc.js?_ora.config=analytics:production

7.2 Promote your Test Configuration to Production

Now that we have successfully tested your Test configuration, we can promote this to Production as follows:

  • Click on Publish to Production within your tag:

    Promoting Configurations to Production

    An image of promote to production

  • Check the boxes and click Publish.

    Promoting Configurations to Production

    An image of promoting to production

Your Tag Configuration (for example, plugins and settings) is now live in the Production environment for your tag so we now need to make sure your live website is pointing towards the production environment for your tag.

What happens when I promote a Configuration to Production?

When you promote your Test Configuration to Production you will immediately push the exact Test tag configuration (for example, plugins and their settings) to your Production environment - that is, your live website.

You must be very careful this is exactly as you required as it will overwrite the Production Tag Configuration you already had - including plugins and their settings. Once you promote to Production you cannot retrieve the previous Production configuration.

8. You’re Ready

You have successfully sent data from your website into Oracle Infinity and validated it both in your browser and in the platform itself. You’re ready to move onto the Next Steps below.

Next Steps

In this topic:

Watch other CX Tag Quick Start Videos

See below for a full list of video playlists:

Fundamentals

Advanced

(Optional) If using Oracle Maxymiser, implement Oracle CX Tag Library Directly on your Website

Why do I need to implement this outside of the Tag Manager?

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.

If you’re not using Maxymiser then you can implement the CX Tag Library in your tag manager as per Step 3.

If you’re going to be using Oracle Maxymiser, to ensure that it can modify your website content correctly you must implement the Oracle CX Tag Library directly in the <head> of your website (outside of Google Tag Manager) as per below:

Sample Website Implementation

<head> <script type="text/JavaScript" src="//d.oracleinfinity.io/infy/acs/account/{Account GUID}/js/{Tag ID}/odc.js?_ora.config={_ora.config}"></script> </head>
Will the CX Tag Library fire twice if I’ve implemented it in my tag manager?

If you have implemented the Oracle CX Tag Library in the Tag Manager already (as per step 3) don’t worry - that code detects the CX Tag Library from this step and it will not request the library again.

I do not wish to implement synchronous tags on my website

If you only wish to work with asynchronous tags, please see Oracle Maxymiser CX Tag Guidelines or contact Oracle Consulting about an engagement to support you with your tagging requirements.

Finally, you must enable Oracle Maxymiser by enabling the Oracle Maxymiser Module within the CX Tag.

Data Collection Application - Managing Modules

Now that you have the CX Tag live on your website, you can enable different CX products from the tag (for example, Oracle Maxymiser).

Please see CX Tag Module Configuration for how to enable these products on your website.

Send Parameters within your Calls

Which Parameters should I use? For help with choosing parameter names and syntax formats, please see Parameters

Mapping Variables within the CX Tag

You may wish to map Google Tag Manager Variables from your Data Layer as Parameters (ensuring you use the correct Parameter Syntax) to enrich your analytics/targeting capabilities based on information about your pages and visitors.

To do this, update your View Tag as per below:

Sample View Call Template - with Mapped Parameters

<!-- CX Tag - Page View --> <script type="text/JavaScript"> (function() { // Declare cxDataObject var cxDataObject = {}; // (optional) Declare Parameters if("{{Page URL}}"){cxDataObject["wt.es"] = "{{Page URL}}"}; if("{{Product SKU}}"){cxDataObject["wt.pn_sku"] = "{{Product SKU}}"}; if("{{Product Name}}"){cxDataObject["wt.product_name"] = "{{Product Name}}"}; // DO NOT EDIT BELOW THIS LINE - ORA.view() window.ORA = window.ORA || { productReady: [] }; ORA.productReady.push(['analytics', function (cxDataObject) {return function () {return ORA.view({"data": cxDataObject});};}(cxDataObject)]); })(); </script>
What does {{Page URL}} mean?

{{Variable Name}} is Google Tag Manager code to represent a Variable (Page URL) in this case. You can create variables in Google Tag Manager and dynamically populate them from the Data Layer so when you tag fires - it picks up the correct value from the Data Layer.

The above code block ensures that when the tag fires, it conditionally checks whether each {{variable}} exists in the Data Layer and, if available, declares them as a variable from the cxDataObject["PARAMETER_NAME"] syntax.

Send Event Calls

If you wish to send Event Calls as users interact with your page (for example, clicking on a menu item), please see the Triggering Events With The CX Tag in Google Tag Manager video.

Frequently Asked Questions

How do I enable Oracle Maxymiser on my website?

To implement Oracle Maxymiser on your website please ensure you have completed the following steps:

*If you have already implemented the Oracle CX Tag on a page, you can skip these steps as you can leverage the same Oracle CX Tag.

What if I want to work with Maxymiser asynchronously?

By default, Oracle Maxymiser requires that you implement the Oracle CX Tag synchronously on the page. However, you can also work with the Oracle Maxymiser asynchronously.

If you only wish to work with asynchronous tags, see Oracle Maxymiser CX Tag Guidelines or contact Oracle Consulting about an engagement to support you with your tagging requirements.

Learn more

CX Tag Quick Start Guides