Book the exclusive demo launch to experience the OWOX BI analytics

This type of tracking is intended for those who implemented a tracking code to a website.

1. Add the code below on every page right after Google Analytics initialization command ga('create', ...);:

// Connecting OWOX BI Streaming plugin to the tracker
ga('require', 'OWOXBIStreaming');
// OWOX BI Streaming plugin code
(function(){function f(g){var c=g.get("sendHitTask"),f=function(){function e(b){var a=!1;try{var d=document.createElement("img");d.src=c(!0)+"?"+b;a=!0}catch(h){}return a}function c(b){var a=""+encodeURIComponent(g.get("trackingId"));b||(a+="?tid="+encodeURIComponent(g.get("trackingId")));return a}return{send:function(b){var a;if(!(a=2036>=b.length&&e(b))){a=!1;try{a=navigator.sendBeacon&&navigator.sendBeacon(c(),b)}catch(h){}}if(!a){a=!1;var d;try{window.XMLHttpRequest&&"withCredentials"in(d=
new XMLHttpRequest)&&("POST",c(),!0),d.setRequestHeader("Content-Type","text/plain"),d.send(b),a=!0)}catch(h){}}return a||e(b)}}}();g.set("sendHitTask",function(e){try{c(e)}catch(k){}f.send(e.get("hitPayload"))})}var c=window[window.GoogleAnalyticsObject||"ga"];c&&c("provide","OWOXBIStreaming",f)})();

2. If you use several Google Analytics trackers, then define a name for the tracker you want to use for OWOX BI Pipeline as in the example above. For example, if the tracker name is 'owox' — use ga('owox.require', 'OWOXBIStreaming');

Was this article helpful?
1 out of 2 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.