bm1 / provenexpert
Renders the ProvenExpert rating (Google stars) server-side - no third-party JavaScript, no cookies, no consent needed.
Requires
- php: >=7.4
- typo3/cms-core: ^10.4 || ^11.5 || ^12.4 || ^13.4 || ^14.0
Replaces
- typo3-ter/provenexpert: *
README
Renders the ProvenExpert rating – the "Google stars" rich snippet – on the
server. The visitor's browser never contacts ProvenExpert, so the extension
loads no third-party JavaScript, sets no cookies and writes nothing to
sessionStorage.
ProvenExpert offers the snippet as a JavaScript and as a PHP script. The
JavaScript variant runs in the visitor's browser and writes to sessionStorage,
which usually puts it behind a consent banner – where most visitors and search
engines never get to see the rating. This extension is the PHP way, wrapped in
proper TYPO3 plumbing: caching, backend configuration, content element.
Full manual: docs.typo3.org/p/bm1/provenexpert/main/en-us · TER entry: extensions.typo3.org/extension/bm1_provenexpert
Requirements
| TYPO3 | 10.4 · 11.5 · 12.4 · 13.4 · 14 |
| PHP | 7.4 – 8.4 |
| ProvenExpert | plan with API access (credentials under Reputation boost › Google stars › PHP scripts) |
Installation
composer require bm1/provenexpert
Then enter the API ID and API key, either in the extension configuration (Admin Tools › Settings › Extension Configuration › bm1_provenexpert) or per site (see below).
Configuration
| Setting | Meaning |
|---|---|
apiId, apiKey |
ProvenExpert API credentials |
cacheLifetime |
how long a response is reused (default 3600 s) |
timeout |
how long to wait for the API (default 5 s) |
autoInsert |
place the rating before </body> on every page, default on |
ratingStyle |
layout of the visible rating, see below |
strokeColor, fillColor, fontColor |
colour overrides for the stars, exactly like the official PHP script |
Layout
ProvenExpert always returns the layout selected in the account under Google
stars › Display of the rich snippet; its API offers no parameter for it. The
extension therefore builds the visible output itself, from the ratingValue and
reviewCount fields of the same API response – a route ProvenExpert explicitly
allows. The JSON-LD block is always taken over from ProvenExpert unchanged,
so the structured data stays exactly as intended.
ratingStyle |
Output |
|---|---|
starsInline (default) |
stars next to "N reviews on ProvenExpert.com" |
stars |
stars above the review count |
text |
"Company has 4.67 out of 5 stars" above the review count |
textInline |
both in one line, separated by a pipe |
account |
untouched markup from ProvenExpert, i.e. whatever the account is set to |
Per site
The same keys can be set per site below settings.bm1_provenexpert, which takes
precedence over the extension configuration:
# config/sites/<identifier>/config.yaml (v10-v12) # config/sites/<identifier>/settings.yaml (v13+) settings: bm1_provenexpert: apiId: '…' apiKey: '…'
On TYPO3 v13 and above you can also add the shipped site set
bm1/provenexpert, which makes the settings editable in the backend.
Keeping credentials out of the repository
Any string setting may hold a placeholder such as %env(PROVENEXPERT_API_KEY)%,
which is resolved from the server environment. In site YAML files TYPO3 resolves
such placeholders on its own (since v10).
Usage
Install, enter the credentials – done. The rating is placed before </body> on
every page automatically, centred, without any TypoScript.
Content element
The content element ProvenExpert rating shows either of two things:
- Rating – stars, link and rich snippet. Placing it somewhere makes the
automatic placement hold back, so there is never more than one review snippet
per page. Switch the automatic placement off entirely with
autoInsert. - Seal – the ProvenExpert seal as an image, in portrait, landscape, square or circle, up to 250 pixels wide. The image is stored on your server and delivered from there, so it works without consent as well, and it scales down in narrow columns. The seal carries no structured data and can therefore sit on the same page as the rating.
The ProvenExpert widget type bar is deliberately not offered: its API response
is a <script> tag pointing at ProvenExpert, which would require consent again.
Should such markup ever appear in a response, the extension strips it and writes
a warning to the log.
TypoScript
Add the static template ProvenExpert (server-side) to your root template:
# e.g. below the footer, on every page
page.footerData.950 < lib.provenExpertRating
# optional: override the configured layout
page.footerData.950.style = stars
# the seal, e.g. as a Fluid variable
page.10.variables.provenExpertSeal < lib.provenExpertSeal
page.10.variables.provenExpertSeal.type = square
Fluid
{namespace pe=Bm1\ProvenExpert\ViewHelpers}
<pe:rating />
<pe:rating style="textInline" />
<pe:seal />
<pe:seal type="square" width="200" />
Notes
- Google grants stars only for a snippet that is fully visible, and expects one review snippet per page.
- If the API is unreachable, the last successful response keeps being served and the API is retried after a minute – the rating never disappears because of a network hiccup.
- Changes made in the ProvenExpert account (e.g. the account layout) show up with a delay: this extension caches for an hour, and ProvenExpert caches on its own servers as well.
What is sent where
Only the web server talks to ProvenExpert. The visitor's browser loads nothing
from ProvenExpert: no script, no image, no font - the seal image is copied to
your server and served from there. No cookies and no
sessionStorage entries are created, and no visitor data (IP address, user
agent, …) reaches ProvenExpert. The rating is therefore rendered for every
visitor and for search engines, without any interaction.
Rate this extension
This extension is free. If it helps you, please rate it on RatingStar: ratingstar.de/t/bm1 · more information
License
GPL-2.0-or-later