Tracking codes not loading reliably
Issue #38
new
I had thought this was just a caching issue but tracking codes are not loading reliably - sometimes they work sometimes not.
We are using the code \Concrete\Package\EuCookieLaw\Src\CookieDisclosure::getInstance()->areCookiesAllowed() to detect if cookies have been accepted.
If so we load Google Tag Manager which then loads all other tracking code.
When I clear all cookies and then accept cookies the cookie-disclosure cookie is set to true but the areCookiesAllowed() code does not run.
Sometimes clearing the concrete5 cache resolves this but maionly it does not.
Comments (2)
-
repo owner -
reporter That makes sense when I stop and think about it. Thanks.
- Log in to comment
Hello Glyn, of course that's not working. This Feature is not compatible with FPC. When you use this code in a block element you should set btCacheBlockOutput to false in the block controller. More Informations at: https://documentation.concrete5.org/developers/working-with-blocks/creating-a-new-block-type/making-blocks-cacheable