How to install a google tag

i need to add a google tag for a google ad conversion, i have the html and understand it needs to go after the ’ header ’ on the code, but am i being stupid, i cannot find ‘header’ on any part of my coding?

for instance the tag is being linked to the get in touch page and this is the coding for that page ( where should i put the code i have for the tag? )

[[$Top]]

<main class="base" data-barba="container" data-barba-namespace="contact">
    <input type="hidden" value="[[*lat]]" id="lat">
    <input type="hidden" value="[[*lng]]" id="lng">
        
    <input type="hidden" value="[[*lat2]]" id="lat2">
    <input type="hidden" value="[[*lng2]]" id="lng2">
    
    <section class="contact-grid">
        <div class="contact-grid-content padded-section">
            <h1 class="contact-grid-content-title" data-aos="subtle-fade-up" data-aos-delay="300">[[*pagetitle]]<span class="color-blue">.</span></h1>
            [[*content]]
            
            <a href="https://www.google.com/maps/search/?api=1&query=[[*contact-address:urlencode]]" target="_blank" rel="noopener" class="contact-grid-icon-row" data-aos="subtle-fade-up" data-aos-delay="300">
                <i class="fa-solid fa-location-pin"></i>
                <span>[[*contact-address]]</span>
            </a>
            
            <a href="https://www.google.com/maps/search/?api=1&query=[[*contact-address-2:urlencode]]" target="_blank" rel="noopener" class="contact-grid-icon-row" data-aos="subtle-fade-up" data-aos-delay="300">
                <i class="fa-solid fa-location-pin"></i>
                <span>[[*contact-address-2]]</span>
            </a>
            
            <a href="mailto:[[*contact-emal]]" class="contact-grid-icon-row" data-aos="subtle-fade-up" data-aos-delay="300">
                <i class="fa-solid fa-envelope"></i>
                <span>[[*contact-emal]]</span>
            </a>
            
            <a href="tel:[[*contact-tel]]" class="contact-grid-icon-row" data-aos="subtle-fade-up" data-aos-delay="300">
                <i class="fa-solid fa-phone-rotary"></i>
                <span>[[*contact-tel]]</span>
            </a>
            
            <a href="https://wa.me/+447852791502" class="contact-grid-icon-row" data-aos="subtle-fade-up" data-aos-delay="300">
                <i class="fa-brands fa-whatsapp"></i>
                <span>WhatsApp Business</span>
            </a>
            
            <div class="contact-grid-form-wrap">
                [[!getQuery:is=`true`:then=`
                    <p>Your enquiry has been submitted successfully. One of the team will be in touch shortly.</p>
                `:else=`
                    [[$contact-form]]
                `? &query=`success`]]
            </div>
        </div>
        
        <div class="contact-grid-map">
            <div id="map"></div>
        </div>
    </section>
    
    [[*image-banner-image:notempty=`
    <section class="padded-section image-section bg-image lazy" data-bg="url('[[*image-banner-image:pthumb=`w=1800`]]')">
        <div class="restrict-width-smaller">
            <div class="padded-section px-0 image-section-content">
                <h2 class="mt-0">[[*image-banner-title]]<span class="color-blue">.</span></h2>
                <a href="[[*image-banner-link]]" class="btn btn-blue btn-xl">[[*image-banner-btn-title]]</a>
            </div>
        </div>
    </section>
    `]]
