Title: Problem with Comet Cache
Last modified: June 27, 2018

---

# Problem with Comet Cache

 *  [sergio79](https://wordpress.org/support/users/sergio79/)
 * (@sergio79)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/problem-with-comet-cache/)
 * Hi,
 * i need to load 2 JS script (Google Analytics & Facebook Pixel) after the consent.
 * So, in my functions.php i create a function like this:
 * add_action( ‘wp_footer’, ‘analitiche’ );
    function analitiche() { if ( function_exists(‘
   cookie_accepted’) && cookie_accepted() ) { ?> // my js snippets }
 * But this not works with a caching plugin (Comet Cache), is there a solution?
 * Thanks.

The topic ‘Problem with Comet Cache’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/eu-cookie-law_39293e.svg)
 * [EU Cookie Law for GDPR/CCPA](https://wordpress.org/plugins/eu-cookie-law/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/eu-cookie-law/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/eu-cookie-law/)
 * [Active Topics](https://wordpress.org/support/plugin/eu-cookie-law/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/eu-cookie-law/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/eu-cookie-law/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [sergio79](https://wordpress.org/support/users/sergio79/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/problem-with-comet-cache/)
 * Status: not resolved