Title: Woocommerce events load before cookie consent update state
Last modified: March 25, 2024

---

# Woocommerce events load before cookie consent update state

 *  [Michael](https://wordpress.org/support/users/miastostron/)
 * (@miastostron)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/woocommerce-events-load-before-cookie-consent-update-state/)
 * Hi, we are using Copmlianz plugin which has integration with GTM4WP. However,
   woocommerce events such as view_item, view_cart, begin_checkout, purchase are
   loading in GTM preview mode before the consents are loaded. This causes them 
   to have either no consents set or the on-page default, which can be set in the
   GTM4WP plugin settings – Integration – Cookie consent mode. Unfortunately, user
   provided consents are not included. Is there any way to delay the loading of 
   the Woocommerce events so that they can load the consents first?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [hazelly93](https://wordpress.org/support/users/hazelly93/)
 * (@hazelly93)
 * [2 years ago](https://wordpress.org/support/topic/woocommerce-events-load-before-cookie-consent-update-state/#post-17679517)
 * We encountered the same problem with GTM4WP in combination with Borlabs and Woocommerce.
   Is there any further information about this?
 *  [basti089](https://wordpress.org/support/users/basti089/)
 * (@basti089)
 * [2 years ago](https://wordpress.org/support/topic/woocommerce-events-load-before-cookie-consent-update-state/#post-17693839)
 * We have the same problem like hezelly93 with GTM4WP in combination with Borlabs
   and Woocommerce… Is there already a solution? Thank you in advance.
 *  [agencjadevispace](https://wordpress.org/support/users/agencjadevispace/)
 * (@agencjadevispace)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/woocommerce-events-load-before-cookie-consent-update-state/#post-17793846)
 * We have the same problem as [Michael](https://wordpress.org/support/users/miastostron/).
   We are using Complianz plugin but woocommerce events are loading in GTM preview
   mode before the consents are loaded. The tag is set according to the instructions:
   [https://gtm4wp.com/google-tag-manager-for-woocommerce/how-to-setup-enhanced-ecommerce-tracking-google-analytics-4-ga4-version](https://gtm4wp.com/google-tag-manager-for-woocommerce/how-to-setup-enhanced-ecommerce-tracking-google-analytics-4-ga4-version).
   
   Is there any further information about this?
 *  [piotroxy](https://wordpress.org/support/users/piotroxy/)
 * (@piotroxy)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/woocommerce-events-load-before-cookie-consent-update-state/#post-18065031)
 * Has anyone managed to fix this issue?
 * I think that because of this issue a large portion of sessions with the purchase
   event are assigned to ‘Unassigned’ in GA4.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Woocommerce events load before cookie consent update state’ is closed
to new replies.

 * ![](https://ps.w.org/duracelltomi-google-tag-manager/assets/icon-256x256.png?
   rev=1708451)
 * [GTM4WP - A Google Tag Manager (GTM) plugin for WordPress](https://wordpress.org/plugins/duracelltomi-google-tag-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duracelltomi-google-tag-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/reviews/)

## Tags

 * [cookie consent](https://wordpress.org/support/topic-tag/cookie-consent/)

 * 4 replies
 * 6 participants
 * Last reply from: [piotroxy](https://wordpress.org/support/users/piotroxy/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/woocommerce-events-load-before-cookie-consent-update-state/#post-18065031)
 * Status: not resolved