Browse Source

Added flag to capture analytics once per element

bmallred 12 years ago
parent
commit
2cf708dec5
1 changed files with 4 additions and 1 deletions
  1. 4 1
      jquery-analytics.js

+ 4 - 1
jquery-analytics.js

58
    var settings = {
58
    var settings = {
59
        attributes: [],
59
        attributes: [],
60
        assignTo: ["a", "input[type='submit']"],
60
        assignTo: ["a", "input[type='submit']"],
61
        captureOnce: false,
61
        client: null,
62
        client: null,
62
        exclude: ".analytics-exclude",
63
        exclude: ".analytics-exclude",
63
        url: null
64
        url: null
134
                data: data
135
                data: data
135
            })
136
            })
136
            .always(function () {
137
            .always(function () {
137
                $this.addClass("analytics-captured");
138
                if (settings.captureOnce) {
139
                    $this.addClass("analytics-captured");
140
                }
138
            });
141
            });
139
        }
142
        }
140
    };
143
    };