Tracks a window event

@param windowEvent the window event to track
774120
public void add(Event<T> windowEvent) {
    // watermark events are not added to the queue.
    if (windowEvent.isWatermark()) {
      LOG.fine(String.format("Got watermark event with ts %d", windowEvent.getTimestamp()));
    } else {
      queue.add(windowEvent);
    }
    track(windowEvent);
    compactWindow();
  }
920417
function track (error) {
  if (window.trackJs) {
    try {
      var message = error ? error.message + ' - code: ' + error.errorCode : JSON.stringify(error);
      window.trackJs.track(new Error(message));
    } catch (exc) {
      // Swallow
    }
  }
}
626624
function track(backend, eventName, action, label) {

        action = action || location.pathname;
        switch (backend) {

        // ##### Google-Analytics
        case "google-analytics":
            var pageTracker = window._gat && window._gat._getTracker(settings.backends[backend].accountid);
            if (! pageTracker) {
                return;
            }
            if (eventName == PAGEVIEW) {
                pageTracker._trackPageview(action);
            } else {
                // https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide
                pageTracker._trackEvent("pilotfish:" + eventName, action, label || "");
            }
            break;

        // ##### Mixpanel
        case "mixpanel":
            if (eventName == PAGEVIEW) {
                window.mixpanel && window.mixpanel.track_pageview(action);
            } else {
                window.mixpanel && window.mixpanel.track(eventName, {action: action, label: label});
            }
            break;

        // ##### Pilotfish Session
        case "pilotfish-session":
            var session = window.sessionStorage;

            if (! session) {
                return;
            }
            if (eventName == PAGEVIEW) {
                // Increment a counter in sessionStorage.
                // Retrieve with `Pilotfish('session', 'pageViews')`
                Pilotfish('session', 'INCR', 'pageViews');
            } else {
                // Store events in a list in sessionStorage as JSON
                // Retrieve with `Pilotfish('session', 'events')`
                Pilotfish('session', 'PUSH', 'events', {eventName: eventName, action: action, label: label});
            }
            break;

        // ##### TODO: Pilotfish API as a backend

        // ##### Quantcast
        case "quantcast":
            if (eventName == PAGEVIEW) {
                window._qevents && window._qevents.push({qacct: settings.backends[backend].accountid});
                // Reload the js. It won't *actually* reload it network-wise, because it will be cached
                Pilotfish('loadScript', (location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js");
            }
            break;


        // ##### Unrecognized
        default:
            Pilotfish('perror', "Invalid backend for recorder");
            break;
        }
    }
48354
public static void openDialogInWindow(final I_Callback callback, String windowCaption) {

        final Window window = CmsBasicDialog.prepareWindow();
        window.setCaption(windowCaption);
        CmsSiteSelectDialog dialog = new CmsSiteSelectDialog();
        window.setContent(dialog);
        dialog.setCallback(new I_Callback() {

            public void onCancel() {

                window.close();
                callback.onCancel();

            }

            public void onSiteSelect(String site) {

                window.close();
                callback.onSiteSelect(site);
            }
        });
        A_CmsUI.get().addWindow(window);
    }
1088516
@SuppressWarnings("deprecation")
    @Override
    public void eventCallback(String eventName, Object eventData) {
        try {
            PopupData popupData = null;
            
            if (eventData instanceof PopupData) {
                popupData = (PopupData) eventData;
            } else {
                popupData = new PopupData(eventData.toString());
            }
            
            if (popupData.isEmpty()) {
                return;
            }
            
            Page currentPage = ExecutionContext.getPage();
            Window window = getPopupWindow();
            window.setTitle(popupData.getTitle());
            window.setParent(currentPage);
            String pos = getPosition();
            window.addStyle("left", pos);
            window.addStyle("top", pos);
            window.addEventListener("close", this);
            Label label = window.findByName("messagetext", Label.class);
            label.setLabel(popupData.getMessage());
            window.setMode(Mode.POPUP);
        } catch (Exception e) {}
    }
77045
@Override
    public void userEventTriggered(final ChannelHandlerContext ctx, final Object evt) {
        if (evt instanceof IdleStateEvent) {
            IdleStateEvent e = (IdleStateEvent) evt;
            if (e.state() == IdleState.READER_IDLE) {
                ctx.close();
                LOG.warn(jnrpeContext, "Read Timeout");
                //jnrpeContext.getEventBus().post(new LogEvent(this, LogEventType.INFO, "Read Timeout"));
                //EventsUtil.sendEvent(this.jnrpeContext, this, LogEvent.INFO, "Read Timeout");
            } else if (e.state() == IdleState.WRITER_IDLE) {
                LOG.warn(jnrpeContext, "Write Timeout");
                //jnrpeContext.getEventBus().post(new LogEvent(this, LogEventType.INFO, "Write Timeout"));
                //EventsUtil.sendEvent(jnrpeContext, this, LogEvent.INFO, "Write Timeout");
                ctx.close();
            }
        }
    }
814970
function DOMMouseMoveTracker(
onMove,
    /*function*/ onMoveEnd,
    /*DOMElement*/ domNode) {
    this.$DOMMouseMoveTracker_isDragging = false;
    this.$DOMMouseMoveTracker_animationFrameID = null;
    this.$DOMMouseMoveTracker_domNode = domNode;
    this.$DOMMouseMoveTracker_onMove = onMove;
    this.$DOMMouseMoveTracker_onMoveEnd = onMoveEnd;
    this.$DOMMouseMoveTracker_onMouseMove = this.$DOMMouseMoveTracker_onMouseMove.bind(this);
    this.$DOMMouseMoveTracker_onMouseUp = this.$DOMMouseMoveTracker_onMouseUp.bind(this);
    this.$DOMMouseMoveTracker_didMouseMove = this.$DOMMouseMoveTracker_didMouseMove.bind(this);
  }
817208
@Override
    protected void onDetachedFromWindow() {
        if (LOG_ATTACH_DETACH) {
            Log.d(TAG, "onDetachedFromWindow");
        }
        if (mGLThread != null) {
            mGLThread.requestExitAndWait();
        }
        mDetached = true;
        super.onDetachedFromWindow();
    }
406730
function ( tracker, gPoint ) {
            var guid = _generateGuid( tracker, gPoint ),
                i,
                len = trackerPoints.length;
            for ( i = 0; i < len; i++ ) {
                if ( trackerPoints[ i ].guid === guid ) {
                    trackerPoints.splice( i, 1 );
                    // Only run the interval timer if theres gesture pointers to track
                    len--;
                    if ( len === 0 ) {
                        window.clearInterval( intervalId );
                    }
                    break;
                }
            }
        }
726175
public void trackEvent(String argCategory, String argAction) {
        trackEvent(argCategory, argAction, null, null);
    }
894115
private static void track(String historyToken) {

        if (historyToken == null) {
            historyToken = "historyToken_null";
        }

        historyToken = URL.encode("/WWARN-GWT-Analytics/V1.0/" + historyToken);
        boolean hasErrored = false;
        try{
            trackGoogleAnalytics(historyToken);
        }catch (JavaScriptException e){
            hasErrored = true;
            GWT.log("Unable to track" ,e);
        }
        if(!hasErrored) GWT.log("Tracked " + historyToken);
    }
1196592
public void setRuntimeEventListener(RuntimeEventListener listener) {
        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.entry(tc, "setRuntimeEventListener", listener);
        _runtimeEventListener = listener;
        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.exit(tc, "setRuntimeEventListener");
    }
213525
public void setTargetWindow(com.google.api.ads.admanager.axis.v201811.AdUnitTargetWindow targetWindow) {
        this.targetWindow = targetWindow;
    }
712973
function windowLoaded(event) {
    document.removeEventListener('DOMContentLoaded', windowLoaded);

    // JSDom > 7.1 does not allow re-dispatching the same event, so
    // a copy of the event needs to be created for the new dispatch
    const windowContentLoaded = document.createEvent('HTMLEvents');
    windowContentLoaded.initEvent('DOMContentLoaded', false, false);
    window.dispatchEvent(windowContentLoaded);
  }
153218
public function onBlock(BlockEvent $event)
    {
        $target = $event->getSetting("target");
        $eventName = self::parseEvent($target);
        $gridWidgetBox = $this->getGridWidgetBoxService();
        
        $totalPublished = $gridWidgetBox->countPublishedByEvent($eventName);
        if($totalPublished === 0){
            $gridWidgetBox->addDefaultByEvent($eventName);
        }
        
        $gridWidgetBox->addAllPublishedByEvent($event,$eventName);
    }
782832
private void trackingStopMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_trackingStopMenuItemActionPerformed
        if (trackingWorker != null) {
            trackingWorker.cancel();
        } else {
            assert(false);
        }
    }
471375
function track(event){
  try {
    // TODO look up for event.data.transformer before setting data
    tracker.set(event);
  } catch(e) {
    /** @cut */ basis.dev.error(namespace + '.track(): Error during tracking event processing', event, e);
  }
}