# WordPress

1. Install the [**Insert Headers and Footers**](https://tr.wordpress.org/plugins/insert-headers-and-footers/) plugin.
2. Go to **Settings** > **Header and Footer Scripts**.
3. Paste the code snippet into **Scripts in the header** textbox.
4. Click **Save Settings.**

## **Alternative Method** <a href="#block-374bd958c03c45ff80954bfba8dbc10b" id="block-374bd958c03c45ff80954bfba8dbc10b"></a>

1. Navigate to **Appearance > Theme Editor**
2. Click the **Theme Header (header.php)** file on the right-hand side below the **Theme Files** section.
3. Paste the code snippet before the closing **\</head>** tag.
4. Click **Update File**


---

# Agent Instructions: 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:

```
GET https://docs.hockeystack.com/technical-details/tracking/implementation/wordpress.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
