Skip to content

Commit

Permalink
Allow the eventLabel config setting to be a function (fixes #20)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdhowie committed Apr 26, 2016
1 parent 7b07d84 commit 60409db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions dist/videojs.ga.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* videojs-ga - v0.4.2 - 2015-02-06
* Copyright (c) 2015 Michael Bensoussan
* videojs-ga - v0.4.2 - 2016-04-12
* Copyright (c) 2016 Michael Bensoussan
* Licensed MIT
*/
(function() {
Expand Down Expand Up @@ -106,7 +106,7 @@
ga('send', 'event', {
'eventCategory': eventCategory,
'eventAction': action,
'eventLabel': eventLabel,
'eventLabel': typeof eventLabel === 'function' ? eventLabel() : eventLabel,
'eventValue': value,
'nonInteraction': nonInteraction
});
Expand Down
6 changes: 3 additions & 3 deletions dist/videojs.ga.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/videojs.ga.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ videojs.plugin 'ga', (options = {}) ->
ga 'send', 'event',
'eventCategory' : eventCategory
'eventAction' : action
'eventLabel' : eventLabel
'eventLabel' : if typeof eventLabel is 'function' then eventLabel() else eventLabel
'eventValue' : value
'nonInteraction' : nonInteraction
else if window._gaq
Expand Down

0 comments on commit 60409db

Please sign in to comment.