- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
08-30-2017 09:13 AM
Using Charles Proxy here is a way to get more advanced output from utag.DB.
A sample for the output with this enhanced output.
Using the Charles rewrite functionality (https://www.charlesproxy.com/documentation/tools/rewrite/)
The 2 body rewrites looks like this:
The code to use in each are:
First to upgrade the utag.DB function:
Match Value
;utag.o['
Replace Value
; utag.ut.typeOf = function(e) {return ({}).toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase();}; utag.DB = function(a, b) { var t; if (utag.cfg.utagdb === false) { return; } else if (typeof utag.cfg.utagdb == "undefined") { utag.db_log = []; b = document.cookie + ''; utag.cfg.utagdb = ((b.indexOf('utagdb=true') >= 0) ? true : false); } if (utag.cfg.utagdb === true) { var con = window.console; if (utag.ut.typeOf(a) === "error") { utag.db_log.push(a); t = ""; if (a.stack && a.stack.split) { t = a.stack.split("\n")[1].replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '').replace(/^at\s/, ""); } if (con) { t = "utag - Error : " + t + " "+ a.message; if (con.warn) { con.warn(t); } else if (con.log){ con.log(t); } } } else { t = (utag.ut.typeOf(a) == "object") ? utag.handler.C(a) : a; utag.db_log.push(t); if (con && con.log) con.log("utag - ", t); } } };utag.o['
Second to add extra utag.DB calls to try/catches
Match Value (Regex):
\}catch\((.*?)\)\{
Value Match:
}catch($1){utag.DB($1);
Copyright All Rights Reserved © 2008-2023