# iFrame

Steps on how to integrate MyChips with iFrame integration (web integration).

#### 1. Include the following SDK script and initialize it within your HTML.

```
<script src="https://v1.mychips.io/SDK/latest/my-chips-sdk.bundle.js"></script>myChipsSDK('init', {userId: '{{user_id}}'})
```

#### 2. Add the iFrame code in your HTML.

**Example iFrame code for iOS users:**

```
<iframe id="my-chips-iframe" allow="ch-ua-platform; ch-ua-platform-version" src="https://sdk.mychips.io/content?content_id={adunit_id}&user_id={user_id}&idfa={idfa}&gender={gender}&age={age}"></iframe>
```

**Example iFrame code for ANDROID users:**

```
<iframe id="my-chips-iframe" allow="ch-ua-platform; ch-ua-platform-version" src="https://sdk.mychips.io/content?content_id={adunit_id}&user_id={user_id}&gaid={gaid}&gender={gender}&age={age}"></iframe>
```

**Note:** Replace all macro placeholders (e.g., `{user_id}`, `{adunit_id}`) in the iFrame code with your actual values.\
Also, make sure that any parameters you add to the URL from the[ parameters list](#the-list-of-parameters-available) below are updated with real data.

**Example iFrame code with values replaced for iOS users:**

```
<iframe id="my-chips-iframe" allow="ch-ua-platform; ch-ua-platform-version" src="https://sdk.mychips.io/content?content_id=28617c7e-0178-4b89-b258-74bcf171e&user_id=5d41402abc4b2a76b9719d911017c592&idfa=6D92078A-8246-4BA4-AE5B-76104861E7DC&gender=m&age=30"></iframe>
```

**Example iFrame code with values replaced for ANDROID users:**

```
<iframe id="my-chips-iframe" allow="ch-ua-platform; ch-ua-platform-version" src="https://sdk.mychips.io/content?content_id=28617c7e-0178-4b89-b258-74bcf171e&user_id=5d41402abc4b2a76b9719d911017c592&gaid=38400000-8cf0-11bd-b23e-10b96e40000d&gender=m&age=30"></iframe>
```

#### 3. Locating Your iFrame Code

To locate your iFrame code, please click on the Edit button shown in the screen below.

<figure><img src="https://1889388802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8FPXPNk0nLIRsJsg3nxP%2Fuploads%2Fh4YC26Q8uUnR2TQOfHsi%2Fimage.png?alt=media&#x26;token=27065292-69e5-447e-baa6-a9ce6f2e6b08" alt=""><figcaption></figcaption></figure>

Next, navigate to the Integration section, where you'll find your iFrame code. The code highlighted in the green square is ready to use, and the content\_id parameter corresponds to your ad unit ID.

![](https://1889388802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8FPXPNk0nLIRsJsg3nxP%2Fuploads%2FcDO1SfXy1vW3q12J4Xxc%2Fimage.png?alt=media\&token=96491315-69eb-4c9c-844a-a851ebfe6976)

***

In the list below, you'll find all the available parameters. If you wish to send any of these parameters to us, simply add them to the URL in the iframe code.

#### The list of parameters available:

<table data-header-hidden><thead><tr><th width="112.75"></th><th width="120.25"></th><th width="109.5"></th><th></th></tr></thead><tbody><tr><td><strong>Parameter</strong></td><td><strong>Example</strong></td><td>Mandatory</td><td>Notes</td></tr><tr><td>user_id</td><td>U9221</td><td>Yes</td><td>The User ID is a unique identifier assigned to an individual user. If no specific User ID is provided, the system will automatically generate one to ensure proper user identification and tracking.</td></tr><tr><td>gaid</td><td>38400000-8cf0-11bd-b23e-10b96e40000d</td><td>No</td><td>The Google Advertising ID (GAID) is a unique, randomly generated identifier assigned by Google to Android devices, which enables advertisers to track and measure users’ advertising interactions across apps and services. <strong>We highly recommend including the GAID parameter, as it helps improve eCPM performance.</strong></td></tr><tr><td>idfa</td><td>6D92078A-8246-4BA4-AE5B-76104861E7DC</td><td>No</td><td>The Identifier for Advertisers (IDFA) is a unique, randomly generated code that Apple assigns to each user’s device, allowing advertisers to monitor and analyze advertising-related activity. <strong>We highly recommend including the IDFA parameter, as it helps improve eCPM performance.</strong></td></tr><tr><td>click_id</td><td>6a204bd89f3</td><td>No</td><td>A unique clickid. Keep the same value at each events</td></tr><tr><td>gender</td><td>m</td><td>No</td><td>Supported values: “m” (male), “f” (female), “n” (not specified).</td></tr><tr><td>age</td><td>45</td><td>No</td><td>user age (numeric 0-100)</td></tr><tr><td>aff_sub1,<br>aff_sub2, aff_sub3, aff_sub4, aff_sub5</td><td></td><td>No</td><td>Custom parameters that can be passed and returned in the postback.</td></tr></tbody></table>

### Reward Users

The only reward option available on iFrame is the **Webhook S2S Postback**. Please check the relevant documentation below.

{% content-ref url="reward-handling/webhook-s2s-postback" %}
[webhook-s2s-postback](https://docs.mychips.io/reward-handling/webhook-s2s-postback)
{% endcontent-ref %}
