Setup GA4
For WordPress with Woo-commerce installed
- Install GTM4WP
- Setup a Google Analytics and get a measurement ID, starts with G-
- Setup a G Tag Manager Account and follow this guide.
- If you publish the tag, and you get an error: Unknown variable “Event” found in a tag.
- You will need to enable the Event system variable first. It can be done by visiting the “Variables” page, select “Configure” in the “Built-In Variables” panel and check the box next to the “Event” variable.
- In GTM4WP you will need to have the following settings
- Google Tag Manager ID: starting with GTM-
- Container code ON/OFF: Turned to On
- Container code compatibility mode: Manually coded (needs tweak in your template)
That should be all the settings for GA4.
Default WordPress Sitemap location
For WordPress no SEO plugins installed
- EG
- https://example.com/wp-sitemap.xml
However I do not recommend that you submit this to google console but you submit the relevant inner sitemaps instead EG
- For Pages
- https://example.com/wp-sitemap-posts-page-1.xml
- For posts
- https://example.com/wp-sitemap-posts-post-1.xml
- For products
- https://example.com/wp-sitemap-posts-product-1.xml
- Otherwise it will also add
- https://example.com/wp-sitemap-taxonomies-category-1.xml
- https://example.com/wp-sitemap-taxonomies-product_cat-1.xml
- https://example.com/wp-sitemap-users-1.xml
Those additional sitemaps will probably not be needed for google search console.
Which will probably submit duplicate content.