> For the complete documentation index, see [llms.txt](https://mobkoi.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mobkoi.gitbook.io/docs/landing-tag/google-tag-manager-setup.md).

# Google Tag Manager Setup

## Mobkoi Landing Tag

### What is it?

The Mobkoi Landing Tag is a lightweight script you add to your website via Google Tag Manager. It measures what happens after a user clicks a Mobkoi ad and lands on your site, giving Mobkoi a first-party view of landing quality and user engagement that does not depend on GA4 exports.

Once installed, the tag runs automatically on every page where GTM is active. No changes to your website code are required beyond the GTM setup described below.

***

## Privacy and consent notice

The Mobkoi Landing Tag may be used for campaign measurement, attribution, landing-page engagement reporting, and related advertising performance analysis.

Depending on the implementation, the tag may process online identifiers, campaign identifiers, URL/referrer information, timestamps, device/browser metadata, IP-derived technical data, consent signals, and user interaction events such as page views, scroll depth, clicks, or engagement time.

This may constitute personal data under GDPR/UK GDPR and may also involve access to or storage of information on the user's device. The client is responsible for determining the appropriate legal basis, configuring its Consent Management Platform, updating its privacy and cookie notices, and ensuring the tag only fires when the required consent has been granted.

Mobkoi provides technical implementation guidance only. This guide is not legal advice and should be reviewed by the client's privacy, legal, or DPO team before production deployment.

***

### What does it measure?

| Metric                 | Definition                                                                                                                 |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| Landings               | Visits to your site that originated from a Mobkoi ad click                                                                 |
| Sessions               | Distinct user sessions from Mobkoi traffic                                                                                 |
| Engaged sessions       | Sessions where the user was actively on the page for 10 or more seconds, viewed 2 or more pages, or completed a key action |
| Engagement rate        | Proportion of sessions that were engaged                                                                                   |
| Bounce rate            | Proportion of sessions that were not engaged                                                                               |
| Active engagement time | Time the user spent with your page visible and in focus                                                                    |

These definitions mirror GA4's engagement model, so the numbers are directly comparable to what your analytics team already works with.

***

### How it works

When a user clicks a Mobkoi ad, they are sent to your landing page with two parameters appended to the URL:

```
https://your-site.com/landing?mbiid=IMPRESSION_ID
```

The tag reads these parameters, creates a session, and begins tracking the user's behaviour on your site. The session continues as the user navigates to other pages.

All data is sent to Mobkoi's servers. Nothing is shared with third parties. No personal data is collected.

***

### Prerequisites

You will need:

* A Google Tag Manager container installed on your website
* To activate the Landing Tag, specific parameters must be passed to the Landing URL. Ensure that the [DoubleClick Redirect URL](/docs/landing-tag/google-tag-manager-setup/doubleclick-redirect.md) is properly configured for every Mobkoi Campaign
* The Landing Tag snippet provided by your Mobkoi account team

That is all that is strictly required to get the tag working.

#### If your site uses a CMP

If your website already has a Consent Management Platform (such as OneTrust, Cookiebot, or TrustArc) that is wired to GTM's Consent API, you can configure the Landing Tag to respect it. This is covered in Step 3 below.

If your CMP is already correctly configured, no changes to it are needed, you only need to set the consent check on the tag itself in GTM.

If you are not sure whether your CMP is wired to GTM, check with your analytics or development team. The signal GTM needs is `analytics_storage`.

If your site does not have a CMP - if you operate primarily where GDPR does not apply, you can skip Step 3 entirely.

***

### Setup

#### Step 1: Enable consent overview in GTM

This is a one-time step per GTM container. It unlocks the consent settings panel on individual tags.

1. In GTM, click the **Admin** tab in the top navigation
2. Under **Container**, click **Container Settings**
3. Under **Additional Settings**, tick **Enable consent overview**
4. Click **Save**

<figure><img src="/files/NVBFjROxZ1jxJzCENgma" alt=""><figcaption></figcaption></figure>

***

#### Step 2: Create the tag

1. In GTM, go to **Tags** and click **New**
2. Click **Tag Configuration** and select **Custom HTML**
3. Paste the full contents of the Landing Tag snippet into the HTML field

```javascript
<script>
(function () {
  function injectTag() {
    var s = document.createElement('script');
    s.async = true;
    s.src = "https://one-tag.mobkoi.com/tag.min.js";
    document.head.appendChild(s);
  }

  if (document.readyState !== 'loading') {
    injectTag();
  } else {
    document.addEventListener('DOMContentLoaded', injectTag);
  }
})();
</script>
```

4. Name the tag **Mobkoi Landing Tag**

<figure><img src="/files/VB0rnBw1iTPR9VbmXUVK" alt=""><figcaption></figcaption></figure>

***

#### Step 3: Configure consent settings

Inside the tag, scroll down to the **Consent Settings** panel.

1. Set the consent setting to **Require additional consent for tag to fire**
2. Add consent type: `analytics_storage`

This ensures the tag only fires after the user has granted analytics consent. The tag will not collect any data before consent is given.

<figure><img src="/files/Juwm3iJiwYgHNmxXa2ts" alt=""><figcaption></figcaption></figure>

***

#### Step 4: Add triggers

**Standard websites**

Add a single trigger:

| Setting      | Value                      |
| ------------ | -------------------------- |
| Trigger type | Initialization - All Pages |

<figure><img src="/files/2LktpmEwwIhWHJTqvftZ" alt=""><figcaption></figcaption></figure>

***

#### Step 5: Publish

Click **Save**, then **Submit** to publish your container. The tag will begin firing on your next page load once the container is published.

***

### Verifying the installation

#### Using GTM Preview mode

1. Click **Preview** in GTM and enter your website URL
2. Navigate to a page that receives Mobkoi traffic, or append `?mbiid=test` to any URL on your site to simulate a Mobkoi click
3. In the GTM debug panel, confirm **Mobkoi Landing Tag** appears under **Tags Fired**
4. Open your browser's **Network** tab and filter by `events.mobkoi.com` - you should see POST requests for `session-start` and `page-view`

#### Confirming consent behaviour

1. In GTM Preview, load the page without granting consent in your CMP
2. Confirm no requests appear to `events.mobkoi.com`
3. Grant consent via your CMP banner
4. Confirm the tag fires and requests appear in the Network tab

***

### Privacy and data collection

The Mobkoi Landing Tag collects the following information:

* Page URL, path, and title
* Referring website (domain only, not full URL)
* Active time spent on the page
* Scroll depth
* Mobkoi click and impression identifiers from the URL

The tag does not collect:

* Names, email addresses, phone numbers, or any other personal identifiers
* Form field values or free-text input
* Precise location data
* Any data before consent is granted

For questions about data processing, contact your Mobkoi account team or refer to the Mobkoi Data Processing Agreement.
