Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block BrandesEric

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View index.html
<script src="/dist/bundle.js">
BrandesEric / awesome.js
Last active Jun 19, 2018
TrackJS onError sending to third party API first, before tracking
View awesome.js
let filename = ''
let jsonURL = ''
let token = 'YOUR_TOKEN_HERE'
let trackJsCaptureUrl = `${token}`
let actions = []
export function configureTracker () {
onError: (payload, error) => {
BrandesEric / index-simple.js
Last active May 23, 2016
Webpack and TrackJS
View index-simple.js
// 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");
View Test.html
<title>Error: It&#39;s just a flesh wound</title>
<meta name="author" content="TrackJS">
<meta name="description" content="Error: It&#39;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&#39;s just a flesh wound" />
<meta property="og:url" content="" />
<meta property="og:image" content="" />
View track.js
// This thing lives at /client/lib/compatibility
(function (){
window._trackJs = {
token: "mytoken"
// the entire tracker script here
You can’t perform that action at this time.