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
<html> | |
<head> | |
<script src="/dist/bundle.js"> | |
</script> | |
</head> | |
</html> |
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
let filename = '' | |
let jsonURL = 'https://api.myjson.com/bins' | |
let token = 'YOUR_TOKEN_HERE' | |
let trackJsCaptureUrl = `https://capture.trackjs.com/capture?token=${token}` | |
let actions = [] | |
export function configureTracker () { | |
window.trackJs.configure({ | |
onError: (payload, error) => { |
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
// The easiest way to use TrackJS with webpack | |
// You can put the initial config in a different file if you wish, just make sure it's loaded before you require('trackjs') | |
window._trackJs = { | |
token: "" | |
} | |
require('trackjs'); // window.trackJs() will be a thing now in the browser. | |
// You can just treat as global if you wish: | |
trackJs.track("Test error"); |
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
<html> | |
<head> | |
<title>Error: It's just a flesh wound</title> | |
<meta name="author" content="TrackJS"> | |
<meta name="description" content="Error: It's just a flesh wound" /> | |
<meta property="og:description" content="http://localhost:3000/js/tracker-backup.js 41:116" /> | |
<meta property="og:site_name" content="TrackJS" /> | |
<meta property="og:title" content="Error: It's just a flesh wound" /> | |
<meta property="og:url" content="https://local.trackjs.com:443/shared/MDczNzRkMmIwMTBjNDcyNzhmMWE2ZmY1OTA5ODMwMmM" /> | |
<meta property="og:image" content="http://s3.amazonaws.com/uploads.hipchat.com/62739/433807/JoiUFgD4qldaTtK/favicon-196x196.png" /> |
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
// This thing lives at /client/lib/compatibility | |
(function (){ | |
window._trackJs = { | |
token: "mytoken" | |
}; | |
// the entire tracker script here | |
})() | |