HW3 — Module 10: Command Queue Loader Demo

This page loads collector-v9.js with the async attribute and uses the production embed-snippet pattern: commands are pushed to a plain array (window._cq) before the script has even started downloading. Once the script loads, it drains that queue and replaces the array with a live object — any _cq.push() made afterward runs immediately.

<script>
  window._cq = window._cq || [];
  _cq.push(['init', { endpoint: '/collect', debug: true, detectBots: false, respectConsent: false }]);
  _cq.push(['set', 'loadedVia', 'command-queue']);
  _cq.push(['track', 'queued_before_load']);
</script>
<script async src="/collector-v9.js"></script>

Gates are disabled here on purpose — this page exists to demonstrate the queue mechanic itself, not the consent/bot gates (see test-v9.html for that). Debug mode is on so every command logs to the console instead of hitting the network.

Live Timeline

typeof window._cq right now:
← Back to collector home