Learn How to Successfully Integrate Eloqua Tracking with OneTrust
As concerns around user privacy online continue to grow around the world, and more regulations around privacy are put into place, companies are increasingly turning to services which can automate processes like cookie compliance and consent management.
Here at Relationship One, we’ve seen an uptick in clients utilizing OneTrust to ensure that the company’s approach to visitor tracking is compliant with localities around the world. So, how does one successfully implement Eloqua’s tracking scripts along with OneTrust? Read on!
But first…
To integrate Eloqua tracking scripts with OneTrust, Eloqua’s Strict Mode tracking must be enabled first. You’ll need to create a service request with Oracle Support requesting that Strict Mode be enabled on your Eloqua instance(s).
Great, but what’s Strict Mode Tracking?
Per Oracle’s documentation, “Strict mode helps you comply with the European Union’s privacy tracking regulations. Member countries of the EU have legislation in place that requires a marketer to receive explicit opt-in consent to track individuals actions online. If you are conducting a campaign that includes EU member states, then it is your responsibility to determine and set which tracking mode permission request (if any) for each of your web pages.” Of course, this can apply to other countries outside of the EU as well.
Strict Mode can be implemented on three different levels:
- Default: All visitors are tracked
- Require opt-in for visitors by country: All visitors are tracked, except those located in countries on a restricted country list. Visitors in restricted countries that have opted-in for tracking will also be tracked
- Require opt-in for all visitors: No visitors are tracked by default. Only visitors that have opted-in for tracking will be tracked.
How do we set it up?
Following are the steps to set up Strict Mode tracking:
- First, as mentioned above, you’ll need to open a request with Oracle Support; in this case, you’ll be requesting that the Strict Mode interface be enabled, but before you do that…
- Gather a list of countries where your organization requires users to opt-in for tracking. Oracle Support will ask you to provide this list as part of the installation, and you will also need this list to manually add later on in the process.
- Once that’s enabled, log into Eloqua, and navigate to: Assets → Website Setup → Tracking → Generate Visitors Tracking Scripts
- In the resulting window, you’ll see a section labeled “Strict Mode”; within that section, you’ll see a text link for the Restricted Country List; it can be a little difficult to see.
Clicking on it will display a list of countries. Choose the countries that you want to restrict (aka the countries that your organization requires an opt-in for tracking). Once you’ve chosen the countries, save and close.
Note: If Strict Mode tracking is implemented, but no countries are chosen, no visitors will be tracked; at least one country must be selected, and then only visitors from the selected country/countries will not be tracked unless they opt-in. - Once your countries have been configured, you’ll need to follow up with Oracle Support on your initial service request, and ask that Strict Mode tracking itself be turned on
- Once Oracle Support confirms that Strict Mode tracking is enabled, log into your instance and navigate to Assets → Website Setup → Tracking → Visitor Tracking → Visitor Tracking Package
- Click Generate to create and download new tracking scripts for your instance(s)
- For external pages, you’ll need to work with your IT department to implement the opt-in banner and any changes to the tracking scripts
- You can configure Strict Mode for Eloqua landing pages by navigating to Assets → Website Setup → Microsites → {Microsite name} → Strict Mode Settings
Once everything here is completed, now you’re ready to integrate with OneTrust.
Implementing Eloqua tracking with OneTrust
In order to implement Eloqua tracking with OneTrust, we need to disassemble the standard Eloqua asynchronous tracking script and move some pieces around, placing most of it within OneTrust’s code, which needs to be added to your web pages.
Here’s the standard Eloqua tracking script; this should look familiar to you:
We’ll need to split this up and put part of it into the JavaScript OptanonWrapper callback function; this function is called after the OneTrust banner script is executed, and thus can be used to drop the Eloqua cookie into the visitor’s browser.
First, we need to define the _elqQ variable, but we need to do it slightly differently; we’ll attach it to the window object so that it’s global:
Next, we’ll go ahead and set the Eloqua site ID as usual, using a slightly modified command:
Here’s where we take a bit of a detour, and start working with the OptanonWrapper function. By default, the function is empty as provided, so we need to pop some code into it to make it do what we need. First, we will send the Strict Mode command, elqTrackPageViewOptinByCountry, to track the visitor’s page view if they’re in a non-restricted country, or have opted-in:
Next, we add in the remainder of the Eloqua tracking script:
Now, there’s some additional code that needs to be added, per OneTrust’s Knowledge Base, to handle the Eloqua cookies. (Note that the code on their page looks slightly different; it’s missing the Eloqua tracking script components and the _elqQ commands aren’t formatted consistently.) Adding that code in, gives us this:
We’re almost there. You’ll notice that there’s another function called within the OneTrust code: SetEloquaTracking. That function is also provided in the OneTrust Knowledge Base; as follows:
That should do it; once the script above is installed on your pages, Eloqua tracking should now be enabled and working with OneTrust’s cookie consent functionality. We do encourage you to verify not only that Eloqua tracking is firing, but OneTrust’s cookie consent management tool is working as expected.
Wrapping it up
Ensuring that your visitor tracking is in compliance with the regulations of different countries is of vital importance, and using a platform like OneTrust to assist with that practice can be very beneficial. You can still use Eloqua tracking with visitors from non-restrictive countries or those that have opted-in with a little bit of JavaScript work!
If you need help implementing Eloqua tracking with OneTrust, or with any of your other marketing automation needs, Relationship One is here to help!
References:
Thank you for subscribing!