Event Tracking
You can track user actions on your website. Tianji provides a simple way to do that.
Using Script Tag
if you are using script tag, you just need to call track
function in any where after you inject script
tianji.track(eventName, data);
Using SDK
if you are using sdk, you just need to call reportEvent()
function after you initTianjiTracker()
import { initTianjiTracker, reportEvent } from 'tianji-sdk-client';
initTianjiTracker({
url: backendUrl,
websiteId,
});
reportEvent('Demo Event', {
foo: 'bar',
});