Google Analytics 4 (GA4) WooCommerce Ecommerce Tracking without Plugin

Standard

Implement Google Analytics 4 (GA4) WooCommerce eCommerce Tracking without Plugin using Google Tag Manager

WooCommerce GA4 ecommerce tracking without a plugin with a data layer using Google Tag Manager (GTM) refers to a method of implementing ecommerce tracking for a WooCommerce website using Google Analytics (GA) 4 and GTM, without relying on a WooCommerce plugin for tracking. Instead, a data layer is used to send transaction data from the WooCommerce website to GA4 through GTM.

The data layer is a JavaScript object that holds information about the website and user interactions, such as transaction data. The data layer is used to pass the transaction information from the WooCommerce website to GTM, which then sends the data to GA4. This allows you to have more control over the tracking tags and triggers and provides more accuracy and reliability in the tracking data.

GTM is used to manage the tracking tags and triggers that are used to send the transaction data to GA4. With GTM, you can easily set up and manage the ecommerce tracking for your WooCommerce website, without having to make changes to the website’s code.

To implement ecommerce tracking in Google Analytics (GA) 4 for a WooCommerce website without using a plugin, you can use Google Tag Manager (GTM) and a data layer to set up ecommerce tracking. Here’s how you can do it:

  1. Set up a GTM account: If you don’t already have a GTM account, you’ll need to create one.

2. Create a GTM container: In the GTM account, create a container for your WooCommerce website. This container will hold all of the tracking tags, triggers, and variables for your website.

3. Add the GTM code to your website: Next, add the GTM code to your WooCommerce website. This code should be added to every page of your website, typically in the header section.

4. Set up a data layer: A data layer is a JavaScript object that holds information about the website and user interactions. On your WooCommerce website, you’ll need to set up a data layer that includes information about the transaction, such as the transaction id, revenue, and items purchased.

5. Create a trigger in GTM: In GTM, create a trigger that fires when a customer completes a purchase on your WooCommerce website. This trigger should be set to fire on the Thank You page that is displayed after a purchase is completed.

7. Create a GA4 tag in GTM: In GTM, create a GA4 tag for ecommerce tracking. This tag should be set to fire when the trigger you created in the previous step is triggered. The tag should use the information in the data layer to populate the transaction details in GA4.

In conclusion, using GA4 ecommerce tracking with a data layer and GTM can provide a more accurate, efficient, and customizable tracking solution for your WooCommerce website.

WooCommerce GA4 eCommerce Tracking

Tracking eCommerce Purchases with Google Analytics 4 (GA4) for WooCommerce without Plugin with Google Tag Manager

Warning: If you do n’t know about javascript or do n’t have developing knowledge then do n’t try to Google Analytics 4 (GA4) WooCommerce Ecommerce Tracking without Plugin that can broke your site, Cart and other functionality 

Disclaimer: Google tag manager belongs to Google property 

For Contact: mappchero@gmail.com

I am available for Hire on Freelancer: Freelancer.com

I am available for Hire on Upwork: Upwork.com

I am available for Hire on Peopleperhour: Peopleperhour.com

I am available for Hire on Guru: Guru.com

Enhanced Ecommerce Google Analytics 4 (GA4) for WooCommerce using Google Tag Manager

Standard

Google Analytics 4 Enhanced Ecommerce for WooCommerce using Google Tag Manager

Recently, one of client asks me to integration GA4 eCommerce Tracking and Enhanced Tracking using Google Tag Manager and converted exiting data layer GA4 Data Layer to working for GA4 Enhanced eCommerce Tracking.

WooCommerce GA4 Setup

Install Google Analytics 4 (GA4) on WooCommerce using Google Tag Manager

Google Analytics 4 (GA4) on WordPress WooCommerce Tracking using Google Tag Manager 

Paste this code as high in the <head> of the page as possible:

<!– Google Tag Manager –>

<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
‘https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,’script’,’dataLayer’,’GTM-XXXX’);</script>
<!– End Google Tag Manager –>

Additionally, paste this code immediately after the opening <body> tag:
<!– Google Tag Manager (noscript) –>
<noscript><iframe src=”https://www.googletagmanager.com/ns.html?id=GTM-XXXX”
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<!– End Google Tag Manager (noscript) –>

Note: Make you will replace GTM Tracking Code with your GTM ID XXXXX

WordPress WooCommerce GA4 Enhanced Ecommerce Events for view_item_list: To Track when user reach out category pages where list of product listed on the Page for GA4 (Google Analytics 4) Enhanced Ecommerce Tracking for WordPress WooCommerce using Google Tag Manager 

WooCommerce Store GA4 Tracking

WooCommerce Google Analytics 4 Integration using Google Tag Manager

WordPress WooCommerce GA4 Enhanced Ecommerce Events for select_item: To Track when user click on list of product listed on the pages using GA4 Enhanced Ecommerce Tracking for WordPress WooCommerce using Google Tag Manager

Google Analytics 4 (GA4) for WooCommerce

Integrate WooCommerce Google Analytics 4 (GA4) Setup using Google Tag Manager

WordPress WooCommerce GA4 Enhanced Ecommerce Events for view_item: To Track when user visit a product details page using GA4 Enhanced Ecommerce Tracking for WordPress WooCommerce using Google Tag Manager 

Google Analytics 4 WooCommerce

Install Google Analytics 4 (GA4) on WooCommerce using Google Tag Manager

WordPress WooCommerce GA4 Enhanced Ecommerce Events for add_to_cart: To Track when user visit a product details page then Click on AddtoCart using GA4 Enhanced Ecommerce Tracking for WordPress WooCommerce Via Google Tag Manager 

Google Analytics 4 WooCommerce Setup

Google Analytics 4 WooCommerce Setup Enhanced Ecommerce using Google Tag Manager

WordPress WooCommerce GA4 Enhanced Ecommerce Events for add_to_wishlist: To Track when Add a product into Add to Wishlist using GA4 Enhanced Ecommerce Tracking for WordPress WooCommerce Via Google Tag Manager 

Google Analytics 4 (GA4) Funnel for WooCommerce

Google Analytics 4 (GA4) Funnel for WooCommerce using Google Tag Manager

WordPress WooCommerce GA4 Enhanced Ecommerce Events for view_cart: To Track when user entered to View Cart using GA4 Enhanced Ecommerce Tracking for WordPress WooCommerce Via Google Tag Manager 

WooCommerce Google Analytics 4 Conversion Tracking

WordPress WooCommerce Google Analytics 4 Integration using Google Tag Manager

WordPress WooCommerce GA4 Enhanced Ecommerce Events for remove_from_Cart: To Track when user remove a product from cart to remove_from_Cart using GA4 Enhanced Ecommerce Tracking for WordPress WooCommerce using Google Tag Manager 

woocommerce ga4 ecommerce tracking

WooCommerce Store GA4 Tracking using Google Tag Manager

WordPress WooCommerce GA4 Enhanced Ecommerce Events for begin_checkout: To Track when user entered to begin_checkout using GA4 Enhanced Ecommerce Tracking for WordPress WooCommerce Via Google Tag Manager

Google Analytics GA4 with WooCommerce

Add Google Analytics 4 (GA4) to WooCommerce using Google Tag Manager

WordPress WooCommerce GA4 Enhanced Ecommerce Events for add_shipping_info: To Track when user entered to selected a Shipping Method using GA4 Enhanced Ecommerce Tracking for WordPress WooCommerce Via Google Tag Manager 

Integrate WooCommerce GA4

E-commerce Tracking GA4 Woocommerce using Google Tag Manager

WordPress WooCommerce GA4 Enhanced Ecommerce Events for add_payment_info: To Track when user entered to selected a Payment Method using GA4 Enhanced Ecommerce Tracking for WordPress WooCommerce Via Google Tag Manager

