Track webviews in your aplication as app traffic

If you package your web version as a native application within a WebView, you can specify a page technology using the Marfeel tracker. This differentiation helps distinguish between App and Web traffic.

You can use {pageType: 3} for iOS, {pageType: 4} for Android, or declare an alternative page technology and then initialize the Marfeel tracker accordingly declaring the {pageType:} parameter as follows:

var mrfTech = 0;
if (is_app) { //use your own logic to know if the page is loading in your inapp webview
   mrfTech= 3;

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="";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,
   /* AccountId */,
   { pageType: mrfTech } /* Config */
1 Like