GA4/GTM/OneTrust Blocker

## Goal

**Context**

Google Tag Manager (GTM) by itself does NOT store any cookies on the browser. When tags on GTM are configured to send data to different platforms, such as Google Analytics, Linkedin, Google Ads, etc. - that's when cookies for the associated platform are stored on the browser. Each tag already contains a OneTrust condition, and will only fire if the user consents to the specific cookie category, such as functional, performance/analytics, or targeting.

On a related note, we've added the gtag.js code update for GA4's consent feature. This update will send a signal to the browser's dataLayer regarding the user's default consent status based on their country. For example, by default (no user interaction with the consent banner at this point), a user from a European country will NOT be tracked if they take no action (clicking "X" on the OneTrust banner).

The gtag.js code update enables the machine learning capabilities for GA4 to fill in the gap where users deny tracking (by default or by choice).

[More Details](https://docs.google.com/document/d/1i66ayUZTVuff41w6IKPVeSJ_pwL1nIX4pQZbF9Gpcro/edit#)

#### Jobs To Be Done
* **Situation**: *When a user visits the site w*
* **Motivation**: *We want to load GTM at all times and prevent OneTrust from blocking *
* **Outcome**: *So we can ...*

#### Please provide more information related to this request

In attempt to prevent OT from blocking GTM we tried using `data-ot-ignore` and `optanon-category-C0001` from OneTrust's Docs. Both of these slowed down traffic to GA. A ticket was submitted to OneTrust support where they suggested that we focus on our script ordering since OneTRust loads after GTM in our codebase and that may potentially be preventing their auto blocking classes from working. In attempt to do we've tried:

- **Placing OneTrust above GTM in the head file**: no effect [[MR]](https://gitlab.com/gitlab-com/www-gitlab-com/-/merge_requests/108574)
- **Using the addEventListener**: Using the addEventListener method to attach a load event listener to the OneTrust script, and then include the Google Tag Manager script inside the event listener function
this prevented GTM from loading at all [[MR]](https://gitlab.com/gitlab-com/marketing/digital-experience/buyer-experience/-/merge_requests/1499)
- **Changing GTM’s Triggers to wait for OneTrust** [[MR]](https://gitlab.com/gitlab-com/www-gitlab-com/-/merge_requests/118462)
This was suggested by [StackOverflow](https://stackoverflow.com/questions/75073704/onetrust-script-executing-after-google-tag-manager). By adding another trigger that onetrust fires when it's loaded and by adding an exception to existing pageview triggers to not fire if onetrust's consent cookies are missing or denied [[MR]](https://gitlab.com/gitlab-com/www-gitlab-com/-/merge_requests/118462)
- **Increasing time interval on GTM attribute `wait_for_update`**:  no effect [[MR]](https://gitlab.com/gitlab-com/www-gitlab-com/-/merge_requests/118797)
- **Loading OneTrust from GTM:** broke the functionality in the cookie banner and prevented user preferences from persisting [(shown here)](https://gitlab.com/gitlab-com/www-gitlab-com/uploads/e582c4be996eae761a87d0ebb8fa65d7/video2798811226.mp4)
- **Removing GTM from the source of all cookies containing "gtm" individually in the OneTrust Dashboard**: _waiting for response from OT support_

**Does anyone in leadership have eyes on this project?**
- [x]  Yes `@laurenbarker`
- [ ]  No

## Page(s)
Which page(s) are involved in this request?

All pages, but let's start with about.gitlab.com subdomain for this issue.

## DCI
[DRI, Consulted, Informed](https://about.gitlab.com/handbook/people-group/directly-responsible-individuals/#dri-consulted-informed-dci)

- [ ] DRI: @miraclebanks
- [ ] Consulted: @dennischarukulvanich
- [ ] Informed: @justin.vetter @lduggan @laurenbarker @mpreuss22 @christinelee @degan @jahye1 @dmicovic

## Requirements
What are the requirements for this request? Checklist below is an example of common requirements, please check all that apply and adjust as necessary:

- [ ] Copy writing
- [ ] Illustration
- [ ] Custom Graphics
- [ ] Research
- [x] Data / Analytics
- [ ] UX Design
- [x] Engineering

Story points: 8.0