trying to load utag.js from static resource in lightning component with following tag.
<ltng:require scripts="/resource/UTAG1/utag/utag.js" afterScriptsLoaded = "{!c.afterScriptsLoaded}" />
in afterScriptsLoaded calling utag.view method.
var utag_data = {
userGuid : "", //
l1 : "", //
l2 : "", //
l3 : "", //
l4 : "", //
l5 : "", //
l6 : "", //
l7 : "", //
l8 : "", //
event : "", //
environment : "", //
user_id : usrid,
}
console.log('utag_data---'+utag_data);
try{
utag.view(utag_data);
}
catch(err){
console.log(err);
}
utag.view(utag_data);here ended up with utag is not defined error. Please do needful.