This Knowledge Base article only applies to premium Editor's Desk accounts. A premium level account allows for customization of the HTML, CSS, and JavaScript of your widgets. If you'd like more information about how you can take advantage of this more robust version of Editor's Desk, please contact Craig Lachman. His contact information is included in the confirmation email that was sent to you when you signed up for a basic Editor's Desk account.
If you have a tabbed or checkbox widget, you may have found that you have to view the reporting for each individual internal widget to gather information about how many people see your widget and click on the articles. Enhanced reporting was created so that you can view this information in one place: and all you need to do is make a few minor changes to your widget code, per these instructions:
In the JavaScript pane of your tab/checkbox master widget (located within the Design tab of a widget), look for a line of code that says var NG = (). This declaration contains a number of functions; the one you need to look for is NG.ReturnBuzz. The archaic way of calling slave widgets is driven by this function, which should look like this:
NG.ReturnBuzz = function(elem){
try{
var friendlyName = trim(elem.id.replace(/^.*?([^_\-]+)$/, "$1"));
var subTgt = document.createElement("DIV");
subTgt.id = NG.GetTargetId(elem.id);
var tgt = document.getElementById(target);
if(tgt.firstChild){
document.getElementById("buzzTarget").insertBefore(subTgt, tgt.firstChild);
} else {
tgt.appendChild(subTgt);
}
var eargs = {
DisplayName:friendlyName,
Category:friendlyName,
FavIcon:NG.ReturnFavIcon(elem),
maxPosts:3,
maxPostSelector:this.extraArgs.maxPostSelector,
removeFeedButton:this.extraArgs.removeFeedButton,
BuzzName:elem.id,
noSelectedFeedsMessage:this.extraArgs.noSelectedFeedsMessage,
suppressScripts: true,
suppressStyles: true
}
new ng.buzz.Buzzlet(elem.id, this.APIToken, template, subTgt.id, this.buzzObj.buzzAppUrl, this.buzzObj.attnUrl,
this.buzzObj.userId, eargs, this.buzzObj.orgCode, this.buzzObj.analytics).render();
}
catch(ex){ ng_debug(ex.message); }
}
To implement Enhanced Reporting, simply replace the following chunks of code:
Remove:
var eargs = {
DisplayName:friendlyName,
Category:friendlyName,
FavIcon:NG.ReturnFavIcon(elem),
maxPosts:3,
maxPostSelector:this.extraArgs.maxPostSelector,
removeFeedButton:this.extraArgs.removeFeedButton,
BuzzName:elem.id,
noSelectedFeedsMessage:this.extraArgs.noSelectedFeedsMessage,
suppressScripts: true,
suppressStyles: true
}
and replace with:
var slaveArgs = {
templateId : "buzzTemplate",
targetId : subTgt.id,
extraArgs : {
DisplayName:friendlyName,
Category:friendlyName,
FavIcon:NG.ReturnFavIcon(elem),
maxPosts:3,
maxPostSelector:this.buzzObj._extraArgs.maxPostSelector,
removeFeedButton:this.buzzObj._extraArgs.removeFeedButton,
BuzzName:elem.id,
noSelectedFeedsMessage:this.buzzObj._extraArgs.noSelectedFeedsMessage,
suppressScripts: true,
suppressStyles: true
}
};
And also remove:
new ng.buzz.Buzzlet(elem.id, this.APIToken, template, subTgt.id, this.buzzObj.buzzAppUrl, this.buzzObj.attnUrl,
this.buzzObj.userId, eargs, this.buzzObj.orgCode, this.buzzObj.analytics).render();
and replace with:
var slave = this.buzzObj.createSlaveWidget(elem.id, slaveArgs);
slave.render();
If you have additional questions, or need personalized help on this topic, please send an email to Private Label Support.