# TVSquared

[TVSquared](https://tvsquared.com/) is a television attribution platform that specializes in enterprise-scale cross-screen and multi-touch TV attribution and measurement.

RudderStack supports TVSquared as a destination where you can seamlessly send your event data.

## Connection compatibility

{{< destination-config >}}

{{< info >}}
In the web device mode integration, that is, using [JavaScript SDK]({{< ref "sources/event-streams/sdks/rudderstack-javascript-sdk/_index.md" >}}) as a source, RudderStack loads the TVSquared native SDK from the `http://tvsquared.com` domain. 

Based on your website's content security policy, you might need to [allowlist this domain]({{< ref "sources/event-streams/sdks/rudderstack-javascript-sdk/load-js-sdk.md#allowlist-destination-domain" >}}) to load the TVSquared SDK successfully.
{{< /info >}}

## Get started

Once you have confirmed that the platform supports sending events to TVSquared, follow these steps:

1. From your [RudderStack dashboard](https://app.rudderstack.com/), add a source. Then, from the list of destinations, select **TVSquared**.
2. Assign a name to the destination and click **Continue**.

## Connection settings

To successfully set up TVSquared as a destination, configure the following settings:

- **Brand Id \(Site ID\)**: Enter the unique identifier indicating the TVSquared client to which the traffic belongs. It is of the format `TV-XXXXXXX-1` with a variable-length numeric value replacing `X`.
- **Client Id \(Collector Id\)**: Enter the Client ID used to distribute the traffic and manage the load on the TVSquared servers effectively. It is numeric and can contain one or more values.
- **Custom Metrics**: The **Property Name** values added in this field are sent to TVSquared for the events containing those event properties, along with the other defined TVSquared properties. For example, if the property added in the dashboard is `shipping` , then the shipping value is sent to TVSquared. A sample snippet for this is shown:

```javascript
rudderanalytics.track('Order Completed', {
  order_id: '5d4c7cb5',
  revenue: 99.9,
  shipping: 13.99,
  tax: 20.99,
  products: [
  ]
});
```

- **Client-side Events Filtering**: This setting lets you specify which events should be blocked or allowed to flow through to TVSquared. See [Client-side Events Filtering]({{< ref "sources/event-streams/sdks/event-filtering.md" >}}) for more information.

## Page

When you make a [`page`]({{< ref "event-spec/standard-events/page.md" >}}) call, RudderStack makes a call to TVSquared to record a page view.

```javascript
rudderanalytics.page('new category',
'page name',
{
  url: 'url',
  path: '/path'
});
```

## Track

Calling the [`track`]({{< ref "event-spec/standard-events/track.md" >}}) method triggers TVSquared's `Action Tracker` method. 

By default, TVSquared accepts the following properties in your `track` events:

- `revenue`
- `product type (category)`
- `action id (order_id)`
- `promo (promotion_id)`

{{< info >}}
All the above parameters are optional. There is no requirement to add these to measure the uplift from TV. However, you can use this data for more detailed analysis as required. If there is no value to pass, RudderStack sets an empty string instead.
{{< /info >}}

A sample `track` call is as shown:

```javascript
rudderanalytics.track('Order Completed', {
  order_id: '5d4c7cb5',
  category: 'category',
  revenue: 99.9,
  shipping: 13.99,
  tax: 20.99,
  products: [

  ],
  promotion_id: 'PROMO_1234'
});
```

<br />
