Anni Marketing

By annimarketing

0+ active installationsVersion 1.11.9

Connects your site to Anni (anni-marketing.ch): adds your own GA4 tag and Search Console verification. No tracking by the plugin itself.

Description

Anni is a marketing assistant for small businesses in Switzerland (anni-marketing.ch). This companion plugin lets Anni finish your Google setup automatically after you connect your WordPress site:

  • Outputs the Google Analytics 4 tag (gtag.js) in your site’s head — only if you (or Anni, with your permission) configure a measurement ID. An analytics ID that was already configured stays active alongside Anni’s (it is never replaced).
  • Outputs the Google Search Console site-verification meta tag — only if a verification token is configured.
  • Counts visits of known AI crawlers per day (only the date, the crawler name and the count — no IP address, no visitor
    data). The numbers stay on your site until Anni reads them through the authenticated endpoint.
  • Provides a small authenticated REST endpoint (anni/v1) so the Anni app can read plugin status and set the two values above. All endpoints require the manage_options capability (administrators). Requests are authenticated with WordPress Application Passwords.

The plugin itself does not track visitors, does not send data anywhere, and stores only two options (anni_ga4_id, anni_gsc_verification). The Google Analytics tag is only loaded if a measurement ID has been explicitly configured; in that case Google’s terms for Analytics apply.

External services

