All files / src/web analytics.js

66.66% Statements 2/3
80% Branches 4/5
100% Functions 1/1
66.66% Lines 2/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14      99x               99x    
import { runningInNode } from "../loader.js";
 
export function noteEvent(category, type, label) {
    Iif (
        !runningInNode &&
        (window.location.host.endsWith(".godbolt.org") || window.location.host.endsWith(".xania.org"))
    ) {
        // Only note events on the public site
        /*global gtag*/
        gtag("event", category, { type, label });
    }
    console.log("event noted:", category, type, label);
}