WooCommerce Google Analytics 4 (GA4)

Ecommerce Tracking Google Analytics 4 (GA4) for WooCommerce using Google Tag Manager

WordPress WooCommerce GA4 Enhanced Ecommerce Events for purchase: To Track when user completed purchase using GA4 Enhanced Ecommerce Tracking for WordPress WooCommerce Via Google Tag Manager

Google Analytics 4 (GA4) WooCommerce Data Layer

Correct Install Google Analytics 4 (GA4) on WooCommerce using Google Tag Manager

Warning: If you do n’t know about javascript or do n’t have developing knowledge then do n’t try to Google Analytics 4 (GA4) on WordPress WooCommerce Tracking using Google Tag Manager that can broke your site, Cart and other functionality 

Disclaimer: Google tag manager belongs to Google property 

For Contact: mappchero@gmail.com

I am available for Hire on Freelancer: Freelancer.com

I am available for Hire on Upwork: Upwork.com

I am available for Hire on Peopleperhour: Peopleperhour.com

I am available for Hire on Guru: Guru.com

Advanced WooCommerce Facebook Pixel Events for Dynamic Ads without Any Plugins

Standard

Advanced WooCommerce Facebook Pixel Events for Dynamic Ads without Any Plugins using Google Tag Manager 

Recently one client asks me to implement Advanced WooCommerce Facebook Pixel Events for Dynamic Ads without Any Plugins using Google Tag Manager to Pass Parameters for Dynamic Ads to Retargeting Ads for Facebook 

content_ids —–>Array of integers or strings —–>Product IDs associated with the event, such as SKUs (e.g. [‘ABC123’, ‘XYZ789’]), it’s depend upon on your feed you pass either sku or Product ID

content_category —–>String —–>Category of the page/product.

content_name —–>String —–> Name of the page of product for WooCommerce

content_type —–>String —–> It should be product 

currency —–>String —–> value of Currency of WooCommerce 

value —–>Integer or float —–> Amount of product , Cart and Purchase order confirmation

Step 1: Install Google Tag Manager on Advanced WooCommerce Facebook Pixel Events for Dynamic Ads without Any Plugins using Google Tag Manager

Paste this code as high in the <head> of the page as possible:
<!– Google Tag Manager –>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
‘https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,’script’,’dataLayer’,’GTM-XXXX’);</script>
<!– End Google Tag Manager –>
Additionally, paste this code immediately after the opening <body> tag:
<!– Google Tag Manager (noscript) –>
<noscript><iframe src=”https://www.googletagmanager.com/ns.html?id=GTM-XXXX”
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<!– End Google Tag Manager (noscript) –>

Note: Make you will replace GTM Tracking Code with your GTM ID XXXXX

Step 2 – Product Page (ViewContent)– User Visited to Product Page of WooCommerce to Setup Facebook Events for Dynamic Ads using Google Tag Manager without Any Plugins

WooCommerce Facebook Pixel Events

WooCommerce Facebook pixel with Dynamic Ads using Google Tag Manager without Any Plugin

Step 3 – Product Page (AddToCart)– User Visited to Product Page and Click on AddToCart, Product added to Shopping cart to setup Facebook Events for Dynamic Ads using Google Tag Manager without Any Plugins

Track Facebook Pixel Conversion on WooCommerce

WooCommerce Facebook Pixel using Google Tag Manager without any plugins

Step 4InitiateCheckout –  When user started process to buy a product Facebook Events for Dynamic Ads using Google Tag Manager without Any Plugins

Facebook Pixel For WooCommerce

WooCommerce Facebook pixel using Google Tag Manager without any plugins

Step 5Purchase –  When user completed purchase setup Facebook dynamic purchase pixel using Google Tag Manager without any plugins

Track WooCommerce Facebook Conversion Pixel

