OP Custom Tag - Ensighten Tag Management Rules

Overview

This custom tag sends data to ObservePoint collected from pre-defined parameters set in the Ensighten Tag Management System.

Under Variable Summary Report in ObservePoint data, select the Ensighten Tag account to access the relevant variables. There may also be other variables present as a result of the Ensighten rules.

  • page: Shows all the page URLs.
  • status: Shows whether an Ensighten object was found on the current page or not.

To capture these details in an Audit or Journey, paste the snippet below into an Execute Action:

function opReqGetAsync(paramObject, acct, callback) {

    var baseURL = "https://opreq.observepoint.com/?acct=" + acct;

    var opReq = new XMLHttpRequest();

    opReq.onreadystatechange = function() {

        if (opReq.readyState == 4 && opReq.status == 200) {

            callback(opReq.responseText);

        }

    }

    opReq.open("POST", baseURL, true);

    opReq.send(JSON.stringify(paramObject));

}

var ensTesting = function() {

    var obj = {},

        ensObject = window['ensBootstraps'];

    obj.page = location.href;

    if (typeof ensObject == 'object') {

        obj.results = ensObject.Bootstrapper.data.getAllDataDefinitionsOnCurrentPage_S_C_N();

        obj.status = 'ensighten object found';

        obj.rulesFound = obj.results.length;

        opReqGetAsync(obj, 'ensighten rules')

    } else {

        obj.status = 'ensighten object not found on current page';

        opReqGetAsync(obj, ' Ensighten Tag')

    }

};

ensTesting();

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us