Newsbreak instrumentation

Marfeel allows to track the content published to Newsbreak.

You should place the following code inside your <nb:scripts> section in your XML feed.

In this code, you should replace:

  • /* AccountId */ with your account id
  • https://YOUR_CANONICAL_URL_FROM_ARTICLE with the article canonical URL of each element

Remember that all scripts inside <nb:scripts> must be enclosed by the <![CDATA[ ]]> tag.

<script>function e(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],c=document.createElement("script");c.src=e,t?c.type="module":(c.async=!0,c.type="text/javascript",c.setAttribute("nomodule",""));var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(c,n)}function t(t,c,n){var a,o,r;null!==(a=t.marfeel)&&void 0!==a||(t.marfeel={}),null!==(o=(r=t.marfeel).cmd)&&void 0!==o||(r.cmd=[]),t.marfeel.config=n,t.marfeel.config.accountId=c;var i="https://sdk.mrf.io/statics";e("".concat(i,"/marfeel-sdk.js?id=").concat(c),!0),e("".concat(i,"/marfeel-sdk.es5.js?id=").concat(c),!1)}!function(e,c){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t(e,c,n)}(window,0 /* AccountId */,{pageType:14, lazy:true});</script>

window.marfeel.cmd.push(['compass', function(compass) {
	compass.trackNewPage('https://YOUR_CANONICAL_URL_FROM_ARTICLE');
}]);
</script>