This guide aims to educate you about tracking custom events specific to your business using the gist.track() JavaScript method.

Getting Started with Event Tracking

Upon successfully installing the Gist JavaScript code on your site, you can start tracking specific actions performed by your users. Gist automatically tracks pageviews, but if you wish to record a custom event, you can use the gist.track method.

An event refers to an action that users perform on your site. Each event, such as 'Registered', has properties associated with it, such as 'plan' or 'accountType'. To track an event, simply call gist.track with the event name and properties.

Here’s a sample JavaScript event:

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

Guidelines: What Events to Track

Tracking the right events is crucial for effective data segmentation. The key is to understand your user journey and track significant steps along the way. Here's what to keep in mind when building your tracking plan:

  1. Understand Your Funnel: Identify the important steps users take while discovering, using, and paying for your features and products. These steps make up your key events.

  2. Start Small: In the beginning, avoid overwhelming yourself with too much data. Track key events that are crucial for business decisions. You can add more events later as required.

  3. Organize Your Data: Adopt a simple and clear naming convention for your events and properties from the get-go. This will help your team in the long run and make it easier for new teammates to understand your tracking system.

Core Lifecycle Events for SaaS Businesses

Sharing a few core lifecycle events for a typical SaaS business. Here's how to track them:

1. Signed Up:

The 'Signed Up' event is vital to measure website conversions and the success of marketing campaigns. Here's how you can track this event:

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

We differentiate between organic signups and invited signups using the event property 'type'. UTM parameters are also used to distinguish users that come through paid campaigns.

2. Sent Project Data:

Tracking the 'Sent Project Data' event provides insights into whether users are actively using your product and how well they are using it.

gist.track( 'Sent Project Data', {
 // project
 projectId: 'bce5fad577',
 projectSlug: '',
 projectCollaborators: 1,
 // owner
 ownerId: 'aef6d5f6e',
 ownerType: 'company',
 ownerOwners: 14,
 // usage
 chatsMonthly: 4811,
 callsWeekly: 22

3. Started Subscription:

The 'Started Subscription' event is crucial to identify users who have decided to become paying customers, signalling their satisfaction with your service. Here's how you can track this event:

gist.track('Started Subscription', {
 userId: "michael-jordan",
 plan: "Pro",
 startDate: "2023-06-01"

In this example, the 'userId' is the unique identifier for the user, the 'plan' property shows the plan they have chosen, and 'startDate' indicates when the user started their subscription. This event helps you understand the conversion rate and effectiveness of your sales funnel.

The tracking of these core events and user properties allows you to get a clearer picture of your users, making your marketing more effective and your user interactions more personalized. Remember, the quality of your segmentation is as good as the data you track. Happy tracking!

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.