Tracking Instructions: How to track events

Once you have the Gist JavaScript code installed on your site, you can track an event by calling gist.track with the event name and properties. Although Gist automatically tracks pageviews without the need to code, if you wish to track a custom event that is specific to your business, you can use the gist.track method.

The track API call is how you record any actions your users perform, along with any properties that describe the action.

Each action is known as an event. Each event has a name, like Registered, and properties, for example a Registered event might have properties like plan or accountType. Calling track in one of our sources is one of the first steps to getting started with Segment.

Here’s the corresponding Javascript event that would generate the above payload:

gist.track("Registered", {
    plan: "Pro Annual",
    accountType: "Facebook" 
});

Tracking Guidelines: What events to track

Your segmentation is only as good as the data you're tracking. As such, deciding what to track is the hardest part about making your data useful for your business. It can be overwhelming to create a tracking plan from scratch, so this guide will give you a head start.

What to know when building your tracking plan.

  • The most important information is how your funnel is working. How your users discover, start using, and pay for your features and products. What important steps do they take along the way? You would want to capture these important events.
  • Do not overload yourself with lots of tracking data, especially in the beginning. Track only those events that are crucial to make business decisions, And then once you're good, add more events later.
  • Organizing your data from the beginning is vital to keep everything in place. A simple and suitable naming convention for your events and properties will help you and your team in the long run, and will make things easy for new teammates to understand and get along quickly.

Core Lifecycle Events

If you are a SaaS business, there are three core lifecycle events are very important, and these three events are usually common among most businesses.

  • Signed Up
  • Sent Project Data
  • Started Subscription

Here's why and how you can track each of these events,

Signed Up:

The Signed Up event is the key metric for Design to see how the site is converting and for Marketing to measure campaigns. It’s a user’s first baby step of commitment.

gist.track('Signed Up', {
    userName: "michael-jordan", 
    type: "invite",
    companyId: "aef6d5f6e"
});

We differentiate organic signups and invited signups, so we can understand organic website conversion separately from internal team sharing. To distinguish between organic and invited signups we use an event property called type. We also use automatically recorded UTM parameters to differentiate users that come through paid campaigns like Adwords.

Sent Project Data

This event is possibly the most important of all, because this metric tells you whether or not people are using your product, and how well they are using it, and if they are using it as it is meant to be. It helps your team understand important information such as whether they integrated their project yet, whether they are sending data, if yes then how much, to which integrations, using what methods, etc.

gist.track( 'Sent Project Data', {
    // project
    projectId: 'bce5fad577',
    projectSlug: 'getgist.com',
    projectCollaborators: 1,

    // owner
    ownerId: 'aef6d5f6e',
    ownerType: 'company',
    ownerOwners: 14,

    // usage
    chatsMonthly: 4811,
    callsWeekly: 22
});

Need Help?

If you have any questions, please start a Live Chat. Just "Click" on the Chat Icon in the lower right corner to talk with our support team.