I am trying to implement a GDPR-compliant site which implements Google Analytics via Google Tag Manager. GDPR status is determined via a cookie, which I do not have control over and is the only method I may use. My understanding is that I need to set the anonymizeIp value in Google Analytics to true based on the value of this GDPR cookie. I'm not quite sure how best to do this. I can make changes in GA or GTM directly or I can conditionally load different GTM snippets on the site. What I cannot do is use a different strategy to determine GDPR status. What is my likely best choice?
As far as I know I can't just drop the standard ga('set', 'anonymizeIp', true);
when using GTM. (Though I'm not an expert on this.) Configuring the value via "Fields to Set" in the GA variable inside GTM is also not allowed unless I reset it when the GDPR cookie notes that un-anonymized tracking is allowed.