This plugin connects your site to the Anni marketing platform (https://anni-marketing.ch), operated by
digitale rakete GmbH (https://digitalerakete.ch), so that Anni can complete your Google setup for you.

What the plugin itself sends: nothing. The plugin does not initiate any outbound request. It only
receives authenticated REST requests from the Anni app and stores/prints two values on your site.

When your site is contacted: only after you connect your website inside your own Anni account and
create a WordPress Application Password for it. The Anni app then calls the endpoints below using
that password:

  • GET /wp-json/anni/v1/status — reads whether the plugin is active and which values are set
    (requires the manage_options capability).
  • POST /wp-json/anni/v1/ga4 — stores your Google Analytics 4 measurement ID (requires manage_options).
  • POST /wp-json/anni/v1/gsc — stores your Google Search Console verification token (requires manage_options).
  • GET /wp-json/anni/v1/ki-bots — reads the daily counts of AI crawler visits (service name and number only;
    requires manage_options).
  • POST /wp-json/anni/v1/ki-technik/seiten — stores a summary, questions and a table of contents for one page that
    you approved in Anni (requires manage_options).

Data involved: your GA4 measurement ID and your Search Console verification token. No visitor data,
no personal data and no site content is transmitted by this plugin.

Google Analytics: if — and only if — a measurement ID is configured, the plugin prints Google’s
standard gtag.js snippet, which loads https://www.googletagmanager.com/gtag/js in visitors’ browsers.
This is Google’s service, used under your own Google Analytics property. Google’s terms and privacy
policy apply: https://policies.google.com/terms and https://policies.google.com/privacy

Anni platform terms and privacy policy: https://anni-marketing.ch/nutzungsbedingungen and
https://anni-marketing.ch/datenschutz

Installation

  1. Install and activate the plugin.
  2. Connect your website in your Anni account (anni-marketing.ch) — Anni configures statistics and Search Console automatically.
  3. Alternatively, set the options manually via WP-CLI or the REST endpoint.

FAQ

How is the plugin updated?

Only through the normal WordPress update system, from WordPress.org. Anni can start an update that WordPress already
offers (like clicking “Update now”); your settings and the change history stay as they are. Automatic updates are only
enabled if you choose so, either on the Plugins screen or by agreeing in Anni.

Does this plugin track my visitors?

No. It only prints the Google Analytics tag if you configure a measurement ID. Without configuration it outputs nothing.

Who can change the settings?

Only authenticated WordPress administrators (manage_options), typically via an Application Password issued by you. All anni/v1 endpoints require this — including reading the plugin status; page edits additionally require the right to edit that page (edit_post).

Does it work without an Anni account?

Yes — you can set the GA4 ID and the Search Console token yourself; the plugin is a minimal, dependency-free head-injector.

Why does this plugin re-enable Application Passwords?

Anni connects to your site exclusively through WordPress Application Passwords (the built-in
authorize-application.php flow — you approve the connection yourself, no password typing).
Some security plugins disable Application Passwords globally, which silently breaks that
connection. If you install this plugin, you explicitly want the Anni connection, so it makes
the feature available again — but only for Anni: authorization requests from any other
application keep whatever policy your security plugin enforces. WordPress’ own HTTPS
requirement for Application Passwords stays untouched.

Changelog

1.11.9

  • Image optimization preview (dry run) now works in the system temp folder and no longer creates the protected backup folder or its setting. The backup folder is created only when an image is actually optimized.

1.11.8

  • Translated page titles and descriptions for TranslatePress sites: Anni sets the translation of an existing string, every change is logged and can be undone.
    Requires the TranslatePress SEO Pack (only it makes page titles and meta descriptions translatable); without it Anni changes nothing.

1.11.7

  • Page content (Gutenberg/classic): new change type «link_ersetzen» — points a broken link on the site to the right page.
    Only the link target changes; same checksum check, history entry and undo as the other content changes.

1.11.6

  • 301 redirects: a target address in another language (TranslatePress, Polylang, WPML, e.g. «/en/contact») is now
    recognised as the published page behind it. Before, such redirects were rejected as «target missing». No other change.

1.11.5

  • Cookie settings dialog: the close button (×) no longer covers the title — on phones it was as wide as the dialog.
    No other change.

1.11.4

  • Search visibility check: when only a non-writable robots.txt file blocks search engines, the plugin now reports the
    reason «robots_datei» instead of «erzwungen». No other change.

1.11.3

  • Maintenance: code comments cleaned up. No change in behaviour.

1.11.2

  • Cookie notice: the notice no longer reports visitor decisions (accept/reject) to Anni. The choice stays in the
    visitor’s browser only.

1.11.1

  • Cookie notice: when Anni changes the notice settings (texts, on/off), known page caches (WP Rocket, LiteSpeed, W3 Total
    Cache, WP Super Cache, WP Fastest Cache, SiteGround, 10Web, Autoptimize) are cleared so visitors see the change right
    away. Nothing is cleared if the settings did not change.

1.11.0

  • Drafts for Elementor pages: Anni can save a change (text, link, design, sections, header/footer templates, image swap,
    global colors and fonts) as a draft instead of changing the live page. The draft is stored in the post meta
    _anni_entwurf_data of the page or template; nothing visitors see changes until you publish it in Anni.
  • Publishing goes through the existing change history (one entry per page, “Undo” as before). If the page was changed in
    WordPress after the draft was started, nothing is published and Anni tells you why.
  • Preview: Anni can request a short-lived signed token (at most 10 minutes) and open the page with ?anni_vorschau=…
    to show the draft. Only requests with a valid token see the draft; the response is marked noindex and is never
    cached, and Elementor’s element cache is skipped for that request. Without a token everyone sees the live page.
  • Uninstall removes open drafts and the preview secret.

1.10.1

  • Security check: core file checksums are now compared per language package. A file only counts as changed if it
    matches none of the official versions for the installed language package, the site language or en_US. This removes
    false alarms on German-language sites (for example wp-config-sample.php or wp-includes/version.php). Read-only, as before.

1.10.0

  • Updates without data loss: new authenticated endpoint anni/v1/aktualisieren lets Anni start the update that
    WordPress itself offers for this plugin (same as “Update now” on the Plugins screen). The plugin stays active; its
    settings and the change history (anni_changes) are kept. The new version always comes from WordPress.org through
    the regular WordPress update system; the plugin contains no update server of its own.
  • Automatic updates for this plugin are only switched on when you ask for it (same setting as “Enable auto-updates” on
    the Plugins screen). If your site has disabled automatic plugin updates, the plugin leaves that setting untouched.
  • Site owners can turn the endpoint off with add_filter( 'anni_marketing_selbst_aktualisieren', '__return_false' );.

1.9.3

  • Consent: with Anni’s notice switched off and your own Google tag running without a cookie tool, the plugin no longer
    prints a site-wide consent default either (Anni does not measure without its notice).
  • Undo: the type filter of anni/v1/rollback (nur) now accepts digits (e.g. ga4_weitere); an invalid value still
    undoes nothing.

1.9.2

  • Google Analytics: if your site already loads a measurement ID itself (theme or another plugin), Anni no longer loads
    it a second time as an additional ID, so visits are not counted twice. Anni can remove such an additional ID again
    (anni/v1/ga4 with entfernen).
  • Consent: if your site runs its own Google tag without a cookie tool, Anni’s notice no longer sets a site-wide consent
    default or update (nur_eigen); it only applies to Anni’s own measurement, which still loads after consent.

1.9.1

  • All in One SEO: on an existing entry Anni now changes only the title and description columns directly; all other
    columns (e.g. schema) stay byte-identical, also after undo. A new entry is still removed completely on undo. After
    each change the post cache and the All in One SEO caches are cleared, so the page title shows the new text at once.

1.9.0

  • SEO title and description for All in One SEO, SEOPress, The SEO Framework and Slim SEO: Anni writes them only into
    the SEO plugin that outputs your page title (never into two plugins), with the storage each plugin uses itself
    (AIOSEO table via its own model, post meta for the others). Every change is in the Anni history and can be undone
    (anni/v1/rollback).
  • Block and classic pages (not Elementor): replace an image (image, cover, media & text blocks and images in classic
    content) with a new image and alt text, when you confirm it in Anni. Only that spot changes; everything else in the
    page content stays byte for byte the same (checked after saving, otherwise the old content is restored). The plugin
    only writes when the page is still exactly as Anni read it. Every change is in the Anni history and can be undone
    (anni/v1/bloecke/{id}, anni/v1/rollback).
  • Block and classic pages (not Elementor): duplicate, move and delete sections (top-level blocks; on classic pages the
    parts between blank lines, only where the structure is unambiguous) and hide blocks per device using WordPress’ own
    block visibility (WordPress 7.0 or newer). Deleting needs a confirmation in Anni. Same checks, history and undo as above.
  • Header and footer: change a text there (e.g. address, opening hours, phone) after you confirm it in Anni. Block themes:
    the header/footer template parts (saved like the Site Editor does; a theme part becomes a customized copy, undo removes
    that copy again). Classic themes: widgets in the sidebars and short contact/footer texts in the Customizer. Texts
    written into the theme’s code cannot be changed here. History and undo as above (anni/v1/kopffuss).
  • Customizer text settings never receive HTML: writing text containing “<” into a theme setting is refused.
  • 301 redirects without an extra plugin: after you approve it in your Anni account, an old address of your site (e.g.
    a renamed or deleted page) leads permanently to a published page of the same site. Only used when WordPress itself
    finds nothing at the old address (404); never the home page, never system paths, never another domain, no loops or
    chains. Stored in the option anni_weiterleitungen (at most 200 rules); every rule is in the Anni history and can be
    undone (anni/v1/rollback). If a redirect plugin is active (Redirection, Rank Math redirections, Yoast Premium,
    SEOPress PRO, AIOSEO Redirects, Slim SEO, Safe Redirect Manager, Simple 301 Redirects), Anni adds no rule of its own. Redirects keep working when “Anni may adjust site technology” is off.

1.8.0

  • Links between your own pages: after you approve a suggestion in your Anni account, the plugin shows one short
    paragraph with a link to a matching page of your site (“Passend dazu: …”) below the content of an existing page,
    e.g. for a page no other page links to. Stored per page in the option anni_ki_links, never written into your page
    content; link targets must be published pages of the same site. No extra block on posts when YARPP, Jetpack Related
    Posts or Contextual Related Posts already show related posts. Every change is in the Anni history and can be undone
    (anni/v1/rollback). Nothing is shown without your approval.

1.7.0

  • Short summary, questions and table of contents on existing pages: after you approve a draft in your Anni account,
    the plugin shows 2-3 sentences “Kurz gesagt” at the top of that page, a table of contents from its H2/H3 headings
    (long pages only) and visible answers to common questions with FAQPage schema. Stored per page in the option
    anni_ki_seiten, never written into your page content; works with Elementor pages. Every change is in the Anni
    history and can be undone (anni/v1/rollback). Nothing is shown without your approval.
  • Counts how often AI services read your site (GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, Claude-SearchBot,
    PerplexityBot, CCBot and others): only the day, the service name and the count are stored (option anni_ki_bots,
    at most 90 days) — no IP address, no page, no visitor data. Anni reads the numbers via the authenticated
    anni/v1/ki-bots endpoint. Requests answered by a page cache or CDN are not counted.
  • Existing cookie tool: if your Anni account is linked to the cookie tool already running on your site, the plugin
    shows no Anni cookie notice of its own. Google Analytics then loads only after visitors agree to statistics in your
    cookie tool (no consent, unreadable or declined: nothing is loaded). Without such a link nothing changes.
  • Cookie notice: decisions made by automated browsers (navigator.webdriver, headless browsers) and known bots or
    crawlers are no longer counted in the anonymous consent statistics.
  • /llms.txt is off by default and no longer switched on by Anni (it has not become an established standard; robots.txt
    stays the standard). Sites that already use it keep it unchanged.
  • IndexNow key file: when Anni stores an IndexNow key through anni/v1/ki-technik (field indexnow, 8 to 128 letters,
    digits or hyphens; an empty value turns it off), the site answers /<key>.txt with that key as plain text. Search
    engines that take part in IndexNow (for example Bing) use this file to confirm that a reported page belongs to the
    site. Nothing is added to robots.txt or the sitemap, and the plugin sends nothing anywhere itself.

1.6.0

  • Read-only security check for administrators (anni/v1/sicherheit): compares WordPress core files with the official
    checksums, lists PHP files inside the uploads folder and lists must-use plugins and drop-ins (flagging typical
    malicious patterns). Only file names and counts are reported, never file contents. Nothing on the site is changed.
    Anni uses this when you connect your site and pauses all changes if the site shows signs of a compromise.
  • An analytics measurement ID that was already configured is kept active next to Anni’s own (option
    anni_ga4_weitere, at most three IDs) instead of being replaced. Both respect the consent banner.
  • The WordPress “Authorize Application” screen for the Anni connection is easier to follow: only when the
    request returns to Anni’s own connection callback (app.anni-marketing.ch), other admin notices are hidden on that one screen, a one-line instruction
    points to the approve button, and the application is shown as “Anni” (the stored password name is unchanged).
  • Security: the plugin only overrides a security plugin’s application-password block for requests that return to
    Anni’s own connection callback; a request that merely uses the name “Anni” is treated like any other application.
  • The consent banner can show the site’s own logo: an https address or a small embedded PNG/WebP image (data URI),
    nothing else. Light logos get a dark background so they stay visible. No image is loaded from Anni’s server.

1.4.4

  • The authenticated status endpoint (anni/v1/status, administrators only) also reports the PHP and WordPress
    version, so Anni can tell you when your site runs outdated or insecure software.

1.4.3

  • /llms.txt follows llmstxt.org more closely: legal pages (imprint, privacy policy, terms, cookie policy) move to an
    “Optional” section, matched by their exact address or title only, so pages like “Legal Tech” or “Cookie recipes” stay
    in the main list. Posts carry their manual excerpt as a short description. Pages set to noindex in Yoast or
    Rank Math are left out.

1.4.2

  • AI search access in robots.txt now also covers DuckAssistBot, MistralAI-User, Meta-WebIndexer, Amzn-SearchBot
    and Amzn-User (answer and retrieval bots that, per their operators, do not train models). Your training setting
    now also applies to Applebot-Extended, Meta-ExternalAgent and Amazonbot.

1.4.1

  • Maintenance release: no change to how the plugin behaves on your website. The cookie notice script gains
    optional layout variants that are used only on Anni’s own pages; without them the notice looks and works
    exactly as in 1.4.0.

1.4.0

  • New setting “Anni may adjust website technology” (Settings > Anni, on by default). When off, the plugin
    outputs none of the items below and makes no further changes; undo stays available.
  • AI search access in robots.txt: AI search crawlers (OAI-SearchBot, ChatGPT-User, PerplexityBot,
    Perplexity-User, Claude-SearchBot, Claude-User) are no longer blocked; training crawlers (GPTBot,
    Google-Extended, ClaudeBot, CCBot) follow your setting. Works through the robots_txt filter; if a physical
    robots.txt exists and is writable, the plugin updates that file and keeps the previous content for undo.
  • Business schema (Organization/LocalBusiness) on the front page. If Rank Math or Yoast already output an
    organization, the plugin completes their node through their schema filters instead of adding a second one;
    if the theme outputs one, the plugin adds nothing.
  • FAQPage schema for posts and pages with question headings (at least two), skipped when the page already has
    FAQ schema (for example from an SEO plugin’s FAQ block).
  • /llms.txt with your pages and recent posts (not linked anywhere, only when the site is public).
  • Business details correction (name, address, phone) after your approval: exact text in page content
    (block editor, classic, Elementor incl. header/footer templates), widgets and Customizer settings, plus an
    optional output rule for text built into the theme (text only, never attributes or scripts).
  • Search engine visibility can be switched on after your approval.
  • Every change is recorded in the Anni history ({prefix}anni_changes) and can be undone, with a conflict check.

1.3.0

  • Page editing for Elementor (classic widgets, 10Web widgets, header/footer templates): Anni changes only
    fields an element really has (checked against the widget’s own controls), validates values, cleans text
    with wp_kses_post and saves through Elementor’s own document API. Every change is recorded in an own
    table ({prefix}anni_changes) and can be undone, with a conflict check if the page changed meanwhile.
  • Style per device (typography, colours, spacing, borders, background, animation) from an allow-list of
    style sections; global kit colours and fonts of the active kit (existing entries only).
  • Structure: duplicate, move, hide per device; deleting a section needs a one-time confirmation token.
  • Images: swap an image in a widget, compress an image under the same media ID with a private backup of
    the original and a restore endpoint. Images are processed on your server; nothing is sent elsewhere.
  • SEO title/description/focus keyword for Rank Math and Yoast are exposed to the WordPress REST API for
    users who can edit the post.
  • Optional load-time switches for images (fetchpriority for the largest image, lazy loading below the
    fold, decoding=”async”), each one can be turned off again.
  • Hardening: write requests to anni/v1 are limited per user (120 per minute, image optimisation 20 per
    minute, HTTP 429 above), requests larger than 2 MB are rejected (HTTP 413), invalid values are rejected
    with a real HTTP error instead of being adjusted silently.
  • New endpoints require manage_options and, for a page, edit_post. Uninstalling removes the table and
    the plugin’s options. The plugin still makes no outbound requests.

1.2.1

  • Elementor editing: Anni can now target a specific text field (icon boxes, image boxes, icon lists, call-to-action, testimonials, animated headlines, header/footer templates). Only existing text fields are written; the text is passed through wp_kses_post.
  • The “Zu Anni” link in the activation notice now points to the Anni environment this site is connected to (taken from the consent configuration), instead of always to app.anni-marketing.ch.

1.2.0

  • Consent banner built in: the plugin now shows a bottom notice (“Alle akzeptieren” / “Nur notwendige” /
    “Einstellungen anpassen” with categories) before Google Analytics loads. Until now the plugin only set
    Consent Mode to “denied” and never asked, so nothing was measured. Texts, colours, privacy link and
    mode (basic = no Google contact before consent, advanced = cookieless pings) come from Anni via the new
    REST endpoint anni/v1/consent; without it, built-in defaults with the site name and WordPress privacy
    page apply. Choice stored as a first-party cookie for 182 days, footer link “Cookie-Einstellungen” to
    change it. No data is sent to Anni except an anonymous accept/decline count when configured.

1.1.8

  • Elementor editing: new REST endpoints anni/v1/elementor/{id} (GET the widget tree, POST
    surgical text edits by stable element id) via Elementor’s own Document::save() — correct CSS
    regeneration, native revision for undo, per-page locking. Only active when Elementor is installed.

1.1.7

  • GA4 now respects visitor consent: Consent Mode v2 defaults to “denied” before the config call,
    so no analytics or advertising storage is used until a consent tool on the site grants it. Sites
    without a consent banner therefore no longer measure without consent (GDPR/Swiss DPA compliant).

1.1.6

  • Application Passwords availability is now restored surgically instead of globally:
    authorization requests whose application name does not start with “Anni” keep the policy
    enforced by your security plugin (both availability filters plus the
    wp_authorize_application_password_request_errors hook, scoped the same way).
  • Added a dismissible admin notice after activation pointing back to Anni (no redirect).
  • Added a FAQ entry explaining why and how the plugin re-enables Application Passwords.

1.1.5

  • Restore Application Passwords availability via the wp_is_application_passwords_available
    filter (latest priority) — some security plugins disable the feature globally, which breaks
    the Anni connection entirely. WordPress’ HTTPS requirement stays untouched.

1.1.4

  • Author URI auf https://digitalerakete.ch umgestellt (die alte Adresse hatte kein
    gueltiges Zertifikat und wurde vom Review geruegt).
  • Firmenname in readme.txt an das Impressum angeglichen: digitale rakete GmbH.

1.1.3

  • Tightened the /status REST endpoint to require manage_options (was edit_posts), matching the other two endpoints and this readme’s own description.

1.1.2

  • Added the required “External services” documentation.
  • Corrected the documented capabilities to match the code (status: edit_posts, writes: manage_options).

1.1.0

  • Search Console verification meta support (anni/v1/gsc).

1.0.0

  • Initial release: GA4 tag output + status endpoint.