Adding custom parameters to an mPulse beacon

Document created by DPM Admin on Jul 14, 2017
Version 1Show Document
  • View in full screen mode

There are times that a customer might want to include custom parameters on the beacon that is sent to mPulse.  As of June 2015, this data will not show up inside the mPulse dashboards and can only be seen in the raw beacons and DSWB.

 

Nothing in the original JS snippet needs to change.  You simply need to add additional code after the original JS snippet.  Below is the example that adds four new custom parameters added to the beacon: UserId, ClientId, GroupId, and UniqueId.

 

function addVars() {
  BOOMR.addVar({
    "UserId": SOASTA.UserId,
    "ClientId": SOASTA.ClientId,
    "GroupId": SOASTA.GroupId,
    "UniqueId": SOASTA.UniqueId
  });
}
 
if (document.addEventListener) {
  document.addEventListener("onBoomerangLoaded", addVars);
}
else if (document.attachEvent) {
  document.attachEvent("onpropertychange", function(e) {
    if (!e) e = window.event;
    if (e && e.propertyName === "onBoomerangLoaded") {
      addVars();
    }
  });
}

Attachments

    Outcomes