How to use trackjs - 3 common examples

To help you get started, we’ve selected a few trackjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CIDARLAB / 3DuF / src / app / appSetup.js View on Github external
if(checkBrowCompatibility()){
        viewManager = new ViewManager();


        console.log("Checking Host: ");
        console.log(window.location.host);

        if(window.location.host === "3duf.org"){
            console.log("Enabling TrackJS");
            TrackJS.install({
                token: "1f4d3a9c263e4e3fb2fe4c7f96f8808e"
            });

            viewManager = TrackJS.watchAll(viewManager);
        }


        Registry.viewManager = viewManager;

        viewManager.loadDeviceFromJSON(JSON.parse(Examples.example2));
        viewManager.updateGrid();
        Registry.currentDevice.updateView();

        window.dev = Registry.currentDevice;
        window.Registry = Registry;

        window.view = Registry.viewManager.view;

        // Registry.threeRenderer = new ThreeDeviceRenderer(document.getElementById("renderContainer"));
github CartoDB / cartodb / lib / assets / javascripts / new-dashboard / core / trackers.js View on Github external
import { TrackJS } from 'trackjs';
import store from '../store';

// TrackJS Configuration
const isTrackJSEnabled = store.state.config.trackjs_enabled;

if (isTrackJSEnabled) {
  TrackJS.install({
    token: store.state.config.trackjs_customer,
    application: store.state.config.trackjs_app_key,
    userId: store.state.user.username,
    version: __ASSETS_VERSION__ + '-nd' // eslint-disable-line
  });
}

// Google Tag Manager
const tagManagerId = store.state.config.google_tag_manager_id;

if (tagManagerId) {
  window.dataLayer = window.dataLayer || [];
  window.dataLayer.push({
    userId: store.state.user.id,
    userAccountType: store.state.user.account_type,
    userSignUpDate: Date.parse(store.state.user.created_at) / 1000
github CIDARLAB / 3DuF / src / app / appSetup.js View on Github external
window.onload = function() {


    if(checkBrowCompatibility()){
        viewManager = new ViewManager();


        console.log("Checking Host: ");
        console.log(window.location.host);

        if(window.location.host === "3duf.org"){
            console.log("Enabling TrackJS");
            TrackJS.install({
                token: "1f4d3a9c263e4e3fb2fe4c7f96f8808e"
            });

            viewManager = TrackJS.watchAll(viewManager);
        }


        Registry.viewManager = viewManager;

        viewManager.loadDeviceFromJSON(JSON.parse(Examples.example2));
        viewManager.updateGrid();
        Registry.currentDevice.updateView();

        window.dev = Registry.currentDevice;
        window.Registry = Registry;

trackjs

TrackJS JavaScript error tracking agent.

SEE LICENSE IN LICENSE.md
Latest version published 1 year ago

Package Health Score

54 / 100
Full package analysis