January 5, 2023

January 5, 2023

How to track user behavior with on-chain analytics

You were told that to extract data from smart contracts, you must write SQL queries. That’s one way but it’s not easy. How can business team access blockchain information with simplified dashboards? Find out in the article

When you try to measure your decentralized business growth by looking into your protocol data logic— you can’t find exactly what you came for and you feel confused—have you ever felt this way?

In this article, we will focus on how to understand user behavior with on-chain analysis, specifically how to use on-chain analytics to build a strategy to get new users.

Read the article to understand how you can push your business from a small startup into a unicorn and learn what is blockchain data analysis.

On-chain vs Off-chain

It’s important to know the difference between on-chain and off-chain data.

Off-chain data is data that is not stored on the blockchain and can only be accessed by certain parties. For example, if you’re a marketing person you’re working with off-chain data all the time. Google Analytics, SEM Rush, Social Media Analytics, and your cloud-based database, all of these are examples of off-chain data.

On-chain data on the other hand is data that is stored directly on the blockchain and is publicly accessible. It is immutable and available in real-time. This means that anyone who has permission to access the blockchain can see this information.

“On-chain data is like a message that anyone can read if they know where to look”

The challenge with reading on-chain data is that you need to parse millions or billions of transactions that constitute a specific blockchain network in order to retrieve insights from them.

Each transaction is different and may launch different Dapp behavior, which needs to be mapped as well.

Later in this paragraph, you’ll learn where to look at these messages and how anyone without a technical background can access them.

Defining user behavior

User behavior is the way a user interacts with your Dapp or token. It’s important to understand user behavior because it helps you improve the customer experience, which in turn increases engagement, retention, and revenue.

In web3 space user behavior can be tracked using blockchain data analytics. You can analyze this data to gain insights into what users are doing on your protocol or how they interact with your token.

Then, you can use this information to make your product even better. For example, if we see that people are doing specific on-chain action that is important to you, we can monitor the source of the action and the effect of this behavior by connecting all dots together.

Users are more likely to engage with a platform if it enables them to do what they want. This means that tracking user behavior will help you identify areas where your users are struggling, which can then be improved upon.

Ethereum Smart Contracts

What is a smart contract?

If you already know what a smart contract is, then you can skip this paragraph. Otherwise, read it carefully as it is a logical consequence of this article.

If you fail to understand the meaning of smart contracts it might be hard for you to gather all the pieces of the puzzle later.

Smart contracts are self-executing contracts that use code to facilitate, verify, and enforce the terms of an agreement. Smart contracts can be programmed to carry out a range of different functions like executing payment transactions or transferring ownership of assets from one entity to another.

Smart contracts are written by developers using any programming language they want, however, most smart contract developers use either Solidity (a smart contract programming language specifically developed for Ethereum) or Ink (Substrate ecosystem).

Smart contracts run on top of a blockchain network like Ethereum or Polkadot. In order for them to be executed by any party within that network at any time without needing an intermediary like a bank or lawyer.

Here is an example to make it simple for you to understand.

Let’s say you want to buy a house. You and the person selling the house can make a smart contract that says what will happen if you don’t pay the money or if the person doesn’t give you the keys. This way, you can make sure that everything goes smoothly and no one can cheat on each other.

On-chain analytics (smart contract analytics) how does it work

The main idea behind on-chain analytics is to utilize blockchain data to extract valuable insights from transactions. This way, you can analyze users’ behavior and extract meaningful information from the data without depending on external third parties or centralized databases.

The process involves collecting transaction data, parsing it, and tracking user activities on a decentralized network.

Here’s an example of how you can use this technology in practice:

Let’s say that you have created a decentralized application (dApp) that allows users to send money home by sending them digital currency through chatbots.

You may want to track user activity with your dApp for many reasons: for instance, see which channels are most popular among users when it comes to using your dApp.

Discover what is the number of active addresses, transaction volume, and which exchanges they used before coming to your dApp. Identify what is your application’s net flow and how many whale wallets are using it.

By knowing this information you can plan marketing campaigns to engage with your users like airdrops or remarketing.

All these things become possible because they are based on raw data from inside the blockchain rather than external sources such as Google Analytics (GA), which doesn’t allow reading on-chain data.

How to extract data from the blockchain with zero coding experience

You were told that to extract data from smart contracts, you must write SQL queries. That’s one way but it’s not easy. Most people don’t know how to do this because they’re not developers or analysts.

How can any person from your business team (marketing, sales, content managers) access this information and use it to improve the product?

The parameters like transactions activity, largest token (NFT) sale, and others can be tracked using a no-code tool. You can even find the biggest (whale) user wallets and identify the potential price vulnerability against your protocol.

You can compare this data with the latest media or marketing campaigns, engage with your users and make fixes to your strategy.

All this information is stored in your protocol and you can track it accurately without compromising user privacy or security.

This sounds amazing, I know.

How you can apply it to your protocol with Tokenguard

Tokenguard provides on-chain data analytics to Substrate and EVM-based blockchains. You can extract the most important on-chain data, identify the source and the cause of the conversion and create your conversion funnel.

You can use this data to create a proper sales funnel, which will help you identify the points where people drop off from your protocol.

Improve your tech key metrics like retention rate and engagement rate. And grow your community with user-behavior analysis.

The software is currently in the development stage. If you reach out to the team, they will prepare a custom dashboard for you to test.


The blockchain ecosystem is changing rapidly, but with the right tools and methods, we can stay ahead of this revolution. I hope that this article has given you some insight into how we can use on-chain analytics to track user behavior on the blockchain.

Follow us on Twitter and Linkedin, we’re sharing useful information there!

Request a contact with our success specialist