Keep track of all clicks on page


Hello All,

I have created simple page which contains check boxes. On this page user can check and uncheck boxes multiple times. I want to keep track of all these events? How Can I do that?

here is my code.


var pmApp = angular.module('pmApp', ['ionic']);

pmApp.controller('CheckboxController', function($scope) {
  $scope.devList = [
    { text: "Device & app history", details : "Allows the app to view one or more of: information about activity on the device, which apps are running, browsing history and bookmarks" ,checked: true },
    { text: "Identity", details: "Uses one or more of: accounts on the device, profile data", checked: false },
    { text: "Calendar", details: "Uses calendar information", checked: false },
    { text: "Contact", details: "Uses contact information", checked: false },
    { text: "Location", details: "Uses the device's location", checked: false },
    { text: "SMS", details: "Uses one or more of: SMS, MMS. Charges may apply.", checked: false }

  // toggle selection for a given employee by name
  $scope.toggleSelection = function toggleSelection(item) {
     var idx = $scope.selection.indexOf(item);

     // is currently selected
     if (idx > -1) {
       $scope.selection.splice(idx, 1);

     // is newly selected
     else {



      <div class="list" ng-controller="CheckboxController">
        <ion-checkbox ng-repeat="item in devList"
                      ng-checked="selection.indexOf(item) > -1"
            {{ item.text }}
            <h3 class="item-text-wrap"> {{ item.details }}</h3>
<div class="item">
          <pre ng-bind="selection | json"></pre> 

Thanks in advance, any help would be appreciated.