-
-
Save nuno/d9b77093e932242be15d to your computer and use it in GitHub Desktop.
Alloy override for analytics
This file contains hidden or 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
Alloy.createWidget = function(id, name, args) { | |
Ti.Analytics.featureEvent("widget." + id, args); | |
return new (require("alloy/widgets/" + id + "/controllers/" + (name || "widget")))(args); | |
}; | |
Alloy.createController = function(name, args) { | |
Ti.Analytics.featureEvent("controller." + name, args); | |
return new (require("alloy/controllers/" + name))(args); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment