Consent iFrame solution

Hello,
Concerning the consent iFrame, it is recommended to include it in a “privacy policy” page. Before arriving on this page, the user has already browsed the site, and has therefore already been tracked? so what is the point of this iFrame?
Won’t the user feel “betrayed” for having already been tracked without knowing it (even anonymously)?

I’m trying to find a solution to avoid the cookie banner (UX issue), but I find that the iFrame is not ideal…
Since the visit is anonymous, is it mandatory to ask anything to the user?

Would you have any solutions to propose?
Thank you!

Hi,

There is no “consent iFrame” in Matomo. Just an iFrame that allows users to opt-out by setting a (third-party-)cookie.

Alternatively you can use https://developer.matomo.org/guides/tracking-consent and https://developer.matomo.org/guides/tracking-javascript-guide#optional-creating-a-custom-opt-out-form to build a more detailed solution of either opt-out or opt-in without any tracking until the user accepts.

Which one of those you need depends on the exact situation of data you are tracking, but all of them should be implementable using Matomo.

Thanks for your reply.
The data I want to track is anonymous, the goal being simply to have statistics on the number of pages viewed. No cookies are set, so I don’t use a cookie banner.
My question is: what is the point of the opt-in / opt-out iframe in the case of anonymous data?