Repository navigation
Conversation
A second domain of a project can use the analytics of an active site
instead of its own registration.
Attach to an active site
- The registration asks whether the site is registered as a new site or
attached to an active site.
- The domain of the site is added to the whitelisted domains of the
website of the active site, via the new middleware endpoint
POST /website/{intpWebsiteId}/whitelisted-domains.
- The site gets the credentials and the tracking code of the active site
and the setting "attachedTo". Plan and credits are shared.
Detach
- A "Detach" button with a confirmation dialog removes the domain from
the whitelist (DELETE /website/{intpWebsiteId}/whitelisted-domains/{domain})
and removes the copied settings. The site is inactive again.
Requires the whitelisted domain endpoints of the middleware.
Several sites can track into one website when a site is attached to an active site. Each query of the dashboard widgets now uses a filter on the page URL. The filter contains the base of the site and the bases of all site languages, for example "://example.com". The API compares each value as a part of the page URL, as the TWIPLA dashboard does for its "contains" filter. The filter is also part of the cache keys. - AnalyticsSiteProvider returns the filter with the credentials and lists attached sites again. - The top pages widget gets its pages from the API with the filter. - DashboardLinkBuilder builds the "Show in Analytics" links. A widget of an attached site shows no link, because the dashboard cannot show only the data of one domain. The page performance bar opens the dashboard of the active site with the page filter. - A link shows only when the backend user has access to the root page of the site whose dashboard opens. - The widgets for TYPO3 v13 show or hide the link when the site changes.
…tach An attached site has no analytics of its own, so the module shows it in an indented row below its active site and the details of that site. The row shows the status "Attached" and the "Detach" button. A site whose active site is not in the list keeps a row of its own. - An attached site cannot be the target of another attach. - The dashboard and the plan of an attached site open only for the active site. A direct call redirects with a message. - The site menu in the module header leaves out attached sites. - Attaching a site opens a confirmation dialog. The data of the site stays in the analytics of the active site, also after a detach. - The labels use "attach" and "detach" throughout. Labels and badges use sentence case, and the status badge shows translated values.
Some labels had two or more entries with the same id: 35 ids with 37 extra entries in the German file and one id with 3 extra entries in the English file. TYPO3 uses the last entry of an id, so the other entries had no effect. Some of them differed from the entry in use, for example a second "flash.accessDenied" with informal address. The files now keep only the last entry of each id. The labels in the backend do not change.
The German labels used formal and informal address. The TYPO3 backend uses the formal "Sie", so all labels of the extension use it now: - the status query error - the messages about low and used up credits - the question of the registration form - the message after a plan upgrade
…t on TYPO3 v14 TrafficSourcesWidgetV14Pass still set the constructor argument "$uriBuilder", which the widget no longer has. The container of TYPO3 v14 failed to build. The pass now sets "$dashboardLinkBuilder".
sfsmfc
added this pull request to stack #31
October 14, 2026 09:22
The parameter docs of the page URL filter referred to "buildPageUrlWhere()" without a class. The interface does not have this method, so the reference now names AnalyticsDataClient, which implements it.
sfsmfc
force-pushed
the
feature/site-attach
branch
from
October 14, 2026 09:31
770552f to
af4af88
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A second domain of a project can use the analytics of an active site instead of its own registration. This PR adds attach and detach to the backend module and limits all analytics to the domains of the selected site.
Stacked on #26. Needs TYPO3GmbH/site-analytics-middleware#91.
Attach and detach
attachedTo.Module
Analytics of the selected site
pageUrl in ["://example.com"]. The TWIPLA dashboard uses the same filter for "contains".Labels
Test
ddev composer t3g:test,t3g:test:functional,t3g:phpstanandt3g:cglpass.