# Wordpress

<figure><img src="/files/5KtBjCYTvhvV7UIJxvlg" alt="" width="128"><figcaption></figcaption></figure>

{% hint style="info" %}
SiteBehaviour Analytics is creating its own WordPress plugin to help install our Tracking Code on sites that use WordPress. You don't need to be on a paid plan with SiteBehaviour to use this plugin.

Installing the plugin on self-hosted versions of WordPress will be free.

As of now, you can use the WordPress plugin - WPCode to add code snippets in your WordPress websites
{% endhint %}

1. Go to your [SiteBehaviour Organisation's page](https://web.sitebehaviour.com/a/org) and click on the **Settings button** for your site.
2. Go to the Tracking code tab.
3. Click on **Copy** to copy the Tracking Code to your clipboard.
4. On your [WordPress dashboard](https://wordpress.com/), click on Plugins Menu.
5. Choose the WPCode plugin from the plugins list and click **Install Now**. [WPCode](https://wpcode.com/?utm_source=wprepo\&utm_medium=link\&utm_campaign=liteplugin\&referrer=wordpress.com) (formerly known as Insert Headers and Footers by WPBeginner) is the most popular code snippets plugin for WordPress used by over 2 million websites.
6. After installation, click **Activate**.
7. Go to **Code Snippets** > **Header & Footer**.
8. In the **Header** section, paste the copied script.
9. Click **Save Changes**..
10. After allowing a couple of minutes for the update, check [SiteBehaviour's Dashboard](https://web.sitebehaviour.com/a/dashboard) for statistics. We recommend visiting your website to ensure that your initial activity is accurately reflected on the [SiteBehaviour Dashboard](https://web.sitebehaviour.com/a/dashboard).

### <mark style="color:orange;">**Still having trouble installing the code?**</mark>

If your WordPress site uses caching plugins, you may need to clear your cache to ensure the script is added to your site.

Additionally, after installing the Tracking Code, it’s important to wait a few minutes. This usually occurs as soon as your site is loaded with the SiteBehaviour Tracking Code (you can visit your site yourself to expedite this process).


---

# 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.sitebehaviour.com/guides-and-integrations/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.
