Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/wordpressutilities/wputarteaucitron/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Simple WordPress plugin to implement https://github.com/AmauriC/tarteaucitron.js.
This plugin is NOT AFFILIATED WITH Tarteaucitron.js.
How to
Create a Button to accept a service
<button data-wputarteaucitron-allow-service="pardot" type="button">Allow cookies from Pardot</button>
Show/hide a block based on a service
/* Hide this block if pardot is accepted */
[data-wputarteaucitron-service-pardot="1"] .my-block {
display: none;
}
Add a new service
add_filter('wputarteaucitron__services', function ($services) {
/* array key should match tarteaucitron.job.push('array_key'); */
$services['twitteruwt'] = [
/* Name */
'label' => 'Twitter Pixel',
/* Used to store the value in database */
'setting_key' => 'twitter_pixel_id',
/* Matches the tarteaucitron.user.user_key */
'user_key' => 'twitteruwtId',
/* A value to help identify the service key */
'example' => '123456'
];
return $services;
}, 10, 1);