Building Paystack: Product Analytics

How we’re approaching product analytics at Paystack

Feature Image

Paystack’s mission is to provide the best payments experience for African merchants, and we’ve been at this for more than a year now. In that time, we’ve made a lot of (thankfully) good assumptions. But as we grow rapidly, we need to make more informed decisions about how to build our product. This involves implementing product analytics.

It might surprise you to realize that Paystack only recently started being more intentional about product analytics. Like many other startups, we didn’t pay attention to analytics early because:

  • Tunnel vision: We were very focused on pushing out the product and getting early customers that there was “no time for anything else”.
  • Team size: User Experience (UX) is such an extensive field, and because our early design team was only one person, UX research seemed like something to consider after hiring a bigger design team.
  • Correct early assumptions: At the very early stages of our product, we were driven by a strong sense of intuition and smart assumptions, so analytics seemed unnecessary.

Benefits of analytics for a small startup

There’re numerous benefits to being intentional about analytics, even for small startups:

  1. You can greatly improve your design process by observing how people use your product.
  2. There’s a high likelihood of you discovering something about your product you never even considered.
  3. Smart assumptions for product features are good, but informed decisions are much better.
  4. Even if you don’t use the analytics data immediately, it’s really handy to collect for future work or another product.
  5. Pivots!*

Before working on Instagram, founder Kevin Systrom spent months working on an app called Burbn. It was while reviewing Burbn’s analytics that he saw interesting user behaviour which resulted in the pivot to Instagram.

Great analytics tools for small startups

Here’re some of the tools we’ve been trying out at Paystack in our early experiments with becoming a more data-driven company.

  1. Google Analytics Account — (Free) This is a simple analytics tracker.
  2. Google Search Console — (Free) This helps you figure out how people find your site on the internet, and much more.
  3. Fullstory Account — (Trial account). Fullstory is a tool that helps you better understand your customers’ experience of your product.

Heap or Mixpanel are popular alternatives for Google Analytics or Fullstory

* Keep a checklist handy, so you can follow your progress as you implement analytics for your product

Analytics Checklist

Step 1: Setup Tracking

  • Google Analytics
  • Google Search Console
  • Fullstory

Step 2: Decide what to track

  • Highlight the call to actions on your app / landing page
  • List out the most important goals of your app / landing page

Step 3: Implement

  • Mark important actions as events
  • Create and track conversion goals

Step 1: Setup Tracking

Google Analytics is great for tracking how users navigate through your site (behaviour), and where your users come from (acquisition).

Google Search Console helps you figure out how people find your business on the internet. You can use this data to optimize your keywords, SEO, and much more.

Fullstory is more suited for when you want specific details about how people interact with your pages — what buttons they click or don’t, how they flow through you product, and more. Here’s a quick guide to setting up all these services:

  • Create your Google Analytics account, then follow the instructions to add to your application.
  • Signup and follow the instructions to add Fullstory to your app. Fullstory has a pretty neat on-boarding process so you’ll be guided through how to use it.
  • Finally, connect your analytics account with Search console. This helps you figure out how people search for and find your product on Google.

Note: At Paystack, we created multiple account ids for the different concerns i.e. Landing page analytics ID is different from dashboard ID. This decision was made to keep the data clean.

For single page applications, you might need to find a custom Google Analytics library to track pages. A simple search on Github will find you one. Fullstory works out of the box with any application.

Image

Step 2: Deciding what to track

On to the next! Now that tracking is all set up, make a list of things that are important to track. It doesn’t have to be a long list, but it needs to be precise. Take a look at your app and landing page to decide the most important actions you want people to do.

For landing pages, this is usually evident in the call-to-action buttons. For example:

Landing Page: I want people to

  • Sign up
  • Use the demo
  • Contact Sales

Tracking analytics for your main application might be bit different, and usually your database will be able to give you insights into what people do with their accounts. For your application, you should be looking out for things that have to do with the user experience (UI/UX). A good way to decide what metrics to track is using Google’s HEART framework. For example

App: I want to know how people

  • Interact with the onboarding screens
  • Interact with the empty states
  • Interact with the upsell Calls-to-Action

Step 3: Implementation

By default, once integration is done, both Google Analytics and Fullstory provide rich dashboards that give you insights out of the box. If you’ve outlined what to track from Step 2 above though, then you need to actively note when these actions happen.

Image
Paystack’s Fullstory dashboard default insights

Default Insights

  • The Fullstory dashboard highlights a lot of important things by default. So you can see session recordings, dead clicks, error clicks and browser distribution, etc.
  • Google Analytics also provides a ton of usage data right out of the box. You can play around with it to understand, read an explainer, or read a glossary.

Fullstory Tips

  • One important way to optimize your Fullstory data is to use unique IDs in your HTML to highlight all the important sections and buttons.
  • To go further, you can create segments and funnels.
  • Segments are questions you can ask from the tracked information e.g How many people that used the onboarding clicked on help later?
  • Funnels join segments together for deeper questions. e.g For the people from the question above, how many were on a mobile device?

Events (Google Analytics)

These are used to record user interaction with website element. Other services like Fullstory provide this data by default because they track every click and swipe. At Paystack though, we prefer to track our conversion and goals in Google Analytics.

As an example, we’ll be tracking one of the actions from Step 2. To track people signing up, we can use javascript to notify GA when the signup buttons are clicked. e.g

HTML:

<a class="button button--green" data-signup="Homepage Hero Button" href="https://dashboard.paystack.com/#/signup">Get started for free</a>
<a class="button button--green" data-signup="Signup Tab Button" href="https://dashboard.paystack.com/#/signup">Create Account</a>

Javascript:

var signupLinks = document.querySelectorAll('[data-signup]');
for (i = 0; i < signupLinks.length; i++) {
    signupLinks[i].addEventListener("click", function(event){
        event.preventDefault();
        var eventLabel = event.target.getAttribute('data-signup');
        var gaIsLoaded = window[window['GoogleAnalyticsObject'] || 'ga'];
        if (gaIsLoaded) {
            ga('send', 'event', {
                eventCategory: 'Signup',
                eventAction: 'click',
                eventLabel: eventLabel
            });
        }
        window.location = event.target.getAttribute('href');
    })
}

If you’re not technical, what we’ve done above is label our signup buttons based on their position on the page and record the “Signup” event to Google Analytics when they are clicked.

Goals (Google Analytics)

This takes events one step further by tracking conversion. You can use this to track the metrics that directly affect the success of your business. Here’s an example story:

  • You want to know when people need help in your application
  • You implement an event every time the help button is clicked
  • You create a goal to see how many people do this over time
  • Now, you can progressively see how people are requesting help
  • When you redesign your dashboard, you want to know if worked i.e Less people need help
  • Goals can help you see if this really worked over time
Image
Example Goal: How many people are creating a Paystack account

Further reading: KissmetricsAbout Goals

Done is better than perfect

You can implement only Step 1 and call it a day. You’ll still be collecting useful data you can use, and your dashboards will be able to give you insights.

Also, there’s no need to be pedantic about analytics, because as a small startup, you have to make difficult decisions about where you allocate your development time. You can start simple and keep refining this over time. The more insights you get, the better your events and goals will get.

We hope this look into how Paystack is approaching product analytics has proved illuminating. If you have analytics tips and tools that have worked for you, please feel free to share them with us via email or Twitter  ❤️✌🏿

Read this!
Feature Image
Introducing Paystack Starter Businesses
Unregistered businesses can now accept online payments with Paystack, without needing a Corporate Bank Account or company registration document
Feature Image
Product Updates to Paystack Payment Pages
We've introduced new improvements to Paystack Payment Pages!