actioncat
v0.0.74
Published
ActionCat by Dstroms
Readme
ActionCat by Dstroms
Getting Started (for NextJS)
- Install the package in your project
npm i actioncat- Add your ActionCat API key to your .env file.
ACTIONCAT_API_KEY=- Import trackAction and use it anywhere you want to record an action.
import { trackAction } from "actioncat";
const handleSendMessage = () => {
trackAction({
actor: user.email,
action: "Sent a message",
extras: {
userObject: message,
},
});
};
or
<button
onClick={() =>
trackAction({
actor: user.emailAddresses[0].emailAddress,
action: "Clicked on the arrow up circle icon",
extras: {
userObject: user,
},
})
}
>
<ArrowUpCircleIcon className="w-10 h-10" />
</button>