Skip to main content

How to Add Our Script to Your WordPress Header

Learn how to add the script to your WordPress site in just a few simple steps

Carlos Teixeira avatar
Written by Carlos Teixeira
Updated over a month ago

📌 1. Install the “Insert Headers and Footers” Plugin

To insert code into your website header, you’ll first need to install a plugin.

  1. Log in to your WordPress Dashboard.

  2. In the left menu, navigate to Plugins → Add New.

  3. Search for Insert Headers and Footers by WPBeginner.

  4. Click Install Now, then select Activate.

This plugin allows you to safely add scripts without modifying any theme files.


🔧 2. Add the Script We Provide

Once the plugin is active:

  1. In the left menu, go to Settings → Insert Headers and Footers.

  2. Locate the Scripts in Header section.

  3. Paste the script we provided you into this box.

  4. Click Save to apply the changes.


🎉 3. Setup Complete!

Your script is now installed!

If you need help or would like us to verify the installation, feel free to contact our support team at [email protected] 🙂


🛠️ Support

If, after adding the script, you notice that the data-id or data-domain attributes disappear inside WordPress, you can use this alternative method to ensure the attributes are preserved:

<script>

(function () {

var s = document.createElement('script');

s.src = 'https://analitas.com/script.js';

s.defer = true;

s.setAttribute('data-id', 'xxxx');

s.setAttribute('data-domain', 'site.com');

document.head.appendChild(s);

})();

</script>

This method adds the script dynamically and prevents WordPress or security plugins from removing required attributes.

If the issue continues, send us a message at [email protected] and we’ll assist you as soon as possible.

Did this answer your question?