> 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/overview-of-setting-up-hb-analytics.md).

# Overview of setting up HB Analytics

## Integration of the HB Analytics

You’ll see a Programmatic tag link for each site in the Publisher account page when you choose to edit a publisher: "Programmatic tag"

![](/files/304d84cb97747a278b6b8d99d40e6126710b9996)

In the top of the tag page you’ll see the script you should put on the site:

![](/files/72ba5126aa8cac81fa83dddb05a1c9edc19a44a6)

{% hint style="warning" %}
You must place the tag before any other calls to Prebid.js, and that includes any other call to **pbjs.queue.push()**.
{% endhint %}

The loading of the actual HBA script (hosted by Relevant) can however be delayed any amount of time. In the tag this is controlled by the **LOAD\_TIMEOUT\_MS** variable at the top.

Delaying the load will naturally increase the % of traffic/revenue/events that will be missed. The HBA script is designed to be light on resources. But if you’re concerned about your page load time and accept that a certain % of traffic will be missing in the report you can e.g. set it to **3000** for a **3 second** delay.

A real world example that we’ve observed for a specific site was that a 10 second delay lost \~35% of the traffic/revenue in the reports. But this varies obviously for different sites depending on the average time users spend on each page.

*Delaying the load might be desirable during initial testing of HBA.*

That is it!

Please notice that it is important to use unique scripts per website. We recommend that you take a look at [**Adding Custom Dimensions**](/hb-analytics/setup/adding-custom-dimensions.md) in the help section if you need to build a higher granularity or log special parameters.

## Related articles

* [How to Export Reporting data through HB Analytics Pull API](broken://spaces/thyujPhgXh1WtJZy8bjr/pages/4d5985be40553c088172936988a90adcba3a7419)
* [Real-time analytics for GAM in HB Analytics - How it works and how to set it up.](/hb-analytics/setup/real-time-analytics-for-gam-in-hb-analytics-how-it-works-and-how-to-set-it-up..md)
* [What is HB Analytics](/getting-started/what-is-hb-analytics.md)
* [Adding Custom Dimensions](/hb-analytics/setup/adding-custom-dimensions.md)
* [Date-based event notifications in HB Analytics](/hb-analytics/alarms-and-notifications/date-based-event-notifications-in-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/overview-of-setting-up-hb-analytics.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.
