_satellite.isLinked

This function in DTM is among the few that were to be supported as safe to call directly (see https://docs.adobe.com/content/help/en/dtm/using/client-side/object-reference.html), but oddly did not make it into Launch.

The function in DTM took a DOM element as an argument. It would look at the element itself and then containing elements to see if any were "a" anchor tags.

Remedy:

Below is a function adapted from the minimized DTM code which can be used in place of _satellite.isLinked.

function isLinked(e) {
  function _isLinkTag(e) {
    return !(!e || !e.nodeName || "a" !== e.nodeName.toLowerCase())
  }
  for (var t = e; t; t = t.parentNode)
    if (_isLinkTag(t)) return !0;
  return !1
}

Last updated