Facebook Purchase event using Google Tag Manager without any plugins

Warning: If you do n’t know about javascript or do n’t have developing knowledge then do n’t try to Advanced WooCommerce Facebook Pixel Events for Dynamic Ads without Any Plugins  using Google Tag Manager that can broke your site, Cart and other functionality 

Disclaimer: Google tag manager belongs to Google property 

For Contact: mappchero@gmail.com

I am available for Hire on Freelancer: Freelancer.com

I am available for Hire on Upwork: Upwork.com

I am available for Hire on Peopleperhour: Peopleperhour.com

I am available for Hire on Guru: Guru.com

Setup Enhanced Ecommerce and E-commerce Tracking in WooCommerce using Google Tag Manager without any plugin

Standard

Enhanced eCommerce & E-commerce Tracking in WooCommerce using Google Tag Manager without using a plugin of WordPress

Recently once client asks, they want the track Enhanced eCommerce & E-commerce Tracking using Google Tag Manager without using a plugin of WordPress.

Why they don’t use plugin because they have fully customized Woocomerce website whenever they tried to install a plugin website broke the site.

They want to see entire details of E-commerce Tracking and Shopping behavior in Google Analytic using Google Tag Manager without plugin of Woo-commerce E-commerce Tracking in WordPress.

For Configure Enhanced eCommerce & E-commerce Tracking in WooCommerce, Should passed data-layer (Data Layer), See the below List Array and String to pass this variable to Track E-commerce Tracking

E-commerce Tracking in WooCommerce using Google Tag Manager without any plugin in WordPress

Here’s an example of how the data layer code might be implemented in JavaScript into Woocommerce using Google Tag Manager Tracking E-commerce Tracking

<script>
window.dataLayer = window.dataLayer || []
dataLayer.push({
   'transactionId': '1234',
   'transactionAffiliation': 'Acme Clothing',
   'transactionTotal': 38.26,
   'transactionTax': 1.29,
   'transactionShipping': 5,
   'transactionProducts': [{
       'sku': 'DD44',
       'name': 'T-Shirt',
       'category': 'Apparel',
       'price': 11.99,
       'quantity': 1
   },{
       'sku': 'AA1243544',
       'name': 'Socks',
       'category': 'Apparel',
       'price': 9.99,
       'quantity': 2
   }]
});
</script>

Step 1. First Install Google Tag Manager Enhanced eCommerce & E-commerce Tracking in WooCommerce using Google Tag Manager without using a plugin of WordPress

Paste this code as high in the <head> of the page as possible:
<!– Google Tag Manager –>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
‘https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,’script’,’dataLayer’,’GTM-XXXXX’);</script>
<!– End Google Tag Manager –>
Additionally, paste this code immediately after the opening <body> tag:
<!– Google Tag Manager (noscript) –>
<noscript><iframe src=”https://www.googletagmanager.com/ns.html?id=GTM-WN29THP”
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<!– End Google Tag Manager (noscript) –>

Note:  Make sure you will place google tag manager code inside the body tag </body>

Step 2. Need to place dataLayer for Enhanced eCommerce & E-commerce Tracking in WooCommerce using Google Tag Manager Datalayer code on function.php without using any plugin for WordPress for E-commerce Tracking and Enhanced E-commerce Tracking in Woocommerce

Wodrepss Admin ——> Appearance ——>Editor ——-> Your theme ——-> Functions.php (in last )

DataLayer E-commerce Tracking in WooCommerce

Setup Enhanced Ecommerce and E-commerce Tracking DataLayer in WooCommerce without plugins

Note:  Put DataLayer of Enhanced Ecommerce and E-commerce Tracking in WooCommerce above the Google Tag Manager Code 

Step 3. Now Configure Trigger , Tag and Event Triggers in Google Tag Manager for Woocommerce without any pluing etup Enhanced Ecommerce and E-commerce Tracking in WooCommerce

2016-06-02_0338

Now Create Google Tag Manager Custom Event to firing Setup Enhanced Ecommerce and E-commerce Tracking in WooCommerce using Google Tag Manager without any plugin

Setup Enhanced Ecommerce and E-commerce Tracking in WooCommerce

 Step 4It’s time to check Result with Google Tag Manager for Setup Enhanced Ecommerce and E-commerce Tracking in WooCommerce using Google Tag Manager without any plugin

Successfully fired Custom Event for Enhanced Ecommerce and E-commerce Tracking in WooCommerce

 For Contact: mappchero@gmail.com

Warning:if you do n’t know about javascript or do n’t have developing knowledge then do n’t try to implement Enhanced Ecommerce and E-commerce Tracking in WooCommerce using Google Tag Manager without any plugin that can broke your site, Cart and other functionality 

Disclaimer: Google tag manager belongs to Google property 

No Fields Found.

Exclude WordPress Admin traffic using Google Tag Manager without any Plugins

Standard

Exclude admin(WordPress) users from being tracked using Google Tag Manager Without Any Plugins

Recently I received a request from one of client they want exclude WordPress admin traffic using Google Tag Manager without any plugins on WordPress Back-end.

They said, they know few plugin in WordPress, does not want to use because its fully customized web site and Also large website so many bloggers updating content at the same time on the WordPress.

Why Should Exclude WordPress Admin Traffic From Google Analytics using Google Tag Manager without any Plugins and using Data Layer Placing Directly on the WordPress Back-end using Google Tag Manager.

They have already tried solution these solutions in WordPress to Exclude/Block Traffic in Google Analytic

  1. Blocking IP Address Excluding WordPress Admin TrafficUsing filters in WordPress Admin or Apply filter in Google Analytic, it fails when large number admin users access at the same time. and also users are using dynamic IP address.    

2. Dummy Cookie Concept – The cookie concept fails some country due laws of a cookie and also if some body disable cookie on there system, in that case solution is also fails 

Then I have decided to write a data Layer to exuding Admin traffic of WordPress using Google Tag Manager without any Plugins, Its took my time to find a solution and finally ended with solution of Excluding of Admin Traffic of WordPress using Google Tag Manager.

Step 1First Install Google Tag Manager on Your Website /Store

Copy the code below and paste it onto every page of your website. Place it immediately after the opening <body> tag.

<!– Google Tag Manager –>
<noscript><iframe src=”//www.googletagmanager.com/ns.html?id=GTM-XXXXXX
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
‘//www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,’script’,’dataLayer’,’GTM-XXXXXX‘);</script>
<!– End Google Tag Manager –>

Note: Make you will replace GTM Tracking Code with your GTM ID

Step 2Place DataLayer Code Place on functions.php in WordPress Back-end exclude to admin Traffic.

DataLayer Excluding in Google Tag Manager

Exclude WordPress Admin Traffic using Google Tag Manager without Any Plugins

Step 3Create  a Data Layer Variable to Track admin users to State “Logged-In” and “Logged-out” using without any plugin of WordPress

Exclude Admin Traffic using Google Tag Manager in WordPress

Step 4It’s time be Test the result using Google Tag Manager 

When Login WordPress Back-end 

Tracking When Users are Login in WordPress Back-end

When Login out WordPress Back-end

Exclude Admin Traffic in WordPress

Login out Visitor Tracking in WordPress exclude admin Traffic

Step 5It’s time check Result with Google Analytic and Implement Trigger in Google Tag Manager

Exclude Admin Visitor from the Website

When WordPress Back-end Login no visitor tracking in Google Anaytic

For Contact: mappchero@gmail.com

Warning:if you do n’t know about javascript or do n’t have developing knowledge then do n’t try to implement on exclude WordPress Admin Traffic using Google Tag Manager  that can broke your site, Cart and other functionality 

Disclaimer: Google tag manager belongs to Google property 

No Fields Found.