I don’t see the basis for the accepted answer saying that a Google Analytics cookie does not require user prior consent—even after the modifications that answerer proposed. Opinion 04/2012 on Cookie Consent Exemption of the Article 29 Data Protection Working Party, adopted 7 June 2012, addresses the question of “First party analytics” (see page 10 of the pdf):
While they are often considered as a “strictly necessary” tool for website operators, they are not strictly necessary to provide a functionality explicitly requested by the user (or subscriber). In fact, the user can access all the functionalities provided by the website when such cookies are disabled. As a consequence, these cookies do not fall under the exemption defined in CRITERION A or B.
The CRITERIA A and B referenced are the only conditions under which a cookie could be exempted from the requirement of informed consistent, according to the ePrivacy Directive (Article 5.3 of Directive 2002/58/EC, as amended by Directive 2009/136/EC).
Whether the Google Analytics cookie is seen as a first-party cookie (with the analysis outsourced) or as a third-party cookie, it would definitely not be treated more leniently than this first-party analysis.
Regarding what constitutes sufficiently explicit consent, see Neil Ford, “The GDPR’s Six Lawful Bases For Processing – With Examples,” IT Governance, 21 June 2021, which cites Recital 32, which says in part:
Consent should be given by a clear affirmative act establishing a freely given, specific, informed and unambiguous indication of the data subject’s agreement to the processing of personal data relating to him or her, such as by a written statement, including by electronic means, or an oral statement.
An ‘affirmative act’ means the data subject has to opt-in – you cannot assume their consent, for example, by using pre-ticked boxes on your website.
This would call into question your hope that:
My question is, Is it ok if in my cookie notice text said something like this..
'By clicking agree or continuing to use this site you agree to our privacy policy'
This way if they completely ignore the notice (which a lot of people do) and navigate to another page, then at least I am able to track more visits.