Quickstart

Send your first events to Hey Glancy and see them arrive, in about five minutes. This guide uses the script tag, the quickest way to start on any website. For apps and frameworks, see the SDKs.

1. Get your write key

In Hey Glancy, open the bucket you want to send data to and go to Setup. Copy the bucket's write key: it starts with glc_ and tells Hey Glancy where to store your events.

Use one bucket per environment (for example one for production and one for staging), so test data never mixes with real data. Only bucket admins can see the write key.

2. Add the script to your site

Paste this into the <head> of every page, with your write key:

<script defer src="https://ingest.heyglancy.com/glancy.js" data-key="YOUR_WRITE_KEY"></script>

That's all for page views: Hey Glancy now records one every time a page loads, including route changes in single-page apps.

3. Track what matters

Page views tell you where people go. Events tell you what they do. Track the actions that matter to your product:

<script>
  document.querySelector("#signup-form").addEventListener("submit", () => {
    glancy.track("Signed Up", { plan: "pro" });
  });
</script>

Or without writing any JavaScript, with an attribute:

<button data-glancy-event="Demo Requested" data-glancy-prop-plan="pro">Book a demo</button>

4. Tell Hey Glancy who people are

Until someone signs in, Hey Glancy knows them by an anonymous id kept in their browser. When they sign in, call identify with your own user id, so everything they did before and after is tied to the same person:

glancy.identify("user_42", { name: "Ana Silva", email: "ana@example.com", plan: "pro" });

When they sign out, call glancy.reset() so the next person on that device starts fresh.

5. See it arrive

Open Real time in Hey Glancy: your page views and events show up within seconds, on a map and in a live feed. Then try Insights to chart an event over time, or Funnels to see how many people go from one step to the next.

Next steps