Commit e2280a5e756 for woocommerce

commit e2280a5e756bf52f6310f90099b602023ce5b47f
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date:   Mon May 25 09:28:56 2026 +0200

    Add tracking for attribute type when updating or saving product attributes (#65228)

    * Add tracking for attribute type when updating or saving product attributes

    * Add changelog

    * Code order

diff --git a/plugins/woocommerce/changelog/add-attribute-type-tracking b/plugins/woocommerce/changelog/add-attribute-type-tracking
new file mode 100644
index 00000000000..6cfdb310801
--- /dev/null
+++ b/plugins/woocommerce/changelog/add-attribute-type-tracking
@@ -0,0 +1,4 @@
+Significance: patch
+Type: update
+
+Add tracking for attribute type when updating or saving product attributes
diff --git a/plugins/woocommerce/client/admin/client/wp-admin-scripts/attributes-tracking/index.js b/plugins/woocommerce/client/admin/client/wp-admin-scripts/attributes-tracking/index.js
index 4f50605b477..4d0db40a68d 100644
--- a/plugins/woocommerce/client/admin/client/wp-admin-scripts/attributes-tracking/index.js
+++ b/plugins/woocommerce/client/admin/client/wp-admin-scripts/attributes-tracking/index.js
@@ -10,11 +10,13 @@ const configureTerms = document.querySelectorAll( '.configure-terms' );

 addNewAttribute?.addEventListener( 'click', function () {
 	const archiveInput = document.querySelector( '#attribute_public' );
+	const attributeTypeInput = document.querySelector( '#attribute_type' );
 	const sortOrder = document.querySelector( '#attribute_orderby' );
 	const name = document.querySelector( '#attribute_label' );
 	const slug = document.querySelector( '#attribute_name' );
 	recordEvent( 'product_attributes_add', {
 		enable_archive: archiveInput?.checked ? 'yes' : 'no',
+		attribute_type: attributeTypeInput?.value,
 		default_sort_order: sortOrder?.value,
 		name: name?.value,
 		slug: slug?.value,
@@ -24,9 +26,11 @@ addNewAttribute?.addEventListener( 'click', function () {

 saveAttribute?.addEventListener( 'click', function () {
 	const archiveInput = document.querySelector( '#attribute_public' );
+	const attributeTypeInput = document.querySelector( '#attribute_type' );
 	const sortOrder = document.querySelector( '#attribute_orderby' );
 	recordEvent( 'product_attributes_update', {
 		enable_archive: archiveInput?.checked ? 'yes' : 'no',
+		attribute_type: attributeTypeInput?.value,
 		default_sort_order: sortOrder?.value,
 		page: 'attributes',
 	} );