From f6c2d01d7ead7d392060ee683c49be558c0c3bad Mon Sep 17 00:00:00 2001 From: Thomas Geiger Date: Mon, 3 Apr 2023 15:03:00 +0200 Subject: [PATCH] Minor code formatting + added changelog --- js/gtm4wp-woocommerce-enhanced.js | 2 +- readme.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/js/gtm4wp-woocommerce-enhanced.js b/js/gtm4wp-woocommerce-enhanced.js index ce8a2110..af8f7a07 100644 --- a/js/gtm4wp-woocommerce-enhanced.js +++ b/js/gtm4wp-woocommerce-enhanced.js @@ -764,7 +764,7 @@ function gtm4wp_process_woocommerce_pages() { } const ctrl_key_pressed = e.ctrlKey || e.metaKey; - const target_new_tab = (matching_link_element.target === '_blank'); + const target_new_tab = ( '_blank' === matching_link_element.target ); e.preventDefault(); if ( ctrl_key_pressed || target_new_tab ) { diff --git a/readme.txt b/readme.txt index 0b14f908..b251505f 100644 --- a/readme.txt +++ b/readme.txt @@ -239,6 +239,7 @@ https://gtm4wp.com/how-to-articles/how-to-exclude-admin-users-from-being-tracked * Added: new advanced option to disable browser console.log() messages on frontend * Added: new filter: gtm4wp_purchase_datalayer to be able to alter data layer content for the purchase data * Added: new filter: gtm4wp_datalayer_on_pageload to be able to alter data layer content generated during page load +* Updated: WooCommerce integration will also check target attitbute of product links while firing select_item event, thanks [robklo])(https://github.com/robklo) = 1.16.2 =