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
#! /usr/local/bin/amm | |
/** | |
* A ammonite script http://www.lihaoyi.com/Ammonite/#Ammonite-Shell | |
* For report toggl datas | |
* HowTo: | |
* - install ammonite: sudo curl -L -o /usr/local/bin/amm https://git.io/vHaMa && sudo chmod +x /usr/local/bin/amm | |
* - update script with Toggl-apikey and | |
* - chmod +x togglReport.sc | |
* - ./togglReport.sc | |
* |
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
object EventTracker { | |
def isScriptLoaded=js.Dynamic.global.ga.isInstanceOf[js.Function] | |
def sendEvent(category:String,action:String,label:String):Unit={ | |
if (isScriptLoaded) GoogleAnalytics.ga("send","event",category,action,label) | |
} | |
def sendEvent(category:String,action:String,label:String,value:String):Unit={ | |
if (isScriptLoaded) GoogleAnalytics.ga("send","event",category,action,label,value) | |
} | |
} |
NewerOlder