WordPress
You can integrate Rybbit into your WordPress site to track user behavior and gather analytics. There are several ways to do this depending on whether you’re using a hosted WordPress.com site or a self-hosted WordPress.org installation.
Option 1: Use a Plugin
If you don’t want to modify your theme files directly, you can use a plugin to inject the Rybbit snippet. This is the only option for WordPress.com users.
- Install the Insert Headers and Footers  plugin.
- Go to the plugin settings and paste your snippet into the
<header>
section. - Save your changes.
Option 2: Add to functions.php
If you’re using a self-hosted WordPress theme, you can add the script via functions.php
.
- In your WordPress dashboard, go to Tools > Theme File Editor.
- Open the
functions.php
file. - Add the following code:
function add_rybbit() {
?>
<script
src="https://app.rybbit.io/api/script.js"
data-site-id="YOUR_SITE_ID"
async
></script>
<?php
}
add_action("wp_head", "add_rybbit");
- Save the file.
Option 3: Modify header.php
You can also manually add the script to your theme’s HTML header if using an older version of WordPress.
- Go to Appearance > Theme Editor.
- Open the
header.php
file. - Paste your snippet right before the closing
</head>
tag. - Save the file.
Last updated on