> For the complete documentation index, see [llms.txt](https://foodcommerce-api-help.onlinesales.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://foodcommerce-api-help.onlinesales.ai/user-tracking-events/js-sdk.md).

# JS SDK

Overview

The OnlineSales.ai tag is a snippet of JavaScript code that loads a small library of functions that is used to track visitor activity on your website. It relies on browser Cookies, which enable us to match your website visitors to their respective browsing history. Once matched, we can analyse their actions and improve the recommended product suggestion and the complete ad-click flow and optimize the campaigns on various channels like Facebook & Google.\
\
By default, the tag will track URLs visited, domains visited, and the devices your visitors use. Once [installed](/user-tracking-events/js-sdk/installing-the-tag.md#base-code), you can use the library of functions to:

* Track following events
  * [Conversions](/user-tracking-events/js-sdk/track-purchases.md)
  * [Add to carts](/user-tracking-events/js-sdk/track-add-to-cart.md)
  * [Product Views](/user-tracking-events/js-sdk/track-product-view.md)
  * [Clicks](/user-tracking-events/js-sdk/track-ad-clicks.md)
  * [Impressions](/user-tracking-events/js-sdk/track-impressions.md)
