> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://staging.chrisp.chat/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How can I push user events?

****If you are using Crisp on a website where users are authenticated, you may want to push events to retarget them later on different channels. Using Crisp, you can push events in two different ways: through the JS SDK and through the chatbot****

This method uses the Crisp JavaScript API, that you can call from your own code or you can use the chatbot to trigger an event.

|| You can push an event from your backend too using our API, here is [an article that explains everything about it](/en/article/how-to-push-user-event-from-my-backend-z0tda4/).

****Here's how you would proceed to push an event using the JS SDK:****

```
// Feed this call with your own events data.$crisp.push(["set", "session:event", [[    ["product_bought", { price: "$200", name: "iPhone 6S" }, "red"]]]]);
```

Sets one or multiple session events, with a text and an optional data object and ****optional color**** (in `` `red` ``, `` `orange` ``, `` `yellow` ``, `` `green` ``, `` `blue` ``, `` `purple` ``, `` `pink` ``, `` `brown` ``, `` `grey` ``, `` `black` ``)`

|| Of course, you need to replace ****product_bought**** with your own event name, own data and own color. For instance, you can use ****login**** or ****signup****, ****upgrade****, etc.

⚠️ Want to know more about the $crisp interface? Read: [How to use $crisp Javascript SDK?](https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/dollar-crisp/)

****Here's how you would proceed to push an event using the chatbot:****

So the chatbot offers different blocks that have specific behaviors. One of them makes you able to push an event to trigger a campaign. The one we're looking for is the "Push session event" block, which is an action block.

![Push session event block](https://storage.crisp.chat/users/helpdesk/website/-/8/9/d/a/89dabc01a8a16800/893b6ab9-56e8-4b67-8138-4c3012_6q9hmq.png)

****Use cases for pushing an event through the bot:****

* Automate email sequences following a product info request
* Send a calendly link based on information granted through the bot
* Push Knowledge Base articles from customers' input

||| Events are used for automation purpose, and must not serve as a permanent database of data. We only retain the most recent events for your users. If you need to store per-user data permanently, please use [custom user data](/en/article/how-can-i-automatically-set-custom-data-1xh7pqk/) instead.