> For the complete documentation index, see [llms.txt](https://docs.relevant-digital.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.relevant-digital.com/hb-analytics/setup/real-time-analytics-for-gam-in-hb-analytics-how-it-works-and-how-to-set-it-up..md).

# Real-time analytics for GAM in HB Analytics - How it works and how to set it up.

## In this Section we will guide you on how to set up real-time analytics for GAM for HB Analytics

### How it works

The first thing to know is that the real-time analytics data collected from GAM is strictly not real-time, but a few hours old, and the real-time data seen is a projection forward based on API data collected from GAM. This projection is quite accurate for most major Metrics, like Revenue, Fillrate, Revenue Type; but some more granular metrics, like Browser might have a slightly bigger increase of unorthodox data listed; due to the projection calculation.

Please notice that we only collect GAM revenue data for Ad slots that are added in the Prebid configuration.

### How to set it up

As the data is based on API and logged data in the auction; rather than 100% logged data in the auction, you will need to add credentials to the API, in order for us to be able to collect the data for you.

You can add your credentials in the "Adserver" integration page:

![](/files/59fdde1e2239c3f4edb91bb3cf5e1989abd1c066)

And then add the credentials data like you would for an Adserver:

[Setting Up a New Ad Server Connection](/ad-revenue-insights/data-connections/setting-up-a-new-ad-server-connection.md)

And finally Activate/Enable the collection of Real-Time data:

![](/files/46bd75314c6a5f09bc12d01db9cdcfb61c020811)

With this enabled, you should start seeing your GAM account showing as a Bidder in HB Analytics (please notice that it might take a few minutes).

If you would like to switch between seeing the data, or switch between not seeing approximated data, only real GAM data, this is also possible through switches in the reports:

![](/files/951bb569bbc23d2482665325d4a80e1f020af363)

Activating the Adserver approximations, will approximate forward towards real-time, and you will also see when the latest real data was collected. Turning it off will only show real collected GAM data. If you select Headerbidding only, you will just see Bidders that are present directly in the Headerbidding Auction (removing GAM; as a bidder).

### Related articles

* [Date-based event notifications in HB Analytics](/hb-analytics/alarms-and-notifications/date-based-event-notifications-in-hb-analytics.md)
* [How to Export Reporting data through HB Analytics Pull API](broken://spaces/thyujPhgXh1WtJZy8bjr/pages/4d5985be40553c088172936988a90adcba3a7419)
* [What is HB Analytics](/getting-started/what-is-hb-analytics.md)
* [Adding Custom Dimensions](/hb-analytics/setup/adding-custom-dimensions.md)
* [Overview of setting up HB Analytics](/hb-analytics/setup/overview-of-setting-up-hb-analytics.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.relevant-digital.com/hb-analytics/setup/real-time-analytics-for-gam-in-hb-analytics-how-it-works-and-how-to-set-it-up..md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
