# Server-Side

## When to track events server-side vs. client-side

The [Javascript source](/integrations/sources/web/javascript.md) is the easiest way to collect data with Freshpaint. The Javascript source automatically collects data from your site and lets you retroactively create events from the collected data.

We recommend that you track events server-side in the following scenarios:

1. **Offsite events:** when a user interaction is not on a website or app (for example, using your API)
2. **Revenue events:** the event for completing a purchase (for example, a user may click the 'Purchase' button, but that purchase may time out)

Sometimes you can make an argument for tracking an event either client-side or server-side. We recommend that you should only *consider* tracking events server-side in the following scenario:

1. **Essential events to operations:** For example, events that you trigger a *critical* email drip from (so that users don't get left out or sent the wrong emails).

## Sending Server-side events to Freshpaint

To send server-side events to Freshpaint, you should use the Freshpaint HTTP API. Take a look at HTTP API reference for how to go about sending events to Freshpaint.

{% content-ref url="/pages/bmCr9djpUjVtAm3wnOXF" %}
[HTTP API](/reference/developer/http-api.md)
{% endcontent-ref %}

## Sending Server-side events to Destinations

By default, server-side events will be sent to all active destinations. Active destinations are destinations you have configured and enabled in Freshpaint.

If you don't want server-side events to be sent to all active destinations, you can have more granular control by following the options listed [here](https://documentation.freshpaint.io/reference/developer/http-api#configuring-which-destinations-server-side-events-are-sent-to).

## Supported Server Side Destinations

Not all destinations accept server-side events. Here's a list of destinations you can send server-side events to:

* Active Campaign
* Adobe Analytics
* Amplitude
* Autopilot (now Ortto)
* Azure Synapse Analytics
* Basis
* BigQuery
* Bing Ads
* Braze
* Crisp
* Customer.io
* Databricks
* Facebook Conversions API
* Floodlight
* Freshsales
* Gainsight CS
* Google Ads
* Google Analytics
* Heap
* Hubspot
* Impact.com
* Iterable
* Klaviyo
* Kustomer
* LeadSquared
* LinkedIn
* Mixpanel
* MySQL
* Panolpy
* Pintrest
* Postgres
* Reddit Ads
* Redshift
* S3
* Sendinblue
* Snowflake
* Spotify (Podsights)
* StackAdapt
* Tiktok Ads
* Vero
* Zendesk
* X Ads (Twitter)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.freshpaint.io/integrations/sources/server-side.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
