@justinvelluppillai opened this Issue on November 15th 2022 Member

The new Consent Manager, GA3, GA4, GTM detection mechanisms and existing GtmSiteTypeGuesser class don't check the enable_internet_features config setting before calling out to the internet. It should check this config and do nothing if it is set to 0.

As part of this task the GtmSiteTypeGuesser and new SiteContentDetector could be improved to share code or at least logic - eg the SiteContentDetector caches for 7 days, and GtmSiteTypeGuesser caches for only 1 day, and GtmSiteTypeGuesser avoids requests to certain hosts (see https://github.com/matomo-org/matomo/commit/f839cb921ff056bc107a5306cfe254dca1684d82#diff-47ed7c5049ee406ef66904e382872672fc2bd9864140609e7918b871f989ec6aR185)

@bx80 commented on November 15th 2022 Contributor

I think it should be fairly straightforward to move the GtmSiteTypeGuesser functionality into SiteContentDetector which would then unify the caching and host blocking settings. SiteContentDetector was intended to support detection of multiple site properties. This would also reduce the request count by half. It might also make sense to move SiteContentDectector to the SitesManager plugin at the same time.

@justinvelluppillai commented on November 15th 2022 Member

I doubt there is much depending on the GtmSiteTypeGuesser class yet but this might be something we remove in Matomo 5.0.0 to avoid breaking anything for anyone.

Powered by GitHub Issue Mirror