Skip to content

Commit

Permalink
1.0.7
Browse files Browse the repository at this point in the history
* removed polyfill
* moved plugin scoped option logic
  • Loading branch information
Ryan Brewster committed Oct 30, 2014
1 parent f3ba99d commit c7b4619
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 22 deletions.
11 changes: 2 additions & 9 deletions lib/atrackt.js

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

1 change: 0 additions & 1 deletion lib/plugins/atrackt.omniture.js

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

4 changes: 4 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
### CHANGE LOG
###### 1.0.7
* removed polyfill
* moved plugin scoped option logic

###### 1.0.6
* option namespacing

Expand Down
14 changes: 3 additions & 11 deletions src/atrackt.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ https://github.com/brewster1134/atrackt
window.Atrackt ||= new(factory($))
) @, ($) ->

# console polyfill
window.console ||=
log: ->
error: ->

class Atrackt

# Default global attributes
Expand Down Expand Up @@ -132,10 +127,6 @@ https://github.com/brewster1134/atrackt

# Loop through each plugin and check if the data should be tracked
for pluginName, pluginData of @plugins
# extract plugin specific data
if options[pluginName]
$.extend true, options, options[pluginName]
delete options[pluginName]

# If tracking is triggered by an event, make sure the event namespace matches the plugin or is global
if event
Expand Down Expand Up @@ -194,9 +185,10 @@ https://github.com/brewster1134/atrackt
# prepare tracking data
trackingData = $.extend true, {}, @_data, plugin._data, options['_data'] || {}, metaData

# remove any data in the options
optionsCopy = $.extend true, {}, options
# remove any data in the options & plugin options in the global options
optionsCopy = $.extend true, {}, options, (options[plugin.name] || {})
delete optionsCopy['_data']
delete optionsCopy[plugin.name]

trackingOptions = $.extend true, {}, @_options, plugin._options, optionsCopy

Expand Down
1 change: 0 additions & 1 deletion src/plugins/atrackt.omniture.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ https://github.com/brewster1134/atrackt

send: (data, options) ->
return console.error 'ATRACKT ERROR: PLUGIN `omniture` - Site catalyst library not loaded' if typeof s == 'undefined'
console.log 'dataoptions', data, options

$.extend true, @options, options
data._categories = data._categories?.join @options.delimiters.category
Expand Down

0 comments on commit c7b4619

Please sign in to comment.