Skip to content

Installation

Michael Marras edited this page Jun 8, 2026 · 3 revisions

SDK Installation

WIP

Setup

Step 1 - Register your Project

Dashboard accounts are seeded by the team (no self-serve signup). Ask in the team channel to get a project_id for your app.

Step 2 - Install SDK

Add the Watchtower SDK to your html file with the following script

<script src="https://cdn.jsdelivr.net/gh/cse110-sp26-group7/Watchtower@main/client/watchtower.min.js" defer></script> 

Step 3 - Initialize SDK

Create and initialize a WatchTower object in in your code. Make sure to use your project id

const wt = new Watchtower({
  projectId: "your_project_id",
  endpoint: "https://watchtower-ingest.cse110piedpiper7.workers.dev/ingest",
  environment: "prod"
})
wt.init()

Step 4 - Test

Add this button to your html file to test your dashboard

<button id="trigger-error">Trigger Test Error</button>

<script>
  document
    .getElementById("trigger-error")
    .addEventListener("click", () => {
      // Simulate a runtime error
      throw new Error("Manual test error triggered");
    });
</script>

Clone this wiki locally