Directory / plugin
HATATATE
v1.2.0 · by borderhazejapan
Show one CTA banner on every post: in the content, the sidebar, a modal or a fixed bar. Run an A/B test and read the report.
About this plugin
HATATATE puts one call-to-action (CTA) on all of your posts without editing each post. A CTA can be a banner, an ad tag or a text link.
What it does
- Create a banner. Register a CTA (HTML, image or text) in the CTA library. Ad code from an affiliate network is kept as you pasted it, as long as the CTA’s author (its
post_author) may post unfiltered HTML (the same rule WordPress applies to post content). - Choose where it appears. Pick a position: before or after the content, after a heading, before the table of contents, in the sidebar, as a modal, or as a fixed bar at the bottom of the screen. You can also click an element on one of your posts to add a custom position.
- It shows on every post. Save the placement once and the CTA appears on all published posts. Change the position later and every post follows.
- Decide it per post. Turn the CTA on or off for a specific post, page, category or tag from the “Per page” tab. Categories and tags are listed inside the plugin, so you do not leave the screen.
- A/B test. Compare two CTAs in the same position. The report uses a Bayesian estimate so you can stop the test when one is clearly better.
- Report. Impressions (50% visible for 1 second) and clicks are counted on your own site and shown per CTA, per position and per day. Your own visits are left out while you are logged in with an account that can write posts.
- Ask an AI assistant. With WordPress 6.9 or later and the MCP Adapter plugin, an AI assistant such as Claude Code can read your results and settings and create a CTA as a draft. See “Using HATATATE from an AI assistant (MCP)” below.
First run
- Open “HATATATE” in the admin menu. The Home tab lists what to do next.
- Create one CTA in the CTA library.
- Open the placement, choose a position, switch it on, and open one of your posts to confirm.
How the plugin is shaped
- You configure one placement: a list of positions, each with the CTA that goes there. The same placement is used on the whole site. Per-post, per-category and per-tag settings only turn it on or off.
- You can create as many A/B tests as you like. One position runs one test at a time; a second test in the same position waits until you pause or finish the first.
For tag managers and analytics
Every CTA is wrapped in an element with id="hatatate-cta-<ID>" and data-hatatate-cta="<ID>" (the CTA’s post ID). If the same CTA appears twice on one page, the second element gets -2 appended to its id while the data attribute stays the same. Use the data attribute when you set up click triggers in Google Tag Manager.
Requirements and what it does not do
- WordPress 6.0 or later, PHP 7.4 or later.
- The content positions rely on the
the_contentfilter. Themes or page builders that render posts without it will not show in-content CTAs (sidebar, modal and fixed bar still work). - Positions that depend on a table of contents work with plugins and themes that output a
p-toc,toc_containerorez-toc-containerelement. - The admin screens are in Japanese.
- A CTA is printed as it was saved only when its author (its
post_author) has theunfiltered_htmlcapability, which is the rule WordPress core uses for post content and for the Custom HTML widget. For everyone else the markup goes throughwp_kses()with an explicit list of allowed tags, and<script>is dropped. Nobody has the capability whenDISALLOW_UNFILTERED_HTMLis defined, and on multisite only network administrators have it.
HATATATE Pro, a separate paid add-on, lets you use a different placement pattern for each post, category or tag: https://border-haze.co.jp/tools/hatatate-pro/
Using HATATATE from an AI assistant (MCP)
From version 1.2.0, an AI assistant such as Claude Code can read your CTA results and settings and create a CTA as a draft, through MCP (Model Context Protocol). You can then talk with the assistant about which CTA works and ask it to write a new one.
What you need to install separately
- WordPress 6.9 or later. On WordPress 6.8 and earlier this part of the plugin does nothing.
- The MCP Adapter plugin. HATATATE does not require it; without it, nothing changes.
- An application password for an administrator account (Users > Profile > Application Passwords). Application Passwords need your site to use HTTPS. We recommend creating a separate application password only for the AI assistant and revoking it when you stop using it.
- An MCP client, such as Claude Code, set up with your site’s MCP address, the user name and the application password.
Where to connect
https://your-site.example/wp-json/hatatate/mcp– HATATATE’s own MCP server. Each tool below is listed one by one.https://your-site.example/wp-json/mcp/mcp-adapter-default-server– the default server of the MCP Adapter plugin, which shows the same tools through its own discovery tools.
What the HATATATE MCP tools do
hatatate/get-stats– read impressions, clicks and click-through rate per day, per position, per CTA or per page (site-wide totals, up to 180 days).hatatate/get-placement– read the placement: which CTA appears in which position, whether delivery is on, and whether the CTA is shown on posts without a setting.hatatate/get-page-rules– read the per-page settings: the site-wide switch, per-post, per-category and per-tag settings, and your custom positions.hatatate/list-ctas– list the CTAs in the CTA library with their status and totals.hatatate/get-cta– read one CTA, including its HTML.hatatate/list-ab-tests– list the A/B tests, their state, whether each one is shown on your posts and why not, and the results.hatatate/create-cta– create a new CTA as a draft.hatatate/update-cta– edit a CTA that is still a draft. A published CTA is refused.
Every HATATATE MCP tool requires the manage_options capability, the same as the plugin’s admin screens. The HATATATE MCP tools cannot publish or delete a CTA, change the placement or the per-page settings, or create, start, pause or end an A/B test: no tool for those actions is registered. Note that this is how WordPress application passwords work in general, not something specific to HATATATE: an application password can use the whole WordPress REST API with the same permissions as its account. With an administrator’s application password, that includes publishing or deleting posts, pages and CTAs (CTAs use the REST route /wp-json/wp/v2/hatatate_item, which the block editor needs). To keep this in check, create a separate application password only for the AI assistant and revoke it when you stop using it.
Check a CTA that the AI assistant created or edited before you publish it. A CTA created or edited through the HATATATE MCP tools is a draft and is not shown to visitors. Open it in the CTA library and read its HTML before you publish it. A CTA created through these tools has the account you connected with as its author. When the CTA’s author may post unfiltered HTML (on a single site, administrators and editors may; on multisite, only network administrators may; nobody may when DISALLOW_UNFILTERED_HTML is defined), the HTML is printed as written once the CTA is published, including any <script>.
External services
This plugin does not send data about your site or its visitors to any external service. Impressions and clicks are stored in your own database and sent to your own site’s REST API (hatatate/v1/track).
The plugin fetches images from third-party hosts (for example an affiliate network’s image server) only to render a preview snapshot of a CTA’s own content, and only for the image URLs written in that CTA’s own HTML. This can happen in three places, all of them administrator-only:
- When an administrator edits a CTA in the block editor, a snapshot of it is captured automatically.
- On the CTA screen, a CTA whose snapshot is out of date is re-captured automatically when the screen is opened.
- When an administrator starts an A/B test, a snapshot of each side is captured.
Nothing about your site is sent in these requests beyond the image URL being fetched, and requests to private or reserved IP addresses are refused.
The MCP tools described above do not send anything from your site either. When you connect an AI assistant, the assistant requests the data from your site’s REST API with your application password, and what it does with that data is decided by the assistant and the service you chose.
Third-party libraries
These libraries are bundled unmodified in admin/lib/ and are all under a GPL-compatible license. The full license text of each one is in admin/lib/LICENSES/, together with the bundled version and where the file was obtained.
- Chart.js 4.5.1 – MIT (
admin/lib/LICENSES/chart.js-MIT.txt). The file header reads “Released under the MIT License”. - Lucide 1.47.0 – ISC (
admin/lib/LICENSES/lucide-ISC.txt). The file header reads “@license lucide v1.47.0 – ISC”. The 15 individual SVG icon files inadmin/icons/(all exceptsymbol-menu.svgandsymbol-mono.svg, which are this plugin’s own logo) are single icons extracted unmodified from the same Lucide release; the same license file covers them. - html2canvas 1.4.1 – MIT (
admin/lib/LICENSES/html2canvas-MIT.txt). The file header reads “Released under MIT License”. It bundles tslib, which is licensed under 0BSD by Microsoft. tailwind.cssis not a third-party file as shipped: it is a stylesheet this plugin compiles with Tailwind CSS 3.4.17 (MIT,admin/lib/LICENSES/tailwindcss-MIT.txt). See “Source code” below for how to rebuild it.
Source code
admin/lib/tailwind.css is minified, so the files it is built from are included in the plugin: `admin/lib/src/tailwind-source.css` (the input) and `admin/lib/src/tailwind.config.js` (the build configuration, which also carries the exact command). Running that command with Tailwind CSS 3.4.17 from the plugin root reproduces the shipped file byte for byte. Every other file in the plugin is shipped in its readable form.