Last active
April 9, 2018 21:16
-
-
Save arsduo/261005b0421393fe9729471448d8a4fc to your computer and use it in GitHub Desktop.
ElmRings blog post - example 3
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
yarn add elm-rings | |
# or | |
npm install elm-rings |
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
app = MyElmApp.fullscreen() | |
myRecorder = new ElmRings({ | |
allowDownload: true, | |
trackingFrequency: 60 * 1000, // 60 seconds by default | |
shouldSendHistory: isLoggedIn(), // or whatever's appropriate, defaults to true | |
storeHistory: historyData => { | |
// process, upload, make confetti from your history data | |
} | |
}) | |
myRecorder.startTracking(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment