Setup GA4

For WordPress with Woo-commerce installed

Google Tag Manager settings interface screenshot
  1. Install GTM4WP
  2. Setup a Google Analytics and get a measurement ID, starts with G- 
  3. Setup a G Tag Manager Account and follow this guide.
  4. 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.
  5. In GTM4WP you will need to have the following settings
    1. Google Tag Manager ID: starting with GTM-
    2. Container code ON/OFF: Turned to On
    3. Container code compatibility mode: Manually coded (needs tweak in your template)

 

In Google Ads, 

Need the following tags

  • Google Tag (starts with AW- ….) > can be found > Tools > Data manager
    • Click manage > Installation Instructions > Install Manually 
    • Test your website (optional): put your website to check if it works OK

 

  • In GTM > Need to add the Google Tag
  • In GTM > Need to add the conversion linker for improved tracking

In Addition 

You can add container to track mailto:  and tel: clicks 

 

 

*** IMPORTANT GA4****

  • Admin > Data Display > Events

There should be stream data detected to show the event tracking via GA4, sometimes it is 24 hours delayed, therefore it will be good to check this in 24 hours after you submit some information to ensure it is tracking.

 

Google Analytics events management dashboard screenshot.

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.