# View Staging Environment

## Introduction

To view the Staging Environment, select the **Staging** option on the Environments screen.

## Procedure

Under the *Name* field, click *Staging*.

<figure><img src="https://2731380315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDMDmegqZUJFhJhF4JQG%2Fuploads%2FT2C2LcBkZlvJeGFoeE2n%2Fimage.png?alt=media&#x26;token=7096db2a-a20a-41d6-ae6e-694b85b5c695" alt=""><figcaption></figcaption></figure>

## Info <a href="#info" id="info"></a>

The **Info** section includes the following information.

* **Name**: Displays **Staging**, indicating the environment type.
* **Description**: Displays **Staging Environment**, which gives more details about the selected environment.

<figure><img src="https://2731380315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDMDmegqZUJFhJhF4JQG%2Fuploads%2FQwhIai0fuO3HxNexQ3Q8%2Fimage.png?alt=media&#x26;token=05269098-d33f-4b74-a994-edff477a4a87" alt=""><figcaption></figcaption></figure>

### SDK Settings <a href="#sdksettings" id="sdksettings"></a>

<figure><img src="https://2731380315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDMDmegqZUJFhJhF4JQG%2Fuploads%2FYmSeLcISsWwe15vlAwSq%2Fimage.png?alt=media&#x26;token=63a07b73-4f7a-4cf3-9e87-c19d8821fc12" alt=""><figcaption></figcaption></figure>

Click ***Edit***.

<figure><img src="https://2731380315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDMDmegqZUJFhJhF4JQG%2Fuploads%2FnCPpn0wRgHlhkbwXaGo1%2Fimage.png?alt=media&#x26;token=ccffb851-7053-437c-ba96-6662d5f4762e" alt=""><figcaption></figcaption></figure>

#### Event Type

Denotes the specific event that will be used to trigger the tag.

<figure><img src="https://2731380315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDMDmegqZUJFhJhF4JQG%2Fuploads%2FKy3VpXz6dy4RwxBPER7H%2Fimage.png?alt=media&#x26;token=0b5e4e65-d7c5-4be8-a312-ccdcfbd9186b" alt=""><figcaption></figcaption></figure>

#### Event Trigger

Specifies the condition that activates the tag. You can choose from the following options:

* **On Page Interactive** – Triggers the tag when the page becomes interactive (for example, when the DOM is fully parsed and ready for user interaction).
* **On Page Loaded** – Triggers the tag as soon as the page is loaded.
* **Custom Page Event** – Allows you to define a custom event that triggers the tag.

<figure><img src="https://2731380315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDMDmegqZUJFhJhF4JQG%2Fuploads%2F670RpEkir1JeC3lSnEFE%2Fimage.png?alt=media&#x26;token=7e155423-f4db-4fa0-8176-b5ada39d6fb2" alt=""><figcaption></figcaption></figure>

#### Secondary Trigger (JavaScript Variable)

Select this checkbox to enable a secondary trigger.&#x20;

Once enabled, two additional fields appear:

* **Variable Name** – Specify the JavaScript variable that acts as the secondary trigger.&#x20;
* **Wait Time** – Enter the in milliseconds that the system should wait before triggering the secondary action.

<figure><img src="https://2731380315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDMDmegqZUJFhJhF4JQG%2Fuploads%2FwreLPudvA8eKhdgjTAcL%2Fimage.png?alt=media&#x26;token=9dc78458-dc4c-4577-8bf5-40c335cabdcf" alt=""><figcaption></figcaption></figure>

#### Cookie Domain

Determines how the cookie domain is set. Two options are available:

* **Auto** – The cookie domain is automatically detected at runtime.
* **Manual** – Allows you to manually specify the cookie domain.

**Note:** The cookie domain is automatically detected at runtime, so you don’t need to configure it manually.

<figure><img src="https://2731380315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDMDmegqZUJFhJhF4JQG%2Fuploads%2FVR63R3xWKlBhg90ycfJZ%2Fimage.png?alt=media&#x26;token=7ac1a2b4-1570-44ac-9f5c-76f6c7f3c439" alt=""><figcaption></figcaption></figure>

#### **Enable Error Logging**

Provides options to capture and report SDK errors on the client side.

