Understanding users is a crucial task for any business. It supports marketing, sales, and improving the product. If most user activities happen on our website or mobile app, We can use Google Analytics - GA. However, we may need our own tracking system for private and custom data. This blog will show you the way. Let's go.
1. Warm up
This section shows where the tracking system is in our business. Imagine that a camera shop sells new products on its website. There are two main ways for users to know these products: traditional (telesales, broadcast) and digital (Facebook ads, Google ads, etc.). But, how to check the performance of each campaign, e.g. user landing, product purchased.
On the website, users register to some products, then go to the offline shop to buy registered ones. The tracking system is as below:
2. Existing Solution
If you have no backend devs, this solution is for you. We can embed Google Tag scripts into our websites. It will send events automatically, like landing, clicking, and form submission, to Google Tag Manager. Then, we can redirect events to some platforms for analytics and performance tracking like Facebook (Pixel), Google Ads, and Google Analytics.
We can upload offline events as CSV files manually, or we can build a backend system to submit periodically. This solution is fast and good to extract useful insights on web/app activities.
3. Our solution
This solution is for private/custom data and can be used along with the above one without any conflicts. Suppose that the current system has frontend and backend (optional). We will add some modification and a new backend service - event
service.
First, we will map a user with an ID, e.g. UUID or hash of phone, at frontend. For web browser, we put an UUID into local storage if this UUID is not existed (new users). This can be done the same with mobile app. Then, we will embed this UUID in HTTP header, e.g. X-Request-ID
, of every API requests.
Second, frontend can send some events, e.g. click
or submit
to event
services whenever users interact with the app. Backend will send offsite events, e.g. paid or purchased.
Finally, event
service will store data into database or stream it to Google Cloud (GCP). In GCP ecosystem, we can query data using SQL and visualize into dashboards with Data Studio. The schema of data requires event name and uuid. The other fields are optional and flexible.
4. Examples
Because we own data, we can use SQL queries to get any insights we want, including ad-hoc queries. For example, the marketing department asks for the number of users registered to purchase cameras within 1 day after Facebook posts. Moreover, we can build custom dashboards with custom filters too. We can know exactly which section, e.g. home page, recommendation popup, or similar products, that makes users purchase.
5. Conclusion
Both methods #2 and #3 can be used simultaneously. They will help us understand more about users. With early launching and low cost product, #2 fits our needs perfectly. It also helps us run campaigns in Facebook or Google Ads. If we need deeper insights about product, #3 will be the choice.
Thank you for reading my blog!