Last active
February 8, 2017 17:50
-
-
Save marinhero/415c5a934621aff2d925a1dabe0075b3 to your computer and use it in GitHub Desktop.
An Example of the analytics.js module in the beacon.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['jquery'], function(jq){ | |
//Edited for readability purposes | |
var $ = jq.noConflict(true); | |
var initialize = function() { | |
pixel(); | |
google(); | |
}; | |
var pixel = function() { | |
var pixel_url = "https://ourtrackingurl"; | |
$.get(pixel_url).fail(function(error) { | |
console.log('Wootric: Error: tracking pixel -> ', error.statusText); | |
}); | |
} | |
}; | |
var google = function() { | |
// GA tracker settings | |
ga('wootricTracker.send', 'pageview'); | |
}; | |
return { initialize: initialize }; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment