# Site Hooks

**Site Hooks** let you insert custom code or content at specific locations on your website without modifying theme files. The **Top Hook** places content at the very top of your site, above all elements.

{% hint style="success" %}
**Steps to Configure Site Hooks:**

1. **Login** to your WordPress admin dashboard.
2. Navigate to **Appearance > Customize**.
3. Select **Site Hooks** from the Customizer panel.
4. Choose the desired hook (e.g., *Top Hook*) and add your custom content or code.
5. Click **Publish** to apply your changes.
   {% endhint %}

<figure><img src="https://content.gitbook.com/content/vO76m9boh6U15JnTSDPM/blobs/e8znj6sHCz7N16k1kJSc/site-hooks.jpg" alt=""><figcaption></figcaption></figure>

#### **Site Hooks Settings Overview**

**Site Hooks** allow you to insert custom code or content at key structural points of your website without editing theme files. Below are the available hook options and their functions:

***

**Top Hook**

* **Enable Top Hook**: Toggle to show or hide this hook.
* **Top Hook**: Add custom code that runs **immediately after the opening `<body>` tag**.

***

**Content Before Hook**

* **Enable Content Before Hook**: Toggle to enable or disable this hook.
* **Content Before Hook**: Insert code that executes **before the opening `<#primary>` tag** (typically the main content wrapper).

***

**Content After Hook**

* **Enable Content After Hook**: Toggle to show or hide this hook.
* **Content After Hook**: Add code that executes **right after the closing `</#main>` tag** (end of the main content area).

***

**Bottom Hook**

* **Enable Bottom Hook**: Toggle to enable or disable the bottom hook.
* **Bottom Hook**: Insert custom code that executes **just before the closing `</body>` tag**.

***

**Tracking Code**

* **Enable Tracking Code**: Turn on or off the inclusion of tracking scripts.
* **Google Analytics Tracking Code**: Paste your **Google Analytics Tracking ID** (e.g., `UA-XXXXX-X`).\
  You may also allow users to **opt out of tracking** by using the shortcode:\
  `dt_sc_privacy_google_tracking` anywhere on your site.
