How to Manually Integrate a CMP Script on a WordPress Site

How to Manually Integrate a CMP Script on a WordPress Site

Summary

This guide provides step-by-step instructions on how to manually integrate The Moneytizer's Consent Management Platform (CMP) script on a WordPress website using the theme editor. This method is an alternative to using a plugin and ensures compliance with data protection regulations by displaying a consent banner on your site. 

Introduction

To comply with the General Data Protection Regulation (GDPR), it's essential to display a consent banner on your website, especially if you have international traffic. While a WordPress plugin can automatically handle this, another effective method is to manually add the CMP script directly into your site's source code. The most universal way to do this is by using the WordPress theme editor.



Step-by-Step Guide

Step 1: Access the WordPress Theme File Editor

  1. Log in to your WordPress dashboard.

  2. On the sidebar, click on the "Appearance" tab.

  1. In the drop-down menu that appears, click on "Theme File Editor".

This will give you access to the various files that make up your site's theme, including the header.php file, which is where you will place the CMP script.

This will give you access to the various files that make up your site's theme, including the header.php file, which is where you will place the CMP script.

Step 2: Locate and Copy the CMP Script

  1. Go to your Moneytizer dashboard (or your Moneybox dashboard).

  2. Navigate to the "Consent Banner" section.

  3. Here, you will find the CMP script you need to copy.

The script is a piece of code that will display the consent banner on your site.

Step 3: Paste the CMP Script into the header.php File

  1. Return to the WordPress Theme File Editor.

  2. On the right-hand side, under "Theme Files," find and click on the header.php file.

  3. Locate the <head> section in the code.

  4. Paste the CMP script you copied in the previous step between the <head> and </head> tags.

Click the "Update File" button to save your changes.

Step 4: Clear Your Cache

Once you have saved the file, remember to clear your site's cache. This ensures the changes take effect and the CMP banner is displayed correctly on your site.

Alternative Method

While using the Theme File Editor is a reliable method, you can also integrate the CMP manually using a "Code Snippet" plugin. This is a viable solution if you are familiar with these types of plugins.