# Common arguments

{% hint style="info" %}
Read me! You're about to read the description of the common arguments of the Universal Collect API.\
If you're using our JavaScript tag you **don't need** to know this list since our tag already takes care of everything for you.\
These common arguments are details about the hit you may have to or want to add to your payload when sending a specific hit detailled in the [uc-hits](https://docs.abtasty.com/client-side/data-apis/universal-collect/uc-hits "mention").
{% endhint %}

A few common arguments are required for EVERY hit type. You should try to know them before reading into hit-specific arguments.

### Common arguments list

These arguments can be sent with any type of hit. The more data the better. By default, the JS tag sends the needed ones for each type of hit.

**Summary**

* Required for all hit types
  * [Type](#type)
  * [Client ID](#client-id)
  * [Visitor ID](#visitor-id)
* Attached to specific hit types
  * [Campaign History](#campaign-history) (optional)
  * [Current Session Timestamp](#current-session-timestamp) (optional)
  * [Custom Dimension](#custom-dimension) (optional)
  * [Custom Metric](#custom-metric) (optional)
  * [Custom Variable](#custom-variable) (optional)
  * [Data Source](#data-source) (optional)
  * [Document Encoding](#document-encoding) (optional)
  * [Document Location URL](#document-location-url) (Required for \[[pageview](https://docs.abtasty.com/client-side/data-apis/universal-collect/uc-hits#pageview)] hits)
  * [Document Referrer](#document-referrer) (Required for \[[pageview](https://docs.abtasty.com/client-side/data-apis/universal-collect/uc-hits#pageview)] hits)
  * [Is Bot](#is-bot) (optional)
  * [Java Enabled](#java-enabled) (optional)
  * [Logical view](#logical-view) (optional)
  * [Page Title](#page-title) (Required for \[[pageview](https://docs.abtasty.com/client-side/data-apis/universal-collect/uc-hits#pageview)] hits)
  * [Protocol Version](#protocol-version) (optional)
  * [Quality Assurance Flag](#quality-assurance-flag) (optional)
  * [Queue Time](#queue-time) (optional)
  * [Screen Color Depth](#screen-color-depth) (optional)
  * [Screen Resolution](#screen-resolution) (optional)
  * [Session Number](#session-number) (optional)
  * [Tag commit hash](#tag-commit-hash) (optional)
  * [Tag semantic version](#tag-semantic-version) (optional)
  * [Tag version](#tag-version) (optional)
  * [User Language](#user-language) (optional)
  * [Viewport Size](#viewport-size) (optional)

### Type

List of possible values:

* `campaign` ([#campaign](https://docs.abtasty.com/client-side/data-apis/uc-hits#campaign "mention"))
* `event` ([#event](https://docs.abtasty.com/client-side/data-apis/uc-hits#event "mention"))
* `pageview` ([#pageview](https://docs.abtasty.com/client-side/data-apis/uc-hits#pageview "mention") alias 'screenview' for mobile apps)
* `item` ([#item](https://docs.abtasty.com/client-side/data-apis/uc-hits#item "mention"))
* `nps` ([#nps](https://docs.abtasty.com/client-side/data-apis/uc-hits#nps "mention"))
* `transaction` ([#transaction](https://docs.abtasty.com/client-side/data-apis/uc-hits#transaction "mention"))
* `visitorevent` ([uc-hits](https://docs.abtasty.com/client-side/data-apis/universal-collect/uc-hits "mention"))
* `segment` ([#segment](https://docs.abtasty.com/client-side/data-apis/uc-hits#segment "mention"))
* `datalayer` ([#datalayer](https://docs.abtasty.com/client-side/data-apis/uc-hits#datalayer "mention"))
* `batch` ([#batch](https://docs.abtasty.com/client-side/data-apis/uc-hits#batch "mention"))
* `product` ([#product](https://docs.abtasty.com/client-side/data-apis/uc-hits#product "mention"))

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **t**     | string     | *None*        | *None*     | all                 |

Example usage: `t=pageview`

### Client ID

Unique ID of the client. This ID is also the JS tag identifier.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **cid**   | string     | *None*        | *None*     | all                 |

Example usage: `cid=b0711162425441fb679dc41b98f052ab`

### Visitor ID

Unique ID of the visitor

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **vid**   | string     | *None*        | 50 char    | all                 |

Example usage: `vid=as8eknlll`

### Campaign History

{% hint style="warning" %}
Not required but highly recommended. Without this parameter, the hit will never be assigned to any campaign.
{% endhint %}

Contains the list of campaign ID / variation ID the visitor has been exposed to. This will condition the attribution of a hit to a list of specific campaigns.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **c**     | string     | *None*        | *None*     | all                 |

Example usage:

```
c: {
  '123456':'654321',
  '789012':'210987'
}
```

### Current Session Timestamp

Unix Timestamp of the current session

Note: the JS tag uses a cookie to write and read this data.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **cst**   | Integer    | *None*        | *None*     | all                 |

Example usage: `cst=1522053173006`

### Custom Dimension

Each custom dimension has an associated index. There is a maximum of 20 custom dimensions. The dimension index must be a positive integer between 1 and 20, inclusive.

| Parameter               | Value Type | Default Value | Max Length | Supported hit types |
| ----------------------- | ---------- | ------------- | ---------- | ------------------- |
| **cd\[dimensionIndex]** | string     | *None*        | 150 Bytes  | all                 |

Example usage: `cd[1]=Sports`

### Custom Metric

Each custom metric has an associated index. There is a maximum of 20 custom metrics. The metric index must be a positive integer between 1 and 20, inclusive.

| Parameter               | Value Type | Default Value | Max Length | Supported hit types |
| ----------------------- | ---------- | ------------- | ---------- | ------------------- |
| **cm\[dimensionIndex]** | number     | *None*        | *None*     | all                 |

Example usage: `cm[1]=47`

### Custom Variable

{% tabs %}
{% tab title="JavaScript" %}

<pre><code><strong>window.abtasty.send("EVENT", {
</strong>  ec: "Action Tracking",
  ea: "myEvent",
  cv: {"0": "key1, value1", "2": "key2, value2"}
  });
</code></pre>

{% endtab %}

{% tab title="Shell" %}
{% hint style="warning" %}
As part of our ongoing efforts to improve data security and prevent bot traffic, it is now mandatory to include a specific 'User-Agent' header in your CURL requests when sending data to ariane.
{% endhint %}

```
curl -X POST \
  https://ariane.abtasty.com \
  -H 'content-type: application/json' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36' \
  -d '{
  "cid": "60511af14f5e48764b83d36ddb8ece5a",
  "dl": "http%3A%2F%2Fabtastylab.com%2F60511af14f5e48764b83d36ddb8ece5a%2F",
  "t": "EVENT",
  "vid": "18100217380532936",
  "cv": {"0": "key1, value1", "2": "key2, value2"}
}' --output ariane_response.tmp
```

{% endtab %}
{% endtabs %}

Each custom variable has an associated index and a \[key,value] combination. The custom variable index must be a positive integer.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **cv**    | object     | *None*        | *None*     | all                 |

Example usage: `"cv" = "0": "key1, value1"`

### Data Source

Data source type. Can be `web` or `app`.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **ds**    | string     | web           | *None*     | all                 |

Example usage: `ds=web`

### Document Encoding

{% hint style="warning" %}
Not supported in Flagship
{% endhint %}

Specifies the character set used to encode the page / document.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **de**    | string     | UTF-8         | 20 Bytes   | all                 |

Example usage: `de=UTF-8`

### Document Location url

Current URL of the page, at the moment the hit is sent.

Note: server will compute more information from this url, such as domain name, url path, list of parameters, etc.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **dl**    | string     | *None*        | 2048 Bytes | all                 |

Example usage: `dl=https%3A%2F%2Fabtastylab.com%2Fb0711162425441fb679dc41b98f052ab%2F`

### Document Referrer

Specifies which referral source brought traffic to a website. This value is also used to compute the traffic source. The format of this value is a URL.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **dr**    | string     | *None*        | 2048 Bytes | all                 |

Example usage: `dr=http%3A%2F%2Fexample.com`

### Is Bot

Specifies whether this hit has been sent by a bot.

When at least one hit as been sent with this parameter sent to `true`, the whole session will be automatically flagged as coming from a bot, even if the other hits don't have the parameter or if it is set to `false`.

The `false` value does not trigger any effect.

All bots sessions are automatically excluded from our reportings.

This parameter is useful to manually flag a session as a bot or to exclude another type of unwanted sessions.

{% hint style="warning" %}
Even if this parameter is unset or set to `false`, the collect pipeline will still evaluate its user-agent and flag it as a bot if it has a known bot user-agent.
{% endhint %}

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **ib**    | boolean    | *None*        | *N/A*      | all                 |

Example usage: `ib=true`

### Java Enabled

Specifies whether Java was enabled.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **je**    | boolean    | *None*        | *None*     | all                 |

Example usage: `je=1`

### Logical View

Used to manage correct redirection tracking.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **lv**    | Hash       | *None*        | *None*     | all                 |

Example usage: `lv="x2GJdGGR"`

### Page Title

{% hint style="warning" %}
Not supported in Flagship
{% endhint %}

The title of the page / document.

Note: The JS tag uses `document.title`.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **pt**    | string     | *None*        | 1500 Bytes | all                 |

Example usage: `pt=Settings`

### Protocol Version

Protocol version. This will only change when there are changes that are not backwards compatible.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **v**     | integer    | 1             | *None*     | all                 |

Example usage: `v=1`

### Quality Assurance Flag

Used to flag hits part of a QA session. This field is automatically set to true when:

* the QA assistant is opened
* **OR** the test is in QA mode

QA sessions are not counted in the report once the test is launched in production without the QA mode.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **qa**    | boolean    | false         | *None*     | all                 |

Example usage: `qa=false`

### Queue Time

Used to collect offline / latent hits. The value represents the time delta (in milliseconds) between when the hit being reported occurred and the time the hit was sent. The value must be greater than or equal to 0. Values greater than four hours may lead to hits not being processed.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **qt**    | integer    | *None*        | *None*     | all                 |

Example usage: `qt=560`

### Screen Color Depth

Specifies the screen color depth.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **sd**    | string     | *None*        | 20 Bytes   | all                 |

Example usage: `sd=24-bits`

### Screen resolution

Specifies the screen resolution (in pixels).

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **sr**    | string     | *None*        | 20 Bytes   | all                 |

Example usage: `sr=800x600`

### Tag semantic version

Tag semantic version.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **tsv**   | String     | *None*        | *None*     | all                 |

Example usage: `tsv=3.23.0`

### Session Number

Number of the current session for the current visitor.

Note: the JS tag uses a cookie to write and read this data.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **sn**    | Integer    | *None*        | *None*     | all                 |

Example usage: `sn=6`

### Tag commit hash

Identifies the commit hash of the current script. Used for debug purposes.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **tch**   | Hash       | *None*        | *None*     | all                 |

Example usage: `tch="98f10"`

### Tag version

Identifies the branch of the current tag. Four possible values: `latest` (common usage), `next`, `unstable` and `deprecated`.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **tv**    | String     | *None*        | *None*     | all                 |

Example usage: `tv="latest"`

### User Language

Specifies the language.

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **ul**    | string     | *None*        | 20 Bytes   | all                 |

Example usage: `ul=en-us`

### Viewport Size

Specifies the viewable area of the browser / device (in pixels).

| Parameter | Value Type | Default Value | Max Length | Supported hit types |
| --------- | ---------- | ------------- | ---------- | ------------------- |
| **vp**    | string     | *None*        | 20 Bytes   | all                 |

Example usage: `vp=123x456`
