---
title: Configuration Guide
description: Guidance on configuration for the Opensend SDK.
---

[Skip to content](https://help.opensend.com/opensend-sdk/configuration-guide#main-content)

[Contact Support](https://help.opensend.com/kb-tickets/new?hsLang=en)

[![Logo Black.png\]](https://help.opensend.com/hs-fs/hubfs/Logo%20Black.png?height=33&name=Logo%20Black.png)](https://opensend.com/)

Open main navigation

Close main navigation

- [Contact Support](https://help.opensend.com/kb-tickets/new)
- [Return to opensend.com](https://opensend.com/)

[Return to opensend.com](https://opensend.com/)

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Success Center](https://help.opensend.com/?hsLang=en)
2. [Getting started](https://help.opensend.com/getting-started?hsLang=en)
3. [Opensend SDK](https://help.opensend.com/getting-started?hsLang=en#opensend-sdk)

# Configuration Guide

## Learn how to configure the OIR SDK for your website.

### Required Configuration

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#configuration-guide>

The following options are required:

| Option | Type | Description |
| --- | --- | --- |
| `oirid` | string | Your unique publisher ID (provided by your account manager) |
| `oirtyp` | string | Pixel type identifier |

#### Script Attributes Configuration

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#script-attributes-configuration>

Set configuration via script attributes during installation:

```
<script type="text/javascript">  !(function (s) {    var o = s.createElement('script'),      u = s.getElementsByTagName('script')[0];    o.src = 'https://cdn.aggle.net/oir/oir.min.js';    o.async = !0;    o.setAttribute('oirtyp', 'YOUR_INTEGRATION_TYPE');    o.setAttribute('oirid', 'YOUR_INTEGRATION_ID');    u.parentNode.insertBefore(o, u);  })(document);</script>
```

 

#### Programmatic Configuration

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#programmatic-configuration>

Configure the SDK after it loads using the `cfg()` method:

```
window._oirtrk = window._oirtrk || [];window._oirtrk.cfg({  oirid: 'YOUR_INTEGRATION_ID',  oirtyp: 'YOUR_INTEGRATION_TYPE',});
```

 

#### Configuration Options

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#configuration-options>

| Option | Type | Req | Default | Description |
| --- | --- | --- | --- | --- |
| `oirid` | string | ✅ | - | Your publisher ID |
| `oirtyp` | string | ✅ | - | Pixel type identifier |
| `brandedLinkDomain` | string | ❌ | - | First-party tracking domain |
| `autoPageView` | boolean | ❌ | true | Automatically track page views |
| `controlledMode` | boolean | ❌ | false | Read-only mode, manual tracking only |

### Example with All Options

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#example-with-all-options>

```
window._oirtrk.cfg({  oirid: 'YOUR_INTEGRATION_ID',  oirtyp: 'YOUR_INTEGRATION_TYPE',  brandedLinkDomain: 'track.yourdomain.com',  autoPageView: true,  controlledMode: false,});
```

 

#### Controlled Mode (Read-Only)

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#controlled-mode-read-only>

When `controlledMode: true`, the SDK becomes **read-only** for identity and storage:

- No userId generation or cookie/localStorage writes
- No auto-tracking (CSC/ACK/ECHO/OST/auto pageview)
- Tracking occurs only through manual calls (`event`, `identify`, `set-identifier`)

```
window._oirtrk.cfg({  oirid: 'YOUR_INTEGRATION_ID',  oirtyp: 'YOUR_INTEGRATION_TYPE',  controlledMode: true,});
```

 

Use `set-identifier` to provide user identity explicitly. If no userId is available, events are sent without `X-Reference-Uid`.

#### Automatic Page View Tracking (autoPageView)

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#automatic-page-view-tracking-autopageview>

The `autoPageView` option controls whether the SDK automatically tracks page view events when pages load.

### Default Behavior

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#default-behavior>

By default, `autoPageView` is set to `true`, meaning the SDK automatically fires a `page_view` event on every page load without any additional implementation.

### Disabling Automatic Page Views

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#disabling-automatic-page-views>

Set `autoPageView` to `false` if you want to:

- Implement custom page view tracking logic
- Track page views only on specific pages
- Add custom data to page view events

```
window._oirtrk.cfg({  oirid: 'YOUR_INTEGRATION_ID',  oirtyp: 'YOUR_INTEGRATION_TYPE',  autoPageView: false, // Disable automatic page view tracking});
```

 

When disabled, you must manually track page views using the [Custom Events](https://help.opensend.com/opensend-sdk/custom-events-guide?hsLang=en) syntax.

> **Note:** For more details on page view tracking, see the [Page View Guide](https://help.opensend.com/opensend-sdk/page-viewed-event?hsLang=en).

---

### First-Party Tracking (brandedLinkDomain)

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#first-party-tracking-brandedlinkdomain>

The `brandedLinkDomain` option enables **first-party tracking** by using your own custom domain instead of the default tracking domain. This extends cookie lifetime and improves tracking accuracy across browsers with strict privacy restrictions.

### Why First-Party Tracking?

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#why-first-party-tracking>

Modern browsers apply restrictions to third-party cookies:

| Browser | Third-Party Cookies | First-Party Cookie Limit |
| --- | --- | --- |
| Safari | ❌ Blocked | 7-day cap (if IP mismatch) |
| Firefox | ❌ Blocked (Strict) | 7-day cap (known trackers) |
| Chrome | ⚠️ User Choice | 400-day maximum |
| Edge | ⚠️ User Choice | 400-day maximum |

First-party tracking bypasses these restrictions by serving tracking requests from your own domain.

### Benefits

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#benefits>

- **Extended cookie lifetime**: Up to 180+ days vs 7 days for third-party
- **Bypass ad blockers**: Tracking requests appear as first-party traffic
- **Improved accuracy**: Higher data collection rates
- **Privacy compliance**: First-party tracking is more privacy-friendly
- **Better attribution**: More accurate user journey tracking

### DNS Setup Options

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#dns-setup-options>

You can configure first-party tracking using either a **CNAME record** or an **A record**.

#### Option 1: CNAME Record

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#option-1-cname-record>

Point your tracking subdomain to the tracking service:

```
track.yourdomain.com.    CNAME    api.aggle.net.
```

 

Advantages:

- Simple setup
- Automatic IP updates if service changes
- Easy migration

Limitations:

- Cannot be used at apex/root domain
- Some DNS providers have restrictions

#### Option 2: A Record

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#option-2-a-record>

Point your tracking subdomain directly to the tracking IP:

```
track.yourdomain.com.    A    [PROVIDED_IP_ADDRESS]
```

 

Advantages:

- Works at apex/root domain
- Better Safari ITP compatibility (IP matching)
- More control over DNS

Limitations:

- Requires manual update if IP changes
- IP address provided by account manager

> **Note:** Contact your account manager to get the appropriate IP address for A record setup.

### SDK Configuration

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#sdk-configuration>

After DNS is configured, set the `brandedLinkDomain` option:

```
window._oirtrk.cfg({  oirid: 'YOUR_INTEGRATION_ID',  oirtyp: 'YOUR_INTEGRATION_TYPE',  brandedLinkDomain: 'track.yourdomain.com',});
```

 

### Verification

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#verification>

After setup, verify your configuration:

1. Open browser DevTools → **Network** tab
2. Trigger a tracking event
3. Confirm requests go to `track.yourdomain.com` (your domain)
4. Check **Application** → **Cookies** for first-party cookies

### Which Option to Choose?

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#which-option-to-choose>

| Scenario | Recommended |
| --- | --- |
| Standard setup | CNAME record |
| Safari ITP optimization | A record |
| Root domain tracking | A record |
| Simple maintenance | CNAME record |

> **Note:** Contact your account manager for setup instructions and to verify your domain configuration.
> 
> ---

### Next Steps

<https://github.com/Intelligence-Labs/tagoir-sdk/blob/develop/docs/user-guides/configuration.md#next-steps>

1. [**Quick Start Guide**](https://help.opensend.com/opensend-sdk/quickstart-guide?hsLang=en) - Track your first event
2. [**Installation Guide**](https://help.opensend.com/opensend-sdk/installation-guide?hsLang=en) - Install the SDK
3. [**Custom Events Guide**](https://help.opensend.com/opensend-sdk/custom-events-guide?hsLang=en) - Track custom business events

- [Getting started](https://help.opensend.com/getting-started?hsLang=en#main-content)

    - [Start Here!](https://help.opensend.com/getting-started?hsLang=en#start-here)
    - [Installation and Setup](https://help.opensend.com/getting-started?hsLang=en#installation-and-setup)
    - [CNAME Setup](https://help.opensend.com/getting-started?hsLang=en#cname-setup)
    - [Opensend SDK](https://help.opensend.com/getting-started?hsLang=en#opensend-sdk)
- [Best Practices to Maximize Revenues](https://help.opensend.com/best-practices-to-maximize-revenues?hsLang=en#main-content)

    - [Direct-to-consumer](https://help.opensend.com/best-practices-to-maximize-revenues?hsLang=en#direct-to-consumer)
    - [Business-to-business](https://help.opensend.com/best-practices-to-maximize-revenues?hsLang=en#business-to-business)
    - [Deliverability](https://help.opensend.com/best-practices-to-maximize-revenues?hsLang=en#deliverability)
- [Dashboards & Reports](https://help.opensend.com/dashboards-reports?hsLang=en#main-content)

    - [Klaviyo Reports](https://help.opensend.com/dashboards-reports?hsLang=en#klaviyo-reports)
    - [Iterable Reports](https://help.opensend.com/dashboards-reports?hsLang=en#iterable-reports)
- [Reconnect](https://help.opensend.com/reconnect?hsLang=en#main-content)

    - [Klaviyo](https://help.opensend.com/reconnect?hsLang=en#klaviyo)
    - [Iterable](https://help.opensend.com/reconnect?hsLang=en#iterable)
    - [Bloomreach](https://help.opensend.com/reconnect?hsLang=en#bloomreach)
    - [Attentive](https://help.opensend.com/reconnect?hsLang=en#attentive)
    - [Salesforce Marketing Cloud](https://help.opensend.com/reconnect?hsLang=en#salesforce-marketing-cloud)
- [Personas](https://help.opensend.com/personas?hsLang=en)
- [Revive](https://help.opensend.com/revive?hsLang=en)
- [Integrations](https://help.opensend.com/integrations?hsLang=en#main-content)

    - [API Keys and Account IDs](https://help.opensend.com/integrations?hsLang=en#api-keys-and-account-ids)
    - [Bloomreach](https://help.opensend.com/integrations?hsLang=en#bloomreach)
    - [Braze](https://help.opensend.com/integrations?hsLang=en#braze)
    - [Facebook](https://help.opensend.com/integrations?hsLang=en#facebook)
    - [Google](https://help.opensend.com/integrations?hsLang=en#google)
    - [Iterable](https://help.opensend.com/integrations?hsLang=en#iterable)
    - [Klaviyo](https://help.opensend.com/integrations?hsLang=en#klaviyo)
    - [Listrak](https://help.opensend.com/integrations?hsLang=en#listrak)
    - [Sendlane](https://help.opensend.com/integrations?hsLang=en#sendlane)
    - [Suppression List](https://help.opensend.com/integrations?hsLang=en#suppression-list)
    - [Webhook](https://help.opensend.com/integrations?hsLang=en#webhook)
    - [Yotpo](https://help.opensend.com/integrations?hsLang=en#yotpo)
    - [Zapier](https://help.opensend.com/integrations?hsLang=en#zapier)
    - [Attentive](https://help.opensend.com/integrations?hsLang=en#attentive)
    - [Salesforce Marketing Cloud](https://help.opensend.com/integrations?hsLang=en#salesforce-marketing-cloud)
- [FAQs](https://help.opensend.com/faqs?hsLang=en)
- [General](https://help.opensend.com/general?hsLang=en)

[![Chill listening crop-3](https://help.opensend.com/hs-fs/hubfs/OpenSend_Logo%20icon%202.png?width=42&height=42&name=OpenSend_Logo%20icon%202.png "Chill listening crop-3")](https://www.opensend.com/)

Opensend Help Center

Copyright © 2026, Opensend Inc