# Appending Client Tags for Reporting & Attribution

## Hosted Integrations

### How to Structure Client Tags <a href="#how-to-structure-client-tags-for-either-hosted-integration-type" id="how-to-structure-client-tags-for-either-hosted-integration-type"></a>

Regardless of the integration type, Client Tags can be added via query parameters at the end of the respective URL in the below format\*:

**Partner Page Format**

<pre class="language-html"><code class="lang-html"><strong>?tag.{key1}={value1}&#x26;tag.{key2}={value2}
</strong></code></pre>

**Embed Format (Credit Cards)**

```
tags=tag.{key1}={value1}&tag.{key2}={value2}
```

**Embed Format (All Other Categories)**

<pre class="language-html"><code class="lang-html"><strong>data-tags=tag.{key1}={value1}&#x26;tag.{key2}={value2}
</strong></code></pre>

Where the {key} represents your general identifier, e.g. `clientId` or `subId`, and {value} represents the value for that specific individual, e.g. "client1" or "client2."

### Where to Place Client Tags (Different by Hosted Integration Type)

In the below examples, `tag.clientId=c1` means the lead will be stored with a `clientId` of "c1", and a `source` of "email", which can now be provided in reporting.

#### Partner Page

To add Client Tags in a **Partner Page**, append the parameters to the end of the `{provided_moneylion_url}` as follows:

```
{provided_moneylion_url}?tag.clientId=c1&tag.source=email
```

{% hint style="info" %}
\*The first Client Tag (or any query parameter) appended at the end of a URL/path should start with a question mark `?`; all subsequent parameters should be separated with an ampersand `&`
{% endhint %}

#### Embed (Credit Cards)

```html
<script
        async src="https://www.moneylion.dev/network/{channel}/{zone}/web-component/credit-cards-search/index.js\" 
 ></script>
<moneylion-credit-cards-search 
        tags="tag.clientId=c1&tag.source=email&tag.providedCreditRating=good">
</moneylion-credit-cards-search>
```

#### Embed (All Other Categories)

To add Client Tags in an Embed, use the following syntax in the `tags` attribute on the opening custom `moneylion-{some-product}` tag as follows (with each key preceded by `tag.`):

```html
<script 
      async src=\"https://www.moneylion.dev/network/{channel}/{zone}/web-component/generic-offers/index.js\" 
      data-tags=\"tag.clientId=c1&tag.source=email&app.providedCreditRating=good\"
      data-embed-type=\"auto-mount\" 
></script>
```

{% hint style="info" %}
\*The first Client Tag for Embeds should *not* include a question mark `?`, but every key/value pair of tags must be separated by an ampersand `&`
{% endhint %}

## Native API Integrations

Client Tags for Native API Integrations can be added by including a `clientTags` attribute at the top level of the request body, where the value is an array of strings. We strongly recommend only including one element per array for ease of reporting/attribution - if you want two separate tags, include the second tag under a different key. There is no limit to the number of keys in the `clientTags` object. See the following for an example:

<pre class="language-json"><code class="lang-json">{   
    "personalInformation": {...},
    "financialInformation": {...},
<strong>    "clientTags": {
</strong><strong>        "clientId": ["client1"],
</strong><strong>        "trafficsource": ["email"],
</strong><strong>        "campaignId": ["campaign1"]
</strong><strong>    }
</strong>}
</code></pre>

**More Information**

See the sample request in our [API Reference](https://engine.tech/docs/api-reference/#loans) for more info on the request body when posting leads to Engine's API.

See our [GET Lead Client Tags](https://engine.tech/docs/api-reference/#get-lead-client-tags) endpoint for information on attributing lead analytics to your own client tags

## Mobile SDK Integrations

### React Native

The Engine Mobile SDK supports adding your unique Client Tags to track performance of specific campaigns or users. All Client Tag data is attributed to the lead level.

Client Tags can be added by including a `clientTags` attribute at the top level of the request body, where the value is an array of strings. We strongly recommend only including one element per array for ease of reporting/attribution - if you want two separate tags, include the second tag under a different key. There is no limit to the number of keys in the clientTags object.&#x20;

**Example**

Here is a sample code snippet of how you might implement the Mobile SDK into your app, with sample `clientTags` appended:

```jsx
<EngineSdk
    bearer="{your_token}"
    primaryColor=”#11aa34”
    secondaryColor=”#444444”
    prefilledData={ any data you don't want to ask for again }
    "clientTags": {
        "clientId": ["client1"],
        "trafficsource": ["email"],
        "campaignId": ["campaign1"]
    }
    { ...optional Event Handlers, please see Event Handler section }
/>
```

See our [GET Lead Client Tags](https://engine.tech/docs/api-reference/#get-lead-client-tags) endpoint for information on attributing lead analytics to your own client tags, if you decide to hit our Analytics API for reporting.

### Flutter

The Engine Flutter SDK supports adding your unique Client Tags to track performance of specific campaigns or users. All Client Tag data is attributed to the lead level.

Client Tags can be added by including a **clientTags** attribute at the top level of the EngineSDK widget, where the value is a **Map\<String, List\<String>>**.&#x20;

We strongly recommend including only one element per list for ease of reporting and attribution—if you want two separate tags, include the second tag under a different key. There is no limit to the number of keys in the **clientTags** map

**Example:**

```dart
EngineSDK( 
bearerToken: '{your_token}', 
channel: '{your_channel}', 
zone: '{your_zone}', 
experience: '{your_experience}', 
prefilledData: // ...any data you don't want to ask for again 
clientTags: const { 
'clientId': ['client1'], 
'trafficsource': ['email'], 
'campaignId': ['campaign1'], 
}, 
// ...optional Event Handlers, please see Event Handler section 
)
```

**Note**: Client Tags are only sent when both prefilledData and bearerToken are provided.

## Supported Client Tag Keys (for any integration type)

These are the keys that are currently fully supported. If a different key is needed, please reach out to your partner manager - we *may* be able to accommodate, but adding nonstandard keys will increase the time it takes Engine to report Client Tag values back to you and is therefore not recommended. Please note that the keys below are case-sensitive.

* agentId
* campaignId
* clientId
* deviceid
* medium
* sourceId
* subid
* subid1
* subid2
* subid3
* target
* trafficsource
* userid


---

# 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://even-financial.gitbook.io/developer-center/channel-partner-reporting/appending-client-tags-for-reporting-and-attribution.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.
