Do you want to use the WooCommerce Google Analytics integration to track and understand the user behavior within your shop?
In this document, we will show you how you can use the Google Analytics integration in conjunction with our cookie plugin and what setup is necessary for this.
WooCommerce Google Analytics
First of all, make sure that you have correctly entered all data, such as the tracking ID, within the plugin.
Very important: You must activate the tracking option "Enable Standard Tracking".
Step 1 - Create Script Blocker
Click on the button "Add new" in the menu item "Script Blocker".
Set page and search phrase
In the following view, you must select the page on which the script is loaded. Enter gaProperty, googletagmanager under search phrases. Then click on the Scan button.
After the scan is complete, click the Next button.
Now you have to configure the script blocker. To do this, enter woocommerce-google-analytics under ID and under Name WooCommerce Google Analytics. Also set the status to ON.
Then click on the button Create Script Blocker.
Copy code for Cookies
After the Script Blocker has been created, you must now copy the code for the Content Blocker to the clipboard. We will need this in a moment to set up a functioning content blocker in the second step.
Finally, click on the button "Save all settings". The Script Blocker has now been successfully created.
Step 2 - Create "WooCommerce Analytics" cookie
Click on the button "Add new" in the menu item "Cookies" → "Statistics".
Then select "Custom" as the service and click on the "Next" button.
Cookie Settings & Configure
- ID: woocommerce-google-analytics
- Name: WooCommerce Google Analytics
- Provider: Google LLC
- Purpose: Cookie from Google for website analytics. Generates statistical data about how the visitor uses the website.
- Cookie Name: _ga,_gat,_gid
Then click on the button "Save all settings".