<div id = 'crmWebToEntityForm' class = 'zcwf_lblLeft crmWebToEntityForm' style = 'background-color: white;color: black;max-width: 600px;'>
	<meta name = 'viewport' content = 'width=device-width, initial-scale=1.0'>
		<META HTTP-EQUIV = 'content-type' CONTENT = 'text/html;charset=UTF-8'>
			<form id = 'webform675337000003633003' action = 'https://crm.zoho.eu/crm/WebToLeadForm' name = WebToLeads675337000003633003 method = 'POST' onSubmit = 'javascript:document.charset="UTF-8"; return checkMandatory675337000003633003()' accept-charset = 'UTF-8'>
				<input type = 'text' style = 'display:none;' name = 'xnQsjsdp' value = '0d9e3edd90ca7588042be03676efd67f16451903b3c1b0519c43f869c440949f'>
				</input>
				<input type = 'hidden' name = 'zc_gad' id = 'zc_gad' value = ''>
				</input>
				<input type = 'text' style = 'display:none;' name = 'xmIwtLD' value = '53fe3900fcc948263b4a79ec000185a4a12644a14ff1b383ac4dfa1b43e7361a71b9fc533bc9534a0e0424fd8ce5f4eb'>
				</input>
				<input type = 'text' style = 'display:none;' name = 'actionType' value = 'TGVhZHM='>
				</input>
				<input type = 'text' style = 'display:none;' name = 'returnURL' value = 'null'>
				</input>
				<!-- Do not remove this code. -->
				<style>
					html,body{
						margin: 0px;
					}
					.formsubmit.zcwf_button{
						color: white !important;
						background: transparent linear-gradient(0deg, #0279FF 0%, #00A3F3 100%);
					}
					#crmWebToEntityForm.zcwf_lblLeft{
						width: 100%;
						padding: 25px;
						margin: 0 auto;
						box-sizing: border-box;
					}
					#crmWebToEntityForm.zcwf_lblLeft *{
						box-sizing: border-box;
					}
					#crmWebToEntityForm {text-align: left;
					}
					#crmWebToEntityForm *{
					direction: ltr;
					}
					.zcwf_lblLeft .zcwf_title{
					word-wrap: break-word;
					padding: 0px 6px 10px;
					font-weight: bold }
					.zcwf_lblLeft.cpT_primaryBtn:hover{
					background: linear-gradient(#02acff 0,#006be4 100%)no-repeat padding-box !important;
					box-shadow: 0 -2px 0 0  #0159b9 inset !important;
					border: 0 !important;
					color:  #fff !important;
					outline: 0 !important;
					}
					.zcwf_lblLeft .zcwf_col_fld input[type = text], input[type = password], .zcwf_lblLeft .zcwf_col_fld textarea{
					width: 60%;
					border: 1px solid  #c0c6cc !important;
					resize: vertical;
					border-radius: 2px;
					float: left;
					}
					.zcwf_lblLeft .zcwf_col_lab{
					width: 30%;
					word-break: break-word;
					padding: 0px 6px 0px;
					margin-right: 10px;
					margin-top: 5px;
					float: left;
					min-height: 1px;
					}
					.zcwf_lblLeft .zcwf_col_fld{
					float: left;
					width: 68%;
					padding: 0px 6px 0px;
					position: relative;
					margin-top: 5px;
					}
					.zcwf_lblLeft .zcwf_privacy {padding: 6px;
					}
					.zcwf_lblLeft .wfrm_fld_dpNn {display: none;
					}
					.dIB {display: inline-block;
					}
					.zcwf_lblLeft .zcwf_col_fld_slt{
					width: 60%;
					border: 1px solid  #ccc;
					background:  #fff;
					border-radius: 4px;
					font-size: 12px;
					float: left;
					resize: vertical;
					padding: 2px 5px;
					}
					.zcwf_lblLeft .zcwf_row:after, .zcwf_lblLeft .zcwf_col_fld:after{
					content: '';
					display: table;
					clear: both;
					}
					.zcwf_lblLeft .zcwf_col_help{
					float: left;
					margin-left: 7px;
					font-size: 12px;
					max-width: 35%;
					word-break: break-word;
					}
					.zcwf_lblLeft .zcwf_help_icon{
					cursor: pointer;
					width: 16px;
					height: 16px;
					display: inline-block;
					background:  #fff;
					border: 1px solid  #c0c6cc;
					color:  #c1c1c1;
					text-align: center;
					font-size: 11px;
					line-height: 16px;
					font-weight: bold;
					border-radius: 50%;
					}
					.zcwf_lblLeft .zcwf_row {margin: 15px 0px;
					}
					.zcwf_lblLeft .formsubmit{
					margin-right: 5px;
					cursor: pointer;
					color:  #313949;
					font-size: 12px;
					}
					.zcwf_lblLeft .zcwf_privacy_txt{
					width: 90%;
					color: rgb(0, 0, 0);
					font-size: 12px;
					font-family: Arial;
					display: inline-block;
					vertical-align: top;
					color:  #313949;
					padding-top: 2px;
					margin-left: 6px;
					}
					.zcwf_lblLeft .zcwf_button{
					font-size: 12px;
					color:  #313949;
					border: 1px solid  #c0c6cc;
					padding: 3px 9px;
					border-radius: 4px;
					cursor: pointer;
					max-width: 120px;
					overflow: hidden;
					text-overflow: ellipsis;
					white-space: nowrap;
					}
					.zcwf_lblLeft .zcwf_tooltip_over{
					position: relative;
					}
					.zcwf_lblLeft .zcwf_tooltip_ctn{
					position: absolute;
					background:  #dedede;
					padding: 3px 6px;
					top: 3px;
					border-radius: 4px;
					word-break: break-word;
					min-width: 100px;
					max-width: 150px;
					color:  #313949;
					z-index: 100;
					}
					.zcwf_lblLeft .zcwf_ckbox{
					float: left;
					}
					.zcwf_lblLeft .zcwf_file{
					width: 55%;
					box-sizing: border-box;
					float: left;
					}
					.cBoth:after{
					content: '';
					display: block;
					clear: both;
					}
					@media all and  (max-width: 600px){
					.zcwf_lblLeft .zcwf_col_lab, .zcwf_lblLeft .zcwf_col_fld{
					width: auto;
					float: none !important;
					}
					.zcwf_lblLeft .zcwf_col_help {width: 40%;
					}
					}
				</style>
				<div class = 'zcwf_row'>
					<div class = 'zcwf_col_lab' style = 'font-size:12px; font-family: Arial;'>
						<label for = 'First_Name'>
							Name
							<span style = 'color:red;'>
								*
							</span>
						</label>
					</div>
					<div class = 'zcwf_col_fld'>
						<input type = 'text' id = 'First_Name' aria-required = 'true' aria-label = 'First Name' name = 'First Name' aria-valuemax = '40' maxlength = '40'>
						</input>
						<div class = 'zcwf_col_help'>
						</div>
					</div>
				</div>
				<div class = 'zcwf_row'>
					<div class = 'zcwf_col_lab' style = 'font-size:12px; font-family: Arial;'>
						<label for = 'Last_Name'>
							Last Name
							<span style = 'color:red;'>
								*
							</span>
						</label>
					</div>
					<div class = 'zcwf_col_fld'>
						<input type = 'text' id = 'Last_Name' aria-required = 'true' aria-label = 'Last Name' name = 'Last Name' aria-valuemax = '80' maxlength = '80'>
						</input>
						<div class = 'zcwf_col_help'>
						</div>
					</div>
				</div>
				<div class = 'zcwf_row'>
					<div class = 'zcwf_col_lab' style = 'font-size:12px; font-family: Arial;'>
						<label for = 'Company'>
							Company
							<span style = 'color:red;'>
								*
							</span>
						</label>
					</div>
					<div class = 'zcwf_col_fld'>
						<input type = 'text' id = 'Company' aria-required = 'true' aria-label = 'Company' name = 'Company' aria-valuemax = '200' maxlength = '200'>
						</input>
						<div class = 'zcwf_col_help'>
						</div>
					</div>
				</div>
				<div class = 'zcwf_row'>
					<div class = 'zcwf_col_lab' style = 'font-size:12px; font-family: Arial;'>
						<label for = 'Email'>
							Email
							<span style = 'color:red;'>
								*
							</span>
						</label>
					</div>
					<div class = 'zcwf_col_fld'>
						<input type = 'text' ftype = 'email' autocomplete = 'false' id = 'Email' aria-required = 'true' aria-label = 'Email' name = 'Email' aria-valuemax = '100' crmlabel = '' maxlength = '100'>
						</input>
						<div class = 'zcwf_col_help'>
						</div>
					</div>
				</div>
				<div class = 'zcwf_row'>
					<div class = 'zcwf_col_lab' style = 'font-size:12px; font-family: Arial;'>
						<label for = 'Mobile'>
							Mobile
						</label>
					</div>
					<div class = 'zcwf_col_fld'>
						<input type = 'text' id = 'Mobile' aria-required = 'false' aria-label = 'Mobile' name = 'Mobile' aria-valuemax = '30' maxlength = '30'>
						</input>
						<div class = 'zcwf_col_help'>
						</div>
					</div>
				</div>
				<div class = 'zcwf_row'>
					<div class = 'zcwf_col_lab' style = 'font-size:12px; font-family: Arial;'>
						<label for = 'Zip_Code'>
							Postal Code
						</label>
					</div>
					<div class = 'zcwf_col_fld'>
						<input type = 'text' id = 'Zip_Code' aria-required = 'false' aria-label = 'Zip Code' name = 'Zip Code' aria-valuemax = '30' maxlength = '30'>
						</input>
						<div class = 'zcwf_col_help'>
						</div>
					</div>
				</div>
				<div class = 'zcwf_row wfrm_fld_dpNn'>
					<div class = 'zcwf_col_lab' style = 'font-size:12px; font-family: Arial;'>
						<label for = 'Lead_Source'>
							Lead Source
						</label>
					</div>
					<div class = 'zcwf_col_fld'>
						<select class = 'zcwf_col_fld_slt' role = 'combobox' aria-expanded = 'false' aria-haspopup = 'listbox' id = 'Lead_Source' onChange = 'addAriaSelected675337000003633003()' aria-required = 'false' aria-label = 'Lead Source' name = 'Lead Source'>
							<option value = '-None-'>
								-None-
							</option>
							<option value = 'Advertisement'>
								Advertisement
							</option>
							<option value = 'Cold&#x20;Call'>
								Cold Call
							</option>
							<option value = 'Employee&#x20;Referral'>
								Employee Referral
							</option>
							<option value = 'External&#x20;Referral'>
								External Referral
							</option>
							<option value = 'Partner'>
								Partner
							</option>
							<option value = 'Online&#x20;Store'>
								Online Store
							</option>
							<option value = 'Public&#x20;Relations'>
								Public Relations
							</option>
							<option value = 'Trade&#x20;Show'>
								Trade Show
							</option>
							<option value = 'Sales&#x20;Email&#x20;Alias'>
								Sales Email Alias
							</option>
							<option value = 'Seminar&#x20;Partner'>
								Seminar Partner
							</option>
							<option value = 'Facebook'>
								Facebook
							</option>
							<option value = 'Internal&#x20;Seminar'>
								Internal Seminar
							</option>
							<option value = 'Twitter'>
								Twitter
							</option>
							<option value = 'Web&#x20;Download'>
								Web Download
							</option>
							<option selected value= 'Web&#x20;Research'>
								Web Research
							</option>
							<option value = 'Chat'>
								Chat
							</option>
							<option value = 'Google&#x2b;'>
								Google&#x2b;
							</option>
						</select>
						<div class = 'zcwf_col_help'>
						</div>
					</div>
				</div>
				<div class = 'zcwf_row'>
					<div class = 'zcwf_col_lab'>
					</div>
					<div class = 'zcwf_col_fld'>
						<input type = 'submit' id = 'formsubmit' role = 'button' class = 'formsubmit zcwf_button' value = 'Submit' aria-label = 'Submit' title = 'Submit'>
							<input type = 'reset' class = 'zcwf_button' role = 'button' name = 'reset' value = 'Reset' aria-label = 'Reset' title = 'Reset'>
							</div>
						</div>
						<script>
							function addAriaSelected675337000003633003 (){
								var optionElem = event.target;
								var previousSelectedOption = optionElem.querySelector ( '[aria-selected=true]' );
								if ( previousSelectedOption ){
									previousSelectedOption.removeAttribute ( 'aria-selected' );
								}
								optionElem.querySelectorAll ( 'option' )[ optionElem.selectedIndex ].ariaSelected = 'true';
							}
							function validateEmail675337000003633003 (){
								var form = document.forms[ 'WebToLeads675337000003633003' ];
								var emailFld = form.querySelectorAll ( '[ftype=email]' );
								var i;
								for ( i = 0; i < emailFld.length; i++ ){
									var emailVal = emailFld[ i ].value;
									if ((emailVal.replace( /^\s+|\s+$/g,'' )).length != 0 ){
										var atpos = emailVal.indexOf ( '@' );
										var dotpos = emailVal.lastIndexOf ( '.' );
										if ( atpos < 1 || dotpos < atpos + 2 || dotpos + 2 >= emailVal.length ){
											alert ( 'Please enter a valid email address. ' );
											emailFld[ i ].focus ();
											return false;
										}
									}
								}
								return true;
							}
							function checkMandatory675337000003633003 (){
								var mndFileds = new Array ( 'Company', 'First Name', 'Last Name', 'Email' );
								var fldLangVal = new Array ( 'Company', 'Name', 'Last\x20Name', 'Email' );
								for ( i = 0; i < mndFileds.length; i++ ){
									var fieldObj = document.forms[ 'WebToLeads675337000003633003' ][ mndFileds[ i ]];
									if ( fieldObj ){
										if (((fieldObj.value ).replace( /^\s+|\s+$/g,'' )).length == 0 ){
											if ( fieldObj.type == 'file' ){
												alert ( 'Please select a file to upload.' );
												fieldObj.focus ();
												return false;
											}
											alert ( fldLangVal[ i ] + ' cannot be empty' );
											fieldObj.focus ();
											return false;
										}
										else if ( fieldObj.nodeName == 'SELECT' ){
											if ( fieldObj.options[fieldObj.selectedIndex].value == '-None-' ){
												alert ( fldLangVal[ i ] + ' cannot be none' );
												fieldObj.focus ();
												return false;
											}
										}
										else if ( fieldObj.type == 'checkbox' ){
											if ( fieldObj.checked == false ){
												alert ( 'Please accept  ' + fldLangVal[ i ]);
												fieldObj.focus ();
												return false;
											}
										}
										try {
											if ( fieldObj.name == 'Last Name' ){
												name = fieldObj.value;
											}
										}
										catch ( e ){}
									}
								}
								if ( !validateEmail675337000003633003()){
									return false;
								}
								var urlparams = new URLSearchParams ( window.location.search );
								if ( urlparams.has( 'service' ) && ( urlparams.get( 'service' ) === 'smarturl' )){
									var webform = document.getElementById ( 'webform675337000003633003' );
									var service = urlparams.get ( 'service' );
									var smarturlfield = document.createElement ( 'input' );
									smarturlfield.setAttribute ( 'type', 'hidden' );
									smarturlfield.setAttribute ( 'value', service );
									smarturlfield.setAttribute ( 'name', 'service' );
									webform.appendChild ( smarturlfield );
								}
								document.querySelector ( '.crmWebToEntityForm .formsubmit' ).setAttribute ( 'disabled', true );
							}
							function tooltipShow675337000003633003 ( el ){
								var tooltip = el.nextElementSibling;
								var tooltipDisplay = tooltip.style.display;
								if ( tooltipDisplay == 'none' ){
									var allTooltip = document.getElementsByClassName ( 'zcwf_tooltip_over' );
									for ( i = 0; i < allTooltip.length; i++ ){
										allTooltip[ i ].style.display = 'none';
									}
									tooltip.style.display = 'block';
								}
								else {
									tooltip.style.display = 'none';
								}
							}
						</script>
						<!-- Do not remove this --- Analytics Tracking code starts -->
						<script id='wf_anal' src='https://crm.zohopublic.eu/crm/WebFormAnalyticsServeServlet?rid=cbe68259bc6cf0446fff3e0986cafc4bafb3064ec7a293ef4d455edc8a6d2202b399b3e07e9d04cbf95e3713db34f4a4gid8fabc20d2d18d1ace42ed5632ab4668eeb377463da2afc6153b6601e0069db18gidefc45cf01de52f14c0ecf8e00eb88fb33baed00e5b9b382e1f239737174e0111gid2ccfb7d7f18436b0f9be59d6c2a15916f9274e89f78982a1ef3a2ee72cec7726&tw=d1beea60ab1eadb285e5eb0978f3053caa0914c9f3defaca2d0a7fd903bf4692'></script>
						<!-- Do not remove this --- Analytics Tracking code ends. -->
					</form>
				</div>
</main>

[[$Bottom]]

Here is what Google says: " To install the tag, copy and paste it in the code of every page of your website, immediately after the <head> element ."

For MODX, the <head> element is almost certainly in the page’s Template.

Putting the tag in the appropriate Template(s) will save you from having to insert it in every page.

yeah i looked everything up - but none of the pages say head thats where im getting stuck and i dont want to mess anything up by randomly placing it

The <head> tag is probably in the chunk with the name “Top”.

The chunk gets included into the template with this line

[[$Top]]