Installation - Custom Version

The following are installation instructions for use if you have non-standard requirements and a sufficient knowledge of javascript to be able to customise the code.

For most purposes, the simple installation instructions should be sufficient.

Steps

  1. Download the latest version of multitouch-X.Y.Z.min.js from the download page and install it at a convenient location on your web server.
  2. On each page of your website, insert the javascript that records the touch.
  3. On each transaction confirmation page (or any point on your site that represents the "goal" that you wish to track), insert the javascript that records the transaction and sends off the event to Google Analytics.
  4. Verify that the events are being captured.
  5. Install the reporting suite
  6. Generate reports

Recording Touches

The multitouch library must be included on every page of your website, either in the head or body sections, and a small piece of javascript must be placed on every page to record each "touch", as follows:

  <script type="text/javascript" src="/path/on/your/website/multitouch-X.Y.Z.min.js></script>
  <script type="text/javascript">
      var mt = new MultiTouchTracker();
      mt.multitouch();
  </script>

See the Javascript API documentation for details on the parameters that MultiTouchTracker() and mt.multitouch() can take.

Recording Transactions

Similarly, a small piece of javascript must be placed on every transaction confirmation page to record the transaction and send the sequence of touches to Google Analytics, as shown below. Typically this would be a https page, whilst touches would be recorded on http pages only, so the following code snippet again includes the multitouch library; however, there is nothing to prevent you including the touch recording code on https pages or vice versa, or having both the touch and transaction recording code on the same page.

  <script type="text/javascript" src="/path/on/your/website/multitouch-X.Y.Z.min.js></script>
  <script type="text/javascript">
      var mt = new MultiTouchTracker();
      // This is for Google's asynchronous tracker (recommended)
      _gaq.push(['_trackEvent', 'multitouch', 'TID' + tid, mt.multitouch_event(tid, rev) ])
  </script>

Again, see the Javascript API documentation for details on the parameters that MultiTouchTracker() and mt.multitouch_event() can take.

If you are using the older style standard (not asynchronous) Google Analytics tracking code, then the code would instead look something like this:

  <script type="text/javascript" src="/path/on/your/website/multitouch-X.Y.Z.min.js></script>
  <script type="text/javascript">
      var mt = new MultiTouchTracker();
      // This is for Google's standard tracker (why not upgrade to the asynchronous method instead?)
     var pageTracker = _gat._getTracker(gid);
     pageTracker._trackEvent('multitouch', 'TID' + tid, mt.multitouch_event(tid, rev));
  </script>

Verify that events are coming through

After the javascript code for recording transactions has been installed, within a few hours the events will start to become visible in the Google Analytics reporting under Content, Event Tracking, Categories, multitouch.

If there is nothing appearing after a day or more, and you are otherwise seeing transactions come through, then do the normal checks - make sure there are no javascript errors occurring on the page, double-check the javascript in the source, and use the various browser development tools to see if the event is actually being sent to Google Analytics.