* **Report Client-side SDK Errors** – Select this checkbox to allow the Client SDK to report errors and exceptions to the Ingest Labs servers.
* **Enable Logging for Client-side SDK** – Select this checkbox to capture and log client-side SDK activities locally for troubleshooting.

<figure><img src="https://2731380315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDMDmegqZUJFhJhF4JQG%2Fuploads%2F7aLkBZtTpd71TnukQT8J%2Fimage.png?alt=media&#x26;token=242198e5-6c11-44ef-85e2-3f525ca6e173" alt=""><figcaption></figcaption></figure>

#### Trigger Delay

With Trigger Delay, you can set how long, in milliseconds, the system should wait after the page loads before firing the tag.

Note: Allows the page to render its content before the Tag Manager is fired, ensuring that all necessary elements are available.

<figure><img src="https://2731380315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDMDmegqZUJFhJhF4JQG%2Fuploads%2F9Ug76yOLVDzvaWacj7at%2Fimage.png?alt=media&#x26;token=ee9c130c-72b0-4f88-9251-b82f0c27916c" alt=""><figcaption></figcaption></figure>

#### Content Security Policy

This allows the client to add an additional CSP field so we can use the same csp field to add scripts to the website - Else, it will fail. Select this check box to enable or disable this option. If Enabled, the following option is available.

* Meta tag attribute name for Nonce: The Attribute name in meta tag where the Nonce value is configured in the website.

<figure><img src="https://2731380315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDMDmegqZUJFhJhF4JQG%2Fuploads%2FRzjIJqIMiU6dohUA2TAH%2Fimage.png?alt=media&#x26;token=e7b6f58f-c532-4b78-a939-e71b5df4ba95" alt=""><figcaption></figcaption></figure>

### SDK Setup <a href="#sdksetup" id="sdksetup"></a>

To set up Ingest Labs SDK, you must include the following script tag in index.html file of the website. Once the script is executed, the SDK is installed on the client website.

![sdksetup](https://ingest-lab.netlify.app/images/environmentsimages/sdksetup.png)

The following is the SDK URL that you must embed in the Staging environment of the client website. The first party domain is mp.ingestlabs.com and the Project ID in the sdk url is MPcl02kskp1eha030nh7hnn. In the IDL Setup, the idl.js file is Identity Link or First party identity script file. The following is the IDL setup url that you must embed in the Staging environment of the client website:

![viewstagingenvironment](https://ingest-lab.netlify.app/images/environmentsimages/stagingcode.png)

### Approved Domains and Collector URLs <a href="#approveddomainsandcollectorurls" id="approveddomainsandcollectorurls"></a>

The Approved Domains has the list of domains on which the SDK will run. The SDK will execute only these listed domains. This is to avoid spamming and to ensure that the SDK of one site is not used on another site.

The Script sdk url changes when the domain is verified based on the data collector configuration. This decides which collector url to pick based on what domain. Collector url is the url to which Server Side Tags and report calls are sent.

![datacollectordomain](https://ingest-lab.netlify.app/images/environmentsimages/datacollectordomain.png)

The Approved Domains & Collector URLs display the following information:

* **Domain** – Enter your website domain in this field.
* **Collector URL** – This displays the URL where the collected data is sent.

<figure><img src="https://2731380315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDMDmegqZUJFhJhF4JQG%2Fuploads%2FTTSj5SqTvsSm2yOXhS0H%2Fimage.png?alt=media&#x26;token=b0427d46-c726-4976-ac16-30853d34cfe7" alt=""><figcaption></figcaption></figure>

**Approved Data Collection Domains** – This section lists the domains that are authorized to collect data.

<figure><img src="https://2731380315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDMDmegqZUJFhJhF4JQG%2Fuploads%2FzKU0vEWQ6MQPa0gVTbvk%2Fimage.png?alt=media&#x26;token=600eea94-a914-4989-82e6-57c8460bcfb6" alt=""><figcaption></figcaption></figure>

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDMDmegqZUJFhJhF4JQG%2Fuploads%2FaPxWPO5WR1FfRZGvqvP7%2FView%20Staging%20Environment.mp4?alt=media&token=7ff3c0c7-6f23-4313-bcc0-650128fcfd48>" %}
