インテグレーション:Usabilla

Mouseflowを使用すると、Usabillaなどの他のツールと簡単にインテグレーションできます。 JavaScript APIを使用して、特定のセッションをUsabillaに直接再生するためのリンクを送信することができます。 これにより、Usabillaでユーザーの応答を表示し、実際のセッションを再生して周囲のコンテキストを表示できます。

このインテグレーションは、いくつかの追加のJavaScriptを使用します。 トラッキングコードを次のスニペットに置き換えてください。

例:

<script type="text/javascript">

        var Cookie = {
	   set: function(name, value, days)
	   {
	      var domain, domainParts, date, expires, host;

	      if (days)
	      {
	         date = new Date();
	         date.setTime(date.getTime()+(days*24*60*60*1000));
	         expires = "; expires="+date.toGMTString();
	      }
	      else
	      {
	         expires = "";
	      }

	      host = location.host;
	      if (host.split('.').length === 1)
	      {
	         document.cookie = name+"="+value+expires+"; path=/";
	      }
	      else
	      {
	         domainParts = host.split('.');
	         domainParts.shift();
	         domain = '.'+domainParts.join('.');

	         document.cookie = name+"="+value+expires+"; path=/; domain="+domain;

	         if (Cookie.get(name) == null || Cookie.get(name) != value)
	         {
	            domain = '.'+host;
	            document.cookie = name+"="+value+expires+"; path=/; domain="+domain;
	         }
	      }
	   },

	   get: function(name)
	   {
	      var nameEQ = name + "=";
	      var ca = document.cookie.split(';');
	      for (var i=0; i < ca.length; i++)
	      {
	         var c = ca[i];
	         while (c.charAt(0)==' ')
	         {
	            c = c.substring(1,c.length);
	         }

	         if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	      }
	      return null;
	   },

	   erase: function(name)
	   {
	      Cookie.set(name, '', -1);
	   }
	};


// mouseflow tracking code

 var _mfq = _mfq || [];
 (function() {
 var mf = document.createElement("script"); mf.type = "text/javascript"; mf.async = true;
 mf.src = "//cdn.mouseflow.com/projects/your-website-id.js";
 document.getElementsByTagName("head")[0].appendChild(mf);
 })();

 // usabilla integration code

if(typeof usabilla_live == "function" && typeof mouseflow == "object") {
 window.usabilla_live('data', {
 'custom':{'mouseflow_link': 'https://app.mouseflow.com/websites/' + mouseflow.websiteId + '/recordings/' + mouseflow.getSessionId() + '/play'} } );
}
</script>