Version Description
12.05.2022
- New: Added customer lifetime value output for Google Ads
- Tweak: Renamed the plugin from Pixel Manager for WooCommerce to Pixel Manager for WooCommerce
- Tweak: Added user identifiers for FB for orders and logged in users
- Tweak: Temporary disabled off_site_payment_gateway check
- Fix: Now the cache is only flushed when the Pixel Manager itself is updated
- Fix: Fixed the new_customer evaluation for guest buyers
- Fix: Fixed the position of the 'scripts blocked' warning message in the back-end if admin scripts don't load
- Fix: Fixed the link of the 'admin scripts not loaded' message
Download this release
Release Info
Developer | alekv |
Plugin | Pixel Manager for WooCommerce – Track Google Analytics, Google Ads, Facebook and more |
Version | 1.17.0 |
Comparing to | |
See all releases |
Code changes from version 1.16.14 to 1.17.0
- classes/admin/class-admin.php +18 -7
- classes/admin/class-debug-info.php +1 -1
- classes/admin/class-documentation.php +67 -65
- classes/admin/class-environment-check.php +13 -1
- classes/admin/class-notifications.php +2 -2
- classes/class-deprecated-filters.php +20 -0
- classes/pixels/class-pixel-manager.php +53 -25
- classes/pixels/class-pixel.php +2 -1
- classes/pixels/class-script-manager.php +0 -284
- classes/pixels/google/class-google-analytics-refund.php +0 -57
- classes/pixels/google/class-google-pixel-manager.php +5 -9
- classes/pixels/trait-product.php +4 -4
- classes/pixels/trait-shop.php +493 -354
- js/admin/main.js +1 -1
- js/admin/main.min.js +1 -0
- js/admin/wpm-admin-freemius.p1.min.js.map +1 -1
- js/admin/wpm-admin.p1.min.js.map +1 -1
- js/public/wpm-public.p1.min.js +1 -1
- js/public/wpm-public.p1.min.js.map +1 -1
- languages/woocommerce-google-adwords-conversion-tracking-tag.pot +123 -123
- readme.txt +24 -12
- wgact.php +17 -20
classes/admin/class-admin.php
CHANGED
@@ -75,7 +75,7 @@ class Admin
|
|
75 |
|
76 |
public function fs_after_purchase_js( $js_function )
|
77 |
{
|
78 |
-
return "\n\t\tfunction ( response ) {\n\n let\n isTrial = (null != response.purchase.trial_ends),\n isSubscription = (null != response.purchase.initial_amount),\n total = isTrial ? 0 : (isSubscription ? response.purchase.initial_amount : response.purchase.gross).toString(),\n productName = '
|
79 |
}
|
80 |
|
81 |
public function fs_inject_additional_scripts( $html )
|
@@ -764,8 +764,19 @@ class Admin
|
|
764 |
public function wpm_plugin_options_page()
|
765 |
{
|
766 |
?>
|
767 |
-
|
768 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
769 |
<p>
|
770 |
<?php
|
771 |
esc_html_e( 'It looks like you are using some sort of ad or script blocker which is blocking the script and CSS files of this plugin.
|
@@ -774,7 +785,7 @@ class Admin
|
|
774 |
</p>
|
775 |
<p>
|
776 |
<a href="<?php
|
777 |
-
$this->
|
778 |
?>"
|
779 |
target="_blank">
|
780 |
<?php
|
@@ -1518,7 +1529,7 @@ class Admin
|
|
1518 |
$this->get_status_icon_new( $this->options['google']['analytics']['link_attribution'], $this->options['google']['analytics']['universal']['property_id'] || $this->options['google']['analytics']['ga4']['measurement_id'], true );
|
1519 |
?>
|
1520 |
<?php
|
1521 |
-
// echo $this->get_documentation_html('/wgact/?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
1522 |
?>
|
1523 |
<?php
|
1524 |
|
@@ -1555,7 +1566,7 @@ class Admin
|
|
1555 |
<?php
|
1556 |
$this->get_status_icon_new( $this->options['google']['user_id'], $this->options['google']['analytics']['universal']['property_id'] || $this->options['google']['analytics']['ga4']['measurement_id'] || $this->google->is_google_ads_active(), true );
|
1557 |
$this->html_pro_feature();
|
1558 |
-
// echo $this->get_documentation_html('/wgact/?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
1559 |
?>
|
1560 |
<?php
|
1561 |
|
@@ -1754,7 +1765,7 @@ class Admin
|
|
1754 |
echo '</p><br>' ;
|
1755 |
}
|
1756 |
|
1757 |
-
// echo $this->get_documentation_html('/wgact/?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
1758 |
echo '<br><br>' ;
|
1759 |
// esc_html_e('The conversion ID looks similar to this:', 'woocommerce-google-adwords-conversion-tracking-tag');
|
1760 |
// echo ' <i>123456789</i>';
|
75 |
|
76 |
public function fs_after_purchase_js( $js_function )
|
77 |
{
|
78 |
+
return "\n\t\tfunction ( response ) {\n\n let\n isTrial = (null != response.purchase.trial_ends),\n isSubscription = (null != response.purchase.initial_amount),\n total = isTrial ? 0 : (isSubscription ? response.purchase.initial_amount : response.purchase.gross).toString(),\n productName = 'Pixel Manager for WooCommerce',\n // storeUrl = 'https://sweetcode.com',\n storeName = 'SweetCode';\n \n window.dataLayer = window.dataLayer || [];\n\n function gtag() {\n dataLayer.push(arguments);\n }\n \n gtag('js', new Date()); \n \n gtag('config', 'UA-39746956-10', {'anonymize_ip': true});\n gtag('config', 'G-2QE000DX8D');\n gtag('config', 'AW-406204436');\n \n gtag('event', 'purchase', {\n 'send_to':['UA-39746956-10', 'G-2QE000DX8D'],\n 'transaction_id':response.purchase.id.toString(),\n 'currency': response.purchase.currency.toUpperCase(),\n 'discount':0,\n 'items':[{\n 'id':response.purchase.plan_id.toString(),\n 'quantity':1,\n 'price':total,\n 'name':productName,\n 'category': 'Plugin',\n }],\n 'affiliation': storeName,\n 'value':response.purchase.initial_amount.toString()\n });\n \n gtag('event', 'conversion', {\n 'send_to': 'AW-406204436/XrUYCK3J8YoCEJTg2MEB',\n 'value': response.purchase.initial_amount.toString(),\n 'currency': response.purchase.currency.toUpperCase(),\n 'transaction_id': response.purchase.id.toString()\n });\n \n !function(f,b,e,v,n,t,s)\n {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n n.queue=[];t=b.createElement(e);t.async=!0;\n t.src=v;s=b.getElementsByTagName(e)[0];\n s.parentNode.insertBefore(t,s)}(window, document,'script',\n 'https://connect.facebook.net/en_US/fbevents.js');\n fbq('init', '257839909406661');\n fbq('track', 'PageView');\n \n fbq('track', 'Purchase', {\n currency: 'USD',\n value: total\n });\n \n var _dcq = _dcq || [];\n\t\t\tvar _dcs = _dcs || {};\n\t\t\t_dcs.account = '5594556';\n\t\n\t\t\t(function() {\n\t\t\t\tvar dc = document.createElement('script');\n\t\t\t\tdc.type = 'text/javascript'; dc.async = true;\n\t\t\t\tdc.src = '//tag.getdrip.com/5594556.js';\n\t\t\t\tvar s = document.getElementsByTagName('script')[0];\n\t\t\t\ts.parentNode.insertBefore(dc, s);\n\t\t\t})();\n\t\t\t\n\t\t\twindow._dcq.push([\n\t\t\t\t'track',\n\t\t\t\t'Placed an order',\n\t\t\t]);\n\t\t\t\n\t\t\twindow._dcq.push([\n\t\t\t\t'track',\n\t\t\t\t'purchase',\n\t\t\t\t{\n\t\t\t\t\tvalue: total * 100,\n\t\t\t\t\tcurrency_code: response.purchase.currency.toUpperCase(),\n\t\t\t\t}\n\t\t\t]);\n \n }";
|
79 |
}
|
80 |
|
81 |
public function fs_inject_additional_scripts( $html )
|
764 |
public function wpm_plugin_options_page()
|
765 |
{
|
766 |
?>
|
767 |
+
|
768 |
+
<div id="script-blocker-notice"
|
769 |
+
style="
|
770 |
+
font-weight: bold;
|
771 |
+
width:90%;
|
772 |
+
float: left;
|
773 |
+
margin: 5px 15px 2px;
|
774 |
+
padding: 1px 12px;
|
775 |
+
background: #fff;
|
776 |
+
border: 1px solid #c3c4c7;
|
777 |
+
border-left-width: 4px;
|
778 |
+
border-left-color: #d63638;
|
779 |
+
box-shadow: 0 1px 1px rgb(0 0 0 / 4%);">
|
780 |
<p>
|
781 |
<?php
|
782 |
esc_html_e( 'It looks like you are using some sort of ad or script blocker which is blocking the script and CSS files of this plugin.
|
785 |
</p>
|
786 |
<p>
|
787 |
<a href="<?php
|
788 |
+
echo esc_url( $this->documentation->get_link( 'script_blockers' ) ) ;
|
789 |
?>"
|
790 |
target="_blank">
|
791 |
<?php
|
1529 |
$this->get_status_icon_new( $this->options['google']['analytics']['link_attribution'], $this->options['google']['analytics']['universal']['property_id'] || $this->options['google']['analytics']['ga4']['measurement_id'], true );
|
1530 |
?>
|
1531 |
<?php
|
1532 |
+
// echo $this->get_documentation_html('/wgact/?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=google-consent-mode#/consent-mgmt/google-consent-mode');
|
1533 |
?>
|
1534 |
<?php
|
1535 |
|
1566 |
<?php
|
1567 |
$this->get_status_icon_new( $this->options['google']['user_id'], $this->options['google']['analytics']['universal']['property_id'] || $this->options['google']['analytics']['ga4']['measurement_id'] || $this->google->is_google_ads_active(), true );
|
1568 |
$this->html_pro_feature();
|
1569 |
+
// echo $this->get_documentation_html('/wgact/?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=google-consent-mode#/consent-mgmt/google-consent-mode');
|
1570 |
?>
|
1571 |
<?php
|
1572 |
|
1765 |
echo '</p><br>' ;
|
1766 |
}
|
1767 |
|
1768 |
+
// echo $this->get_documentation_html('/wgact/?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=google-ads-conversion-id#/pixels/google-ads?id=configure-the-plugin');
|
1769 |
echo '<br><br>' ;
|
1770 |
// esc_html_e('The conversion ID looks similar to this:', 'woocommerce-google-adwords-conversion-tracking-tag');
|
1771 |
// echo ' <i>123456789</i>';
|
classes/admin/class-debug-info.php
CHANGED
@@ -357,7 +357,7 @@ class Debug_Info {
|
|
357 |
$total = $fired + $not_fired;
|
358 |
|
359 |
if ($total > 0) {
|
360 |
-
$percentage =
|
361 |
$text = $gateway . ' (' . $value['method_title'] . '): ' . $fired . ' / ' . $total . ' => ' . $percentage * 100 . '% accuracy';
|
362 |
} else {
|
363 |
$text = $gateway . ' (' . $value['method_title'] . '): ' . $fired . ' / ' . $total;
|
357 |
$total = $fired + $not_fired;
|
358 |
|
359 |
if ($total > 0) {
|
360 |
+
$percentage = wc_format_decimal((float) ( $fired / $total ), 2);
|
361 |
$text = $gateway . ' (' . $value['method_title'] . '): ' . $fired . ' / ' . $total . ' => ' . $percentage * 100 . '% accuracy';
|
362 |
} else {
|
363 |
$text = $gateway . ' (' . $value['method_title'] . '): ' . $fired . ' / ' . $total;
|
classes/admin/class-documentation.php
CHANGED
@@ -7,6 +7,7 @@ if (!defined('ABSPATH')) {
|
|
7 |
}
|
8 |
|
9 |
class Documentation {
|
|
|
10 |
protected $documentation_host;
|
11 |
|
12 |
public function __construct() {
|
@@ -14,122 +15,123 @@ class Documentation {
|
|
14 |
}
|
15 |
|
16 |
public function get_link( $key = 'default' ) {
|
|
|
17 |
$documentation_links = [
|
18 |
'default' => [
|
19 |
'default' => '/docs/wpm/',
|
20 |
-
'wcm' => '/'],
|
21 |
'script_blockers' => [
|
22 |
-
'default' => '/docs/wpm/setup/script-blockers/?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
23 |
-
'wcm' => '/'],
|
24 |
'google_analytics_universal_property' => [
|
25 |
-
'default' => '/docs/wpm/plugin-configuration/google-analytics?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
26 |
-
'wcm' => '/'],
|
27 |
'google_analytics_4_id' => [
|
28 |
-
'default' => '/docs/wpm/plugin-configuration/google-analytics#connect-an-existing-google-analytics-4-property?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
29 |
-
'wcm' => '/'],
|
30 |
'google_ads_conversion_id' => [
|
31 |
-
'default' => '/docs/wpm/plugin-configuration/google-ads#configure-the-plugin?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
32 |
-
'wcm' => '/'],
|
33 |
'google_ads_conversion_label' => [
|
34 |
-
'default' => '/docs/wpm/plugin-configuration/google-ads#configure-the-plugin?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
35 |
-
'wcm' => '/'],
|
36 |
'google_optimize_container_id' => [
|
37 |
-
'default' => '/docs/wpm/plugin-configuration/google-optimize?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
38 |
-
'wcm' => '/'],
|
39 |
'facebook_pixel_id' => [
|
40 |
-
'default' => '/docs/wpm/plugin-configuration/meta#find-the-pixel-id?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
41 |
-
'wcm' => '/'],
|
42 |
'bing_uet_tag_id' => [
|
43 |
-
'default' => '/docs/wpm/plugin-configuration/microsoft-advertising#setting-up-the-uet-tag?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
44 |
-
'wcm' => '/'],
|
45 |
'twitter_pixel_id' => [
|
46 |
'default' => '/docs/wpm/plugin-configuration/twitter',
|
47 |
-
'wcm' => '/'],
|
48 |
'pinterest_pixel_id' => [
|
49 |
'default' => '/docs/wpm/plugin-configuration/pinterest',
|
50 |
-
'wcm' => '/'],
|
51 |
'snapchat_pixel_id' => [
|
52 |
'default' => '/docs/wpm/plugin-configuration/snapchat',
|
53 |
-
'wcm' => '/'],
|
54 |
'tiktok_pixel_id' => [
|
55 |
'default' => '/docs/wpm/plugin-configuration/tiktok',
|
56 |
-
'wcm' => '/'],
|
57 |
'hotjar_site_id' => [
|
58 |
-
'default' => '/docs/wpm/plugin-configuration/hotjar#hotjar-site-id?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
59 |
-
'wcm' => '/'],
|
60 |
'google_gtag_deactivation' => [
|
61 |
-
'default' => '/docs/wpm/faq/#google-tag-assistant-reports-multiple-installations-of-global-site-tag-gtagjs-detected-what-shall-i-do&utm_medium=documentation-link&utm_campaign=
|
62 |
-
'wcm' => '/'],
|
63 |
'google_consent_mode' => [
|
64 |
-
'default' => '/docs/wpm/consent-management/google-consent-mode?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
65 |
-
'wcm' => '/'],
|
66 |
'google_consent_regions' => [
|
67 |
-
'default' => '/docs/wpm/consent-management/google-consent-mode#regions?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
68 |
-
'wcm' => '/'],
|
69 |
'google_analytics_eec' => [
|
70 |
'default' => '/docs/wpm/plugin-configuration/google-analytics#enhanced-e-commerce-funnel-setup',
|
71 |
-
'wcm' => '/'],
|
72 |
'google_analytics_4_api_secret' => [
|
73 |
-
'default' => '/docs/wpm/plugin-configuration/google-analytics#ga4-api-secret?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
74 |
-
'wcm' => '/'],
|
75 |
'google_ads_enhanced_conversions' => [
|
76 |
-
'default' => '/docs/wpm/plugin-configuration/google-ads#enhanced-conversions?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
77 |
-
'wcm' => '/'],
|
78 |
'google_ads_phone_conversion_number' => [
|
79 |
-
'default' => '/docs/wpm/plugin-configuration/google-ads#phone-conversion-number?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
80 |
-
'wcm' => '/'],
|
81 |
'google_ads_phone_conversion_label' => [
|
82 |
-
'default' => '/docs/wpm/plugin-configuration/google-ads#phone-conversion-number?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
83 |
-
'wcm' => '/'],
|
84 |
'explicit_consent_mode' => [
|
85 |
'default' => '/docs/wpm/consent-management/overview/#explicit-consent-mode',
|
86 |
-
'wcm' => '/'],
|
87 |
'facebook_capi_token' => [
|
88 |
-
'default' => '/docs/wpm/plugin-configuration/meta#facebook-conversion-api-capi?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
89 |
-
'wcm' => '/'],
|
90 |
'facebook_capi_user_transparency_process_anonymous_hits' => [
|
91 |
-
'default' => '/docs/wpm/plugin-configuration/meta#user-transparency-settings?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
92 |
-
'wcm' => '/'],
|
93 |
'facebook_capi_user_transparency_send_additional_client_identifiers' => [
|
94 |
-
'default' => '/docs/wpm/plugin-configuration/meta#user-transparency-settings?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
95 |
-
'wcm' => '/'],
|
96 |
'facebook_microdata' => [
|
97 |
-
'default' => '/docs/wpm/plugin-configuration/meta#microdata-tags-for-catalogues?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
98 |
-
'wcm' => '/'],
|
99 |
'maximum_compatibility_mode' => [
|
100 |
-
'default' => '/docs/wpm/plugin-configuration/general-settings/#maximum-compatibility-mode?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
101 |
-
'wcm' => '/'],
|
102 |
'google_ads_dynamic_remarketing' => [
|
103 |
-
'default' => '/docs/wpm/plugin-configuration/dynamic-remarketing?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
104 |
-
'wcm' => '/'],
|
105 |
'variations_output' => [
|
106 |
-
'default' => '/docs/wpm/plugin-configuration/dynamic-remarketing?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
107 |
-
'wcm' => '/'],
|
108 |
'aw_merchant_id' => [
|
109 |
-
'default' => '/docs/wpm/plugin-configuration/google-ads/#conversion-cart-data?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
110 |
-
'wcm' => '/'],
|
111 |
'custom_thank_you' => [
|
112 |
'default' => '/docs/wpm/troubleshooting/#wc-custom-thank-you',
|
113 |
-
'wcm' => '/'],
|
114 |
'the_dismiss_button_doesnt_work_why' => [
|
115 |
'default' => '/docs/wpm/faq/#the-dismiss-button-doesnt-work-why?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=wpp-pixel-manager-docs&utm_content=dismiss-button-info',
|
116 |
-
'wcm' => '/'],
|
117 |
'wp-rocket-javascript-concatenation' => [
|
118 |
-
'default' => '/docs/wpm/troubleshooting?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
119 |
-
'wcm' => '/'],
|
120 |
'litespeed-cache-inline-javascript-after-dom-ready' => [
|
121 |
-
'default' => '/docs/wpm/troubleshooting?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
122 |
-
'wcm' => '/'],
|
123 |
'payment-gateways' => [
|
124 |
-
'default' => '/docs/wpm/setup/requirements#payment-gateways?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=
|
125 |
-
'wcm' => '/'],
|
126 |
'test_order' => [
|
127 |
'default' => '/docs/wpm/testing#test-order',
|
128 |
-
'wcm' => '/'],
|
129 |
];
|
130 |
|
131 |
if (array_key_exists($key, $documentation_links)) {
|
132 |
-
return $this->get_host() . $documentation_links[$key]['
|
133 |
} else {
|
134 |
error_log('wpm documentation key "' . $key . '" not available');
|
135 |
return $this->get_host() . $documentation_links['default'];
|
7 |
}
|
8 |
|
9 |
class Documentation {
|
10 |
+
|
11 |
protected $documentation_host;
|
12 |
|
13 |
public function __construct() {
|
15 |
}
|
16 |
|
17 |
public function get_link( $key = 'default' ) {
|
18 |
+
|
19 |
$documentation_links = [
|
20 |
'default' => [
|
21 |
'default' => '/docs/wpm/',
|
22 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/'],
|
23 |
'script_blockers' => [
|
24 |
+
'default' => '/docs/wpm/setup/script-blockers/?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=script-blocker-error',
|
25 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/script-blockers/'],
|
26 |
'google_analytics_universal_property' => [
|
27 |
+
'default' => '/docs/wpm/plugin-configuration/google-analytics?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=google-analytics-property-id',
|
28 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/google-analytics/'],
|
29 |
'google_analytics_4_id' => [
|
30 |
+
'default' => '/docs/wpm/plugin-configuration/google-analytics#connect-an-existing-google-analytics-4-property?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=google-analytics-4-id',
|
31 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/google-analytics/#section-3'],
|
32 |
'google_ads_conversion_id' => [
|
33 |
+
'default' => '/docs/wpm/plugin-configuration/google-ads#configure-the-plugin?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=google-ads-configure-the-plugin',
|
34 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/google-ads/#section-2'],
|
35 |
'google_ads_conversion_label' => [
|
36 |
+
'default' => '/docs/wpm/plugin-configuration/google-ads#configure-the-plugin?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=google-ads-configure-the-plugin',
|
37 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/google-ads/#section-2'],
|
38 |
'google_optimize_container_id' => [
|
39 |
+
'default' => '/docs/wpm/plugin-configuration/google-optimize?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=google-optimize',
|
40 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/google-optimize/'],
|
41 |
'facebook_pixel_id' => [
|
42 |
+
'default' => '/docs/wpm/plugin-configuration/meta#find-the-pixel-id?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=facebook-pixel-id',
|
43 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/facebook/#find-the-pixel-id'],
|
44 |
'bing_uet_tag_id' => [
|
45 |
+
'default' => '/docs/wpm/plugin-configuration/microsoft-advertising#setting-up-the-uet-tag?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=microsoft-advertising-uet-tag-id',
|
46 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/microsoft-advertising-bing-ads/#section-1'],
|
47 |
'twitter_pixel_id' => [
|
48 |
'default' => '/docs/wpm/plugin-configuration/twitter',
|
49 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/'],
|
50 |
'pinterest_pixel_id' => [
|
51 |
'default' => '/docs/wpm/plugin-configuration/pinterest',
|
52 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/'],
|
53 |
'snapchat_pixel_id' => [
|
54 |
'default' => '/docs/wpm/plugin-configuration/snapchat',
|
55 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/'],
|
56 |
'tiktok_pixel_id' => [
|
57 |
'default' => '/docs/wpm/plugin-configuration/tiktok',
|
58 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/'],
|
59 |
'hotjar_site_id' => [
|
60 |
+
'default' => '/docs/wpm/plugin-configuration/hotjar#hotjar-site-id?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=hotjar-site-id',
|
61 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/hotjar/#section-1'],
|
62 |
'google_gtag_deactivation' => [
|
63 |
+
'default' => '/docs/wpm/faq/#google-tag-assistant-reports-multiple-installations-of-global-site-tag-gtagjs-detected-what-shall-i-do&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=gtag-js',
|
64 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/'],
|
65 |
'google_consent_mode' => [
|
66 |
+
'default' => '/docs/wpm/consent-management/google-consent-mode?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=google-consent-mode',
|
67 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/consent-management/google-consent-mode/'],
|
68 |
'google_consent_regions' => [
|
69 |
+
'default' => '/docs/wpm/consent-management/google-consent-mode#regions?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=google-consent-mode-regions',
|
70 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/consent-management/google-consent-mode/#section-3'],
|
71 |
'google_analytics_eec' => [
|
72 |
'default' => '/docs/wpm/plugin-configuration/google-analytics#enhanced-e-commerce-funnel-setup',
|
73 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/google-analytics/#section-5'],
|
74 |
'google_analytics_4_api_secret' => [
|
75 |
+
'default' => '/docs/wpm/plugin-configuration/google-analytics#ga4-api-secret?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=google-analytics-4-api-secret',
|
76 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/google-analytics/#section-4'],
|
77 |
'google_ads_enhanced_conversions' => [
|
78 |
+
'default' => '/docs/wpm/plugin-configuration/google-ads#enhanced-conversions?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=google-ads-enhanced-conversions',
|
79 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/google-ads/#section-5'],
|
80 |
'google_ads_phone_conversion_number' => [
|
81 |
+
'default' => '/docs/wpm/plugin-configuration/google-ads#phone-conversion-number?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=google-ads-phone-conversion-number',
|
82 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/google-ads/#section-4'],
|
83 |
'google_ads_phone_conversion_label' => [
|
84 |
+
'default' => '/docs/wpm/plugin-configuration/google-ads#phone-conversion-number?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=google-ads-phone-conversion-number',
|
85 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/google-ads/#section-4'],
|
86 |
'explicit_consent_mode' => [
|
87 |
'default' => '/docs/wpm/consent-management/overview/#explicit-consent-mode',
|
88 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/consent-management/overview/#section-1'],
|
89 |
'facebook_capi_token' => [
|
90 |
+
'default' => '/docs/wpm/plugin-configuration/meta#facebook-conversion-api-capi?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=facebook-capi-token',
|
91 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/facebook/#section-4'],
|
92 |
'facebook_capi_user_transparency_process_anonymous_hits' => [
|
93 |
+
'default' => '/docs/wpm/plugin-configuration/meta#user-transparency-settings?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=facebook-capi-transparency-settings',
|
94 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/facebook/#section-5'],
|
95 |
'facebook_capi_user_transparency_send_additional_client_identifiers' => [
|
96 |
+
'default' => '/docs/wpm/plugin-configuration/meta#user-transparency-settings?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=facebook-capi-transparency-settings',
|
97 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/facebook/#section-5'],
|
98 |
'facebook_microdata' => [
|
99 |
+
'default' => '/docs/wpm/plugin-configuration/meta#microdata-tags-for-catalogues?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=facebook-microdata',
|
100 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/facebook/#section-8'],
|
101 |
'maximum_compatibility_mode' => [
|
102 |
+
'default' => '/docs/wpm/plugin-configuration/general-settings/#maximum-compatibility-mode?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=maximum-compatibility-mode',
|
103 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/'],
|
104 |
'google_ads_dynamic_remarketing' => [
|
105 |
+
'default' => '/docs/wpm/plugin-configuration/dynamic-remarketing?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=dynamic-remarketing',
|
106 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/dynamic-remarketing/'],
|
107 |
'variations_output' => [
|
108 |
+
'default' => '/docs/wpm/plugin-configuration/dynamic-remarketing?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=dynamic-remarketing',
|
109 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/dynamic-remarketing/'],
|
110 |
'aw_merchant_id' => [
|
111 |
+
'default' => '/docs/wpm/plugin-configuration/google-ads/#conversion-cart-data?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=conversion-cart-data',
|
112 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/google-ads/#section-3'],
|
113 |
'custom_thank_you' => [
|
114 |
'default' => '/docs/wpm/troubleshooting/#wc-custom-thank-you',
|
115 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/troubleshooting/#wc-custom-thank-you'],
|
116 |
'the_dismiss_button_doesnt_work_why' => [
|
117 |
'default' => '/docs/wpm/faq/#the-dismiss-button-doesnt-work-why?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=wpp-pixel-manager-docs&utm_content=dismiss-button-info',
|
118 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/faq/#section-10'],
|
119 |
'wp-rocket-javascript-concatenation' => [
|
120 |
+
'default' => '/docs/wpm/troubleshooting?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=wp-rocket-javascript-concatenation-error',
|
121 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/'],
|
122 |
'litespeed-cache-inline-javascript-after-dom-ready' => [
|
123 |
+
'default' => '/docs/wpm/troubleshooting?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=litespeed-inline-js-dom-ready-error',
|
124 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/'],
|
125 |
'payment-gateways' => [
|
126 |
+
'default' => '/docs/wpm/setup/requirements#payment-gateways?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=paypal-standard-warning',
|
127 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/requirements/#payment-gateways'],
|
128 |
'test_order' => [
|
129 |
'default' => '/docs/wpm/testing#test-order',
|
130 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/testing/'],
|
131 |
];
|
132 |
|
133 |
if (array_key_exists($key, $documentation_links)) {
|
134 |
+
return $this->get_host() . $documentation_links[$key]['wcm'];
|
135 |
} else {
|
136 |
error_log('wpm documentation key "' . $key . '" not available');
|
137 |
return $this->get_host() . $documentation_links['default'];
|
classes/admin/class-environment-check.php
CHANGED
@@ -14,6 +14,7 @@ class Environment_Check {
|
|
14 |
private $options;
|
15 |
|
16 |
public function __construct( $options ) {
|
|
|
17 |
if (is_admin()) {
|
18 |
|
19 |
$this->options = $options;
|
@@ -33,6 +34,7 @@ class Environment_Check {
|
|
33 |
}
|
34 |
|
35 |
public function run_incompatible_plugins_checks() {
|
|
|
36 |
$saved_notifications = get_option(WPM_DB_NOTIFICATIONS_NAME);
|
37 |
|
38 |
foreach ($this->get_incompatible_plugins_list() as $plugin) {
|
@@ -64,6 +66,7 @@ class Environment_Check {
|
|
64 |
}
|
65 |
|
66 |
public function flush_cache_on_plugin_changes() {
|
|
|
67 |
// flush cache after saving the plugin options
|
68 |
add_action('update_option_wgact_plugin_options', [$this, 'flush_cache_of_all_cache_plugins'], 10, 3);
|
69 |
|
@@ -72,10 +75,18 @@ class Environment_Check {
|
|
72 |
// add_filter('upgrader_post_install', [$this, 'flush_cache_of_all_cache_plugins'], 10, 3);
|
73 |
|
74 |
// flush cache after plugin update
|
75 |
-
add_action('upgrader_process_complete', [$this, '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
77 |
|
78 |
public function flush_cache_of_all_cache_plugins() {
|
|
|
79 |
// error_log('flush cache of all cache plugins');
|
80 |
if ($this->is_wp_rocket_active()) {
|
81 |
$this->flush_wp_rocket_cache();
|
@@ -296,6 +307,7 @@ class Environment_Check {
|
|
296 |
}
|
297 |
|
298 |
public function check_active_off_site_payment_gateways() {
|
|
|
299 |
$wpm_notifications = get_option(WPM_DB_NOTIFICATIONS_NAME);
|
300 |
|
301 |
if (
|
14 |
private $options;
|
15 |
|
16 |
public function __construct( $options ) {
|
17 |
+
|
18 |
if (is_admin()) {
|
19 |
|
20 |
$this->options = $options;
|
34 |
}
|
35 |
|
36 |
public function run_incompatible_plugins_checks() {
|
37 |
+
|
38 |
$saved_notifications = get_option(WPM_DB_NOTIFICATIONS_NAME);
|
39 |
|
40 |
foreach ($this->get_incompatible_plugins_list() as $plugin) {
|
66 |
}
|
67 |
|
68 |
public function flush_cache_on_plugin_changes() {
|
69 |
+
|
70 |
// flush cache after saving the plugin options
|
71 |
add_action('update_option_wgact_plugin_options', [$this, 'flush_cache_of_all_cache_plugins'], 10, 3);
|
72 |
|
75 |
// add_filter('upgrader_post_install', [$this, 'flush_cache_of_all_cache_plugins'], 10, 3);
|
76 |
|
77 |
// flush cache after plugin update
|
78 |
+
add_action('upgrader_process_complete', [$this, 'upgrader_flush_cache_if_pmw_was_updated'], 10, 2);
|
79 |
+
}
|
80 |
+
|
81 |
+
public function upgrader_flush_cache_if_pmw_was_updated( $upgrader_object, $options ) {
|
82 |
+
|
83 |
+
if ('plugin' === $options['type'] && in_array(WPM_PLUGIN_BASE_NAME, $options['plugins'], true)) {
|
84 |
+
$this->flush_cache_of_all_cache_plugins();
|
85 |
+
}
|
86 |
}
|
87 |
|
88 |
public function flush_cache_of_all_cache_plugins() {
|
89 |
+
|
90 |
// error_log('flush cache of all cache plugins');
|
91 |
if ($this->is_wp_rocket_active()) {
|
92 |
$this->flush_wp_rocket_cache();
|
307 |
}
|
308 |
|
309 |
public function check_active_off_site_payment_gateways() {
|
310 |
+
|
311 |
$wpm_notifications = get_option(WPM_DB_NOTIFICATIONS_NAME);
|
312 |
|
313 |
if (
|
classes/admin/class-notifications.php
CHANGED
@@ -104,7 +104,7 @@ class Notifications {
|
|
104 |
<span>
|
105 |
|
106 |
<?php
|
107 |
-
esc_html_e('The
|
108 |
?>
|
109 |
</span><br>
|
110 |
</p>
|
@@ -142,7 +142,7 @@ class Notifications {
|
|
142 |
<div class="notice notice-error <?php echo esc_js($slug); ?>-incompatible-plugin-error">
|
143 |
<p>
|
144 |
<span>
|
145 |
-
<?php esc_html_e('The following plugin is not compatible with the
|
146 |
</span>
|
147 |
<span>
|
148 |
<a href="<?php echo esc_url($link); ?>" target="_blank">
|
104 |
<span>
|
105 |
|
106 |
<?php
|
107 |
+
esc_html_e('The Pixel Manager for WooCommerce plugin detected that the PayPal standard payment gateway is active. The PayPal standard payment gateway is an off-site payment gateway which impairs conversion tracking significantly. Please switch to an on-site payment gateway as soon as possible in order to increase your conversion tracking accuracy.', 'woocommerce-google-adwords-conversion-tracking-tag');
|
108 |
?>
|
109 |
</span><br>
|
110 |
</p>
|
142 |
<div class="notice notice-error <?php echo esc_js($slug); ?>-incompatible-plugin-error">
|
143 |
<p>
|
144 |
<span>
|
145 |
+
<?php esc_html_e('The following plugin is not compatible with the Pixel Manager for WooCommerce: ', 'woocommerce-google-adwords-conversion-tracking-tag'); ?>
|
146 |
</span>
|
147 |
<span>
|
148 |
<a href="<?php echo esc_url($link); ?>" target="_blank">
|
classes/class-deprecated-filters.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class for deprecated filters
|
5 |
+
*/
|
6 |
+
|
7 |
+
namespace WCPM\Classes;
|
8 |
+
|
9 |
+
if (!defined('ABSPATH')) {
|
10 |
+
exit; // Exit if accessed directly
|
11 |
+
}
|
12 |
+
|
13 |
+
class Deprecated_Filters {
|
14 |
+
|
15 |
+
public function load_deprecated_filters() {
|
16 |
+
|
17 |
+
// Nothing in here yet
|
18 |
+
|
19 |
+
}
|
20 |
+
}
|
classes/pixels/class-pixel-manager.php
CHANGED
@@ -6,9 +6,7 @@ use WCPM\Classes\Http\Facebook_CAPI ;
|
|
6 |
use WCPM\Classes\Http\Google_MP ;
|
7 |
use WCPM\Classes\Pixels\Facebook\Facebook_Microdata ;
|
8 |
use WCPM\Classes\Pixels\Facebook\Facebook_Pixel_Manager ;
|
9 |
-
use WCPM\Classes\Pixels\Facebook\Facebook_Pixel_Manager_Microdata ;
|
10 |
use WCPM\Classes\Pixels\Google\Google ;
|
11 |
-
use WCPM\Classes\Pixels\Google\Google_Analytics_Refund ;
|
12 |
use WCPM\Classes\Pixels\Google\Google_Pixel_Manager ;
|
13 |
|
14 |
if ( !defined( 'ABSPATH' ) ) {
|
@@ -16,7 +14,7 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
16 |
// Exit if accessed directly
|
17 |
}
|
18 |
|
19 |
-
class Pixel_Manager
|
20 |
{
|
21 |
use Trait_Product ;
|
22 |
use Trait_Shop ;
|
@@ -36,7 +34,7 @@ class Pixel_Manager extends Script_Manager
|
|
36 |
* Initialize options
|
37 |
*/
|
38 |
$this->options = $options;
|
39 |
-
$this->options_obj =
|
40 |
$this->options_obj->shop->currency = get_woocommerce_currency();
|
41 |
/**
|
42 |
* Set a few states
|
@@ -274,9 +272,6 @@ class Pixel_Manager extends Script_Manager
|
|
274 |
|
275 |
public function wpm_wp_footer()
|
276 |
{
|
277 |
-
if ( wpm_fs()->is__premium_only() && $this->options_obj->google->analytics->eec ) {
|
278 |
-
( new Google_Analytics_Refund( $this->options ) )->process_refund_to_frontend__premium_only();
|
279 |
-
}
|
280 |
}
|
281 |
|
282 |
// https://support.cloudflare.com/hc/en-us/articles/200169436-How-can-I-have-Rocket-Loader-ignore-specific-JavaScripts-
|
@@ -505,23 +500,55 @@ class Pixel_Manager extends Script_Manager
|
|
505 |
|
506 |
if ( $order ) {
|
507 |
$data['order'] = [
|
508 |
-
'id'
|
509 |
-
'number'
|
510 |
-
'affiliation'
|
511 |
-
'currency'
|
512 |
-
'value_filtered'
|
513 |
-
'value_regular'
|
514 |
-
'discount'
|
515 |
-
'tax'
|
516 |
-
'shipping'
|
517 |
-
'coupon'
|
518 |
-
'aw_merchant_id'
|
519 |
-
'aw_feed_country'
|
520 |
-
'aw_feed_language'
|
521 |
-
'new_customer'
|
522 |
-
'quantity'
|
523 |
-
'items'
|
|
|
|
|
|
|
|
|
524 |
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
525 |
$data['products'] = $this->get_order_products( $order );
|
526 |
}
|
527 |
|
@@ -534,6 +561,7 @@ class Pixel_Manager extends Script_Manager
|
|
534 |
|
535 |
if ( is_user_logged_in() || is_order_received_page() ) {
|
536 |
$data['id'] = get_current_user_id();
|
|
|
537 |
$data['email'] = $this->get_user_email();
|
538 |
$data['email_sha256'] = $this->get_user_email( 'sha256' );
|
539 |
}
|
@@ -596,7 +624,7 @@ class Pixel_Manager extends Script_Manager
|
|
596 |
|
597 |
public function inject_wpm_opening()
|
598 |
{
|
599 |
-
echo PHP_EOL . '<!-- START
|
600 |
}
|
601 |
|
602 |
public function inject_wpm_closing()
|
@@ -609,7 +637,7 @@ class Pixel_Manager extends Script_Manager
|
|
609 |
}
|
610 |
|
611 |
}
|
612 |
-
echo PHP_EOL . '<!-- END
|
613 |
}
|
614 |
|
615 |
private function increase_conversion_count_for_ratings( $order )
|
6 |
use WCPM\Classes\Http\Google_MP ;
|
7 |
use WCPM\Classes\Pixels\Facebook\Facebook_Microdata ;
|
8 |
use WCPM\Classes\Pixels\Facebook\Facebook_Pixel_Manager ;
|
|
|
9 |
use WCPM\Classes\Pixels\Google\Google ;
|
|
|
10 |
use WCPM\Classes\Pixels\Google\Google_Pixel_Manager ;
|
11 |
|
12 |
if ( !defined( 'ABSPATH' ) ) {
|
14 |
// Exit if accessed directly
|
15 |
}
|
16 |
|
17 |
+
class Pixel_Manager
|
18 |
{
|
19 |
use Trait_Product ;
|
20 |
use Trait_Shop ;
|
34 |
* Initialize options
|
35 |
*/
|
36 |
$this->options = $options;
|
37 |
+
$this->options_obj = $this->get_options_object( $options );
|
38 |
$this->options_obj->shop->currency = get_woocommerce_currency();
|
39 |
/**
|
40 |
* Set a few states
|
272 |
|
273 |
public function wpm_wp_footer()
|
274 |
{
|
|
|
|
|
|
|
275 |
}
|
276 |
|
277 |
// https://support.cloudflare.com/hc/en-us/articles/200169436-How-can-I-have-Rocket-Loader-ignore-specific-JavaScripts-
|
500 |
|
501 |
if ( $order ) {
|
502 |
$data['order'] = [
|
503 |
+
'id' => (int) $order->get_id(),
|
504 |
+
'number' => (string) $order->get_order_number(),
|
505 |
+
'affiliation' => (string) get_bloginfo( 'name' ),
|
506 |
+
'currency' => (string) $this->get_order_currency( $order ),
|
507 |
+
'value_filtered' => (double) $this->wpm_get_order_total( $order ),
|
508 |
+
'value_regular' => (double) $order->get_total(),
|
509 |
+
'discount' => (double) $order->get_total_discount(),
|
510 |
+
'tax' => (double) $order->get_total_tax(),
|
511 |
+
'shipping' => (double) $order->get_shipping_total(),
|
512 |
+
'coupon' => implode( ',', $order->get_coupon_codes() ),
|
513 |
+
'aw_merchant_id' => ( (int) $this->options['google']['ads']['aw_merchant_id'] ? (int) $this->options['google']['ads']['aw_merchant_id'] : '' ),
|
514 |
+
'aw_feed_country' => (string) $this->get_visitor_country(),
|
515 |
+
'aw_feed_language' => (string) $this->google->get_gmc_language(),
|
516 |
+
'new_customer' => $this->is_new_customer( $order ),
|
517 |
+
'quantity' => (int) count( $this->wpm_get_order_items( $order ) ),
|
518 |
+
'items' => $this->get_front_end_order_items( $order ),
|
519 |
+
'clv_order_total' => $this->get_clv_order_total_by_billing_email( $order->get_billing_email() ),
|
520 |
+
'clv_order_value_filtered' => $this->get_clv_value_filtered_by_billing_email( $order->get_billing_email() ),
|
521 |
+
'customer_id' => $order->get_customer_id(),
|
522 |
+
'user_id' => $order->get_user_id(),
|
523 |
];
|
524 |
+
// set em (email)
|
525 |
+
$data['order']['billing_email'] = trim( strtolower( $order->get_billing_email() ) );
|
526 |
+
$data['order']['billing_email_hashed'] = hash( 'sha256', trim( strtolower( $order->get_billing_email() ) ) );
|
527 |
+
|
528 |
+
if ( $order->get_billing_phone() ) {
|
529 |
+
$phone = $order->get_billing_phone();
|
530 |
+
$phone = $this->get_e164_formatted_phone_number( $phone, $order->get_billing_country() );
|
531 |
+
$data['order']['billing_phone'] = $phone;
|
532 |
+
}
|
533 |
+
|
534 |
+
if ( $order->get_billing_first_name() ) {
|
535 |
+
$data['order']['billing_first_name'] = trim( strtolower( $order->get_billing_first_name() ) );
|
536 |
+
}
|
537 |
+
if ( $order->get_billing_last_name() ) {
|
538 |
+
$data['order']['billing_last_name'] = trim( strtolower( $order->get_billing_last_name() ) );
|
539 |
+
}
|
540 |
+
if ( $order->get_billing_city() ) {
|
541 |
+
$data['order']['billing_city'] = str_replace( ' ', '', trim( strtolower( $order->get_billing_city() ) ) );
|
542 |
+
}
|
543 |
+
if ( $order->get_billing_state() ) {
|
544 |
+
$data['order']['billing_state'] = trim( strtolower( $order->get_billing_state() ) );
|
545 |
+
}
|
546 |
+
if ( $order->get_billing_postcode() ) {
|
547 |
+
$data['order']['billing_postcode'] = $order->get_billing_postcode();
|
548 |
+
}
|
549 |
+
if ( $order->get_billing_country() ) {
|
550 |
+
$data['order']['billing_country'] = trim( strtolower( $order->get_billing_country() ) );
|
551 |
+
}
|
552 |
$data['products'] = $this->get_order_products( $order );
|
553 |
}
|
554 |
|
561 |
|
562 |
if ( is_user_logged_in() || is_order_received_page() ) {
|
563 |
$data['id'] = get_current_user_id();
|
564 |
+
$data['fb_external_id'] = hash( 'sha256', get_current_user_id() );
|
565 |
$data['email'] = $this->get_user_email();
|
566 |
$data['email_sha256'] = $this->get_user_email( 'sha256' );
|
567 |
}
|
624 |
|
625 |
public function inject_wpm_opening()
|
626 |
{
|
627 |
+
echo PHP_EOL . '<!-- START Pixel Manager for WooCommerce -->' . PHP_EOL ;
|
628 |
}
|
629 |
|
630 |
public function inject_wpm_closing()
|
637 |
}
|
638 |
|
639 |
}
|
640 |
+
echo PHP_EOL . '<!-- END Pixel Manager for WooCommerce -->' . PHP_EOL ;
|
641 |
}
|
642 |
|
643 |
private function increase_conversion_count_for_ratings( $order )
|
classes/pixels/class-pixel.php
CHANGED
@@ -9,6 +9,7 @@ if (!defined('ABSPATH')) {
|
|
9 |
class Pixel {
|
10 |
|
11 |
use Trait_Product;
|
|
|
12 |
|
13 |
protected $add_cart_data;
|
14 |
protected $aw_merchant_id;
|
@@ -29,7 +30,7 @@ class Pixel {
|
|
29 |
* Initialize options
|
30 |
*/
|
31 |
$this->options = $options;
|
32 |
-
$this->options_obj =
|
33 |
|
34 |
$this->options_obj->shop->currency = get_woocommerce_currency();
|
35 |
|
9 |
class Pixel {
|
10 |
|
11 |
use Trait_Product;
|
12 |
+
use Trait_Shop;
|
13 |
|
14 |
protected $add_cart_data;
|
15 |
protected $aw_merchant_id;
|
30 |
* Initialize options
|
31 |
*/
|
32 |
$this->options = $options;
|
33 |
+
$this->options_obj = $this->get_options_object($options);
|
34 |
|
35 |
$this->options_obj->shop->currency = get_woocommerce_currency();
|
36 |
|
classes/pixels/class-script-manager.php
DELETED
@@ -1,284 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace WCPM\Classes\Pixels;
|
4 |
-
|
5 |
-
use stdClass ;
|
6 |
-
use WCPM\Classes\Admin\Documentation ;
|
7 |
-
use WC_Product ;
|
8 |
-
use WC_Product_Data_Store_CPT ;
|
9 |
-
|
10 |
-
if ( !defined( 'ABSPATH' ) ) {
|
11 |
-
exit;
|
12 |
-
// Exit if accessed directly
|
13 |
-
}
|
14 |
-
|
15 |
-
class Script_Manager
|
16 |
-
{
|
17 |
-
use Trait_Product ;
|
18 |
-
use Trait_Shop ;
|
19 |
-
protected $transaction_deduper_timeout = 2000 ;
|
20 |
-
protected $options ;
|
21 |
-
protected $options_obj ;
|
22 |
-
public function __construct( $options )
|
23 |
-
{
|
24 |
-
/*
|
25 |
-
* Initialize options
|
26 |
-
*/
|
27 |
-
// $this->options = get_option(WPM_DB_OPTIONS_NAME);
|
28 |
-
$this->options = $options;
|
29 |
-
$this->options_obj = json_decode( wp_json_encode( $this->options ) );
|
30 |
-
// $this->options_obj->shop->currency = new stdClass();
|
31 |
-
$this->options_obj->shop->currency = get_woocommerce_currency();
|
32 |
-
/*
|
33 |
-
* Inject pixel snippets in head
|
34 |
-
*/
|
35 |
-
add_action( 'wp_head', function () {
|
36 |
-
$this->inject_head_pixels();
|
37 |
-
} );
|
38 |
-
}
|
39 |
-
|
40 |
-
public function inject_head_pixels()
|
41 |
-
{
|
42 |
-
global $woocommerce ;
|
43 |
-
$_post = filter_input_array( INPUT_POST, FILTER_SANITIZE_FULL_SPECIAL_CHARS );
|
44 |
-
$this->inject_opening_script_tag();
|
45 |
-
$this->inject_everywhere();
|
46 |
-
|
47 |
-
if ( is_product_category() ) {
|
48 |
-
$this->inject_product_category();
|
49 |
-
} elseif ( is_product_tag() ) {
|
50 |
-
$this->inject_product_tag();
|
51 |
-
} elseif ( is_search() ) {
|
52 |
-
$this->inject_search();
|
53 |
-
} elseif ( is_product() && !isset( $_post['add-to-cart'] ) ) {
|
54 |
-
$product = wc_get_product();
|
55 |
-
$product_id = $product->get_id();
|
56 |
-
$product_attributes = [
|
57 |
-
'brand' => $this->get_brand_name( $product_id ),
|
58 |
-
];
|
59 |
-
if ( $product->is_type( 'variable' ) ) {
|
60 |
-
// find out if attributes have been set in the URL
|
61 |
-
// if not, continue
|
62 |
-
// if yes get the variation id and variation SKU
|
63 |
-
|
64 |
-
if ( $this->query_string_contains_all_variation_attributes( $product ) ) {
|
65 |
-
// get variation product
|
66 |
-
$product_id = $this->get_variation_from_query_string( $product_id, $product );
|
67 |
-
// In case a variable product is misconfigured, wc_get_product($product_id) will not
|
68 |
-
// get a product but a bool. So we need to test it and only run it if
|
69 |
-
// we actually get a product. Basically we fall back to the parent product.
|
70 |
-
if ( is_object( wc_get_product( $product_id ) ) ) {
|
71 |
-
$product = wc_get_product( $product_id );
|
72 |
-
}
|
73 |
-
}
|
74 |
-
|
75 |
-
}
|
76 |
-
|
77 |
-
if ( is_object( $product ) ) {
|
78 |
-
$product_attributes['product_id_compiled'] = $this->get_compiled_product_id(
|
79 |
-
$product_id,
|
80 |
-
$product->get_sku(),
|
81 |
-
$this->options,
|
82 |
-
''
|
83 |
-
);
|
84 |
-
$product_attributes['dyn_r_ids'] = $this->get_dyn_r_ids( $product );
|
85 |
-
$this->inject_product( $product, $product_attributes );
|
86 |
-
} else {
|
87 |
-
$this->log_problematic_product_id( $product_id );
|
88 |
-
}
|
89 |
-
|
90 |
-
} elseif ( $this->is_shop_top_page() ) {
|
91 |
-
$this->inject_shop_top_page();
|
92 |
-
} elseif ( is_cart() && !empty($woocommerce->cart->get_cart()) ) {
|
93 |
-
$cart = $woocommerce->cart->get_cart();
|
94 |
-
$cart_total = WC()->cart->get_cart_contents_total();
|
95 |
-
$this->inject_cart( $cart, $cart_total );
|
96 |
-
} elseif ( is_order_received_page() ) {
|
97 |
-
// $this->is_nodedupe_parameter_set();
|
98 |
-
// get order from URL and evaluate order total
|
99 |
-
|
100 |
-
if ( $this->get_order_from_order_received_page() ) {
|
101 |
-
$order = $this->get_order_from_order_received_page();
|
102 |
-
|
103 |
-
if ( is_user_logged_in() ) {
|
104 |
-
$user = get_current_user_id();
|
105 |
-
} else {
|
106 |
-
$user = $order->get_billing_email();
|
107 |
-
}
|
108 |
-
|
109 |
-
$is_new_customer = !$this->is_existing_customer( $order, $user );
|
110 |
-
$order_total = $this->wpm_get_order_total( $order );
|
111 |
-
// dedupe code
|
112 |
-
if ( $this->can_order_confirmation_be_processed( $order ) ) {
|
113 |
-
$this->inject_order_received_page_dedupe( $order, $order_total, $is_new_customer );
|
114 |
-
}
|
115 |
-
$this->inject_order_received_page_no_dedupe( $order, $order_total, $is_new_customer );
|
116 |
-
}
|
117 |
-
|
118 |
-
}
|
119 |
-
|
120 |
-
$this->inject_closing_script_tag();
|
121 |
-
}
|
122 |
-
|
123 |
-
protected function can_order_confirmation_be_processed( $order )
|
124 |
-
{
|
125 |
-
$conversion_prevention = false;
|
126 |
-
$conversion_prevention = apply_filters_deprecated(
|
127 |
-
'wgact_conversion_prevention',
|
128 |
-
[ $conversion_prevention, $order ],
|
129 |
-
'1.10.2',
|
130 |
-
'wooptpm_conversion_prevention'
|
131 |
-
);
|
132 |
-
$conversion_prevention = apply_filters_deprecated(
|
133 |
-
'wooptpm_conversion_prevention',
|
134 |
-
[ $conversion_prevention, $order ],
|
135 |
-
'1.13.0',
|
136 |
-
'wpm_conversion_prevention'
|
137 |
-
);
|
138 |
-
$conversion_prevention = apply_filters( 'wpm_conversion_prevention', $conversion_prevention, $order );
|
139 |
-
// error_log('conversion_prevention: ' . $conversion_prevention);
|
140 |
-
// error_log('$this->is_nodedupe_parameter_set(): ' . $this->is_nodedupe_parameter_set());
|
141 |
-
// error_log('$order->has_status(\'failed\'): ' . $order->has_status('failed'));
|
142 |
-
// error_log('current_user_can(\'edit_others_pages\'): ' . current_user_can('edit_others_pages'));
|
143 |
-
// error_log("this->options['shop']['order_deduplication']: " . $this->options['shop']['order_deduplication']);
|
144 |
-
// error_log('order id: ' . $order->get_id());
|
145 |
-
// error_log('order number: ' . $order->get_order_number());
|
146 |
-
// error_log('get_post_meta($order->get_order_number(), \'_wpm_conversion_pixel_fired\', true): ' . get_post_meta($order->get_order_number(), '_wpm_conversion_pixel_fired', true));
|
147 |
-
|
148 |
-
if ( $this->is_nodedupe_parameter_set() || !$order->has_status( 'failed' ) && $this->track_user() && false == $conversion_prevention && (!$this->options['shop']['order_deduplication'] || $this->has_conversion_pixel_already_fired( $order ) != true) ) {
|
149 |
-
return true;
|
150 |
-
} else {
|
151 |
-
return false;
|
152 |
-
}
|
153 |
-
|
154 |
-
}
|
155 |
-
|
156 |
-
private function has_conversion_pixel_already_fired( $order )
|
157 |
-
{
|
158 |
-
return false;
|
159 |
-
}
|
160 |
-
|
161 |
-
public function inject_everywhere()
|
162 |
-
{
|
163 |
-
}
|
164 |
-
|
165 |
-
public function inject_product_category()
|
166 |
-
{
|
167 |
-
}
|
168 |
-
|
169 |
-
public function inject_product_tag()
|
170 |
-
{
|
171 |
-
}
|
172 |
-
|
173 |
-
public function inject_search()
|
174 |
-
{
|
175 |
-
}
|
176 |
-
|
177 |
-
public function inject_product( $product, $product_attributes )
|
178 |
-
{
|
179 |
-
}
|
180 |
-
|
181 |
-
public function inject_shop_top_page()
|
182 |
-
{
|
183 |
-
}
|
184 |
-
|
185 |
-
public function inject_cart( $cart, $cart_total )
|
186 |
-
{
|
187 |
-
}
|
188 |
-
|
189 |
-
public function inject_order_received_page_dedupe( $order, $order_total, $is_new_customer )
|
190 |
-
{
|
191 |
-
}
|
192 |
-
|
193 |
-
protected function is_nodedupe_parameter_set()
|
194 |
-
{
|
195 |
-
$_get = filter_input_array( INPUT_GET, FILTER_SANITIZE_FULL_SPECIAL_CHARS );
|
196 |
-
|
197 |
-
if ( isset( $_get['nodedupe'] ) ) {
|
198 |
-
return true;
|
199 |
-
} else {
|
200 |
-
return false;
|
201 |
-
}
|
202 |
-
|
203 |
-
}
|
204 |
-
|
205 |
-
protected function query_string_contains_all_variation_attributes( $product )
|
206 |
-
{
|
207 |
-
$_server = filter_input_array( INPUT_SERVER, FILTER_SANITIZE_FULL_SPECIAL_CHARS );
|
208 |
-
|
209 |
-
if ( !empty($_server['QUERY_STRING']) ) {
|
210 |
-
parse_str( $_server['QUERY_STRING'], $query_string_attributes );
|
211 |
-
foreach ( array_keys( $product->get_attributes() ) as $variation_attribute => $value ) {
|
212 |
-
if ( !array_key_exists( 'attribute_' . $value, $query_string_attributes ) ) {
|
213 |
-
return false;
|
214 |
-
}
|
215 |
-
}
|
216 |
-
return true;
|
217 |
-
} else {
|
218 |
-
return false;
|
219 |
-
}
|
220 |
-
|
221 |
-
}
|
222 |
-
|
223 |
-
protected function get_variation_from_query_string( $product_id, $product )
|
224 |
-
{
|
225 |
-
$_server = filter_input_array( INPUT_SERVER, FILTER_SANITIZE_FULL_SPECIAL_CHARS );
|
226 |
-
parse_str( $_server['QUERY_STRING'], $query_string_attributes );
|
227 |
-
$search_variation_attributes = [];
|
228 |
-
foreach ( array_keys( $product->get_attributes() ) as $variation_attribute => $value ) {
|
229 |
-
$search_variation_attributes['attribute_' . $value] = $query_string_attributes['attribute_' . $value];
|
230 |
-
}
|
231 |
-
return $this->find_matching_product_variation_id( $product_id, $search_variation_attributes );
|
232 |
-
}
|
233 |
-
|
234 |
-
protected function find_matching_product_variation_id( $product_id, $attributes )
|
235 |
-
{
|
236 |
-
return ( new WC_Product_Data_Store_CPT() )->find_matching_product_variation( new WC_Product( $product_id ), $attributes );
|
237 |
-
}
|
238 |
-
|
239 |
-
protected function conversion_pixels_already_fired_html()
|
240 |
-
{
|
241 |
-
?>
|
242 |
-
|
243 |
-
<!-- ----------------------------------------------------------------------------------------------------
|
244 |
-
The conversion pixels have not been fired. Possible reasons:
|
245 |
-
- The user role has been disabled for tracking.
|
246 |
-
- The order payment has failed.
|
247 |
-
- The pixels have already been fired. To prevent double counting the pixels are only fired once.
|
248 |
-
|
249 |
-
If you want to test the order you have two options:
|
250 |
-
- Turn off order duplication prevention in the advanced settings
|
251 |
-
- Add the '&nodedupe' parameter to the order confirmation URL like this:
|
252 |
-
https://example.test/checkout/order-received/123/?key=wc_order_123abc&nodedupe
|
253 |
-
|
254 |
-
More info on testing: <?php
|
255 |
-
esc_html_e( ( new Documentation() )->get_link( 'test_order' ) );
|
256 |
-
?>
|
257 |
-
|
258 |
-
----------------------------------------------------------------------------------------------------
|
259 |
-
-->
|
260 |
-
<?php
|
261 |
-
}
|
262 |
-
|
263 |
-
private function is_shop_top_page()
|
264 |
-
{
|
265 |
-
|
266 |
-
if ( !is_product() && !is_product_category() && !is_order_received_page() && !is_cart() && !is_search() && is_shop() ) {
|
267 |
-
return true;
|
268 |
-
} else {
|
269 |
-
return false;
|
270 |
-
}
|
271 |
-
|
272 |
-
}
|
273 |
-
|
274 |
-
protected function inject_opening_script_tag()
|
275 |
-
{
|
276 |
-
echo ' <script>' ;
|
277 |
-
}
|
278 |
-
|
279 |
-
protected function inject_closing_script_tag()
|
280 |
-
{
|
281 |
-
echo ' </script>' ;
|
282 |
-
}
|
283 |
-
|
284 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/pixels/google/class-google-analytics-refund.php
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace WCPM\Classes\Pixels\Google;
|
4 |
-
|
5 |
-
use WC_Order_Refund ;
|
6 |
-
use WC_Product ;
|
7 |
-
|
8 |
-
if ( !defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
// Exit if accessed directly
|
11 |
-
}
|
12 |
-
|
13 |
-
class Google_Analytics_Refund extends Google_Analytics
|
14 |
-
{
|
15 |
-
public function __construct( $options )
|
16 |
-
{
|
17 |
-
parent::__construct( $options );
|
18 |
-
}
|
19 |
-
|
20 |
-
public function output_refund_to_frontend( $order, $refund, $dataLayer_refund_items = null )
|
21 |
-
{
|
22 |
-
$data = [
|
23 |
-
'send_to' => $this->options_obj->google->analytics->ga4->measurement_id,
|
24 |
-
'affiliation' => get_bloginfo( 'name' ),
|
25 |
-
'currency' => (string) $this->get_order_currency( $order ),
|
26 |
-
'items' => (array) $dataLayer_refund_items,
|
27 |
-
'transaction_id' => (string) $order->get_order_number(),
|
28 |
-
'shipping' => (double) $order->get_shipping_total(),
|
29 |
-
'tax' => (double) $order->get_total_tax(),
|
30 |
-
'value' => (double) $refund->get_amount(),
|
31 |
-
];
|
32 |
-
?>
|
33 |
-
<script>
|
34 |
-
|
35 |
-
if (typeof wpmFunctionExists !== 'function') {
|
36 |
-
window.wpmFunctionExists = function (functionName) {
|
37 |
-
return new Promise(function (resolve) {
|
38 |
-
(function waitForVar() {
|
39 |
-
if (typeof window[functionName] !== 'undefined') return resolve();
|
40 |
-
setTimeout(waitForVar, 1000);
|
41 |
-
})();
|
42 |
-
});
|
43 |
-
}
|
44 |
-
}
|
45 |
-
|
46 |
-
wpmFunctionExists('wpm').then(function () {
|
47 |
-
if (wpm.googleConfigConditionsMet('analytics')) {
|
48 |
-
gtag('event', 'refund', <?php
|
49 |
-
echo wp_json_encode( $data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ) ;
|
50 |
-
?>);
|
51 |
-
}
|
52 |
-
})
|
53 |
-
</script>
|
54 |
-
<?php
|
55 |
-
}
|
56 |
-
|
57 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/pixels/google/class-google-pixel-manager.php
CHANGED
@@ -5,23 +5,26 @@ namespace WCPM\Classes\Pixels\Google;
|
|
5 |
use WCPM\Classes\Http\Google_MP_GA4 ;
|
6 |
use WCPM\Classes\Http\Google_MP_UA ;
|
7 |
use WCPM\Classes\Pixels\Script_Manager ;
|
|
|
8 |
|
9 |
if ( !defined( 'ABSPATH' ) ) {
|
10 |
exit;
|
11 |
// Exit if accessed directly
|
12 |
}
|
13 |
|
14 |
-
class Google_Pixel_Manager
|
15 |
{
|
|
|
16 |
private $google_pixel ;
|
17 |
private $google_analytics_ua_http_mp ;
|
18 |
private $google_analytics_4_http_mp ;
|
19 |
private $cid_key_ga_ua ;
|
20 |
private $cid_key_ga4 ;
|
|
|
21 |
public function __construct( $options )
|
22 |
{
|
23 |
-
parent::__construct( $options );
|
24 |
$this->google_pixel = new Google( $options );
|
|
|
25 |
}
|
26 |
|
27 |
public function wpm_woocommerce_order_status_changed(
|
@@ -61,13 +64,6 @@ class Google_Pixel_Manager extends Script_Manager
|
|
61 |
}
|
62 |
}
|
63 |
|
64 |
-
public function inject_order_received_page_no_dedupe( $order, $order_total, $is_new_customer )
|
65 |
-
{
|
66 |
-
if ( $this->google_pixel->is_google_ads_active() && wpm_fs()->is__premium_only() ) {
|
67 |
-
$this->save_gclid_in_order__premium_only( $order );
|
68 |
-
}
|
69 |
-
}
|
70 |
-
|
71 |
public function inject_everywhere()
|
72 |
{
|
73 |
// $this->google_pixel->inject_everywhere();
|
5 |
use WCPM\Classes\Http\Google_MP_GA4 ;
|
6 |
use WCPM\Classes\Http\Google_MP_UA ;
|
7 |
use WCPM\Classes\Pixels\Script_Manager ;
|
8 |
+
use WCPM\Classes\Pixels\Trait_Shop ;
|
9 |
|
10 |
if ( !defined( 'ABSPATH' ) ) {
|
11 |
exit;
|
12 |
// Exit if accessed directly
|
13 |
}
|
14 |
|
15 |
+
class Google_Pixel_Manager
|
16 |
{
|
17 |
+
use Trait_Shop ;
|
18 |
private $google_pixel ;
|
19 |
private $google_analytics_ua_http_mp ;
|
20 |
private $google_analytics_4_http_mp ;
|
21 |
private $cid_key_ga_ua ;
|
22 |
private $cid_key_ga4 ;
|
23 |
+
protected $options_obj ;
|
24 |
public function __construct( $options )
|
25 |
{
|
|
|
26 |
$this->google_pixel = new Google( $options );
|
27 |
+
$this->options_obj = $this->get_options_object( $options );
|
28 |
}
|
29 |
|
30 |
public function wpm_woocommerce_order_status_changed(
|
64 |
}
|
65 |
}
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
public function inject_everywhere()
|
68 |
{
|
69 |
// $this->google_pixel->inject_everywhere();
|
classes/pixels/trait-product.php
CHANGED
@@ -282,10 +282,10 @@ trait Trait_Product {
|
|
282 |
'name' => $order_item_data['name'],
|
283 |
'quantity' => $order_item_data['quantity'],
|
284 |
'price' => ( new Google($this->options) )->wpm_get_order_item_price($order_item, $product),
|
285 |
-
'subtotal' => (float)
|
286 |
-
'subtotal_tax' => (float)
|
287 |
-
'total' => (float)
|
288 |
-
'total_tax' => (float)
|
289 |
];
|
290 |
}
|
291 |
|
282 |
'name' => $order_item_data['name'],
|
283 |
'quantity' => $order_item_data['quantity'],
|
284 |
'price' => ( new Google($this->options) )->wpm_get_order_item_price($order_item, $product),
|
285 |
+
'subtotal' => (float) wc_format_decimal($order_item_data['subtotal'], 2),
|
286 |
+
'subtotal_tax' => (float) wc_format_decimal($order_item_data['subtotal_tax'], 2),
|
287 |
+
'total' => (float) wc_format_decimal($order_item_data['total'], 2),
|
288 |
+
'total_tax' => (float) wc_format_decimal($order_item_data['total_tax'], 2),
|
289 |
];
|
290 |
}
|
291 |
|
classes/pixels/trait-shop.php
CHANGED
@@ -2,359 +2,498 @@
|
|
2 |
|
3 |
namespace WCPM\Classes\Pixels;
|
4 |
|
5 |
-
use
|
6 |
-
use
|
7 |
-
use
|
8 |
-
use
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
trait Trait_Shop {
|
15 |
-
|
16 |
-
protected function get_list_name_suffix() {
|
17 |
-
|
18 |
-
$list_suffix = '';
|
19 |
-
|
20 |
-
if (is_product_category()) {
|
21 |
-
|
22 |
-
$category = get_queried_object();
|
23 |
-
$list_suffix = ' | ' . wp_specialchars_decode($category->name);
|
24 |
-
$list_suffix = $this->add_parent_category_name($category, $list_suffix);
|
25 |
-
} else {
|
26 |
-
if (is_product_tag()) {
|
27 |
-
$tag = get_queried_object();
|
28 |
-
$list_suffix = ' | ' . wp_specialchars_decode($tag->name);
|
29 |
-
}
|
30 |
-
}
|
31 |
-
|
32 |
-
return $list_suffix;
|
33 |
-
}
|
34 |
-
|
35 |
-
protected function add_parent_category_name( $category, $list_suffix ) {
|
36 |
-
|
37 |
-
if ($category->parent > 0) {
|
38 |
-
|
39 |
-
$parent_category = get_term_by('id', $category->parent, 'product_cat');
|
40 |
-
$list_suffix = ' | ' . wp_specialchars_decode($parent_category->name) . $list_suffix;
|
41 |
-
$list_suffix = $this->add_parent_category_name($parent_category, $list_suffix);
|
42 |
-
}
|
43 |
-
|
44 |
-
return $list_suffix;
|
45 |
-
}
|
46 |
-
|
47 |
-
protected function get_list_id_suffix() {
|
48 |
-
|
49 |
-
$list_suffix = '';
|
50 |
-
|
51 |
-
if (is_product_category()) {
|
52 |
-
$category = get_queried_object();
|
53 |
-
$list_suffix = '.' . $category->slug;
|
54 |
-
$list_suffix = $this->add_parent_category_id($category, $list_suffix);
|
55 |
-
} else {
|
56 |
-
if (is_product_tag()) {
|
57 |
-
$tag = get_queried_object();
|
58 |
-
$list_suffix = '.' . $tag->slug;
|
59 |
-
}
|
60 |
-
}
|
61 |
-
|
62 |
-
return $list_suffix;
|
63 |
-
}
|
64 |
-
|
65 |
-
protected function add_parent_category_id( $category, $list_suffix ) {
|
66 |
-
|
67 |
-
if ($category->parent > 0) {
|
68 |
-
|
69 |
-
$parent_category = get_term_by('id', $category->parent, 'product_cat');
|
70 |
-
$list_suffix = '.' . $parent_category->slug . $list_suffix;
|
71 |
-
$list_suffix = $this->add_parent_category_id($parent_category, $list_suffix);
|
72 |
-
}
|
73 |
-
|
74 |
-
return $list_suffix;
|
75 |
-
}
|
76 |
-
|
77 |
-
// https://stackoverflow.com/a/49616130/4688612
|
78 |
-
protected function get_order_from_order_received_page() {
|
79 |
-
|
80 |
-
if ($this->get_order_from_query_vars()) {
|
81 |
-
return $this->get_order_from_query_vars();
|
82 |
-
} else {
|
83 |
-
if ($this->get_order_with_url_order_key()) {
|
84 |
-
return $this->get_order_with_url_order_key();
|
85 |
-
} else {
|
86 |
-
return false;
|
87 |
-
}
|
88 |
-
}
|
89 |
-
}
|
90 |
-
|
91 |
-
protected function wpm_get_order_total( $order ) {
|
92 |
-
|
93 |
-
$order_total = 0 == $this->options_obj->shop->order_total_logic ? $order->get_subtotal() - $order->get_total_discount() : $order->get_total();
|
94 |
-
|
95 |
-
// filter to adjust the order value
|
96 |
-
$order_total = apply_filters_deprecated('wgact_conversion_value_filter', [$order_total, $order], '1.10.2', 'wooptpm_conversion_value_filter');
|
97 |
-
$order_total = apply_filters_deprecated('wooptpm_conversion_value_filter', [$order_total, $order], '1.13.0', 'wpm_conversion_value_filter');
|
98 |
-
$order_total = apply_filters('wpm_conversion_value_filter', $order_total, $order);
|
99 |
-
|
100 |
-
return number_format((float) $order_total, 2, '.', '');
|
101 |
-
|
102 |
-
}
|
103 |
-
|
104 |
-
protected function get_order_from_query_vars() {
|
105 |
-
|
106 |
-
global $wp;
|
107 |
-
|
108 |
-
$order_id = absint($wp->query_vars['order-received']);
|
109 |
-
|
110 |
-
if ($order_id && 0 != $order_id && wc_get_order($order_id)) {
|
111 |
-
|
112 |
-
return wc_get_order($order_id);
|
113 |
-
} else {
|
114 |
-
|
115 |
-
wc_get_logger()->debug(
|
116 |
-
'WooCommerce couldn\'t retrieve the order ID from $wp->query_vars[\'order-received\']',
|
117 |
-
['source' => 'wpm']
|
118 |
-
);
|
119 |
-
|
120 |
-
wc_get_logger()->debug(
|
121 |
-
print_r($wp->query_vars, true),
|
122 |
-
['source' => 'wpm']
|
123 |
-
);
|
124 |
-
|
125 |
-
return false;
|
126 |
-
}
|
127 |
-
}
|
128 |
-
|
129 |
-
protected function get_order_with_url_order_key() {
|
130 |
-
|
131 |
-
$_get = filter_input_array(INPUT_GET, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
132 |
-
|
133 |
-
if (isset($_get['key'])) {
|
134 |
-
|
135 |
-
$order_key = $_get['key'];
|
136 |
-
return wc_get_order(wc_get_order_id_by_order_key($order_key));
|
137 |
-
} else {
|
138 |
-
|
139 |
-
wc_get_logger()->debug(
|
140 |
-
'WooCommerce couldn\'t retrieve the order ID from order key in the URL',
|
141 |
-
['source' => 'wpm']
|
142 |
-
);
|
143 |
-
|
144 |
-
$order_key = $_get['key'] ? $_get['key'] : '';
|
145 |
-
wc_get_logger()->debug(
|
146 |
-
'URL order key: ' . $order_key,
|
147 |
-
['source' => 'wpm']
|
148 |
-
);
|
149 |
-
|
150 |
-
return false;
|
151 |
-
}
|
152 |
-
}
|
153 |
-
|
154 |
-
protected function get_order_currency( $order ) {
|
155 |
-
|
156 |
-
// use the right function to get the currency depending on the WooCommerce version
|
157 |
-
return $this->woocommerce_3_and_above() ? $order->get_currency() : $order->get_order_currency();
|
158 |
-
}
|
159 |
-
|
160 |
-
protected function woocommerce_3_and_above() {
|
161 |
-
|
162 |
-
global $woocommerce;
|
163 |
-
|
164 |
-
if (version_compare($woocommerce->version, 3.0, '>=')) {
|
165 |
-
return true;
|
166 |
-
} else {
|
167 |
-
return false;
|
168 |
-
}
|
169 |
-
}
|
170 |
-
|
171 |
-
// https://stackoverflow.com/a/46216073/4688612
|
172 |
-
// https://github.com/woocommerce/woocommerce/wiki/wc_get_orders-and-WC_Order_Query#description
|
173 |
-
protected function is_existing_customer( $order, $value = 0 ) {
|
174 |
-
|
175 |
-
if (is_numeric($value)) { // Based on user ID (registered users)
|
176 |
-
|
177 |
-
$meta_key = '_customer_user';
|
178 |
-
$meta_value = 0 == $value ? get_current_user_id() : (int) $value;
|
179 |
-
} else { // Based on billing email (Guest users)
|
180 |
-
|
181 |
-
$meta_key = '_billing_email';
|
182 |
-
$meta_value = sanitize_email($value);
|
183 |
-
}
|
184 |
-
|
185 |
-
$orders = wc_get_orders([
|
186 |
-
'return' => 'ids',
|
187 |
-
'meta_key' => $meta_key,
|
188 |
-
'meta_value' => $meta_value,
|
189 |
-
// 'orderby' => 'date',
|
190 |
-
// 'order' => 'DESC',
|
191 |
-
'post_status' => wc_get_is_paid_statuses(),
|
192 |
-
'limit' => 1,
|
193 |
-
]);
|
194 |
-
|
195 |
-
// Return a boolean value based on orders count
|
196 |
-
return count($orders) > 0;
|
197 |
-
}
|
198 |
-
|
199 |
-
protected function get_user_ip() {
|
200 |
-
|
201 |
-
if ($this->is_localhost()) {
|
202 |
-
$ip = WC_Geolocation::get_external_ip_address();
|
203 |
-
} else {
|
204 |
-
$ip = WC_Geolocation::get_ip_address();
|
205 |
-
}
|
206 |
-
|
207 |
-
// only set the IP if it is a public address
|
208 |
-
$ip = filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE);
|
209 |
-
|
210 |
-
// Remove the IPv6 to IPv4 mapping in case the IP contains one
|
211 |
-
// and return the IP plain public IPv4 or IPv6 IP
|
212 |
-
// https://en.wikipedia.org/wiki/IPv6_address
|
213 |
-
return str_replace('::ffff:', '', $ip);
|
214 |
-
}
|
215 |
-
|
216 |
-
protected function get_visitor_country() {
|
217 |
-
|
218 |
-
$location = WC_Geolocation::geolocate_ip($this->get_user_ip());
|
219 |
-
|
220 |
-
return $location['country'];
|
221 |
-
}
|
222 |
-
|
223 |
-
protected function is_localhost() {
|
224 |
-
|
225 |
-
$_server = filter_input_array(INPUT_SERVER, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
226 |
-
|
227 |
-
// If the IP is local, return true, else false
|
228 |
-
// https://stackoverflow.com/a/13818647/4688612
|
229 |
-
return !filter_var(
|
230 |
-
$_server['REMOTE_ADDR'],
|
231 |
-
FILTER_VALIDATE_IP,
|
232 |
-
FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE
|
233 |
-
);
|
234 |
-
}
|
235 |
-
|
236 |
-
protected function get_user_email( $algo = null ) {
|
237 |
-
|
238 |
-
if (is_user_logged_in()) {
|
239 |
-
$current_user = wp_get_current_user();
|
240 |
-
$email = $current_user->user_email;
|
241 |
-
} elseif (is_order_received_page()) {
|
242 |
-
$order = $this->get_order_from_order_received_page();
|
243 |
-
|
244 |
-
if ($order) {
|
245 |
-
$email = $order->get_billing_email();
|
246 |
-
} else {
|
247 |
-
$email = '';
|
248 |
-
}
|
249 |
-
} else {
|
250 |
-
$email = '';
|
251 |
-
}
|
252 |
-
|
253 |
-
// encrypt email
|
254 |
-
if ($email && $algo && in_array($algo, hash_algos(), true)) {
|
255 |
-
$email = hash($algo, $email);
|
256 |
-
}
|
257 |
-
|
258 |
-
return $email;
|
259 |
-
}
|
260 |
-
|
261 |
-
private function get_e164_formatted_phone_number( $number, $country ) {
|
262 |
-
|
263 |
-
try {
|
264 |
-
$phone_util = PhoneNumberUtil::getInstance();
|
265 |
-
$number_parsed = $phone_util->parse($number, $country);
|
266 |
-
return $phone_util->format($number_parsed, PhoneNumberFormat::E164);
|
267 |
-
} catch (NumberParseException $e) {
|
268 |
-
error_log($e);
|
269 |
-
return $number;
|
270 |
-
}
|
271 |
-
}
|
272 |
-
|
273 |
-
protected function track_user( $user_id = null ) {
|
274 |
-
|
275 |
-
$user = null;
|
276 |
-
|
277 |
-
if (0 === $user_id) { // If anonymous visitor then track
|
278 |
-
return true;
|
279 |
-
} elseif ($user_id && 0 <= $user_id) { // If user ID is known, get the user
|
280 |
-
$user = get_user_by('id', $user_id);
|
281 |
-
} elseif (null === $user_id && is_user_logged_in()) { // If user id is not given, but the user is logged in, get the user
|
282 |
-
$user = wp_get_current_user();
|
283 |
-
}
|
284 |
-
|
285 |
-
// Find out if the user has a role that is restricted from tracking
|
286 |
-
if ($user) {
|
287 |
-
|
288 |
-
foreach ($user->roles as $role) {
|
289 |
-
if (in_array($role, $this->options_obj->shop->disable_tracking_for, true)) {
|
290 |
-
return false;
|
291 |
-
}
|
292 |
-
}
|
293 |
-
}
|
294 |
-
|
295 |
-
return true;
|
296 |
-
}
|
297 |
-
|
298 |
-
protected function do_not_track_user( $user_id = null ) {
|
299 |
-
return !$this->track_user($user_id);
|
300 |
-
}
|
301 |
-
|
302 |
-
// https://wordpress.stackexchange.com/a/95440/68337
|
303 |
-
// https://wordpress.stackexchange.com/a/31435/68337
|
304 |
-
// https://developer.wordpress.org/reference/functions/get_the_title/
|
305 |
-
// https://codex.wordpress.org/Data_Validation#Output_Sanitation
|
306 |
-
// https://developer.wordpress.org/reference/functions/wp_specialchars_decode/
|
307 |
-
protected function wpm_get_the_title( $post = 0 ) {
|
308 |
-
|
309 |
-
$post = get_post($post);
|
310 |
-
$title = isset($post->post_title) ? $post->post_title : '';
|
311 |
-
|
312 |
-
return wp_specialchars_decode($title);
|
313 |
-
}
|
314 |
-
|
315 |
-
protected function is_backend_manual_order( $post_id ) {
|
316 |
-
|
317 |
-
// Only continue if this is a back-end order
|
318 |
-
if (metadata_exists('post', $post_id, '_created_via') && 'admin' === get_post_meta($post_id, '_created_via', true)) {
|
319 |
-
return true;
|
320 |
-
} else {
|
321 |
-
return false;
|
322 |
-
}
|
323 |
-
}
|
324 |
-
|
325 |
-
protected function is_backend_subscription_renewal_order( $post_id ) {
|
326 |
-
|
327 |
-
// Only continue if this is a back-end order
|
328 |
-
if (metadata_exists('post', $post_id, '_created_via') && 'subscription' === get_post_meta($post_id, '_created_via', true)) {
|
329 |
-
return true;
|
330 |
-
} else {
|
331 |
-
return false;
|
332 |
-
}
|
333 |
-
}
|
334 |
-
|
335 |
-
protected function was_order_created_while_wpm_was_active( $order_id ) {
|
336 |
-
if (get_post_meta($order_id, '_wpm_process_through_wpm', true)) {
|
337 |
-
return true;
|
338 |
-
} else {
|
339 |
-
return false;
|
340 |
-
}
|
341 |
-
}
|
342 |
-
|
343 |
-
protected function was_order_created_while_wpm_premium_was_active( $order_id ) {
|
344 |
-
if (get_post_meta($order_id, '_wpm_premium_active', true)) {
|
345 |
-
return true;
|
346 |
-
} else {
|
347 |
-
return false;
|
348 |
-
}
|
349 |
-
}
|
350 |
-
|
351 |
-
protected function wpm_get_order_user_id( $order_id ) {
|
352 |
-
|
353 |
-
if (metadata_exists('post', $order_id, '_wpm_customer_user')) {
|
354 |
-
return get_post_meta($order_id, '_wpm_customer_user', true);
|
355 |
-
} else {
|
356 |
-
return get_post_meta($order_id, '_customer_user', true);
|
357 |
-
}
|
358 |
-
}
|
359 |
}
|
360 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
namespace WCPM\Classes\Pixels;
|
4 |
|
5 |
+
use libphonenumber\NumberParseException ;
|
6 |
+
use libphonenumber\PhoneNumberFormat ;
|
7 |
+
use libphonenumber\PhoneNumberUtil ;
|
8 |
+
use WC_Geolocation ;
|
9 |
+
use WCPM\Classes\Admin\Documentation ;
|
10 |
+
|
11 |
+
if ( !defined( 'ABSPATH' ) ) {
|
12 |
+
exit;
|
13 |
+
// Exit if accessed directly
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
}
|
15 |
|
16 |
+
trait Trait_Shop
|
17 |
+
{
|
18 |
+
protected function get_list_name_suffix()
|
19 |
+
{
|
20 |
+
$list_suffix = '';
|
21 |
+
|
22 |
+
if ( is_product_category() ) {
|
23 |
+
$category = get_queried_object();
|
24 |
+
$list_suffix = ' | ' . wp_specialchars_decode( $category->name );
|
25 |
+
$list_suffix = $this->add_parent_category_name( $category, $list_suffix );
|
26 |
+
} else {
|
27 |
+
|
28 |
+
if ( is_product_tag() ) {
|
29 |
+
$tag = get_queried_object();
|
30 |
+
$list_suffix = ' | ' . wp_specialchars_decode( $tag->name );
|
31 |
+
}
|
32 |
+
|
33 |
+
}
|
34 |
+
|
35 |
+
return $list_suffix;
|
36 |
+
}
|
37 |
+
|
38 |
+
protected function add_parent_category_name( $category, $list_suffix )
|
39 |
+
{
|
40 |
+
|
41 |
+
if ( $category->parent > 0 ) {
|
42 |
+
$parent_category = get_term_by( 'id', $category->parent, 'product_cat' );
|
43 |
+
$list_suffix = ' | ' . wp_specialchars_decode( $parent_category->name ) . $list_suffix;
|
44 |
+
$list_suffix = $this->add_parent_category_name( $parent_category, $list_suffix );
|
45 |
+
}
|
46 |
+
|
47 |
+
return $list_suffix;
|
48 |
+
}
|
49 |
+
|
50 |
+
protected function get_list_id_suffix()
|
51 |
+
{
|
52 |
+
$list_suffix = '';
|
53 |
+
|
54 |
+
if ( is_product_category() ) {
|
55 |
+
$category = get_queried_object();
|
56 |
+
$list_suffix = '.' . $category->slug;
|
57 |
+
$list_suffix = $this->add_parent_category_id( $category, $list_suffix );
|
58 |
+
} else {
|
59 |
+
|
60 |
+
if ( is_product_tag() ) {
|
61 |
+
$tag = get_queried_object();
|
62 |
+
$list_suffix = '.' . $tag->slug;
|
63 |
+
}
|
64 |
+
|
65 |
+
}
|
66 |
+
|
67 |
+
return $list_suffix;
|
68 |
+
}
|
69 |
+
|
70 |
+
protected function add_parent_category_id( $category, $list_suffix )
|
71 |
+
{
|
72 |
+
|
73 |
+
if ( $category->parent > 0 ) {
|
74 |
+
$parent_category = get_term_by( 'id', $category->parent, 'product_cat' );
|
75 |
+
$list_suffix = '.' . $parent_category->slug . $list_suffix;
|
76 |
+
$list_suffix = $this->add_parent_category_id( $parent_category, $list_suffix );
|
77 |
+
}
|
78 |
+
|
79 |
+
return $list_suffix;
|
80 |
+
}
|
81 |
+
|
82 |
+
// https://stackoverflow.com/a/49616130/4688612
|
83 |
+
protected function get_order_from_order_received_page()
|
84 |
+
{
|
85 |
+
|
86 |
+
if ( $this->get_order_from_query_vars() ) {
|
87 |
+
return $this->get_order_from_query_vars();
|
88 |
+
} else {
|
89 |
+
|
90 |
+
if ( $this->get_order_with_url_order_key() ) {
|
91 |
+
return $this->get_order_with_url_order_key();
|
92 |
+
} else {
|
93 |
+
return false;
|
94 |
+
}
|
95 |
+
|
96 |
+
}
|
97 |
+
|
98 |
+
}
|
99 |
+
|
100 |
+
protected function wpm_get_order_total( $order )
|
101 |
+
{
|
102 |
+
$order_total = ( 0 == $this->options_obj->shop->order_total_logic ? $order->get_subtotal() - $order->get_total_discount() : $order->get_total() );
|
103 |
+
// filter to adjust the order value
|
104 |
+
$order_total = apply_filters_deprecated(
|
105 |
+
'wgact_conversion_value_filter',
|
106 |
+
[ $order_total, $order ],
|
107 |
+
'1.10.2',
|
108 |
+
'wooptpm_conversion_value_filter'
|
109 |
+
);
|
110 |
+
$order_total = apply_filters_deprecated(
|
111 |
+
'wooptpm_conversion_value_filter',
|
112 |
+
[ $order_total, $order ],
|
113 |
+
'1.13.0',
|
114 |
+
'wpm_conversion_value_filter'
|
115 |
+
);
|
116 |
+
$order_total = apply_filters( 'wpm_conversion_value_filter', $order_total, $order );
|
117 |
+
return wc_format_decimal( (double) $order_total, 2 );
|
118 |
+
}
|
119 |
+
|
120 |
+
protected function get_order_from_query_vars()
|
121 |
+
{
|
122 |
+
global $wp ;
|
123 |
+
$order_id = absint( $wp->query_vars['order-received'] );
|
124 |
+
|
125 |
+
if ( $order_id && 0 != $order_id && wc_get_order( $order_id ) ) {
|
126 |
+
return wc_get_order( $order_id );
|
127 |
+
} else {
|
128 |
+
wc_get_logger()->debug( 'WooCommerce couldn\'t retrieve the order ID from $wp->query_vars[\'order-received\']', [
|
129 |
+
'source' => 'wpm',
|
130 |
+
] );
|
131 |
+
wc_get_logger()->debug( print_r( $wp->query_vars, true ), [
|
132 |
+
'source' => 'wpm',
|
133 |
+
] );
|
134 |
+
return false;
|
135 |
+
}
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
protected function get_order_with_url_order_key()
|
140 |
+
{
|
141 |
+
$_get = filter_input_array( INPUT_GET, FILTER_SANITIZE_FULL_SPECIAL_CHARS );
|
142 |
+
|
143 |
+
if ( isset( $_get['key'] ) ) {
|
144 |
+
$order_key = $_get['key'];
|
145 |
+
return wc_get_order( wc_get_order_id_by_order_key( $order_key ) );
|
146 |
+
} else {
|
147 |
+
wc_get_logger()->debug( 'WooCommerce couldn\'t retrieve the order ID from order key in the URL', [
|
148 |
+
'source' => 'wpm',
|
149 |
+
] );
|
150 |
+
$order_key = ( $_get['key'] ? $_get['key'] : '' );
|
151 |
+
wc_get_logger()->debug( 'URL order key: ' . $order_key, [
|
152 |
+
'source' => 'wpm',
|
153 |
+
] );
|
154 |
+
return false;
|
155 |
+
}
|
156 |
+
|
157 |
+
}
|
158 |
+
|
159 |
+
protected function get_order_currency( $order )
|
160 |
+
{
|
161 |
+
// use the right function to get the currency depending on the WooCommerce version
|
162 |
+
return ( $this->woocommerce_3_and_above() ? $order->get_currency() : $order->get_order_currency() );
|
163 |
+
}
|
164 |
+
|
165 |
+
protected function woocommerce_3_and_above()
|
166 |
+
{
|
167 |
+
global $woocommerce ;
|
168 |
+
|
169 |
+
if ( version_compare( $woocommerce->version, 3.0, '>=' ) ) {
|
170 |
+
return true;
|
171 |
+
} else {
|
172 |
+
return false;
|
173 |
+
}
|
174 |
+
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Don't count in the current order
|
179 |
+
* https://stackoverflow.com/a/46216073/4688612
|
180 |
+
* https://github.com/woocommerce/woocommerce/wiki/wc_get_orders-and-WC_Order_Query#description
|
181 |
+
*/
|
182 |
+
protected function is_existing_customer( $order )
|
183 |
+
{
|
184 |
+
$query_arguments = [
|
185 |
+
'return' => 'ids',
|
186 |
+
'exclude' => [ $order->get_id() ],
|
187 |
+
'post_status' => wc_get_is_paid_statuses(),
|
188 |
+
'limit' => -1,
|
189 |
+
];
|
190 |
+
|
191 |
+
if ( is_user_logged_in() ) {
|
192 |
+
$current_user = wp_get_current_user();
|
193 |
+
$query_arguments['customer'] = sanitize_email( $current_user->user_email );
|
194 |
+
} else {
|
195 |
+
$query_arguments['billing_email'] = sanitize_email( $order->get_billing_email() );
|
196 |
+
}
|
197 |
+
|
198 |
+
$orders = wc_get_orders( $query_arguments );
|
199 |
+
return count( $orders ) > 0;
|
200 |
+
}
|
201 |
+
|
202 |
+
protected function is_new_customer( $order )
|
203 |
+
{
|
204 |
+
return !$this->is_existing_customer( $order );
|
205 |
+
}
|
206 |
+
|
207 |
+
// https://github.com/woocommerce/woocommerce/wiki/wc_get_orders-and-WC_Order_Query
|
208 |
+
// https://github.com/woocommerce/woocommerce/blob/5d7f6acbcb387f1d51d51305bf949d07fa3c4b08/includes/data-stores/class-wc-customer-data-store.php#L401
|
209 |
+
protected function get_clv_order_total_by_billing_email( $billing_email )
|
210 |
+
{
|
211 |
+
global $wpdb ;
|
212 |
+
$statuses = array_map( 'esc_sql', wc_get_is_paid_statuses() );
|
213 |
+
$spent = $wpdb->get_var(
|
214 |
+
// phpcs:disable WordPress.DB.PreparedSQL.NotPrepared
|
215 |
+
"SELECT SUM(meta2.meta_value)\n\t\t\t\t\tFROM {$wpdb->posts} as posts\n\t\t\t\t\tLEFT JOIN {$wpdb->postmeta} AS meta ON posts.ID = meta.post_id\n\t\t\t\t\tLEFT JOIN {$wpdb->postmeta} AS meta2 ON posts.ID = meta2.post_id\n\t\t\t\t\tWHERE meta.meta_key = '_billing_email'\n\t\t\t\t\tAND meta.meta_value = '" . esc_sql( sanitize_email( $billing_email ) ) . "'\n\t\t\t\t\tAND posts.post_type = 'shop_order'\n\t\t\t\t\tAND posts.post_status IN ( 'wc-" . implode( "','wc-", $statuses ) . "' )\n\t\t\t\t\tAND meta2.meta_key = '_order_total'"
|
216 |
+
);
|
217 |
+
return $spent;
|
218 |
+
}
|
219 |
+
|
220 |
+
protected function get_clv_value_filtered_by_billing_email( $billing_email )
|
221 |
+
{
|
222 |
+
$orders = $this->get_all_paid_orders_by_billing_email( $billing_email );
|
223 |
+
$value = 0;
|
224 |
+
foreach ( $orders as $order ) {
|
225 |
+
$value += (double) $this->wpm_get_order_total( $order );
|
226 |
+
}
|
227 |
+
return wc_format_decimal( $value, 2 );
|
228 |
+
}
|
229 |
+
|
230 |
+
protected function get_all_paid_orders_by_billing_email( $billing_email )
|
231 |
+
{
|
232 |
+
$query_arguments = [
|
233 |
+
'billing_email' => sanitize_email( $billing_email ),
|
234 |
+
'post_status' => wc_get_is_paid_statuses(),
|
235 |
+
'limit' => -1,
|
236 |
+
];
|
237 |
+
return wc_get_orders( $query_arguments );
|
238 |
+
}
|
239 |
+
|
240 |
+
protected function get_user_ip()
|
241 |
+
{
|
242 |
+
|
243 |
+
if ( $this->is_localhost() ) {
|
244 |
+
$ip = WC_Geolocation::get_external_ip_address();
|
245 |
+
} else {
|
246 |
+
$ip = WC_Geolocation::get_ip_address();
|
247 |
+
}
|
248 |
+
|
249 |
+
// only set the IP if it is a public address
|
250 |
+
$ip = filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE );
|
251 |
+
// Remove the IPv6 to IPv4 mapping in case the IP contains one
|
252 |
+
// and return the IP plain public IPv4 or IPv6 IP
|
253 |
+
// https://en.wikipedia.org/wiki/IPv6_address
|
254 |
+
return str_replace( '::ffff:', '', $ip );
|
255 |
+
}
|
256 |
+
|
257 |
+
protected function get_visitor_country()
|
258 |
+
{
|
259 |
+
$location = WC_Geolocation::geolocate_ip( $this->get_user_ip() );
|
260 |
+
return $location['country'];
|
261 |
+
}
|
262 |
+
|
263 |
+
protected function is_localhost()
|
264 |
+
{
|
265 |
+
$_server = filter_input_array( INPUT_SERVER, FILTER_SANITIZE_FULL_SPECIAL_CHARS );
|
266 |
+
// If the IP is local, return true, else false
|
267 |
+
// https://stackoverflow.com/a/13818647/4688612
|
268 |
+
return !filter_var( $_server['REMOTE_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE );
|
269 |
+
}
|
270 |
+
|
271 |
+
protected function get_user_email( $algo = null )
|
272 |
+
{
|
273 |
+
|
274 |
+
if ( is_user_logged_in() ) {
|
275 |
+
$current_user = wp_get_current_user();
|
276 |
+
$email = $current_user->user_email;
|
277 |
+
} elseif ( is_order_received_page() ) {
|
278 |
+
$order = $this->get_order_from_order_received_page();
|
279 |
+
|
280 |
+
if ( $order ) {
|
281 |
+
$email = $order->get_billing_email();
|
282 |
+
} else {
|
283 |
+
$email = '';
|
284 |
+
}
|
285 |
+
|
286 |
+
} else {
|
287 |
+
$email = '';
|
288 |
+
}
|
289 |
+
|
290 |
+
// encrypt email
|
291 |
+
if ( $email && $algo && in_array( $algo, hash_algos(), true ) ) {
|
292 |
+
$email = hash( $algo, $email );
|
293 |
+
}
|
294 |
+
return $email;
|
295 |
+
}
|
296 |
+
|
297 |
+
private function get_e164_formatted_phone_number( $number, $country )
|
298 |
+
{
|
299 |
+
try {
|
300 |
+
$phone_util = PhoneNumberUtil::getInstance();
|
301 |
+
$number_parsed = $phone_util->parse( $number, $country );
|
302 |
+
return $phone_util->format( $number_parsed, PhoneNumberFormat::E164 );
|
303 |
+
} catch ( NumberParseException $e ) {
|
304 |
+
error_log( $e );
|
305 |
+
return $number;
|
306 |
+
}
|
307 |
+
}
|
308 |
+
|
309 |
+
protected function track_user( $user_id = null )
|
310 |
+
{
|
311 |
+
$user = null;
|
312 |
+
|
313 |
+
if ( 0 === $user_id ) {
|
314 |
+
// If anonymous visitor then track
|
315 |
+
return true;
|
316 |
+
} elseif ( $user_id && 0 <= $user_id ) {
|
317 |
+
// If user ID is known, get the user
|
318 |
+
$user = get_user_by( 'id', $user_id );
|
319 |
+
} elseif ( null === $user_id && is_user_logged_in() ) {
|
320 |
+
// If user id is not given, but the user is logged in, get the user
|
321 |
+
$user = wp_get_current_user();
|
322 |
+
}
|
323 |
+
|
324 |
+
// Find out if the user has a role that is restricted from tracking
|
325 |
+
if ( $user ) {
|
326 |
+
foreach ( $user->roles as $role ) {
|
327 |
+
if ( in_array( $role, $this->options_obj->shop->disable_tracking_for, true ) ) {
|
328 |
+
return false;
|
329 |
+
}
|
330 |
+
}
|
331 |
+
}
|
332 |
+
return true;
|
333 |
+
}
|
334 |
+
|
335 |
+
protected function do_not_track_user( $user_id = null )
|
336 |
+
{
|
337 |
+
return !$this->track_user( $user_id );
|
338 |
+
}
|
339 |
+
|
340 |
+
// https://wordpress.stackexchange.com/a/95440/68337
|
341 |
+
// https://wordpress.stackexchange.com/a/31435/68337
|
342 |
+
// https://developer.wordpress.org/reference/functions/get_the_title/
|
343 |
+
// https://codex.wordpress.org/Data_Validation#Output_Sanitation
|
344 |
+
// https://developer.wordpress.org/reference/functions/wp_specialchars_decode/
|
345 |
+
protected function wpm_get_the_title( $post = 0 )
|
346 |
+
{
|
347 |
+
$post = get_post( $post );
|
348 |
+
$title = ( isset( $post->post_title ) ? $post->post_title : '' );
|
349 |
+
return wp_specialchars_decode( $title );
|
350 |
+
}
|
351 |
+
|
352 |
+
protected function is_backend_manual_order( $post_id )
|
353 |
+
{
|
354 |
+
// Only continue if this is a back-end order
|
355 |
+
|
356 |
+
if ( metadata_exists( 'post', $post_id, '_created_via' ) && 'admin' === get_post_meta( $post_id, '_created_via', true ) ) {
|
357 |
+
return true;
|
358 |
+
} else {
|
359 |
+
return false;
|
360 |
+
}
|
361 |
+
|
362 |
+
}
|
363 |
+
|
364 |
+
protected function is_backend_subscription_renewal_order( $post_id )
|
365 |
+
{
|
366 |
+
// Only continue if this is a back-end order
|
367 |
+
|
368 |
+
if ( metadata_exists( 'post', $post_id, '_created_via' ) && 'subscription' === get_post_meta( $post_id, '_created_via', true ) ) {
|
369 |
+
return true;
|
370 |
+
} else {
|
371 |
+
return false;
|
372 |
+
}
|
373 |
+
|
374 |
+
}
|
375 |
+
|
376 |
+
protected function was_order_created_while_wpm_was_active( $order_id )
|
377 |
+
{
|
378 |
+
|
379 |
+
if ( get_post_meta( $order_id, '_wpm_process_through_wpm', true ) ) {
|
380 |
+
return true;
|
381 |
+
} else {
|
382 |
+
return false;
|
383 |
+
}
|
384 |
+
|
385 |
+
}
|
386 |
+
|
387 |
+
protected function was_order_created_while_wpm_premium_was_active( $order_id )
|
388 |
+
{
|
389 |
+
|
390 |
+
if ( get_post_meta( $order_id, '_wpm_premium_active', true ) ) {
|
391 |
+
return true;
|
392 |
+
} else {
|
393 |
+
return false;
|
394 |
+
}
|
395 |
+
|
396 |
+
}
|
397 |
+
|
398 |
+
protected function wpm_get_order_user_id( $order_id )
|
399 |
+
{
|
400 |
+
|
401 |
+
if ( metadata_exists( 'post', $order_id, '_wpm_customer_user' ) ) {
|
402 |
+
return get_post_meta( $order_id, '_wpm_customer_user', true );
|
403 |
+
} else {
|
404 |
+
return get_post_meta( $order_id, '_customer_user', true );
|
405 |
+
}
|
406 |
+
|
407 |
+
}
|
408 |
+
|
409 |
+
protected function is_browser_on_shop()
|
410 |
+
{
|
411 |
+
$_server = filter_input_array( INPUT_SERVER, FILTER_SANITIZE_FULL_SPECIAL_CHARS );
|
412 |
+
// error_log(print_r($_server, true));
|
413 |
+
// error_log(print_r($_server['HTTP_HOST'], true));
|
414 |
+
// error_log('get_site_url(): ' . parse_url(get_site_url(), PHP_URL_HOST));
|
415 |
+
// error_log('parse url https://www.exampel.com : ' . parse_url('https://www.exampel.com', PHP_URL_HOST));
|
416 |
+
|
417 |
+
if ( wp_parse_url( get_site_url(), PHP_URL_HOST ) === $_server['HTTP_HOST'] ) {
|
418 |
+
return true;
|
419 |
+
} else {
|
420 |
+
return false;
|
421 |
+
}
|
422 |
+
|
423 |
+
}
|
424 |
+
|
425 |
+
protected function can_order_confirmation_be_processed( $order )
|
426 |
+
{
|
427 |
+
$conversion_prevention = false;
|
428 |
+
$conversion_prevention = apply_filters_deprecated(
|
429 |
+
'wgact_conversion_prevention',
|
430 |
+
[ $conversion_prevention, $order ],
|
431 |
+
'1.10.2',
|
432 |
+
'wooptpm_conversion_prevention'
|
433 |
+
);
|
434 |
+
$conversion_prevention = apply_filters_deprecated(
|
435 |
+
'wooptpm_conversion_prevention',
|
436 |
+
[ $conversion_prevention, $order ],
|
437 |
+
'1.13.0',
|
438 |
+
'wpm_conversion_prevention'
|
439 |
+
);
|
440 |
+
$conversion_prevention = apply_filters( 'wpm_conversion_prevention', $conversion_prevention, $order );
|
441 |
+
|
442 |
+
if ( $this->is_nodedupe_parameter_set() || !$order->has_status( 'failed' ) && $this->track_user() && false === $conversion_prevention && (!$this->options['shop']['order_deduplication'] || $this->has_conversion_pixel_already_fired( $order ) !== true) ) {
|
443 |
+
return true;
|
444 |
+
} else {
|
445 |
+
return false;
|
446 |
+
}
|
447 |
+
|
448 |
+
}
|
449 |
+
|
450 |
+
protected function has_conversion_pixel_already_fired( $order )
|
451 |
+
{
|
452 |
+
return false;
|
453 |
+
}
|
454 |
+
|
455 |
+
protected function is_nodedupe_parameter_set()
|
456 |
+
{
|
457 |
+
$_get = filter_input_array( INPUT_GET, FILTER_SANITIZE_FULL_SPECIAL_CHARS );
|
458 |
+
|
459 |
+
if ( isset( $_get['nodedupe'] ) ) {
|
460 |
+
return true;
|
461 |
+
} else {
|
462 |
+
return false;
|
463 |
+
}
|
464 |
+
|
465 |
+
}
|
466 |
+
|
467 |
+
protected function conversion_pixels_already_fired_html()
|
468 |
+
{
|
469 |
+
?>
|
470 |
+
|
471 |
+
<!-- ----------------------------------------------------------------------------------------------------
|
472 |
+
The conversion pixels have not been fired. Possible reasons:
|
473 |
+
- The user role has been disabled for tracking.
|
474 |
+
- The order payment has failed.
|
475 |
+
- The pixels have already been fired. To prevent double counting the pixels are only fired once.
|
476 |
+
|
477 |
+
If you want to test the order you have two options:
|
478 |
+
- Turn off order duplication prevention in the advanced settings
|
479 |
+
- Add the '&nodedupe' parameter to the order confirmation URL like this:
|
480 |
+
https://example.test/checkout/order-received/123/?key=wc_order_123abc&nodedupe
|
481 |
+
|
482 |
+
More info on testing: <?php
|
483 |
+
esc_html_e( ( new Documentation() )->get_link( 'test_order' ) );
|
484 |
+
?>
|
485 |
+
|
486 |
+
----------------------------------------------------------------------------------------------------
|
487 |
+
-->
|
488 |
+
<?php
|
489 |
+
}
|
490 |
+
|
491 |
+
protected function get_options_object( $options )
|
492 |
+
{
|
493 |
+
// TODO find out why I did this weird transformation and simplify it
|
494 |
+
$options_obj = json_decode( wp_json_encode( $options ) );
|
495 |
+
$options_obj->shop->currency = get_woocommerce_currency();
|
496 |
+
return $options_obj;
|
497 |
+
}
|
498 |
+
|
499 |
+
}
|
js/admin/main.js
CHANGED
@@ -5,4 +5,4 @@ import script_blocker_warning from "./script-blocker-warning.js"
|
|
5 |
import tabs from "./tabs.js"
|
6 |
|
7 |
|
8 |
-
// console.log('
|
5 |
import tabs from "./tabs.js"
|
6 |
|
7 |
|
8 |
+
// console.log('Pixel Manager for WooCommerce admin script')
|
js/admin/main.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
import ask_for_rating from"./ask-for-rating.js";import environment_check from"./environment-check.js";import helpers from"./helpers.js";import script_blocker_warning from"./script-blocker-warning.js";import tabs from"./tabs.js";
|
js/admin/wpm-admin-freemius.p1.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"file":"wpm-admin-freemius.p1.min.js","mappings":"sBAAA,WACC,IAEgB,IAAIA,kBAAiB,SAAUC,GAC7CA,EAAUC,SAAQ,SAAUC,GACI,UAA3BA,EAASC,eACSC,OAAOF,EAASG,QAAQC,KAAKJ,EAASC,eACxCI,SAAS,aAC3BH,OAAO,aAAaI,KAAK,sBAAsBC,YAAY,kBAMtDC,QAAQN,OAAO,aAAaI,KAAK,sBAAsB,GAAI,CACnEG,YAAY,IAGZ,MAAOC,G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,EAAOD,QAASJ,GAG/CK,EAAOD,QCpBfJ,EAAoBO,EAAKF,IACxB,IAAIG,EAASH,GAAUA,EAAOI,WAC7B,IAAOJ,EAAiB,QACxB,IAAM,EAEP,OADAL,EAAoBU,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,GCLRR,EAAoBU,EAAI,CAACN,EAASQ,KACjC,IAAI,IAAIC,KAAOD,EACXZ,EAAoBc,EAAEF,EAAYC,KAASb,EAAoBc,EAAEV,EAASS,IAC5EE,OAAOC,eAAeZ,EAASS,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3Eb,EAAoBc,EAAI,CAACK,EAAK5B,IAAUwB,OAAOK,UAAUC,eAAeC,KAAKH,EAAK5B,G","sources":["webpack://Pixel-Manager-for-WooCommerce/./src/js/admin/freemius-keep-deactivate-button-enabled.js","webpack://Pixel-Manager-for-WooCommerce/webpack/bootstrap","webpack://Pixel-Manager-for-WooCommerce/webpack/runtime/compat get default export","webpack://Pixel-Manager-for-WooCommerce/webpack/runtime/define property getters","webpack://Pixel-Manager-for-WooCommerce/webpack/runtime/hasOwnProperty shorthand"],"sourcesContent":["(function () {\n\ttry {\n\n\t\tlet observer = new MutationObserver(function (mutations) {\n\t\t\tmutations.forEach(function (mutation) {\n\t\t\t\tif (mutation.attributeName === \"class\") {\n\t\t\t\t\tlet attributeValue = jQuery(mutation.target).prop(mutation.attributeName);\n\t\t\t\t\tif (attributeValue.includes('disabled')) {\n\t\t\t\t\t\tjQuery('.fs-modal').find('.button-deactivate').removeClass('disabled');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\tobserver.observe(jQuery('.fs-modal').find('.button-deactivate')[0], {\n\t\t\tattributes: true\n\t\t});\n\n\t} catch (error) {\n\t\tconsole.error(error);\n\t}\n})();\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))"],"names":["MutationObserver","mutations","forEach","mutation","attributeName","jQuery","target","prop","includes","find","removeClass","observe","attributes","error","console","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prototype","hasOwnProperty","call"],"sourceRoot":""}
|
js/admin/wpm-admin.p1.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"file":"wpm-admin.p1.min.js","mappings":"sBAAAA,QAAO,WAqBN,SAASC,EAAcC,EAAGC,GAEzBD,EAAEE,iBAEF,IAAIC,EAAO,CACV,OAAU,+BACV,IAAUF,GAGXH,OAAOM,KAAKC,QAASF,GAAM,SAAUG,OAIrCR,OAAO,8BAA8BS,SAhCtCT,OAAO,8BAA8BU,OAGrCV,OAAOW,UAAUC,GAAG,QAAS,gBAAgB,SAAUV,GACtDD,EAAcC,EAAG,eAEPW,OAAOC,KAAK,uHAAwH,UAC1I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./src/js/admin/helpers.js","webpack://WooCommerce-Pixel-Manager/./src/js/admin/script-blocker-warning.js","webpack://WooCommerce-Pixel-Manager/./src/js/admin/tabs.js","webpack://WooCommerce-Pixel-Manager/webpack/bootstrap","webpack://WooCommerce-Pixel-Manager/webpack/runtime/compat get default export","webpack://WooCommerce-Pixel-Manager/webpack/runtime/define property getters","webpack://WooCommerce-Pixel-Manager/webpack/runtime/hasOwnProperty shorthand"],"sourcesContent":["jQuery(function () {\n\n\tjQuery('.wpm-rating-success-notice').show();\n\n\t// go and rate it or already done\n\tjQuery(document).on('click', '#wpm-rate-it', function (e) {\n\t\tprocess_click(e, 'rating_done');\n\n\t\tlet win = window.open('https://wordpress.org/support/view/plugin-reviews/woocommerce-google-adwords-conversion-tracking-tag?rate=5#postform', '_blank');\n\t\twin.focus();\n\t});\n\n\tjQuery(document).on('click', '#wpm-already-did', function (e) {\n\t\tprocess_click(e, 'rating_done');\n\t});\n\n\t// maybe rate later\n\tjQuery(document).on('click', '#wpm-maybe-later', function (e) {\n\t\tprocess_click(e, 'later');\n\t});\n\n\tfunction process_click(e, set) {\n\n\t\te.preventDefault();\n\n\t\tlet data = {\n\t\t\t'action': 'wpm_dismissed_notice_handler',\n\t\t\t'set' : set\n\t\t};\n\n\t\tjQuery.post(ajaxurl, data, function (response) {\n\t\t\t// console.log('Got this from the server: ' + response);\n\t\t\t// console.log('update rating done');\n\t\t});\n\t\tjQuery('.wpm-rating-success-notice').remove();\n\t}\n});\n","jQuery(function () {\n\n\t// disable incompatible plugin warning\n\tjQuery(document).on('click', '.incompatible-plugin-error-dismissal-button', function (e) {\n\t\te.preventDefault();\n\n\t\tlet data = {\n\t\t\t'action' : 'environment_check_handler',\n\t\t\t'disable_warning': jQuery(this).data('plugin-slug'),\n\t\t};\n\n\t\twpm_send_ajax_data(data);\n\t});\n\n\n\t// disable WP Rocket JavaScript concatenation\n\tjQuery(document).on('click', '#wpm-wp-rocket-js-concatenation-disable', function (e) {\n\t\te.preventDefault();\n\n\t\tlet data = {\n\t\t\t'action': 'environment_check_handler',\n\t\t\t'set' : 'disable_wp_rocket_javascript_concatenation'\n\t\t};\n\n\t\twpm_send_ajax_data(data);\n\t});\n\n\t// dismiss WP Rocket JavaScript concatenation error\n\tjQuery(document).on('click', '#wpm-dismiss-wp-rocket-js-concatenation-error', function (e) {\n\t\te.preventDefault();\n\n\t\tlet data = {\n\t\t\t'action': 'environment_check_handler',\n\t\t\t'set' : 'dismiss_wp_rocket_javascript_concatenation_error'\n\t\t};\n\n\t\twpm_send_ajax_data(data);\n\t});\n\n\t// disable WP Rocket JavaScript concatenation\n\tjQuery(document).on('click', '#wpm-litespeed-inline-js-dom-ready-disable', function (e) {\n\t\te.preventDefault();\n\n\t\tlet data = {\n\t\t\t'action': 'environment_check_handler',\n\t\t\t'set' : 'disable_litespeed_inline_js_dom_ready'\n\t\t};\n\n\t\twpm_send_ajax_data(data);\n\t});\n\n\t// dismiss WP Rocket JavaScript concatenation error\n\tjQuery(document).on('click', '#wpm-dismiss-litespeed-inline-js-dom-ready-error', function (e) {\n\t\te.preventDefault();\n\n\t\tlet data = {\n\t\t\t'action': 'environment_check_handler',\n\t\t\t'set' : 'dismiss_litespeed_inline_js_dom_ready'\n\t\t};\n\n\t\twpm_send_ajax_data(data);\n\t});\n\n\t// dismiss PayPal standard payment gateway warning\n\tjQuery(document).on('click', '#wpm-paypal-standard-error-dismissal-button', function (e) {\n\t\te.preventDefault();\n\n\t\tlet data = {\n\t\t\t'action': 'environment_check_handler',\n\t\t\t'set' : 'dismiss_paypal_standard_warning'\n\t\t};\n\n\t\twpm_send_ajax_data(data);\n\t});\n\n});\n\nfunction wpm_send_ajax_data(data) {\n\tjQuery.post(ajaxurl, data, function (response) {\n\t\t// console.log('Got this from the server: ' + response);\n\t\t// console.log('update rating done');\n\t\tlocation.reload();\n\t});\n}\n","jQuery(function () {\n\n\t// copy debug info textarea\n\tjQuery(\"#debug-info-button\").click(function () {\n\t\tjQuery(\"#debug-info-textarea\").select();\n\t\tdocument.execCommand('copy');\n\t});\n\n\tjQuery(\"#wpm_pro_version_demo\").on('click', function () {\n\t\tjQuery(\"#submit\").click();\n\t});\n});\n","function wpm_hide_script_blocker_warning() {\n\tjQuery('#script-blocker-notice').hide();\n}\n\n// try to hide as soon as this script is loaded\n// might be too early in some cases, as the HTML is not rendered yet\nwpm_hide_script_blocker_warning();\n\n// if all other earlier attempts to hide did fail\n// run the function after entire DOM has been loaded\njQuery(function () {\n\twpm_hide_script_blocker_warning();\n});\n","jQuery(function () {\n\n\t // Don't run if we are not one of the\n\t // WPM main tabs\n\tif(\"wpm\" !== wpmGetPageId()) return\n\n\tlet sections = []\n\tlet subsections = {}\n\n\t// Hide unnecessary elements\n\tjQuery(\".section\").closest(\"tr\").hide()\n\n\t// Collect information on sections\n\tjQuery(\".section\").each(function () {\n\t\tsections.push({\n\t\t\t\"slug\" : jQuery(this).data(\"sectionSlug\"),\n\t\t\t\"title\": jQuery(this).data(\"sectionTitle\"),\n\t\t})\n\t})\n\n\t// Collect information on subsections\n\tjQuery(\".subsection\").each(function () {\n\n\t\tsubsections[jQuery(this).data(\"sectionSlug\")] = subsections[jQuery(this).data(\"sectionSlug\")] || []\n\n\t\tsubsections[jQuery(this).data(\"sectionSlug\")].push({\n\t\t\t\"title\": jQuery(this).data(\"subsectionTitle\"),\n\t\t\t\"slug\" : jQuery(this).data(\"subsectionSlug\"),\n\t\t})\n\t})\n\n\t// Create tabs for sections\n\tsections.forEach(\n\t\tfunction (section) {\n\t\t\tjQuery(\".nav-tab-wrapper\").append(\"<a href=\\\"#\\\" class=\\\"nav-tab\\\" data-section-slug=\\\"\" + section[\"slug\"] + \"\\\">\" + section[\"title\"] + \"</a>\")\n\t\t})\n\n\t// Create tabs for each subsections\n\tjQuery(\".nav-tab-wrapper\").after(wpmCreateSubtabUlHtml(subsections))\n\n\t// Create on-click events on section tabs that toggle the views\n\tjQuery(\".nav-tab-wrapper a\").on(\"click\", function (e) {\n\n\t\te.preventDefault()\n\n\t\t// show clicked tab as active\n\t\tjQuery(this).addClass(\"nav-tab-active\").siblings().removeClass(\"nav-tab-active\")\n\n\t\t// toggle the sections visible / invisible based on clicked tab\n\n\t\tlet sectionSlug = jQuery(this).data(\"section-slug\")\n\t\twpmToggleSections(sectionSlug, sections)\n\n\t\t// if subsection exists, click on first subsection\n\t\tif (sectionSlug in subsections) {\n\t\t\tjQuery(\"ul[data-section-slug=\" + sectionSlug + \"]\").children(\":first\").trigger(\"click\")\n\t\t}\n\t})\n\n\t// Create on-click events on subsection tabs that toggle the views\n\tjQuery(\".subnav-li\").on(\"click\", function (e) {\n\n\t\te.preventDefault()\n\n\t\t// jQuery(this).hide();\n\t\tjQuery(this)\n\t\t\t.addClass(\"subnav-li-active\").removeClass(\"subnav-li-inactive\")\n\t\t\t.siblings()\n\t\t\t.addClass(\"subnav-li-inactive\").removeClass(\"subnav-li-active\")\n\n\t\twpmToggleSubsection(jQuery(this).parent().data(\"section-slug\"), jQuery(this).data(\"subsection-slug\"))\n\t})\n\n\t/**\n\t * If someone accesses a plugin tab by deep link, open the right tab\n\t * or fallback to default (first tab)\n\t *\n\t * If deeplink is being opened,\n\t * open the according section and subsection\n\t */\n\tif (wpmGetSectionParams()) {\n\n\t\tlet sectionParams = wpmGetSectionParams()\n\n\t\tjQuery(\"a[data-section-slug=\" + sectionParams[\"section\"] + \"]\").trigger(\"click\")\n\n\t\tif (sectionParams[\"subsection\"] !== false) {\n\t\t\tjQuery(\"ul[data-section-slug=\" + sectionParams[\"section\"] + \"]\").children(\"[data-subsection-slug=\" + sectionParams[\"subsection\"] + \"]\").trigger(\"click\")\n\t\t}\n\t} else {\n\t\tjQuery(\"a[data-section-slug=\" + sections[0][\"slug\"] + \"]\").trigger(\"click\")\n\t}\n})\n\n// Creates the html with all subsection elements\nfunction wpmCreateSubtabUlHtml(subsections) {\n\n\tlet subsectionsKeys = Object.keys(subsections)\n\n\tlet html = \"\"\n\n\tsubsectionsKeys.forEach(function (subsectionKey) {\n\t\thtml += \"<ul class=\\\"subnav-tabs\\\" data-section-slug=\\\"\" + subsectionKey + \"\\\">\"\n\n\t\tlet subtabs = subsections[subsectionKey]\n\n\t\tsubtabs.forEach(function (subtab) {\n\t\t\thtml += \"<li class=\\\"subnav-li subnav-li-inactive\\\" style=\\\"cursor: pointer;\\\" data-subsection-slug=\\\"\" + subtab[\"slug\"] + \"\\\">\" + subtab[\"title\"] + \"</li>\"\n\t\t})\n\n\t\thtml += \"</ul>\"\n\t})\n\n\treturn html\n}\n\n/**\n * If section (and subsection) URL parameters are set,\n * return them, otherwise return false\n */\nfunction wpmGetSectionParams() {\n\n\tconst queryString = window.location.search\n\tconst urlParams = new URLSearchParams(queryString)\n\n\tif (urlParams.get(\"section\")) {\n\t\treturn {\n\t\t\t\"section\" : urlParams.get(\"section\"),\n\t\t\t\"subsection\": urlParams.get(\"subsection\"),\n\t\t}\n\t} else {\n\t\treturn false\n\t}\n}\n\n// Toggles the sections\nfunction wpmToggleSections(sectionSlug, sections) {\n\n\tjQuery(\"#wpm_settings_form > h2\").nextUntil(\".submit\").andSelf().hide()\n\tjQuery(\".subnav-tabs\").hide()\n\tjQuery(\".subnav-tabs[data-section-slug=\" + sectionSlug + \"]\").show()\n\n\tlet sectionPos = sections.findIndex((arrayElement) => arrayElement[\"slug\"] === sectionSlug)\n\n\tjQuery(\"div[data-section-slug=\" + sectionSlug + \"]\").closest(\"table\").prevAll(\"h2:first\").next().nextUntil(\"h2, .submit\").andSelf().show()\n\n\t// set the URL with the active tab parameter\n\twpmSetUrl(sections[sectionPos][\"slug\"])\n}\n\nfunction wpmToggleSubsection(sectionSlug, subsectionSlug) {\n\n\tjQuery(\"#wpm_settings_form > h2\").nextUntil(\".submit\").andSelf().hide()\n\tjQuery(\"[data-section-slug=\" + sectionSlug + \"][data-subsection-slug=\" + subsectionSlug + \"]\").closest(\"tr\").siblings().andSelf().hide()\n\n\tjQuery(\"[data-section-slug=\" + sectionSlug + \"][data-subsection-slug=\" + subsectionSlug + \"]\").closest(\"table\").show()\n\tjQuery(\"[data-section-slug=\" + sectionSlug + \"][data-subsection-slug=\" + subsectionSlug + \"]\").closest(\"tr\").nextUntil(jQuery(\"[data-section-slug=\" + sectionSlug + \"][data-subsection-slug]\").closest(\"tr\")).show()\n\n\t// Set the URL with the active tab parameter\n\twpmSetUrl(sectionSlug, subsectionSlug)\n}\n\n// Sets the new URL parameters\nfunction wpmSetUrl(sectionSlug, subsectionSlug = \"\") {\n\n\tconst queryString = window.location.search\n\tconst urlParams = new URLSearchParams(queryString)\n\n\turlParams.delete(\"section\")\n\turlParams.delete(\"subsection\")\n\n\tlet newParams = \"section=\" + sectionSlug\n\tnewParams += subsectionSlug ? \"&subsection=\" + subsectionSlug : \"\"\n\n\thistory.pushState(\"\", \"wpm\" + sectionSlug, document.location.pathname + \"?page=wpm&\" + newParams)\n\n\t// Make WP remember which was the selected tab on a save and return to the same tab after saving\n\tjQuery(\"input[name =\\\"_wp_http_referer\\\"]\").val(wpmGetAdminPath() + \"?page=wpm&\" + newParams + \"&settings-updated=true\")\n}\n\nfunction wpmGetAdminPath() {\n\tlet url = new URL(jQuery(\"#wp-admin-canonical\").attr(\"href\"))\n\treturn url.pathname\n}\n\nwpmGetPageId = () => {\n\tconst queryString = window.location.search\n\tconst urlParams = new URLSearchParams(queryString)\n\n\treturn urlParams.get(\"page\")\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))"],"names":["jQuery","process_click","e","set","preventDefault","data","post","ajaxurl","response","remove","show","document","on","window","open","focus","wpm_send_ajax_data","location","reload","this","click","select","execCommand","wpm_hide_script_blocker_warning","hide","wpmGetSectionParams","queryString","search","urlParams","URLSearchParams","get","wpmSetUrl","sectionSlug","subsectionSlug","delete","newParams","history","pushState","pathname","val","wpmGetAdminPath","URL","attr","wpmGetPageId","sections","subsections","closest","each","push","forEach","section","append","after","subsectionsKeys","Object","keys","html","subsectionKey","subtab","wpmCreateSubtabUlHtml","addClass","siblings","removeClass","nextUntil","andSelf","sectionPos","findIndex","arrayElement","prevAll","next","wpmToggleSections","children","trigger","parent","sectionParams","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","defineProperty","enumerable","obj","prop","prototype","hasOwnProperty","call"],"sourceRoot":""}
|
1 |
+
{"version":3,"file":"wpm-admin.p1.min.js","mappings":"sBAAAA,QAAO,WAqBN,SAASC,EAAcC,EAAGC,GAEzBD,EAAEE,iBAEF,IAAIC,EAAO,CACV,OAAU,+BACV,IAAUF,GAGXH,OAAOM,KAAKC,QAASF,GAAM,SAAUG,OAIrCR,OAAO,8BAA8BS,SAhCtCT,OAAO,8BAA8BU,OAGrCV,OAAOW,UAAUC,GAAG,QAAS,gBAAgB,SAAUV,GACtDD,EAAcC,EAAG,eAEPW,OAAOC,KAAK,uHAAwH,UA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for-WooCommerce/./src/js/admin/helpers.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/admin/script-blocker-warning.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/admin/tabs.js","webpack://Pixel-Manager-for-WooCommerce/webpack/bootstrap","webpack://Pixel-Manager-for-WooCommerce/webpack/runtime/compat get default export","webpack://Pixel-Manager-for-WooCommerce/webpack/runtime/define property getters","webpack://Pixel-Manager-for-WooCommerce/webpack/runtime/hasOwnProperty shorthand"],"sourcesContent":["jQuery(function () {\n\n\tjQuery('.wpm-rating-success-notice').show();\n\n\t// go and rate it or already done\n\tjQuery(document).on('click', '#wpm-rate-it', function (e) {\n\t\tprocess_click(e, 'rating_done');\n\n\t\tlet win = window.open('https://wordpress.org/support/view/plugin-reviews/woocommerce-google-adwords-conversion-tracking-tag?rate=5#postform', '_blank');\n\t\twin.focus();\n\t});\n\n\tjQuery(document).on('click', '#wpm-already-did', function (e) {\n\t\tprocess_click(e, 'rating_done');\n\t});\n\n\t// maybe rate later\n\tjQuery(document).on('click', '#wpm-maybe-later', function (e) {\n\t\tprocess_click(e, 'later');\n\t});\n\n\tfunction process_click(e, set) {\n\n\t\te.preventDefault();\n\n\t\tlet data = {\n\t\t\t'action': 'wpm_dismissed_notice_handler',\n\t\t\t'set' : set\n\t\t};\n\n\t\tjQuery.post(ajaxurl, data, function (response) {\n\t\t\t// console.log('Got this from the server: ' + response);\n\t\t\t// console.log('update rating done');\n\t\t});\n\t\tjQuery('.wpm-rating-success-notice').remove();\n\t}\n});\n","jQuery(function () {\n\n\t// disable incompatible plugin warning\n\tjQuery(document).on('click', '.incompatible-plugin-error-dismissal-button', function (e) {\n\t\te.preventDefault();\n\n\t\tlet data = {\n\t\t\t'action' : 'environment_check_handler',\n\t\t\t'disable_warning': jQuery(this).data('plugin-slug'),\n\t\t};\n\n\t\twpm_send_ajax_data(data);\n\t});\n\n\n\t// disable WP Rocket JavaScript concatenation\n\tjQuery(document).on('click', '#wpm-wp-rocket-js-concatenation-disable', function (e) {\n\t\te.preventDefault();\n\n\t\tlet data = {\n\t\t\t'action': 'environment_check_handler',\n\t\t\t'set' : 'disable_wp_rocket_javascript_concatenation'\n\t\t};\n\n\t\twpm_send_ajax_data(data);\n\t});\n\n\t// dismiss WP Rocket JavaScript concatenation error\n\tjQuery(document).on('click', '#wpm-dismiss-wp-rocket-js-concatenation-error', function (e) {\n\t\te.preventDefault();\n\n\t\tlet data = {\n\t\t\t'action': 'environment_check_handler',\n\t\t\t'set' : 'dismiss_wp_rocket_javascript_concatenation_error'\n\t\t};\n\n\t\twpm_send_ajax_data(data);\n\t});\n\n\t// disable WP Rocket JavaScript concatenation\n\tjQuery(document).on('click', '#wpm-litespeed-inline-js-dom-ready-disable', function (e) {\n\t\te.preventDefault();\n\n\t\tlet data = {\n\t\t\t'action': 'environment_check_handler',\n\t\t\t'set' : 'disable_litespeed_inline_js_dom_ready'\n\t\t};\n\n\t\twpm_send_ajax_data(data);\n\t});\n\n\t// dismiss WP Rocket JavaScript concatenation error\n\tjQuery(document).on('click', '#wpm-dismiss-litespeed-inline-js-dom-ready-error', function (e) {\n\t\te.preventDefault();\n\n\t\tlet data = {\n\t\t\t'action': 'environment_check_handler',\n\t\t\t'set' : 'dismiss_litespeed_inline_js_dom_ready'\n\t\t};\n\n\t\twpm_send_ajax_data(data);\n\t});\n\n\t// dismiss PayPal standard payment gateway warning\n\tjQuery(document).on('click', '#wpm-paypal-standard-error-dismissal-button', function (e) {\n\t\te.preventDefault();\n\n\t\tlet data = {\n\t\t\t'action': 'environment_check_handler',\n\t\t\t'set' : 'dismiss_paypal_standard_warning'\n\t\t};\n\n\t\twpm_send_ajax_data(data);\n\t});\n\n});\n\nfunction wpm_send_ajax_data(data) {\n\tjQuery.post(ajaxurl, data, function (response) {\n\t\t// console.log('Got this from the server: ' + response);\n\t\t// console.log('update rating done');\n\t\tlocation.reload();\n\t});\n}\n","jQuery(function () {\n\n\t// copy debug info textarea\n\tjQuery(\"#debug-info-button\").click(function () {\n\t\tjQuery(\"#debug-info-textarea\").select();\n\t\tdocument.execCommand('copy');\n\t});\n\n\tjQuery(\"#wpm_pro_version_demo\").on('click', function () {\n\t\tjQuery(\"#submit\").click();\n\t});\n});\n","function wpm_hide_script_blocker_warning() {\n\tjQuery('#script-blocker-notice').hide();\n}\n\n// try to hide as soon as this script is loaded\n// might be too early in some cases, as the HTML is not rendered yet\nwpm_hide_script_blocker_warning();\n\n// if all other earlier attempts to hide did fail\n// run the function after entire DOM has been loaded\njQuery(function () {\n\twpm_hide_script_blocker_warning();\n});\n","jQuery(function () {\n\n\t // Don't run if we are not one of the\n\t // WPM main tabs\n\tif(\"wpm\" !== wpmGetPageId()) return\n\n\tlet sections = []\n\tlet subsections = {}\n\n\t// Hide unnecessary elements\n\tjQuery(\".section\").closest(\"tr\").hide()\n\n\t// Collect information on sections\n\tjQuery(\".section\").each(function () {\n\t\tsections.push({\n\t\t\t\"slug\" : jQuery(this).data(\"sectionSlug\"),\n\t\t\t\"title\": jQuery(this).data(\"sectionTitle\"),\n\t\t})\n\t})\n\n\t// Collect information on subsections\n\tjQuery(\".subsection\").each(function () {\n\n\t\tsubsections[jQuery(this).data(\"sectionSlug\")] = subsections[jQuery(this).data(\"sectionSlug\")] || []\n\n\t\tsubsections[jQuery(this).data(\"sectionSlug\")].push({\n\t\t\t\"title\": jQuery(this).data(\"subsectionTitle\"),\n\t\t\t\"slug\" : jQuery(this).data(\"subsectionSlug\"),\n\t\t})\n\t})\n\n\t// Create tabs for sections\n\tsections.forEach(\n\t\tfunction (section) {\n\t\t\tjQuery(\".nav-tab-wrapper\").append(\"<a href=\\\"#\\\" class=\\\"nav-tab\\\" data-section-slug=\\\"\" + section[\"slug\"] + \"\\\">\" + section[\"title\"] + \"</a>\")\n\t\t})\n\n\t// Create tabs for each subsections\n\tjQuery(\".nav-tab-wrapper\").after(wpmCreateSubtabUlHtml(subsections))\n\n\t// Create on-click events on section tabs that toggle the views\n\tjQuery(\".nav-tab-wrapper a\").on(\"click\", function (e) {\n\n\t\te.preventDefault()\n\n\t\t// show clicked tab as active\n\t\tjQuery(this).addClass(\"nav-tab-active\").siblings().removeClass(\"nav-tab-active\")\n\n\t\t// toggle the sections visible / invisible based on clicked tab\n\n\t\tlet sectionSlug = jQuery(this).data(\"section-slug\")\n\t\twpmToggleSections(sectionSlug, sections)\n\n\t\t// if subsection exists, click on first subsection\n\t\tif (sectionSlug in subsections) {\n\t\t\tjQuery(\"ul[data-section-slug=\" + sectionSlug + \"]\").children(\":first\").trigger(\"click\")\n\t\t}\n\t})\n\n\t// Create on-click events on subsection tabs that toggle the views\n\tjQuery(\".subnav-li\").on(\"click\", function (e) {\n\n\t\te.preventDefault()\n\n\t\t// jQuery(this).hide();\n\t\tjQuery(this)\n\t\t\t.addClass(\"subnav-li-active\").removeClass(\"subnav-li-inactive\")\n\t\t\t.siblings()\n\t\t\t.addClass(\"subnav-li-inactive\").removeClass(\"subnav-li-active\")\n\n\t\twpmToggleSubsection(jQuery(this).parent().data(\"section-slug\"), jQuery(this).data(\"subsection-slug\"))\n\t})\n\n\t/**\n\t * If someone accesses a plugin tab by deep link, open the right tab\n\t * or fallback to default (first tab)\n\t *\n\t * If deeplink is being opened,\n\t * open the according section and subsection\n\t */\n\tif (wpmGetSectionParams()) {\n\n\t\tlet sectionParams = wpmGetSectionParams()\n\n\t\tjQuery(\"a[data-section-slug=\" + sectionParams[\"section\"] + \"]\").trigger(\"click\")\n\n\t\tif (sectionParams[\"subsection\"] !== false) {\n\t\t\tjQuery(\"ul[data-section-slug=\" + sectionParams[\"section\"] + \"]\").children(\"[data-subsection-slug=\" + sectionParams[\"subsection\"] + \"]\").trigger(\"click\")\n\t\t}\n\t} else {\n\t\tjQuery(\"a[data-section-slug=\" + sections[0][\"slug\"] + \"]\").trigger(\"click\")\n\t}\n})\n\n// Creates the html with all subsection elements\nfunction wpmCreateSubtabUlHtml(subsections) {\n\n\tlet subsectionsKeys = Object.keys(subsections)\n\n\tlet html = \"\"\n\n\tsubsectionsKeys.forEach(function (subsectionKey) {\n\t\thtml += \"<ul class=\\\"subnav-tabs\\\" data-section-slug=\\\"\" + subsectionKey + \"\\\">\"\n\n\t\tlet subtabs = subsections[subsectionKey]\n\n\t\tsubtabs.forEach(function (subtab) {\n\t\t\thtml += \"<li class=\\\"subnav-li subnav-li-inactive\\\" style=\\\"cursor: pointer;\\\" data-subsection-slug=\\\"\" + subtab[\"slug\"] + \"\\\">\" + subtab[\"title\"] + \"</li>\"\n\t\t})\n\n\t\thtml += \"</ul>\"\n\t})\n\n\treturn html\n}\n\n/**\n * If section (and subsection) URL parameters are set,\n * return them, otherwise return false\n */\nfunction wpmGetSectionParams() {\n\n\tconst queryString = window.location.search\n\tconst urlParams = new URLSearchParams(queryString)\n\n\tif (urlParams.get(\"section\")) {\n\t\treturn {\n\t\t\t\"section\" : urlParams.get(\"section\"),\n\t\t\t\"subsection\": urlParams.get(\"subsection\"),\n\t\t}\n\t} else {\n\t\treturn false\n\t}\n}\n\n// Toggles the sections\nfunction wpmToggleSections(sectionSlug, sections) {\n\n\tjQuery(\"#wpm_settings_form > h2\").nextUntil(\".submit\").andSelf().hide()\n\tjQuery(\".subnav-tabs\").hide()\n\tjQuery(\".subnav-tabs[data-section-slug=\" + sectionSlug + \"]\").show()\n\n\tlet sectionPos = sections.findIndex((arrayElement) => arrayElement[\"slug\"] === sectionSlug)\n\n\tjQuery(\"div[data-section-slug=\" + sectionSlug + \"]\").closest(\"table\").prevAll(\"h2:first\").next().nextUntil(\"h2, .submit\").andSelf().show()\n\n\t// set the URL with the active tab parameter\n\twpmSetUrl(sections[sectionPos][\"slug\"])\n}\n\nfunction wpmToggleSubsection(sectionSlug, subsectionSlug) {\n\n\tjQuery(\"#wpm_settings_form > h2\").nextUntil(\".submit\").andSelf().hide()\n\tjQuery(\"[data-section-slug=\" + sectionSlug + \"][data-subsection-slug=\" + subsectionSlug + \"]\").closest(\"tr\").siblings().andSelf().hide()\n\n\tjQuery(\"[data-section-slug=\" + sectionSlug + \"][data-subsection-slug=\" + subsectionSlug + \"]\").closest(\"table\").show()\n\tjQuery(\"[data-section-slug=\" + sectionSlug + \"][data-subsection-slug=\" + subsectionSlug + \"]\").closest(\"tr\").nextUntil(jQuery(\"[data-section-slug=\" + sectionSlug + \"][data-subsection-slug]\").closest(\"tr\")).show()\n\n\t// Set the URL with the active tab parameter\n\twpmSetUrl(sectionSlug, subsectionSlug)\n}\n\n// Sets the new URL parameters\nfunction wpmSetUrl(sectionSlug, subsectionSlug = \"\") {\n\n\tconst queryString = window.location.search\n\tconst urlParams = new URLSearchParams(queryString)\n\n\turlParams.delete(\"section\")\n\turlParams.delete(\"subsection\")\n\n\tlet newParams = \"section=\" + sectionSlug\n\tnewParams += subsectionSlug ? \"&subsection=\" + subsectionSlug : \"\"\n\n\thistory.pushState(\"\", \"wpm\" + sectionSlug, document.location.pathname + \"?page=wpm&\" + newParams)\n\n\t// Make WP remember which was the selected tab on a save and return to the same tab after saving\n\tjQuery(\"input[name =\\\"_wp_http_referer\\\"]\").val(wpmGetAdminPath() + \"?page=wpm&\" + newParams + \"&settings-updated=true\")\n}\n\nfunction wpmGetAdminPath() {\n\tlet url = new URL(jQuery(\"#wp-admin-canonical\").attr(\"href\"))\n\treturn url.pathname\n}\n\nwpmGetPageId = () => {\n\tconst queryString = window.location.search\n\tconst urlParams = new URLSearchParams(queryString)\n\n\treturn urlParams.get(\"page\")\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))"],"names":["jQuery","process_click","e","set","preventDefault","data","post","ajaxurl","response","remove","show","document","on","window","open","focus","wpm_send_ajax_data","location","reload","this","click","select","execCommand","wpm_hide_script_blocker_warning","hide","wpmGetSectionParams","queryString","search","urlParams","URLSearchParams","get","wpmSetUrl","sectionSlug","subsectionSlug","delete","newParams","history","pushState","pathname","val","wpmGetAdminPath","URL","attr","wpmGetPageId","sections","subsections","closest","each","push","forEach","section","append","after","subsectionsKeys","Object","keys","html","subsectionKey","subtab","wpmCreateSubtabUlHtml","addClass","siblings","removeClass","nextUntil","andSelf","sectionPos","findIndex","arrayElement","prevAll","next","wpmToggleSections","children","trigger","parent","sectionParams","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","defineProperty","enumerable","obj","prop","prototype","hasOwnProperty","call"],"sourceRoot":""}
|
js/public/wpm-public.p1.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
(()=>{var e={164:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.pixel_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.facebook)&&void 0!==i&&i.loaded||wpm.canIFire("ads","facebook-ads")&&wpm.loadFacebookPixel()})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let e=wpm.getRandomEventId();fbq("track","AddToCart",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],value:parseFloat(t.quantity*t.price),currency:t.currency},{eventID:e}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"AddToCart",event_id:e,user_data:wpm.getFbUserData(),product_data:t,product_id:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmBeginCheckout",(function(e){try{var t,a,o;if(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.facebook)||void 0===o||!o.loaded)return;let e=wpm.getRandomEventId();fbq("track","InitiateCheckout",{},{eventID:e}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:"InitiateCheckout",event_id:e,user_data:wpm.getFbUserData(),event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToWishlist",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let e=wpm.getRandomEventId();fbq("track","AddToWishlist",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],value:parseFloat(t.quantity*t.price),currency:t.currency},{eventID:e}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"AddToWishlist",event_id:e,user_data:wpm.getFbUserData(),product_data:t,product_id:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;wpm.fbViewContent(t)}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;let o=wpm.getRandomEventId();fbq("track","Search",{},{eventID:o}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:"Search",event_id:o,user_data:wpm.getFbUserData(),event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmLoadAlways",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;wpm.setFbUserData()}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;fbq("track","Purchase",{content_type:"product",value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,content_ids:wpm.facebookContentIds()},{eventID:wpmDataLayer.order.id})}catch(e){console.error(e)}}))},1:()=>{!function(e,t,a){let o;e.loadFacebookPixel=()=>{try{wpmDataLayer.pixels.facebook.loaded=!0,e=window,t=document,a="script",e.fbq||(o=e.fbq=function(){o.callMethod?o.callMethod.apply(o,arguments):o.queue.push(arguments)},e._fbq||(e._fbq=o),o.push=o,o.loaded=!0,o.version="2.0",o.queue=[],(r=t.createElement(a)).async=!0,r.src="https://connect.facebook.net/en_US/fbevents.js",(i=t.getElementsByTagName(a)[0]).parentNode.insertBefore(r,i)),fbq("init",wpmDataLayer.pixels.facebook.pixel_id),fbq("track","PageView")}catch(a){console.error(a)}var e,t,a,o,r,i},e.getRandomEventId=()=>(Math.random()+1).toString(36).substring(2),e.getFbUserData=()=>o||e.getFbUserDataFromBrowser(),e.setFbUserData=()=>{o=e.getFbUserDataFromBrowser()},e.getFbUserDataFromBrowser=()=>{var t,a;let o={};return e.getCookie("_fbp")&&(o.fbp=e.getCookie("_fbp")),e.getCookie("_fbc")&&(o.fbp=e.getCookie("_fbc")),null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.user)&&void 0!==a&&a.id&&(o.external_id=wpmDataLayer.user.id),navigator.userAgent&&(o.client_user_agent=navigator.userAgent),o},e.fbViewContent=t=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let i=e.getRandomEventId();fbq("track","ViewContent",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],currency:wpmDataLayer.shop.currency,value:t.price},{eventID:i}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"ViewContent",event_id:i,user_data:e.getFbUserData(),product_data:t,product_id:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],event_source_url:window.location.href})}catch(e){console.error(e)}},e.facebookContentIds=()=>{let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?e.push(String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])):e.push(String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))}return e},e.trackCustomFacebookEvent=t=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let i=e.getRandomEventId();fbq("trackCustom",t,{},{eventID:i}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:t,event_id:i,user_data:e.getFbUserData(),event_source_url:window.location.href})}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},12:(e,t,a)=>{a(1),a(164)},165:()=>{jQuery(document).on("wpmViewItemList",(function(e,t){try{var a,o,r,i,n,s,d,l,c,u,p;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(s=n.pixels)||void 0===s||null===(d=s.google)||void 0===d||null===(l=d.ads)||void 0===l||null===(c=l.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;if(null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.general)&&void 0!==p&&p.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;if(!t)return;wpm.gtagLoaded().then((function(){gtag("event","view_item_list",{send_to:wpm.getGoogleAdsConversionIdentifiers(),items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r,i,n,s,d,l,c;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(s=n.pixels)||void 0===s||null===(d=s.google)||void 0===d||null===(l=d.ads)||void 0===l||null===(c=l.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","add_to_cart",{send_to:wpm.getGoogleAdsConversionIdentifiers(),value:t.quantity*t.price,items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r,i,n,s,d,l,c;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(s=n.pixels)||void 0===s||null===(d=s.google)||void 0===d||null===(l=d.ads)||void 0===l||null===(c=l.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","view_item",{send_to:wpm.getGoogleAdsConversionIdentifiers(),value:(t.quantity?t.quantity:1)*t.price,items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity?t.quantity:1,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a,o,r,i,n,s,d;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(s=n.ads)||void 0===s||null===(d=s.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u=[];for(const[e,t]of Object.entries(wpmDataLayer.products)){var l,c;if(null!==(l=wpmDataLayer)&&void 0!==l&&null!==(c=l.general)&&void 0!==c&&c.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;u.push({id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical})}wpm.gtagLoaded().then((function(){gtag("event","view_search_results",{send_to:wpm.getGoogleAdsConversionIdentifiers(),items:u})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,s,d;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(s=n.ads)||void 0===s||null===(d=s.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:wpm.getGoogleAdsConversionIdentifiers(),value:wpmDataLayer.order.value_filtered,items:wpm.getGoogleAdsDynamicRemarketingOrderItems()})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmLogin",(function(){try{var e,t,a,o,r,i,n,s,d;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(s=n.ads)||void 0===s||null===(d=s.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;wpm.gtagLoaded().then((function(){gtag("event","login",{send_to:wpm.getGoogleAdsConversionIdentifiers()})}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(!wpm.googleConfigConditionsMet("ads"))return;let n={},s={};n={send_to:wpm.getGoogleAdsConversionIdentifiersWithLabel(),transaction_id:wpmDataLayer.order.number,value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,new_customer:wpmDataLayer.order.new_customer},null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.order)&&void 0!==i&&i.aw_merchant_id&&(s={discount:wpmDataLayer.order.discount,aw_merchant_id:wpmDataLayer.order.aw_merchant_id,aw_feed_country:wpmDataLayer.order.aw_feed_country,aw_feed_language:wpmDataLayer.order.aw_feed_language,items:wpm.getGoogleAdsRegularOrderItems()}),wpm.gtagLoaded().then((function(){gtag("event","conversion",{...n,...s})}))}catch(e){console.error(e)}}))},42:()=>{!function(e,t,a){let o=[];e.getGoogleAdsConversionIdentifiersWithLabel=function(){for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))o.push(e+"/"+t);return o},e.getGoogleAdsConversionIdentifiers=function(){let e=[];for(const[t,a]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))e.push(t);return e},e.getGoogleAdsRegularOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e},e.getGoogleAdsDynamicRemarketingOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e}}(window.wpm=window.wpm||{},jQuery)},190:(e,t,a)=>{a(42),a(165)},625:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,s,d,l;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.universal)||void 0===r||!r.property_id)return;if(null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(s=n.google)&&void 0!==s&&null!==(d=s.analytics)&&void 0!==d&&null!==(l=d.universal)&&void 0!==l&&l.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.universal.property_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGAUAOrderItems()})}))}catch(e){console.error(e)}}))},19:()=>{!function(e,t,a){e.getGAUAOrderItems=function(){let t=[];for(const[r,i]of Object.entries(wpmDataLayer.order.items)){var a,o;let r;r={quantity:i.quantity,price:i.price,name:i.name,currency:wpmDataLayer.order.currency,category:wpmDataLayer.products[i.id].category.join("/")},null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.general)&&void 0!==o&&o.variationsOutput&&0!==i.variation_id?(r.id=String(wpmDataLayer.products[i.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.variant=wpmDataLayer.products[i.variation_id].variant_name,r.brand=wpmDataLayer.products[i.variation_id].brand):(r.id=String(wpmDataLayer.products[i.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.brand=wpmDataLayer.products[i.id].brand),r=e.ga3AddListNameToProduct(r),t.push(r)}return t},e.ga3AddListNameToProduct=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null;return e.list_name=wpmDataLayer.shop.list_name,t&&(e.list_position=t),e}}(window.wpm=window.wpm||{},jQuery)},562:(e,t,a)=>{a(19),a(625)},572:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,s,d,l;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.ga4)||void 0===r||!r.measurement_id)return;if(null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(s=n.google)&&void 0!==s&&null!==(d=s.analytics)&&void 0!==d&&null!==(l=d.ga4)&&void 0!==l&&l.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.ga4.measurement_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGA4OrderItems()})}))}catch(e){console.error(e)}}))},228:()=>{!function(e,t,a){e.getGA4OrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,item_name:r.name,currency:wpmDataLayer.order.currency,item_category:wpmDataLayer.products[r.id].category.join("/")},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.item_id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_variant=wpmDataLayer.products[r.variation_id].variant_name,o.item_brand=wpmDataLayer.products[r.variation_id].brand):(o.item_id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_brand=wpmDataLayer.products[r.id].brand),e.push(o)}return e}}(window.wpm=window.wpm||{},jQuery)},522:(e,t,a)=>{a(228),a(572)},774:(e,t,a)=>{a(562),a(522)},294:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a;void 0===(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a?void 0:a.state)&&(wpm.canGoogleLoad()?wpm.loadGoogle():wpm.logPreventedPixelLoading("google","analytics / ads"))}))},860:()=>{!function(e,t,a){e.googleConfigConditionsMet=function(t){var a,o,r,i;return!(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.consent_mode)||void 0===i||!i.active)||("category"===e.getConsentValues().mode?!0===e.getConsentValues().categories[t]:"pixel"===e.getConsentValues().mode&&e.getConsentValues().pixels.includes("google-"+t))},e.getVisitorConsentStatusAndUpdateGoogleConsentSettings=function(t){return"category"===e.getConsentValues().mode?(e.getConsentValues().categories.analytics&&(t.analytics_storage="granted"),e.getConsentValues().categories.ads&&(t.ad_storage="granted")):"pixel"===e.getConsentValues().mode&&(t.analytics_storage=e.getConsentValues().pixels.includes("google-analytics")?"granted":"denied",t.ad_storage=e.getConsentValues().pixels.includes("google-ads")?"granted":"denied"),t},e.updateGoogleConsentMode=function(){let e=!(arguments.length>0&&arguments[0]!==a)||arguments[0],t=!(arguments.length>1&&arguments[1]!==a)||arguments[1];try{if(!window.gtag||!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent)return;gtag("consent","update",{analytics_storage:e?"granted":"denied",ad_storage:t?"granted":"denied"})}catch(e){console.error(e)}},e.fireGtagGoogleAds=function(){try{var e,t,a,o,r,i,n,s,d,l,c,u,p,g,m,y,w,v,_,f,h;if(wpmDataLayer.pixels.google.ads.state="loading",null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.ads)&&void 0!==o&&null!==(r=o.enhanced_conversions)&&void 0!==r&&r.active)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e,{allow_enhanced_conversions:!0});else for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e);null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(s=n.google)&&void 0!==s&&null!==(d=s.ads)&&void 0!==d&&d.conversionIds&&null!==(l=wpmDataLayer)&&void 0!==l&&null!==(c=l.pixels)&&void 0!==c&&null!==(u=c.google)&&void 0!==u&&null!==(p=u.ads)&&void 0!==p&&p.phone_conversion_label&&null!==(g=wpmDataLayer)&&void 0!==g&&null!==(m=g.pixels)&&void 0!==m&&null!==(y=m.google)&&void 0!==y&&null!==(w=y.ads)&&void 0!==w&&w.phone_conversion_number&>ag("config",Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]+"/"+wpmDataLayer.pixels.google.ads.phone_conversion_label,{phone_conversion_number:wpmDataLayer.pixels.google.ads.phone_conversion_number}),"order_received_page"===wpmDataLayer.shop.page_type&&null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.order)&&void 0!==_&&null!==(f=_.google)&&void 0!==f&&null!==(h=f.ads)&&void 0!==h&&h.enhanced_conversion_data&&(window.enhanced_conversion_data=wpmDataLayer.order.google.ads.enhanced_conversion_data),wpmDataLayer.pixels.google.ads.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsUA=function(){try{wpmDataLayer.pixels.google.analytics.universal.state="loading",gtag("config",wpmDataLayer.pixels.google.analytics.universal.property_id,wpmDataLayer.pixels.google.analytics.universal.parameters),wpmDataLayer.pixels.google.analytics.universal.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsGA4=function(){try{wpmDataLayer.pixels.google.analytics.ga4.state="loading",gtag("config",wpmDataLayer.pixels.google.analytics.ga4.measurement_id,wpmDataLayer.pixels.google.analytics.ga4.parameters),wpmDataLayer.pixels.google.analytics.ga4.state="ready"}catch(e){console.error(e)}},e.isGoogleActive=function(){var e,t,a,o,r,i,n,s,d,l,c,u,p,g;return!(!(null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id||null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(s=n.google)&&void 0!==s&&null!==(d=s.analytics)&&void 0!==d&&null!==(l=d.ga4)&&void 0!==l&&l.measurement_id)&&jQuery.isEmptyObject(null===(c=wpmDataLayer)||void 0===c||null===(u=c.pixels)||void 0===u||null===(p=u.google)||void 0===p||null===(g=p.ads)||void 0===g?void 0:g.conversionIds))},e.getGoogleGtagId=function(){var e,t,a,o,r,i,n,s,d,l;return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id?wpmDataLayer.pixels.google.analytics.universal.property_id:null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(s=n.google)&&void 0!==s&&null!==(d=s.analytics)&&void 0!==d&&null!==(l=d.ga4)&&void 0!==l&&l.measurement_id?wpmDataLayer.pixels.google.analytics.ga4.measurement_id:Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]},e.loadGoogle=function(){e.isGoogleActive()&&(wpmDataLayer.pixels.google.state="loading",e.loadScriptAndCacheIt("https://www.googletagmanager.com/gtag/js?id="+e.getGoogleGtagId()).done((function(t,a){try{var o,r,i,n,s,d,l,c,u,p,g,m,y,w,v,_,f,h,L,D,C,b;if(window.dataLayer=window.dataLayer||[],window.gtag=function(){dataLayer.push(arguments)},null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.google)&&void 0!==i&&null!==(n=i.consent_mode)&&void 0!==n&&n.active){var j,x,k,I;let t={ad_storage:wpmDataLayer.pixels.google.consent_mode.ad_storage,analytics_storage:wpmDataLayer.pixels.google.consent_mode.analytics_storage,wait_for_update:wpmDataLayer.pixels.google.consent_mode.wait_for_update};null!==(j=wpmDataLayer)&&void 0!==j&&null!==(x=j.pixels)&&void 0!==x&&null!==(k=x.google)&&void 0!==k&&null!==(I=k.consent_mode)&&void 0!==I&&I.region&&(t.region=wpmDataLayer.pixels.google.consent_mode.region),t=e.getVisitorConsentStatusAndUpdateGoogleConsentSettings(t),gtag("consent","default",t),gtag("set","ads_data_redaction",wpmDataLayer.pixels.google.consent_mode.ads_data_redaction),gtag("set","url_passthrough",wpmDataLayer.pixels.google.consent_mode.url_passthrough)}null!==(s=wpmDataLayer)&&void 0!==s&&null!==(d=s.pixels)&&void 0!==d&&null!==(l=d.google)&&void 0!==l&&null!==(c=l.linker)&&void 0!==c&&c.settings&>ag("set","linker",wpmDataLayer.pixels.google.linker.settings),gtag("js",new Date),jQuery.isEmptyObject(null===(u=wpmDataLayer)||void 0===u||null===(p=u.pixels)||void 0===p||null===(g=p.google)||void 0===g||null===(m=g.ads)||void 0===m?void 0:m.conversionIds)||(e.googleConfigConditionsMet("ads")?e.fireGtagGoogleAds():e.logPreventedPixelLoading("google-ads","ads")),null!==(y=wpmDataLayer)&&void 0!==y&&null!==(w=y.pixels)&&void 0!==w&&null!==(v=w.google)&&void 0!==v&&null!==(_=v.analytics)&&void 0!==_&&null!==(f=_.universal)&&void 0!==f&&f.property_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsUA():e.logPreventedPixelLoading("google-universal-analytics","analytics")),null!==(h=wpmDataLayer)&&void 0!==h&&null!==(L=h.pixels)&&void 0!==L&&null!==(D=L.google)&&void 0!==D&&null!==(C=D.analytics)&&void 0!==C&&null!==(b=C.ga4)&&void 0!==b&&b.measurement_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsGA4():e.logPreventedPixelLoading("ga4","analytics")),wpmDataLayer.pixels.google.state="ready"}catch(e){console.error(e)}})))},e.canGoogleLoad=function(){var t,a,o,r;return!(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.google)||void 0===o||null===(r=o.consent_mode)||void 0===r||!r.active)||("category"===e.getConsentValues().mode?!(!e.getConsentValues().categories.ads&&!e.getConsentValues().categories.analytics):"pixel"===e.getConsentValues().mode?e.getConsentValues().pixels.includes("google-ads")||e.getConsentValues().pixels.includes("google-analytics"):(console.error("Couldn't find a valid load condition for Google mode in wpmConsentValues"),!1))},e.gtagLoaded=function(){return new Promise((function(e,t){var a,o,r;void 0===(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r?void 0:r.state)&&t();let i=0;!function a(){var o,r,n;return"ready"===(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(n=r.google)||void 0===n?void 0:n.state)?e():i>=5e3?t():(i+=200,void setTimeout(a,200))}()}))}}(window.wpm=window.wpm||{},jQuery)},580:(e,t,a)=>{a(860),a(294)},69:(e,t,a)=>{a(580),a(190),a(774),a(463)},945:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i,n,s;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.optimize)||void 0===o||!o.container_id||null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.pixels)&&void 0!==i&&null!==(n=i.google)&&void 0!==n&&null!==(s=n.optimize)&&void 0!==s&&s.loaded||wpm.canIFire("analytics","google-optimize")&&wpm.load_google_optimize_pixel()}))},962:()=>{!function(e,t,a){e.load_google_optimize_pixel=function(){try{wpmDataLayer.pixels.google.optimize.loaded=!0,e.loadScriptAndCacheIt("https://www.googleoptimize.com/optimize.js?id="+wpmDataLayer.pixels.google.optimize.container_id)}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},463:(e,t,a)=>{a(962),a(945)},300:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i,n,s,d;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.hotjar)||void 0===a||!a.site_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.hotjar)&&void 0!==i&&i.loaded||!wpm.canIFire("analytics","hotjar")||null!==(n=wpmDataLayer)&&void 0!==n&&null!==(s=n.pixels)&&void 0!==s&&null!==(d=s.hotjar)&&void 0!==d&&d.loaded||wpm.load_hotjar_pixel()}))},376:()=>{!function(e,t,a){e.load_hotjar_pixel=function(){try{wpmDataLayer.pixels.hotjar.loaded=!0,e=window,t=document,e.hj=e.hj||function(){(e.hj.q=e.hj.q||[]).push(arguments)},e._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6},a=t.getElementsByTagName("head")[0],(o=t.createElement("script")).async=1,o.src="https://static.hotjar.com/c/hotjar-"+e._hjSettings.hjid+".js?sv="+e._hjSettings.hjsv,a.appendChild(o)}catch(e){console.error(e)}var e,t,a,o}}(window.wpm=window.wpm||{},jQuery)},787:(e,t,a)=>{a(376),a(300)},473:()=>{!function(e,t,a){let o=()=>{let t=e.getCookie("cmplz_statistics"),a=e.getCookie("cmplz_marketing");return!(!e.getCookie("cmplz_consent_status")&&!e.getCookie("cmplz_banner-status"))&&{analytics:"allow"===t,ads:"allow"===a,visitorHasChosen:!0}},r=()=>{let t=e.getCookie("cookielawinfo-checkbox-analytics")||e.getCookie("cookielawinfo-checkbox-analytiques"),a=e.getCookie("cookielawinfo-checkbox-advertisement")||e.getCookie("cookielawinfo-checkbox-performance")||e.getCookie("cookielawinfo-checkbox-publicite"),o=e.getCookie("CookieLawInfoConsent");return!(!t&&!a)&&{analytics:"yes"===t,ads:"yes"===a,visitorHasChosen:!!o}},i={categories:{},pixels:[],mode:"category",visitorHasChosen:!1};e.getConsentValues=()=>i,e.setConsentValueCategories=function(){let e=arguments.length>0&&arguments[0]!==a&&arguments[0],t=arguments.length>1&&arguments[1]!==a&&arguments[1];i.categories.analytics=e,i.categories.ads=t},e.updateConsentCookieValues=function(){let t,n=arguments.length>0&&arguments[0]!==a?arguments[0]:null,s=arguments.length>1&&arguments[1]!==a?arguments[1]:null,d=arguments.length>2&&arguments[2]!==a&&arguments[2];if(n||s)n&&(i.categories.analytics=!!n),s&&(i.categories.ads=!!s);else if(t=e.getCookie("CookieConsent"))t=decodeURI(t),i.categories.analytics=t.indexOf("statistics:true")>=0,i.categories.ads=t.indexOf("marketing:true")>=0,i.visitorHasChosen=!0;else if(t=e.getCookie("CookieScriptConsent"))t=JSON.parse(t),"reject"===t.action?(i.categories.analytics=!1,i.categories.ads=!1):2===t.categories.length?(i.categories.analytics=!0,i.categories.ads=!0):(i.categories.analytics=t.categories.indexOf("performance")>=0,i.categories.ads=t.categories.indexOf("targeting")>=0),i.visitorHasChosen=!0;else if(t=e.getCookie("borlabs-cookie")){var l,c,u,p,g,m,y,w;t=decodeURI(t),t=JSON.parse(t),i.categories.analytics=!(null===(l=t)||void 0===l||null===(c=l.consents)||void 0===c||!c.statistics),i.categories.ads=!(null===(u=t)||void 0===u||null===(p=u.consents)||void 0===p||!p.marketing),i.visitorHasChosen=!0,i.pixels=[...(null===(g=t)||void 0===g||null===(m=g.consents)||void 0===m?void 0:m.statistics)||[],...(null===(y=t)||void 0===y||null===(w=y.consents)||void 0===w?void 0:w.marketing)||[]],i.mode="pixel"}else(t=o())?(i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,i.visitorHasChosen=t.visitorHasChosen):(t=e.getCookie("cookie_notice_accepted"))?(i.categories.analytics=!0,i.categories.ads=!0,i.visitorHasChosen=!0):(t=e.getCookie("hu-consent"))?(t=JSON.parse(t),i.categories.analytics=!!t.categories[3],i.categories.ads=!!t.categories[4],i.visitorHasChosen=!0):(t=r())?(i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,i.visitorHasChosen=!0===t.visitorHasChosen):(t=e.getCookie("moove_gdpr_popup"))?(t=JSON.parse(t),i.categories.analytics="1"===t.thirdparty,i.categories.ads="1"===t.advanced,i.visitorHasChosen=!0):(i.categories.analytics=!d,i.categories.ads=!d)},e.updateConsentCookieValues(),e.setConsentDefaultValuesToExplicit=()=>{i.categories={analytics:!1,ads:!1}},e.canIFire=(t,a)=>{let o;return"category"===i.mode?o=!!i.categories[t]:"pixel"===i.mode?(o=i.pixels.includes(a),!1===o&&"microsoft-ads"===a&&(o=i.pixels.includes("bing-ads"))):(console.error("Couldn't find a valid consent mode in wpmConsentValues"),o=!1),!!o||(e.logPreventedPixelLoading(a,t),!1)},e.logPreventedPixelLoading=(e,t)=>{var a,o,r;null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.shop)&&void 0!==o&&null!==(r=o.cookie_consent_mgmt)&&void 0!==r&&r.explicit_consent?console.log('WooCommerce Pixel Manager: The "'+e+" (category: "+t+')" pixel has not fired because you have not given consent for it yet. (WPM is in explicit consent mode.)'):console.log('WooCommerce Pixel Manager: The "'+e+" (category: "+t+')" pixel has not fired because you have removed consent for this pixel. (WPM is in implicit consent mode.)')},e.scriptTagObserver=new MutationObserver((a=>{a.forEach((a=>{let{addedNodes:o}=a;[...o].forEach((a=>{t(a).data("wpm-cookie-category")&&(e.shouldScriptBeActive(a)?e.unblockScript(a):e.blockScript(a))}))}))})),e.scriptTagObserver.observe(document.head,{childList:!0,subtree:!0}),jQuery(document).on("DOMContentLoaded",(()=>e.scriptTagObserver.disconnect())),e.shouldScriptBeActive=e=>{var a,o,r,n;return!((wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent||i.visitorHasChosen)&&("category"!==i.mode||!t(e).data("wpm-cookie-category").split(",").some((e=>i.categories[e])))&&("pixel"!==i.mode||!i.pixels.includes(t(e).data("wpm-pixel-name")))&&("pixel"!==i.mode||"google"!==t(e).data("wpm-pixel-name")||!["google-analytics","google-ads"].some((e=>i.pixels.includes(e))))&&(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.consent_mode)||void 0===n||!n.active||"google"!==t(e).data("wpm-pixel-name")))},e.unblockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove();let r=t(e).data("wpm-src");r&&t(e).attr("src",r),e.type="text/javascript",o&&t(e).appendTo("head"),jQuery(document).trigger("wpmPreLoadPixels",{})},e.blockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove(),t(e).attr("src")&&t(e).removeAttr("src"),e.type="blocked/javascript",o&&t(e).appendTo("head")},e.unblockAllScripts=function(){jQuery(document).trigger("wpmPreLoadPixels",{})},e.unblockSelectedPixels=()=>{jQuery(document).trigger("wpmPreLoadPixels",{})},jQuery(document).on("borlabs-cookie-consent-saved",(()=>{e.updateConsentCookieValues(),"pixel"===i.mode?(e.unblockSelectedPixels(),e.updateGoogleConsentMode(i.pixels.includes("google-analytics"),i.pixels.includes("google-ads"))):(e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads))})),jQuery(document).on("CookiebotOnAccept",(()=>{Cookiebot.consent.statistics&&(i.categories.analytics=!0),Cookiebot.consent.marketing&&(i.categories.ads=!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)}),!1),jQuery(document).on("CookieScriptAccept",(t=>{t.detail.categories.includes("performance")&&(i.categories.analytics=!0),t.detail.categories.includes("targeting")&&(i.categories.ads=!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)})),jQuery(document).on("CookieScriptAcceptAll",(()=>{e.unblockAllScripts(!0,!0),e.updateGoogleConsentMode(!0,!0)})),e.cmplzStatusChange=t=>{t.detail.categories.includes("statistics")&&e.updateConsentCookieValues(!0,null),t.detail.categories.includes("marketing")&&e.updateConsentCookieValues(null,!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)},jQuery(document).on("cmplzStatusChange",e.cmplzStatusChange),jQuery(document).on("cmplz_status_change",e.cmplzStatusChange),jQuery(document).on("setCookieNotice",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)})),e.huObserver=new MutationObserver((t=>{t.forEach((t=>{let{addedNodes:a}=t;[...a].forEach((t=>{"hu"===t.id&&jQuery(".hu-cookies-save").on("click",(function(){e.updateConsentCookieValues(),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)}))}))}))})),window.hu&&e.huObserver.observe(document.documentElement||document.body,{childList:!0,subtree:!0}),e.explicitConsentStateAlreadySet=()=>{if(i.explicitConsentStateAlreadySet)return!0;i.explicitConsentStateAlreadySet=!0}}(window.wpm=window.wpm||{},jQuery)},299:()=>{jQuery(document).on("click",".remove_from_cart_button, .remove",(function(){try{let e=new URL(jQuery(this).attr("href")),t=wpm.getProductIdByCartItemKeyUrl(e);wpm.removeProductFromCart(t)}catch(e){console.error(e)}})),jQuery(document).on("click",".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button",(function(){try{if("product"===wpmDataLayer.shop.page_type){if(void 0!==jQuery(this).attr("href")&&jQuery(this).attr("href").includes("add-to-cart")){let e=1,t=jQuery(this).data("product_id");wpm.addProductToCart(t,e)}else if("simple"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery(this).val();wpm.addProductToCart(t,e)}else if("variable"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery("[name='variation_id']").val();wpm.addProductToCart(t,e)}else if("grouped"===wpmDataLayer.shop.product_type)jQuery(".woocommerce-grouped-product-list-item").each((function(){let e=Number(jQuery(this).find(".input-text.qty").val());e||0===e||(e=1);let t=jQuery(this).attr("class"),a=wpm.getPostIdFromString(t);wpm.addProductToCart(a,e)}));else if("bundle"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery("input[name=add-to-cart]").val();wpm.addProductToCart(t,e)}}else{let e=1,t=jQuery(this).data("product_id");wpm.addProductToCart(t,e)}}catch(e){console.error(e)}})),jQuery(document).one("click","a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)",(function(e){try{if(jQuery(e.target).closest("a").attr("href")){let t=jQuery(e.target).closest("a").attr("href");if(t.includes("add-to-cart=")){let e=t.match(/(add-to-cart=)(\d+)/);e&&wpm.addProductToCart(e[2],1)}}}catch(e){console.error(e)}})),jQuery(document).on("click",".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product",(function(){try{let e=jQuery(this).nextAll(".wpmProductId:first").data("id");if(e){if(e=wpm.getIdBasedOndVariationsOutputSetting(e),!e)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[e]){let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmSelectContentGaUa",t),jQuery(document).trigger("wpmSelectItem",t)}}}catch(e){console.error(e)}})),jQuery(document).one("click",[".checkout-button",".cart-checkout-button",".button.checkout",".xoo-wsc-ft-btn-checkout"].join(","),(function(){jQuery(document).trigger("wpmBeginCheckout")})),jQuery(document).on("input","#billing_email",(function(){wpm.isEmail(jQuery(this).val())&&(wpm.fireCheckoutProgress(2),wpm.emailSelected=!0)})),jQuery(document).on("click",".wc_payment_methods",(function(){!1===wpm.paymentMethodSelected&&wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val()),wpm.paymentMethodSelected=!0})),jQuery(document).one("click","#place_order",(function(){!1===wpm.emailSelected&&wpm.fireCheckoutProgress(2),!1===wpm.paymentMethodSelected&&(wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val())),wpm.fireCheckoutProgress(4)})),jQuery(document).on("click","[name='update_cart']",(function(){try{jQuery(".cart_item").each((function(){let e=new URL(jQuery(this).find(".product-remove").find("a").attr("href")),t=wpm.getProductIdByCartItemKeyUrl(e),a=jQuery(this).find(".qty").val();0===a?wpm.removeProductFromCart(t):a<wpmDataLayer.cart[t].quantity?wpm.removeProductFromCart(t,wpmDataLayer.cart[t].quantity-a):a>wpmDataLayer.cart[t].quantity&&wpm.addProductToCart(t,a-wpmDataLayer.cart[t].quantity)}))}catch(e){console.error(e),wpm.getCartItemsFromBackend()}})),jQuery(document).on("click",".add_to_wishlist, .wl-add-to",(function(){try{let e;if(jQuery(this).data("productid")?e=jQuery(this).data("productid"):jQuery(this).data("product-id")&&(e=jQuery(this).data("product-id")),!e)throw Error("Wasn't able to retrieve a productId");let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmAddToWishlist",t)}catch(e){console.error(e)}})),jQuery(document).on("updated_cart_totals",(function(){jQuery(document).trigger("wpmViewCart")})),jQuery((function(){jQuery(".single_variation_wrap").on("show_variation",(function(e,t){try{let e=wpm.getIdBasedOndVariationsOutputSetting(t.variation_id);if(!e)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[e]){let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmViewItem",t)}}catch(e){console.error(e)}}))})),jQuery((function(){jQuery(".single_variation_wrap").on("hide_variation",(function(){try{var e,t;let i=jQuery("body").attr("class").match(/(postid-)(\d+)/)[2];if(!i)throw Error("Wasn't able to retrieve a productId");if("variable"===wpmDataLayer.shop.product_type&&null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.general)&&void 0!==t&&t.variationsOutput){var a,o,r;for(const[e,t]of Object.entries(wpmDataLayer.products))if("parentId"in t){i=t.id;break}null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.microdata_product_id&&(i=wpmDataLayer.pixels.facebook.microdata_product_id)}if(wpmDataLayer.products&&wpmDataLayer.products[i]){let e=wpm.getProductDetailsFormattedForEvent(i);jQuery(document).trigger("wpmViewItem",e)}}catch(e){console.error(e)}}))})),jQuery(window).on("wpmLoad",(function(){try{wpm.doesWooCommerceCartExist()&&wpm.getCartItems()}catch(e){console.error(e)}})),jQuery(window).on("wpmLoad",(function(){wpmDataLayer.products=wpmDataLayer.products||{};let e=wpm.getAddToCartLinkProductIds();wpm.getProductsFromBackend(e)})),jQuery(window).on("wpmLoad",(function(){if(!wpm.getCookie("wpmReferrer")&&document.referrer){let e=new URL(document.referrer).hostname;e!==window.location.host&&wpm.setCookie("wpmReferrer",e)}})),jQuery(window).on("wpmLoad",(function(){try{var e;if("undefined"!=typeof wpmDataLayer&&(null===(e=wpmDataLayer)||void 0===e||!e.wpmLoadFired)){var t,a;if(jQuery(document).trigger("wpmLoadAlways"),"product"===wpmDataLayer.shop.page_type&&"variable"!==wpmDataLayer.shop.product_type&&wpm.getMainProductIdFromProductPage()){let e=wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage());jQuery(document).trigger("wpmViewItem",e)}else"product_category"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmCategory"):"search"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmSearch"):"cart"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmViewCart"):"order_received_page"===wpmDataLayer.shop.page_type&&wpmDataLayer.order?wpm.isOrderIdStored(wpmDataLayer.order.id)||(jQuery(document).trigger("wpmOrderReceivedPage"),wpm.writeOrderIdToStorage(wpmDataLayer.order.id)):jQuery(document).trigger("wpmEverywhereElse");null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.user)&&void 0!==a&&a.id&&!wpm.hasLoginEventFired()&&(jQuery(document).trigger("wpmLogin"),wpm.setLoginEventFired()),wpmDataLayer.wpmLoadFired=!0}}catch(e){console.error(e)}})),jQuery(window).on("wpmPreLoadPixels",(function(){var e,t,a;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.shop)&&void 0!==t&&null!==(a=t.cookie_consent_mgmt)&&void 0!==a&&a.explicit_consent&&!wpm.explicitConsentStateAlreadySet()&&wpm.updateConsentCookieValues(null,null,!0),jQuery(document).trigger("wpmLoadPixels",{})}))},584:()=>{!function(e,t,a){const o="_wpm_order_ids",r="_wpm_endpoint_available",i="/wp-json/";function n(){return""!==e.getCookie(o)}e.emailSelected=!1,e.paymentMethodSelected=!1,e.useRestEndpoint=()=>e.isSessionStorageAvailable()&&e.isRestEndpointAvailable()&&e.isBelowRestErrorThreshold(),e.isBelowRestErrorThreshold=()=>window.sessionStorage.getItem(0)<=10,e.isRestEndpointAvailable=()=>{if(window.sessionStorage.getItem(r))return JSON.parse(window.sessionStorage.getItem(r));e.testEndpoint()},e.isSessionStorageAvailable=()=>!!window.sessionStorage,e.testEndpoint=function(){let e=arguments.length>0&&arguments[0]!==a?arguments[0]:location.protocol+"//"+location.host+i,t=arguments.length>1&&arguments[1]!==a?arguments[1]:r;jQuery.ajax(e,{type:"HEAD",timeout:1e3,statusCode:{200:function(e){window.sessionStorage.setItem(t,JSON.stringify(!0))},404:function(e){window.sessionStorage.setItem(t,JSON.stringify(!1))},0:function(e){window.sessionStorage.setItem(t,JSON.stringify(!1))}}}).then((e=>{}))},e.isWpmRestEndpointAvailable=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:r;return!!e.getCookie(t)},e.writeOrderIdToStorage=function(t){if(window.Storage)if(null===localStorage.getItem(o)){let e=[];e.push(t),window.localStorage.setItem(o,JSON.stringify(e))}else{let e=JSON.parse(localStorage.getItem(o));e.includes(t)||(e.push(t),window.localStorage.setItem(o,JSON.stringify(e)))}else{let a=new Date;a.setDate(a.getDate()+365);let r=[];n()&&(r=JSON.parse(e.getCookie(o))),r.includes(t)||(r.push(t),document.cookie="_wpm_order_ids="+JSON.stringify(r)+";expires="+a.toUTCString())}"function"==typeof e.storeOrderIdOnServer&&wpmDataLayer.orderDeduplication&&e.storeOrderIdOnServer(t)},e.isOrderIdStored=t=>wpmDataLayer.orderDeduplication?window.Storage?null!==localStorage.getItem(o)&&JSON.parse(localStorage.getItem(o)).includes(t):!!n()&&JSON.parse(e.getCookie(o)).includes(t):(console.log("order duplication prevention: off"),!1),e.isEmail=e=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),e.removeProductFromCart=function(t){let o=arguments.length>1&&arguments[1]!==a?arguments[1]:null;try{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");let a;if(a=null==o?wpmDataLayer.cart[t].quantity:o,wpmDataLayer.cart[t]){let r=e.getProductDetailsFormattedForEvent(t,a);jQuery(document).trigger("wpmRemoveFromCart",r),null==o||wpmDataLayer.cart[t].quantity===o?(delete wpmDataLayer.cart[t],sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))):(wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity-a,sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart)))}}catch(e){console.error(e)}},e.getIdBasedOndVariationsOutputSetting=e=>{try{var t,a;return null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput?e:wpmDataLayer.products[e].isVariation?wpmDataLayer.products[e].parentId:e}catch(e){console.error(e)}},e.addProductToCart=(t,a)=>{try{var o;if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");if(null!==(o=wpmDataLayer)&&void 0!==o&&o.products[t]){var r;let o=e.getProductDetailsFormattedForEvent(t,a);jQuery(document).trigger("wpmAddToCart",o),null!==(r=wpmDataLayer)&&void 0!==r&&r.cart[t]?wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity+a:("cart"in wpmDataLayer||(wpmDataLayer.cart={}),wpmDataLayer.cart[t]=e.getProductDetailsFormattedForEvent(t,a)),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))}}catch(t){console.error(t),e.getCartItemsFromBackend()}},e.getCartItems=()=>{sessionStorage?sessionStorage.getItem("wpmDataLayerCart")&&"order_received_page"!==wpmDataLayer.shop.page_type?e.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem("wpmDataLayerCart"))):sessionStorage.setItem("wpmDataLayerCart",JSON.stringify({})):e.getCartItemsFromBackend()},e.getCartItemsFromBackend=()=>{try{let t={action:"wpm_get_cart_items"};jQuery.ajax({type:"get",dataType:"json",url:e.ajax_url,data:t,success:function(t){t.cart||(t.cart={}),e.saveCartObjectToDataLayer(t.cart),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(t.cart))}})}catch(e){console.error(e)}},e.getProductsFromBackend=t=>{if((t=t.filter((e=>!wpmDataLayer.products.hasOwnProperty(e))))&&0!==t.length)try{let a={action:"wpm_get_product_ids",productIds:t};jQuery.ajax({type:"get",dataType:"json",url:e.ajax_url,data:a,success:function(e){wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},error:function(e){console.log(e)}})}catch(e){console.error(e)}},e.saveCartObjectToDataLayer=e=>{wpmDataLayer.cart=e,wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},e.fireCheckoutOption=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null,o=arguments.length>2&&arguments[2]!==a?arguments[2]:null,r={step:e,checkout_option:t,value:o};jQuery(document).trigger("wpmFireCheckoutOption",r)},e.fireCheckoutProgress=e=>{let t={step:e};jQuery(document).trigger("wpmFireCheckoutProgress",t)},e.getPostIdFromString=e=>{try{return e.match(/(post-)(\d+)/)[2]}catch(e){console.error(e)}},e.triggerViewItemList=t=>{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");jQuery(document).trigger("wpmViewItemList",e.getProductDataForViewItemEvent(t))},e.getProductDataForViewItemEvent=t=>{if(!t)throw Error("Wasn't able to retrieve a productId");try{if(wpmDataLayer.products[t])return e.getProductDetailsFormattedForEvent(t)}catch(e){console.error(e)}},e.getMainProductIdFromProductPage=()=>{try{return["simple","variable","grouped","composite","bundle"].indexOf(wpmDataLayer.shop.product_type)>=0&&jQuery(".wpmProductId:first").data("id")}catch(e){console.error(e)}},e.viewItemListTriggerTestMode=e=>{jQuery(e).css({position:"relative"}),jQuery(e).append('<div id="viewItemListTriggerOverlay"></div>'),jQuery(e).find("#viewItemListTriggerOverlay").css({"z-index":"10",display:"block",position:"absolute",height:"100%",top:"0",left:"0",right:"0",opacity:wpmDataLayer.viewItemListTrigger.opacity,"background-color":wpmDataLayer.viewItemListTrigger.backgroundColor})},e.getSearchTermFromUrl=()=>{try{return new URLSearchParams(window.location.search).get("s")}catch(e){console.error(e)}};let s,d={};e.observerCallback=(t,a)=>{t.forEach((t=>{try{let o,r=jQuery(t.target).data("ioid");if(o=jQuery(t.target).next(".wpmProductId").length?jQuery(t.target).next(".wpmProductId").data("id"):jQuery(t.target).find(".wpmProductId").data("id"),!o)throw Error("wpmProductId element not found");t.isIntersecting?d[r]=setTimeout((()=>{e.triggerViewItemList(o),wpmDataLayer.viewItemListTrigger.testMode&&e.viewItemListTriggerTestMode(t.target),!1===wpmDataLayer.viewItemListTrigger.repeat&&a.unobserve(t.target)}),wpmDataLayer.viewItemListTrigger.timeout):(clearTimeout(d[r]),wpmDataLayer.viewItemListTrigger.testMode&&jQuery(t.target).find("#viewItemListTriggerOverlay").remove())}catch(e){console.error(e)}}))};let l,c=0,u=()=>{l=jQuery(".wpmProductId").map((function(e,t){return jQuery(t).parent().hasClass("type-product")||jQuery(t).parent().hasClass("product")||jQuery(t).parent().hasClass("product-item-inner")?jQuery(t).parent():jQuery(t).prev().hasClass("wc-block-grid__product")||jQuery(t).prev().hasClass("product")||jQuery(t).prev().hasClass("product-small")||jQuery(t).prev().hasClass("woocommerce-LoopProduct-link")?jQuery(this).prev():jQuery(t).closest(".product").length?jQuery(t).closest(".product"):void 0}))};e.startIntersectionObserverToWatch=()=>{try{e.urlHasParameter("vildemomode")&&(wpmDataLayer.viewItemListTrigger.testMode=!0),s=new IntersectionObserver(e.observerCallback,{threshold:wpmDataLayer.viewItemListTrigger.threshold}),u(),l.each(((e,t)=>{jQuery(t[0]).data("ioid",c++),s.observe(t[0])}))}catch(e){console.error(e)}},e.startProductsMutationObserverToWatch=()=>{try{let e=jQuery(".wpmProductId:eq(0)").parents().has(jQuery(".wpmProductId:eq(1)").parents()).first();e.length&&p.observe(e[0],{attributes:!0,childList:!0,characterData:!0})}catch(e){console.error(e)}};let p=new MutationObserver((e=>{e.forEach((e=>{let t=e.addedNodes;null!==t&&jQuery(t).each((function(){(jQuery(this).hasClass("type-product")||jQuery(this).hasClass("product-small")||jQuery(this).hasClass("wc-block-grid__product"))&&g(this)&&(jQuery(this).data("ioid",c++),s.observe(this))}))}))})),g=e=>!(!jQuery(e).find(".wpmProductId").length&&!jQuery(e).siblings(".wpmProductId").length);e.setCookie=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:"",o=arguments.length>2&&arguments[2]!==a?arguments[2]:null;if(o){let a=new Date;a.setTime(a.getTime()+24*o*60*60*1e3);let r="expires="+a.toUTCString();document.cookie=e+"="+t+";"+r+";path=/"}else document.cookie=e+"="+t+";path=/"},e.getCookie=e=>{let t=e+"=",a=decodeURIComponent(document.cookie).split(";");for(let e=0;e<a.length;e++){let o=a[e];for(;" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},e.getWpmSessionData=()=>{if(window.sessionStorage){let e=window.sessionStorage.getItem("_wpm");return null!==e?JSON.parse(e):{}}return{}},e.setWpmSessionData=e=>{window.sessionStorage&&window.sessionStorage.setItem("_wpm",JSON.stringify(e))},e.storeOrderIdOnServer=t=>{try{let a={action:"wpm_purchase_pixels_fired",order_id:t,nonce:e.nonce};jQuery.ajax({type:"post",dataType:"json",url:e.ajax_url,data:a,success:function(e){!1===e.success&&console.log(e)},error:function(e){console.log(e)}})}catch(e){console.error(e)}},e.getProductIdByCartItemKeyUrl=e=>{let t,a=new URLSearchParams(e.search).get("remove_item");return t=0===wpmDataLayer.cartItemKeys[a].variation_id?wpmDataLayer.cartItemKeys[a].product_id:wpmDataLayer.cartItemKeys[a].variation_id,t},e.getAddToCartLinkProductIds=()=>jQuery("a").map((function(){let e=jQuery(this).attr("href");if(e&&e.includes("?add-to-cart=")){let t=e.match(/(add-to-cart=)(\d+)/);if(t)return t[2]}})).get(),e.getProductDetailsFormattedForEvent=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:1,o={id:e.toString(),dyn_r_ids:wpmDataLayer.products[e].dyn_r_ids,name:wpmDataLayer.products[e].name,list_name:wpmDataLayer.shop.list_name,brand:wpmDataLayer.products[e].brand,category:wpmDataLayer.products[e].category,variant:wpmDataLayer.products[e].variant,list_position:wpmDataLayer.products[e].position,quantity:t,price:wpmDataLayer.products[e].price,currency:wpmDataLayer.shop.currency,isVariable:wpmDataLayer.products[e].isVariable,isVariation:wpmDataLayer.products[e].isVariation,parentId:wpmDataLayer.products[e].parentId};return o.isVariation&&(o.parentId_dyn_r_ids=wpmDataLayer.products[e].parentId_dyn_r_ids),o},e.setReferrerToCookie=()=>{e.getCookie("wpmReferrer")||e.setCookie("wpmReferrer",document.referrer)},e.getReferrerFromCookie=()=>e.getCookie("wpmReferrer")?e.getCookie("wpmReferrer"):null,e.getClidFromBrowser=function(){let t,o=arguments.length>0&&arguments[0]!==a?arguments[0]:"gclid";return t={gclid:"_gcl_aw",dclid:"_gcl_dc"},e.getCookie(t[o])?e.getCookie(t[o]).match(/(GCL.[\d]*.)(.*)/)[2]:""},e.getUserAgent=()=>navigator.userAgent,e.getViewPort=()=>({width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}),e.version=()=>{console.log(wpmDataLayer.version)},e.loadScriptAndCacheIt=(e,t)=>(t=jQuery.extend(t||{},{dataType:"script",cache:!0,url:e}),jQuery.ajax(t)),e.getOrderItemPrice=e=>(e.total+e.total_tax)/e.quantity,e.hasLoginEventFired=()=>{let t=e.getWpmSessionData();return null==t?void 0:t.loginEventFired},e.setLoginEventFired=()=>{let t=e.getWpmSessionData();t.loginEventFired=!0,e.setWpmSessionData(t)},e.wpmDataLayerExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof wpmDataLayer)return e();setTimeout(t,50)}()})),e.jQueryExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof jQuery)return e();setTimeout(t,100)}()})),e.pageLoaded=()=>new Promise((e=>{!function t(){if("complete"===document.readyState)return e();setTimeout(t,50)}()})),e.pageReady=()=>new Promise((e=>{!function t(){if("interactive"===document.readyState||"complete"===document.readyState)return e();setTimeout(t,50)}()})),e.isMiniCartActive=()=>{if(window.sessionStorage){for(const[e,t]of Object.entries(window.sessionStorage))if(e.includes("wc_fragments"))return!0;return!1}return!1},e.doesWooCommerceCartExist=()=>document.cookie.includes("woocommerce_items_in_cart"),e.urlHasParameter=e=>new URLSearchParams(window.location.search).has(e)}(window.wpm=window.wpm||{},jQuery)},534:(e,t,a)=>{a(584),a(473)},207:()=>{wpm.wpmDataLayerExists().then((function(){console.log("WooCommerce Pixel Manager: "+(wpmDataLayer.version.pro?"Pro":"Free")+" Version "+wpmDataLayer.version.number+" loaded"),jQuery(document).trigger("wpmPreLoadPixels",{})})).then((function(){wpm.pageLoaded().then((function(){jQuery(document).trigger("wpmLoad",{})}))})),wpm.pageReady().then((function(){wpm.wpmDataLayerExists().then((function(){wpm.startIntersectionObserverToWatch(),wpm.startProductsMutationObserverToWatch()}))}))}},t={};function a(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,a),i.exports}a(534),wpm.jQueryExists().then((function(){a(299),a(69),a(12),a(787),a(207)}))})();
|
2 |
//# sourceMappingURL=wpm-public.p1.min.js.map
|
1 |
+
(()=>{var e={164:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.pixel_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.facebook)&&void 0!==i&&i.loaded||wpm.canIFire("ads","facebook-ads")&&wpm.loadFacebookPixel()})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let e=wpm.getRandomEventId();fbq("track","AddToCart",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],value:parseFloat(t.quantity*t.price),currency:t.currency},{eventID:e}),t.currency=wpmDataLayer.shop.currency,console.log(t),jQuery(document).trigger("wpmFbCapiEvent",{event_name:"AddToCart",event_id:e,user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)})}catch(e){console.error(e)}})),jQuery(document).on("wpmBeginCheckout",(function(e){try{var t,a,o;if(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.facebook)||void 0===o||!o.loaded)return;let e=wpm.getRandomEventId();fbq("track","InitiateCheckout",{},{eventID:e}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:"InitiateCheckout",event_id:e,user_data:wpm.getFbUserData(),event_source_url:window.location.href})}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToWishlist",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let e=wpm.getRandomEventId();fbq("track","AddToWishlist",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],value:parseFloat(t.quantity*t.price),currency:t.currency},{eventID:e}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"AddToWishlist",event_id:e,user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)})}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;wpm.fbViewContent(t)}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;let o=wpm.getRandomEventId();fbq("track","Search",{},{eventID:o}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:"Search",event_id:o,user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{search_string:wpm.getSearchTermFromUrl()}})}catch(e){console.error(e)}})),jQuery(document).on("wpmLoadAlways",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;wpm.setFbUserData()}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;fbq("track","Purchase",{content_type:"product",value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,content_ids:wpm.facebookContentIds()},{eventID:wpmDataLayer.order.id})}catch(e){console.error(e)}}))},1:()=>{!function(e,t,a){let o;e.loadFacebookPixel=()=>{try{var e,t,a,o,r,i,n,l,d,s,c,u,p,m,g,y,w,v,_,f;wpmDataLayer.pixels.facebook.loaded=!0,h=window,L=document,D="script",h.fbq||(C=h.fbq=function(){C.callMethod?C.callMethod.apply(C,arguments):C.queue.push(arguments)},h._fbq||(h._fbq=C),C.push=C,C.loaded=!0,C.version="2.0",C.queue=[],(b=L.createElement(D)).async=!0,b.src="https://connect.facebook.net/en_US/fbevents.js",(j=L.getElementsByTagName(D)[0]).parentNode.insertBefore(b,j));let x={};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.user)&&void 0!==t&&t.id&&(x.external_id=wpmDataLayer.user.id),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.order)&&void 0!==o&&o.user_id&&(x.external_id=wpmDataLayer.order.user_id),null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.order)&&void 0!==i&&i.billing_email_hashed&&(x.em=wpmDataLayer.order.billing_email_hashed),null!==(n=wpmDataLayer)&&void 0!==n&&null!==(l=n.order)&&void 0!==l&&l.billing_first_name&&(x.fn=wpmDataLayer.order.billing_first_name),null!==(d=wpmDataLayer)&&void 0!==d&&null!==(s=d.order)&&void 0!==s&&s.billing_last_name&&(x.ln=wpmDataLayer.order.billing_last_name),null!==(c=wpmDataLayer)&&void 0!==c&&null!==(u=c.order)&&void 0!==u&&u.billing_phone&&(x.ph=wpmDataLayer.order.billing_phone),null!==(p=wpmDataLayer)&&void 0!==p&&null!==(m=p.order)&&void 0!==m&&m.billing_city&&(x.ct=wpmDataLayer.order.billing_city),null!==(g=wpmDataLayer)&&void 0!==g&&null!==(y=g.order)&&void 0!==y&&y.billing_state&&(x.st=wpmDataLayer.order.billing_state),null!==(w=wpmDataLayer)&&void 0!==w&&null!==(v=w.order)&&void 0!==v&&v.billing_postcode&&(x.zp=wpmDataLayer.order.billing_postcode),null!==(_=wpmDataLayer)&&void 0!==_&&null!==(f=_.order)&&void 0!==f&&f.billing_country&&(x.country=wpmDataLayer.order.billing_country),fbq("init",wpmDataLayer.pixels.facebook.pixel_id,x),fbq("track","PageView")}catch(D){console.error(D)}var h,L,D,C,b,j},e.getRandomEventId=()=>(Math.random()+1).toString(36).substring(2),e.getFbUserData=()=>o||e.getFbUserDataFromBrowser(),e.setFbUserData=()=>{o=e.getFbUserDataFromBrowser()},e.getFbUserDataFromBrowser=()=>{var t,a;let o={};return e.getCookie("_fbp")&&(o.fbp=e.getCookie("_fbp")),e.getCookie("_fbc")&&(o.fbp=e.getCookie("_fbc")),null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.user)&&void 0!==a&&a.id&&(o.external_id=wpmDataLayer.user.id),navigator.userAgent&&(o.client_user_agent=navigator.userAgent),o},e.fbViewContent=t=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;let i=e.getRandomEventId();fbq("track","ViewContent",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],currency:wpmDataLayer.shop.currency,value:t.price},{eventID:i}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"ViewContent",event_id:i,user_data:e.getFbUserData(),event_source_url:window.location.href,custom_data:e.fbGetProductDataForCapiEvent(t)})}catch(e){console.error(e)}},e.fbGetProductDataForCapiEvent=e=>({content_type:"product",content_ids:[e.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]],value:e.quantity*e.price,currency:wpmDataLayer.shop.currency}),e.facebookContentIds=()=>{let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?e.push(String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])):e.push(String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))}return e},e.trackCustomFacebookEvent=function(t){let o=arguments.length>1&&arguments[1]!==a?arguments[1]:{};try{var r,i,n;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.facebook)||void 0===n||!n.loaded)return;let a=e.getRandomEventId();fbq("trackCustom",t,o,{eventID:a}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:t,event_id:a,user_data:e.getFbUserData(),event_source_url:window.location.href,custom_data:o})}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},12:(e,t,a)=>{a(1),a(164)},165:()=>{jQuery(document).on("wpmViewItemList",(function(e,t){try{var a,o,r,i,n,l,d,s,c,u,p,m,g;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;if(null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.general)&&void 0!==p&&p.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;if(!t)return;let e={send_to:wpm.getGoogleAdsConversionIdentifiers(),items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]};null!==(m=wpmDataLayer)&&void 0!==m&&null!==(g=m.user)&&void 0!==g&&g.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_item_list",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r,i,n,l,d,s,c,u,p;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let e={send_to:wpm.getGoogleAdsConversionIdentifiers(),value:t.quantity*t.price,items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]};null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.user)&&void 0!==p&&p.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","add_to_cart",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e,t){try{var a,o,r,i,n,l,d,s,c,u,p;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(l=n.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let e={send_to:wpm.getGoogleAdsConversionIdentifiers(),value:(t.quantity?t.quantity:1)*t.price,items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity?t.quantity:1,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]};null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.user)&&void 0!==p&&p.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_item",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a,o,r,i,n,l,d,s,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(l=n.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let m=[];for(const[e,t]of Object.entries(wpmDataLayer.products)){var u,p;if(null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.general)&&void 0!==p&&p.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;m.push({id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical})}let g={send_to:wpm.getGoogleAdsConversionIdentifiers(),items:m};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&c.id&&(g.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_search_results",g)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,l,d,s,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(l=n.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u={send_to:wpm.getGoogleAdsConversionIdentifiers(),value:wpmDataLayer.order.value_filtered,items:wpm.getGoogleAdsDynamicRemarketingOrderItems()};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&c.id&&(u.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","purchase",u)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmLogin",(function(){try{var e,t,a,o,r,i,n,l,d,s,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(l=n.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u={send_to:wpm.getGoogleAdsConversionIdentifiers()};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&c.id&&(u.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","login",u)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,l,d,s;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(!wpm.googleConfigConditionsMet("ads"))return;let c={},u={};c={send_to:wpm.getGoogleAdsConversionIdentifiersWithLabel(),transaction_id:wpmDataLayer.order.number,value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,new_customer:wpmDataLayer.order.new_customer},null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.order)&&void 0!==i&&i.clv_order_value_filtered&&(c.customer_lifetime_value=wpmDataLayer.order.clv_order_value_filtered),null!==(n=wpmDataLayer)&&void 0!==n&&null!==(l=n.user)&&void 0!==l&&l.id&&(c.user_id=wpmDataLayer.user.id),null!==(d=wpmDataLayer)&&void 0!==d&&null!==(s=d.order)&&void 0!==s&&s.aw_merchant_id&&(u={discount:wpmDataLayer.order.discount,aw_merchant_id:wpmDataLayer.order.aw_merchant_id,aw_feed_country:wpmDataLayer.order.aw_feed_country,aw_feed_language:wpmDataLayer.order.aw_feed_language,items:wpm.getGoogleAdsRegularOrderItems()}),wpm.gtagLoaded().then((function(){gtag("event","conversion",{...c,...u})}))}catch(e){console.error(e)}}))},42:()=>{!function(e,t,a){let o=[];e.getGoogleAdsConversionIdentifiersWithLabel=function(){for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))o.push(e+"/"+t);return o},e.getGoogleAdsConversionIdentifiers=function(){let e=[];for(const[t,a]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))e.push(t);return e},e.getGoogleAdsRegularOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e},e.getGoogleAdsDynamicRemarketingOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e}}(window.wpm=window.wpm||{},jQuery)},190:(e,t,a)=>{a(42),a(165)},625:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,l,d,s;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.universal)||void 0===r||!r.property_id)return;if(null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(l=n.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.universal)&&void 0!==s&&s.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.universal.property_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGAUAOrderItems()})}))}catch(e){console.error(e)}}))},19:()=>{!function(e,t,a){e.getGAUAOrderItems=function(){let t=[];for(const[r,i]of Object.entries(wpmDataLayer.order.items)){var a,o;let r;r={quantity:i.quantity,price:i.price,name:i.name,currency:wpmDataLayer.order.currency,category:wpmDataLayer.products[i.id].category.join("/")},null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.general)&&void 0!==o&&o.variationsOutput&&0!==i.variation_id?(r.id=String(wpmDataLayer.products[i.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.variant=wpmDataLayer.products[i.variation_id].variant_name,r.brand=wpmDataLayer.products[i.variation_id].brand):(r.id=String(wpmDataLayer.products[i.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.brand=wpmDataLayer.products[i.id].brand),r=e.ga3AddListNameToProduct(r),t.push(r)}return t},e.ga3AddListNameToProduct=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null;return e.list_name=wpmDataLayer.shop.list_name,t&&(e.list_position=t),e}}(window.wpm=window.wpm||{},jQuery)},562:(e,t,a)=>{a(19),a(625)},572:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,l,d,s;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.ga4)||void 0===r||!r.measurement_id)return;if(null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(l=n.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.ga4)&&void 0!==s&&s.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.ga4.measurement_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGA4OrderItems()})}))}catch(e){console.error(e)}}))},228:()=>{!function(e,t,a){e.getGA4OrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,item_name:r.name,currency:wpmDataLayer.order.currency,item_category:wpmDataLayer.products[r.id].category.join("/")},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.item_id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_variant=wpmDataLayer.products[r.variation_id].variant_name,o.item_brand=wpmDataLayer.products[r.variation_id].brand):(o.item_id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_brand=wpmDataLayer.products[r.id].brand),e.push(o)}return e}}(window.wpm=window.wpm||{},jQuery)},522:(e,t,a)=>{a(228),a(572)},774:(e,t,a)=>{a(562),a(522)},294:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a;void 0===(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a?void 0:a.state)&&(wpm.canGoogleLoad()?wpm.loadGoogle():wpm.logPreventedPixelLoading("google","analytics / ads"))}))},860:()=>{!function(e,t,a){e.googleConfigConditionsMet=function(t){var a,o,r,i;return!(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.consent_mode)||void 0===i||!i.active)||("category"===e.getConsentValues().mode?!0===e.getConsentValues().categories[t]:"pixel"===e.getConsentValues().mode&&e.getConsentValues().pixels.includes("google-"+t))},e.getVisitorConsentStatusAndUpdateGoogleConsentSettings=function(t){return"category"===e.getConsentValues().mode?(e.getConsentValues().categories.analytics&&(t.analytics_storage="granted"),e.getConsentValues().categories.ads&&(t.ad_storage="granted")):"pixel"===e.getConsentValues().mode&&(t.analytics_storage=e.getConsentValues().pixels.includes("google-analytics")?"granted":"denied",t.ad_storage=e.getConsentValues().pixels.includes("google-ads")?"granted":"denied"),t},e.updateGoogleConsentMode=function(){let e=!(arguments.length>0&&arguments[0]!==a)||arguments[0],t=!(arguments.length>1&&arguments[1]!==a)||arguments[1];try{if(!window.gtag||!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent)return;gtag("consent","update",{analytics_storage:e?"granted":"denied",ad_storage:t?"granted":"denied"})}catch(e){console.error(e)}},e.fireGtagGoogleAds=function(){try{var e,t,a,o,r,i,n,l,d,s,c,u,p,m,g,y,w,v,_,f,h;if(wpmDataLayer.pixels.google.ads.state="loading",null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.ads)&&void 0!==o&&null!==(r=o.enhanced_conversions)&&void 0!==r&&r.active)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e,{allow_enhanced_conversions:!0});else for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e);null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(l=n.google)&&void 0!==l&&null!==(d=l.ads)&&void 0!==d&&d.conversionIds&&null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.pixels)&&void 0!==c&&null!==(u=c.google)&&void 0!==u&&null!==(p=u.ads)&&void 0!==p&&p.phone_conversion_label&&null!==(m=wpmDataLayer)&&void 0!==m&&null!==(g=m.pixels)&&void 0!==g&&null!==(y=g.google)&&void 0!==y&&null!==(w=y.ads)&&void 0!==w&&w.phone_conversion_number&>ag("config",Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]+"/"+wpmDataLayer.pixels.google.ads.phone_conversion_label,{phone_conversion_number:wpmDataLayer.pixels.google.ads.phone_conversion_number}),"order_received_page"===wpmDataLayer.shop.page_type&&null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.order)&&void 0!==_&&null!==(f=_.google)&&void 0!==f&&null!==(h=f.ads)&&void 0!==h&&h.enhanced_conversion_data&&(window.enhanced_conversion_data=wpmDataLayer.order.google.ads.enhanced_conversion_data),wpmDataLayer.pixels.google.ads.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsUA=function(){try{wpmDataLayer.pixels.google.analytics.universal.state="loading",gtag("config",wpmDataLayer.pixels.google.analytics.universal.property_id,wpmDataLayer.pixels.google.analytics.universal.parameters),wpmDataLayer.pixels.google.analytics.universal.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsGA4=function(){try{wpmDataLayer.pixels.google.analytics.ga4.state="loading",gtag("config",wpmDataLayer.pixels.google.analytics.ga4.measurement_id,wpmDataLayer.pixels.google.analytics.ga4.parameters),wpmDataLayer.pixels.google.analytics.ga4.state="ready"}catch(e){console.error(e)}},e.isGoogleActive=function(){var e,t,a,o,r,i,n,l,d,s,c,u,p,m;return!(!(null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id||null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(l=n.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.ga4)&&void 0!==s&&s.measurement_id)&&jQuery.isEmptyObject(null===(c=wpmDataLayer)||void 0===c||null===(u=c.pixels)||void 0===u||null===(p=u.google)||void 0===p||null===(m=p.ads)||void 0===m?void 0:m.conversionIds))},e.getGoogleGtagId=function(){var e,t,a,o,r,i,n,l,d,s;return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id?wpmDataLayer.pixels.google.analytics.universal.property_id:null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(l=n.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.ga4)&&void 0!==s&&s.measurement_id?wpmDataLayer.pixels.google.analytics.ga4.measurement_id:Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]},e.loadGoogle=function(){e.isGoogleActive()&&(wpmDataLayer.pixels.google.state="loading",e.loadScriptAndCacheIt("https://www.googletagmanager.com/gtag/js?id="+e.getGoogleGtagId()).done((function(t,a){try{var o,r,i,n,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D,C,b;if(window.dataLayer=window.dataLayer||[],window.gtag=function(){dataLayer.push(arguments)},null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.google)&&void 0!==i&&null!==(n=i.consent_mode)&&void 0!==n&&n.active){var j,x,k,I;let t={ad_storage:wpmDataLayer.pixels.google.consent_mode.ad_storage,analytics_storage:wpmDataLayer.pixels.google.consent_mode.analytics_storage,wait_for_update:wpmDataLayer.pixels.google.consent_mode.wait_for_update};null!==(j=wpmDataLayer)&&void 0!==j&&null!==(x=j.pixels)&&void 0!==x&&null!==(k=x.google)&&void 0!==k&&null!==(I=k.consent_mode)&&void 0!==I&&I.region&&(t.region=wpmDataLayer.pixels.google.consent_mode.region),t=e.getVisitorConsentStatusAndUpdateGoogleConsentSettings(t),gtag("consent","default",t),gtag("set","ads_data_redaction",wpmDataLayer.pixels.google.consent_mode.ads_data_redaction),gtag("set","url_passthrough",wpmDataLayer.pixels.google.consent_mode.url_passthrough)}null!==(l=wpmDataLayer)&&void 0!==l&&null!==(d=l.pixels)&&void 0!==d&&null!==(s=d.google)&&void 0!==s&&null!==(c=s.linker)&&void 0!==c&&c.settings&>ag("set","linker",wpmDataLayer.pixels.google.linker.settings),gtag("js",new Date),jQuery.isEmptyObject(null===(u=wpmDataLayer)||void 0===u||null===(p=u.pixels)||void 0===p||null===(m=p.google)||void 0===m||null===(g=m.ads)||void 0===g?void 0:g.conversionIds)||(e.googleConfigConditionsMet("ads")?e.fireGtagGoogleAds():e.logPreventedPixelLoading("google-ads","ads")),null!==(y=wpmDataLayer)&&void 0!==y&&null!==(w=y.pixels)&&void 0!==w&&null!==(v=w.google)&&void 0!==v&&null!==(_=v.analytics)&&void 0!==_&&null!==(f=_.universal)&&void 0!==f&&f.property_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsUA():e.logPreventedPixelLoading("google-universal-analytics","analytics")),null!==(h=wpmDataLayer)&&void 0!==h&&null!==(L=h.pixels)&&void 0!==L&&null!==(D=L.google)&&void 0!==D&&null!==(C=D.analytics)&&void 0!==C&&null!==(b=C.ga4)&&void 0!==b&&b.measurement_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsGA4():e.logPreventedPixelLoading("ga4","analytics")),wpmDataLayer.pixels.google.state="ready"}catch(e){console.error(e)}})))},e.canGoogleLoad=function(){var t,a,o,r;return!(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.google)||void 0===o||null===(r=o.consent_mode)||void 0===r||!r.active)||("category"===e.getConsentValues().mode?!(!e.getConsentValues().categories.ads&&!e.getConsentValues().categories.analytics):"pixel"===e.getConsentValues().mode?e.getConsentValues().pixels.includes("google-ads")||e.getConsentValues().pixels.includes("google-analytics"):(console.error("Couldn't find a valid load condition for Google mode in wpmConsentValues"),!1))},e.gtagLoaded=function(){return new Promise((function(e,t){var a,o,r;void 0===(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r?void 0:r.state)&&t();let i=0;!function a(){var o,r,n;return"ready"===(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(n=r.google)||void 0===n?void 0:n.state)?e():i>=5e3?t():(i+=200,void setTimeout(a,200))}()}))}}(window.wpm=window.wpm||{},jQuery)},580:(e,t,a)=>{a(860),a(294)},69:(e,t,a)=>{a(580),a(190),a(774),a(463)},945:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i,n,l;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.optimize)||void 0===o||!o.container_id||null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.pixels)&&void 0!==i&&null!==(n=i.google)&&void 0!==n&&null!==(l=n.optimize)&&void 0!==l&&l.loaded||wpm.canIFire("analytics","google-optimize")&&wpm.load_google_optimize_pixel()}))},962:()=>{!function(e,t,a){e.load_google_optimize_pixel=function(){try{wpmDataLayer.pixels.google.optimize.loaded=!0,e.loadScriptAndCacheIt("https://www.googleoptimize.com/optimize.js?id="+wpmDataLayer.pixels.google.optimize.container_id)}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},463:(e,t,a)=>{a(962),a(945)},300:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i,n,l,d;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.hotjar)||void 0===a||!a.site_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.hotjar)&&void 0!==i&&i.loaded||!wpm.canIFire("analytics","hotjar")||null!==(n=wpmDataLayer)&&void 0!==n&&null!==(l=n.pixels)&&void 0!==l&&null!==(d=l.hotjar)&&void 0!==d&&d.loaded||wpm.load_hotjar_pixel()}))},376:()=>{!function(e,t,a){e.load_hotjar_pixel=function(){try{wpmDataLayer.pixels.hotjar.loaded=!0,e=window,t=document,e.hj=e.hj||function(){(e.hj.q=e.hj.q||[]).push(arguments)},e._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6},a=t.getElementsByTagName("head")[0],(o=t.createElement("script")).async=1,o.src="https://static.hotjar.com/c/hotjar-"+e._hjSettings.hjid+".js?sv="+e._hjSettings.hjsv,a.appendChild(o)}catch(e){console.error(e)}var e,t,a,o}}(window.wpm=window.wpm||{},jQuery)},787:(e,t,a)=>{a(376),a(300)},473:()=>{!function(e,t,a){let o=()=>{let t=e.getCookie("cmplz_statistics"),a=e.getCookie("cmplz_marketing");return!(!e.getCookie("cmplz_consent_status")&&!e.getCookie("cmplz_banner-status"))&&{analytics:"allow"===t,ads:"allow"===a,visitorHasChosen:!0}},r=()=>{let t=e.getCookie("cookielawinfo-checkbox-analytics")||e.getCookie("cookielawinfo-checkbox-analytiques"),a=e.getCookie("cookielawinfo-checkbox-advertisement")||e.getCookie("cookielawinfo-checkbox-performance")||e.getCookie("cookielawinfo-checkbox-publicite"),o=e.getCookie("CookieLawInfoConsent");return!(!t&&!a)&&{analytics:"yes"===t,ads:"yes"===a,visitorHasChosen:!!o}},i={categories:{},pixels:[],mode:"category",visitorHasChosen:!1};e.getConsentValues=()=>i,e.setConsentValueCategories=function(){let e=arguments.length>0&&arguments[0]!==a&&arguments[0],t=arguments.length>1&&arguments[1]!==a&&arguments[1];i.categories.analytics=e,i.categories.ads=t},e.updateConsentCookieValues=function(){let t,n=arguments.length>0&&arguments[0]!==a?arguments[0]:null,l=arguments.length>1&&arguments[1]!==a?arguments[1]:null,d=arguments.length>2&&arguments[2]!==a&&arguments[2];if(n||l)n&&(i.categories.analytics=!!n),l&&(i.categories.ads=!!l);else if(t=e.getCookie("CookieConsent"))t=decodeURI(t),i.categories.analytics=t.indexOf("statistics:true")>=0,i.categories.ads=t.indexOf("marketing:true")>=0,i.visitorHasChosen=!0;else if(t=e.getCookie("CookieScriptConsent"))t=JSON.parse(t),"reject"===t.action?(i.categories.analytics=!1,i.categories.ads=!1):2===t.categories.length?(i.categories.analytics=!0,i.categories.ads=!0):(i.categories.analytics=t.categories.indexOf("performance")>=0,i.categories.ads=t.categories.indexOf("targeting")>=0),i.visitorHasChosen=!0;else if(t=e.getCookie("borlabs-cookie")){var s,c,u,p,m,g,y,w;t=decodeURI(t),t=JSON.parse(t),i.categories.analytics=!(null===(s=t)||void 0===s||null===(c=s.consents)||void 0===c||!c.statistics),i.categories.ads=!(null===(u=t)||void 0===u||null===(p=u.consents)||void 0===p||!p.marketing),i.visitorHasChosen=!0,i.pixels=[...(null===(m=t)||void 0===m||null===(g=m.consents)||void 0===g?void 0:g.statistics)||[],...(null===(y=t)||void 0===y||null===(w=y.consents)||void 0===w?void 0:w.marketing)||[]],i.mode="pixel"}else(t=o())?(i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,i.visitorHasChosen=t.visitorHasChosen):(t=e.getCookie("cookie_notice_accepted"))?(i.categories.analytics=!0,i.categories.ads=!0,i.visitorHasChosen=!0):(t=e.getCookie("hu-consent"))?(t=JSON.parse(t),i.categories.analytics=!!t.categories[3],i.categories.ads=!!t.categories[4],i.visitorHasChosen=!0):(t=r())?(i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,i.visitorHasChosen=!0===t.visitorHasChosen):(t=e.getCookie("moove_gdpr_popup"))?(t=JSON.parse(t),i.categories.analytics="1"===t.thirdparty,i.categories.ads="1"===t.advanced,i.visitorHasChosen=!0):(i.categories.analytics=!d,i.categories.ads=!d)},e.updateConsentCookieValues(),e.setConsentDefaultValuesToExplicit=()=>{i.categories={analytics:!1,ads:!1}},e.canIFire=(t,a)=>{let o;return"category"===i.mode?o=!!i.categories[t]:"pixel"===i.mode?(o=i.pixels.includes(a),!1===o&&"microsoft-ads"===a&&(o=i.pixels.includes("bing-ads"))):(console.error("Couldn't find a valid consent mode in wpmConsentValues"),o=!1),!!o||(e.logPreventedPixelLoading(a,t),!1)},e.logPreventedPixelLoading=(e,t)=>{var a,o,r;null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.shop)&&void 0!==o&&null!==(r=o.cookie_consent_mgmt)&&void 0!==r&&r.explicit_consent?console.log('Pixel Manager for WooCommerce: The "'+e+" (category: "+t+')" pixel has not fired because you have not given consent for it yet. (WPM is in explicit consent mode.)'):console.log('Pixel Manager for WooCommerce: The "'+e+" (category: "+t+')" pixel has not fired because you have removed consent for this pixel. (WPM is in implicit consent mode.)')},e.scriptTagObserver=new MutationObserver((a=>{a.forEach((a=>{let{addedNodes:o}=a;[...o].forEach((a=>{t(a).data("wpm-cookie-category")&&(e.shouldScriptBeActive(a)?e.unblockScript(a):e.blockScript(a))}))}))})),e.scriptTagObserver.observe(document.head,{childList:!0,subtree:!0}),jQuery(document).on("DOMContentLoaded",(()=>e.scriptTagObserver.disconnect())),e.shouldScriptBeActive=e=>{var a,o,r,n;return!((wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent||i.visitorHasChosen)&&("category"!==i.mode||!t(e).data("wpm-cookie-category").split(",").some((e=>i.categories[e])))&&("pixel"!==i.mode||!i.pixels.includes(t(e).data("wpm-pixel-name")))&&("pixel"!==i.mode||"google"!==t(e).data("wpm-pixel-name")||!["google-analytics","google-ads"].some((e=>i.pixels.includes(e))))&&(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.consent_mode)||void 0===n||!n.active||"google"!==t(e).data("wpm-pixel-name")))},e.unblockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove();let r=t(e).data("wpm-src");r&&t(e).attr("src",r),e.type="text/javascript",o&&t(e).appendTo("head"),jQuery(document).trigger("wpmPreLoadPixels",{})},e.blockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove(),t(e).attr("src")&&t(e).removeAttr("src"),e.type="blocked/javascript",o&&t(e).appendTo("head")},e.unblockAllScripts=function(){jQuery(document).trigger("wpmPreLoadPixels",{})},e.unblockSelectedPixels=()=>{jQuery(document).trigger("wpmPreLoadPixels",{})},jQuery(document).on("borlabs-cookie-consent-saved",(()=>{e.updateConsentCookieValues(),"pixel"===i.mode?(e.unblockSelectedPixels(),e.updateGoogleConsentMode(i.pixels.includes("google-analytics"),i.pixels.includes("google-ads"))):(e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads))})),jQuery(document).on("CookiebotOnAccept",(()=>{Cookiebot.consent.statistics&&(i.categories.analytics=!0),Cookiebot.consent.marketing&&(i.categories.ads=!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)}),!1),jQuery(document).on("CookieScriptAccept",(t=>{t.detail.categories.includes("performance")&&(i.categories.analytics=!0),t.detail.categories.includes("targeting")&&(i.categories.ads=!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)})),jQuery(document).on("CookieScriptAcceptAll",(()=>{e.unblockAllScripts(!0,!0),e.updateGoogleConsentMode(!0,!0)})),e.cmplzStatusChange=t=>{t.detail.categories.includes("statistics")&&e.updateConsentCookieValues(!0,null),t.detail.categories.includes("marketing")&&e.updateConsentCookieValues(null,!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)},jQuery(document).on("cmplzStatusChange",e.cmplzStatusChange),jQuery(document).on("cmplz_status_change",e.cmplzStatusChange),jQuery(document).on("setCookieNotice",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)})),e.huObserver=new MutationObserver((t=>{t.forEach((t=>{let{addedNodes:a}=t;[...a].forEach((t=>{"hu"===t.id&&jQuery(".hu-cookies-save").on("click",(function(){e.updateConsentCookieValues(),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)}))}))}))})),window.hu&&e.huObserver.observe(document.documentElement||document.body,{childList:!0,subtree:!0}),e.explicitConsentStateAlreadySet=()=>{if(i.explicitConsentStateAlreadySet)return!0;i.explicitConsentStateAlreadySet=!0}}(window.wpm=window.wpm||{},jQuery)},299:()=>{jQuery(document).on("click",".remove_from_cart_button, .remove",(function(){try{let e=new URL(jQuery(this).attr("href")),t=wpm.getProductIdByCartItemKeyUrl(e);wpm.removeProductFromCart(t)}catch(e){console.error(e)}})),jQuery(document).on("click",".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button",(function(){try{if("product"===wpmDataLayer.shop.page_type){if(void 0!==jQuery(this).attr("href")&&jQuery(this).attr("href").includes("add-to-cart")){let e=1,t=jQuery(this).data("product_id");wpm.addProductToCart(t,e)}else if("simple"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery(this).val();wpm.addProductToCart(t,e)}else if("variable"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery("[name='variation_id']").val();wpm.addProductToCart(t,e)}else if("grouped"===wpmDataLayer.shop.product_type)jQuery(".woocommerce-grouped-product-list-item").each((function(){let e=Number(jQuery(this).find(".input-text.qty").val());e||0===e||(e=1);let t=jQuery(this).attr("class"),a=wpm.getPostIdFromString(t);wpm.addProductToCart(a,e)}));else if("bundle"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery("input[name=add-to-cart]").val();wpm.addProductToCart(t,e)}}else{let e=1,t=jQuery(this).data("product_id");wpm.addProductToCart(t,e)}}catch(e){console.error(e)}})),jQuery(document).one("click","a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)",(function(e){try{if(jQuery(e.target).closest("a").attr("href")){let t=jQuery(e.target).closest("a").attr("href");if(t.includes("add-to-cart=")){let e=t.match(/(add-to-cart=)(\d+)/);e&&wpm.addProductToCart(e[2],1)}}}catch(e){console.error(e)}})),jQuery(document).on("click",".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product",(function(){try{let e=jQuery(this).nextAll(".wpmProductId:first").data("id");if(e){if(e=wpm.getIdBasedOndVariationsOutputSetting(e),!e)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[e]){let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmSelectContentGaUa",t),jQuery(document).trigger("wpmSelectItem",t)}}}catch(e){console.error(e)}})),jQuery(document).one("click",[".checkout-button",".cart-checkout-button",".button.checkout",".xoo-wsc-ft-btn-checkout"].join(","),(function(){jQuery(document).trigger("wpmBeginCheckout")})),jQuery(document).on("input","#billing_email",(function(){wpm.isEmail(jQuery(this).val())&&(wpm.fireCheckoutProgress(2),wpm.emailSelected=!0)})),jQuery(document).on("click",".wc_payment_methods",(function(){!1===wpm.paymentMethodSelected&&wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val()),wpm.paymentMethodSelected=!0})),jQuery(document).one("click","#place_order",(function(){!1===wpm.emailSelected&&wpm.fireCheckoutProgress(2),!1===wpm.paymentMethodSelected&&(wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val())),wpm.fireCheckoutProgress(4)})),jQuery(document).on("click","[name='update_cart']",(function(){try{jQuery(".cart_item").each((function(){let e=new URL(jQuery(this).find(".product-remove").find("a").attr("href")),t=wpm.getProductIdByCartItemKeyUrl(e),a=jQuery(this).find(".qty").val();0===a?wpm.removeProductFromCart(t):a<wpmDataLayer.cart[t].quantity?wpm.removeProductFromCart(t,wpmDataLayer.cart[t].quantity-a):a>wpmDataLayer.cart[t].quantity&&wpm.addProductToCart(t,a-wpmDataLayer.cart[t].quantity)}))}catch(e){console.error(e),wpm.getCartItemsFromBackend()}})),jQuery(document).on("click",".add_to_wishlist, .wl-add-to",(function(){try{let e;if(jQuery(this).data("productid")?e=jQuery(this).data("productid"):jQuery(this).data("product-id")&&(e=jQuery(this).data("product-id")),!e)throw Error("Wasn't able to retrieve a productId");let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmAddToWishlist",t)}catch(e){console.error(e)}})),jQuery(document).on("updated_cart_totals",(function(){jQuery(document).trigger("wpmViewCart")})),jQuery((function(){jQuery(".single_variation_wrap").on("show_variation",(function(e,t){try{let e=wpm.getIdBasedOndVariationsOutputSetting(t.variation_id);if(!e)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[e]){let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmViewItem",t)}}catch(e){console.error(e)}}))})),jQuery((function(){jQuery(".single_variation_wrap").on("hide_variation",(function(){try{var e,t;let i=jQuery("body").attr("class").match(/(postid-)(\d+)/)[2];if(!i)throw Error("Wasn't able to retrieve a productId");if("variable"===wpmDataLayer.shop.product_type&&null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.general)&&void 0!==t&&t.variationsOutput){var a,o,r;for(const[e,t]of Object.entries(wpmDataLayer.products))if("parentId"in t){i=t.id;break}null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.microdata_product_id&&(i=wpmDataLayer.pixels.facebook.microdata_product_id)}if(wpmDataLayer.products&&wpmDataLayer.products[i]){let e=wpm.getProductDetailsFormattedForEvent(i);jQuery(document).trigger("wpmViewItem",e)}}catch(e){console.error(e)}}))})),jQuery(window).on("wpmLoad",(function(){try{wpm.doesWooCommerceCartExist()&&wpm.getCartItems()}catch(e){console.error(e)}})),jQuery(window).on("wpmLoad",(function(){wpmDataLayer.products=wpmDataLayer.products||{};let e=wpm.getAddToCartLinkProductIds();wpm.getProductsFromBackend(e)})),jQuery(window).on("wpmLoad",(function(){if(!wpm.getCookie("wpmReferrer")&&document.referrer){let e=new URL(document.referrer).hostname;e!==window.location.host&&wpm.setCookie("wpmReferrer",e)}})),jQuery(window).on("wpmLoad",(function(){try{var e;if("undefined"!=typeof wpmDataLayer&&(null===(e=wpmDataLayer)||void 0===e||!e.wpmLoadFired)){var t,a;if(jQuery(document).trigger("wpmLoadAlways"),"product"===wpmDataLayer.shop.page_type&&"variable"!==wpmDataLayer.shop.product_type&&wpm.getMainProductIdFromProductPage()){let e=wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage());jQuery(document).trigger("wpmViewItem",e)}else"product_category"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmCategory"):"search"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmSearch"):"cart"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmViewCart"):"order_received_page"===wpmDataLayer.shop.page_type&&wpmDataLayer.order?wpm.isOrderIdStored(wpmDataLayer.order.id)||(jQuery(document).trigger("wpmOrderReceivedPage"),wpm.writeOrderIdToStorage(wpmDataLayer.order.id)):jQuery(document).trigger("wpmEverywhereElse");null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.user)&&void 0!==a&&a.id&&!wpm.hasLoginEventFired()&&(jQuery(document).trigger("wpmLogin"),wpm.setLoginEventFired()),wpmDataLayer.wpmLoadFired=!0}}catch(e){console.error(e)}})),jQuery(window).on("wpmPreLoadPixels",(function(){var e,t,a;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.shop)&&void 0!==t&&null!==(a=t.cookie_consent_mgmt)&&void 0!==a&&a.explicit_consent&&!wpm.explicitConsentStateAlreadySet()&&wpm.updateConsentCookieValues(null,null,!0),jQuery(document).trigger("wpmLoadPixels",{})}))},584:()=>{!function(e,t,a){const o="_wpm_order_ids",r="_wpm_endpoint_available",i="/wp-json/";function n(){return""!==e.getCookie(o)}e.emailSelected=!1,e.paymentMethodSelected=!1,e.useRestEndpoint=()=>e.isSessionStorageAvailable()&&e.isRestEndpointAvailable()&&e.isBelowRestErrorThreshold(),e.isBelowRestErrorThreshold=()=>window.sessionStorage.getItem(0)<=10,e.isRestEndpointAvailable=()=>{if(window.sessionStorage.getItem(r))return JSON.parse(window.sessionStorage.getItem(r));e.testEndpoint()},e.isSessionStorageAvailable=()=>!!window.sessionStorage,e.testEndpoint=function(){let e=arguments.length>0&&arguments[0]!==a?arguments[0]:location.protocol+"//"+location.host+i,t=arguments.length>1&&arguments[1]!==a?arguments[1]:r;jQuery.ajax(e,{type:"HEAD",timeout:1e3,statusCode:{200:function(e){window.sessionStorage.setItem(t,JSON.stringify(!0))},404:function(e){window.sessionStorage.setItem(t,JSON.stringify(!1))},0:function(e){window.sessionStorage.setItem(t,JSON.stringify(!1))}}}).then((e=>{}))},e.isWpmRestEndpointAvailable=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:r;return!!e.getCookie(t)},e.writeOrderIdToStorage=function(t){if(window.Storage)if(null===localStorage.getItem(o)){let e=[];e.push(t),window.localStorage.setItem(o,JSON.stringify(e))}else{let e=JSON.parse(localStorage.getItem(o));e.includes(t)||(e.push(t),window.localStorage.setItem(o,JSON.stringify(e)))}else{let a=new Date;a.setDate(a.getDate()+365);let r=[];n()&&(r=JSON.parse(e.getCookie(o))),r.includes(t)||(r.push(t),document.cookie="_wpm_order_ids="+JSON.stringify(r)+";expires="+a.toUTCString())}"function"==typeof e.storeOrderIdOnServer&&wpmDataLayer.orderDeduplication&&e.storeOrderIdOnServer(t)},e.isOrderIdStored=t=>wpmDataLayer.orderDeduplication?window.Storage?null!==localStorage.getItem(o)&&JSON.parse(localStorage.getItem(o)).includes(t):!!n()&&JSON.parse(e.getCookie(o)).includes(t):(console.log("order duplication prevention: off"),!1),e.isEmail=e=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),e.removeProductFromCart=function(t){let o=arguments.length>1&&arguments[1]!==a?arguments[1]:null;try{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");let a;if(a=null==o?wpmDataLayer.cart[t].quantity:o,wpmDataLayer.cart[t]){let r=e.getProductDetailsFormattedForEvent(t,a);jQuery(document).trigger("wpmRemoveFromCart",r),null==o||wpmDataLayer.cart[t].quantity===o?(delete wpmDataLayer.cart[t],sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))):(wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity-a,sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart)))}}catch(e){console.error(e)}},e.getIdBasedOndVariationsOutputSetting=e=>{try{var t,a;return null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput?e:wpmDataLayer.products[e].isVariation?wpmDataLayer.products[e].parentId:e}catch(e){console.error(e)}},e.addProductToCart=(t,a)=>{try{var o;if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");if(null!==(o=wpmDataLayer)&&void 0!==o&&o.products[t]){var r;let o=e.getProductDetailsFormattedForEvent(t,a);jQuery(document).trigger("wpmAddToCart",o),null!==(r=wpmDataLayer)&&void 0!==r&&r.cart[t]?wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity+a:("cart"in wpmDataLayer||(wpmDataLayer.cart={}),wpmDataLayer.cart[t]=e.getProductDetailsFormattedForEvent(t,a)),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))}}catch(t){console.error(t),e.getCartItemsFromBackend()}},e.getCartItems=()=>{sessionStorage?sessionStorage.getItem("wpmDataLayerCart")&&"order_received_page"!==wpmDataLayer.shop.page_type?e.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem("wpmDataLayerCart"))):sessionStorage.setItem("wpmDataLayerCart",JSON.stringify({})):e.getCartItemsFromBackend()},e.getCartItemsFromBackend=()=>{try{let t={action:"wpm_get_cart_items"};jQuery.ajax({type:"get",dataType:"json",url:e.ajax_url,data:t,success:function(t){t.cart||(t.cart={}),e.saveCartObjectToDataLayer(t.cart),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(t.cart))}})}catch(e){console.error(e)}},e.getProductsFromBackend=t=>{if((t=t.filter((e=>!wpmDataLayer.products.hasOwnProperty(e))))&&0!==t.length)try{let a={action:"wpm_get_product_ids",productIds:t};jQuery.ajax({type:"get",dataType:"json",url:e.ajax_url,data:a,success:function(e){wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},error:function(e){console.log(e)}})}catch(e){console.error(e)}},e.saveCartObjectToDataLayer=e=>{wpmDataLayer.cart=e,wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},e.fireCheckoutOption=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null,o=arguments.length>2&&arguments[2]!==a?arguments[2]:null,r={step:e,checkout_option:t,value:o};jQuery(document).trigger("wpmFireCheckoutOption",r)},e.fireCheckoutProgress=e=>{let t={step:e};jQuery(document).trigger("wpmFireCheckoutProgress",t)},e.getPostIdFromString=e=>{try{return e.match(/(post-)(\d+)/)[2]}catch(e){console.error(e)}},e.triggerViewItemList=t=>{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");jQuery(document).trigger("wpmViewItemList",e.getProductDataForViewItemEvent(t))},e.getProductDataForViewItemEvent=t=>{if(!t)throw Error("Wasn't able to retrieve a productId");try{if(wpmDataLayer.products[t])return e.getProductDetailsFormattedForEvent(t)}catch(e){console.error(e)}},e.getMainProductIdFromProductPage=()=>{try{return["simple","variable","grouped","composite","bundle"].indexOf(wpmDataLayer.shop.product_type)>=0&&jQuery(".wpmProductId:first").data("id")}catch(e){console.error(e)}},e.viewItemListTriggerTestMode=e=>{jQuery(e).css({position:"relative"}),jQuery(e).append('<div id="viewItemListTriggerOverlay"></div>'),jQuery(e).find("#viewItemListTriggerOverlay").css({"z-index":"10",display:"block",position:"absolute",height:"100%",top:"0",left:"0",right:"0",opacity:wpmDataLayer.viewItemListTrigger.opacity,"background-color":wpmDataLayer.viewItemListTrigger.backgroundColor})},e.getSearchTermFromUrl=()=>{try{return new URLSearchParams(window.location.search).get("s")}catch(e){console.error(e)}};let l,d={};e.observerCallback=(t,a)=>{t.forEach((t=>{try{let o,r=jQuery(t.target).data("ioid");if(o=jQuery(t.target).next(".wpmProductId").length?jQuery(t.target).next(".wpmProductId").data("id"):jQuery(t.target).find(".wpmProductId").data("id"),!o)throw Error("wpmProductId element not found");t.isIntersecting?d[r]=setTimeout((()=>{e.triggerViewItemList(o),wpmDataLayer.viewItemListTrigger.testMode&&e.viewItemListTriggerTestMode(t.target),!1===wpmDataLayer.viewItemListTrigger.repeat&&a.unobserve(t.target)}),wpmDataLayer.viewItemListTrigger.timeout):(clearTimeout(d[r]),wpmDataLayer.viewItemListTrigger.testMode&&jQuery(t.target).find("#viewItemListTriggerOverlay").remove())}catch(e){console.error(e)}}))};let s,c=0,u=()=>{s=jQuery(".wpmProductId").map((function(e,t){return jQuery(t).parent().hasClass("type-product")||jQuery(t).parent().hasClass("product")||jQuery(t).parent().hasClass("product-item-inner")?jQuery(t).parent():jQuery(t).prev().hasClass("wc-block-grid__product")||jQuery(t).prev().hasClass("product")||jQuery(t).prev().hasClass("product-small")||jQuery(t).prev().hasClass("woocommerce-LoopProduct-link")?jQuery(this).prev():jQuery(t).closest(".product").length?jQuery(t).closest(".product"):void 0}))};e.startIntersectionObserverToWatch=()=>{try{e.urlHasParameter("vildemomode")&&(wpmDataLayer.viewItemListTrigger.testMode=!0),l=new IntersectionObserver(e.observerCallback,{threshold:wpmDataLayer.viewItemListTrigger.threshold}),u(),s.each(((e,t)=>{jQuery(t[0]).data("ioid",c++),l.observe(t[0])}))}catch(e){console.error(e)}},e.startProductsMutationObserverToWatch=()=>{try{let e=jQuery(".wpmProductId:eq(0)").parents().has(jQuery(".wpmProductId:eq(1)").parents()).first();e.length&&p.observe(e[0],{attributes:!0,childList:!0,characterData:!0})}catch(e){console.error(e)}};let p=new MutationObserver((e=>{e.forEach((e=>{let t=e.addedNodes;null!==t&&jQuery(t).each((function(){(jQuery(this).hasClass("type-product")||jQuery(this).hasClass("product-small")||jQuery(this).hasClass("wc-block-grid__product"))&&m(this)&&(jQuery(this).data("ioid",c++),l.observe(this))}))}))})),m=e=>!(!jQuery(e).find(".wpmProductId").length&&!jQuery(e).siblings(".wpmProductId").length);e.setCookie=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:"",o=arguments.length>2&&arguments[2]!==a?arguments[2]:null;if(o){let a=new Date;a.setTime(a.getTime()+24*o*60*60*1e3);let r="expires="+a.toUTCString();document.cookie=e+"="+t+";"+r+";path=/"}else document.cookie=e+"="+t+";path=/"},e.getCookie=e=>{let t=e+"=",a=decodeURIComponent(document.cookie).split(";");for(let e=0;e<a.length;e++){let o=a[e];for(;" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},e.getWpmSessionData=()=>{if(window.sessionStorage){let e=window.sessionStorage.getItem("_wpm");return null!==e?JSON.parse(e):{}}return{}},e.setWpmSessionData=e=>{window.sessionStorage&&window.sessionStorage.setItem("_wpm",JSON.stringify(e))},e.storeOrderIdOnServer=t=>{try{let a={action:"wpm_purchase_pixels_fired",order_id:t,nonce:e.nonce};jQuery.ajax({type:"post",dataType:"json",url:e.ajax_url,data:a,success:function(e){!1===e.success&&console.log(e)},error:function(e){console.log(e)}})}catch(e){console.error(e)}},e.getProductIdByCartItemKeyUrl=e=>{let t,a=new URLSearchParams(e.search).get("remove_item");return t=0===wpmDataLayer.cartItemKeys[a].variation_id?wpmDataLayer.cartItemKeys[a].product_id:wpmDataLayer.cartItemKeys[a].variation_id,t},e.getAddToCartLinkProductIds=()=>jQuery("a").map((function(){let e=jQuery(this).attr("href");if(e&&e.includes("?add-to-cart=")){let t=e.match(/(add-to-cart=)(\d+)/);if(t)return t[2]}})).get(),e.getProductDetailsFormattedForEvent=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:1,o={id:e.toString(),dyn_r_ids:wpmDataLayer.products[e].dyn_r_ids,name:wpmDataLayer.products[e].name,list_name:wpmDataLayer.shop.list_name,brand:wpmDataLayer.products[e].brand,category:wpmDataLayer.products[e].category,variant:wpmDataLayer.products[e].variant,list_position:wpmDataLayer.products[e].position,quantity:t,price:wpmDataLayer.products[e].price,currency:wpmDataLayer.shop.currency,isVariable:wpmDataLayer.products[e].isVariable,isVariation:wpmDataLayer.products[e].isVariation,parentId:wpmDataLayer.products[e].parentId};return o.isVariation&&(o.parentId_dyn_r_ids=wpmDataLayer.products[e].parentId_dyn_r_ids),o},e.setReferrerToCookie=()=>{e.getCookie("wpmReferrer")||e.setCookie("wpmReferrer",document.referrer)},e.getReferrerFromCookie=()=>e.getCookie("wpmReferrer")?e.getCookie("wpmReferrer"):null,e.getClidFromBrowser=function(){let t,o=arguments.length>0&&arguments[0]!==a?arguments[0]:"gclid";return t={gclid:"_gcl_aw",dclid:"_gcl_dc"},e.getCookie(t[o])?e.getCookie(t[o]).match(/(GCL.[\d]*.)(.*)/)[2]:""},e.getUserAgent=()=>navigator.userAgent,e.getViewPort=()=>({width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}),e.version=()=>{console.log(wpmDataLayer.version)},e.loadScriptAndCacheIt=(e,t)=>(t=jQuery.extend(t||{},{dataType:"script",cache:!0,url:e}),jQuery.ajax(t)),e.getOrderItemPrice=e=>(e.total+e.total_tax)/e.quantity,e.hasLoginEventFired=()=>{let t=e.getWpmSessionData();return null==t?void 0:t.loginEventFired},e.setLoginEventFired=()=>{let t=e.getWpmSessionData();t.loginEventFired=!0,e.setWpmSessionData(t)},e.wpmDataLayerExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof wpmDataLayer)return e();setTimeout(t,50)}()})),e.jQueryExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof jQuery)return e();setTimeout(t,100)}()})),e.pageLoaded=()=>new Promise((e=>{!function t(){if("complete"===document.readyState)return e();setTimeout(t,50)}()})),e.pageReady=()=>new Promise((e=>{!function t(){if("interactive"===document.readyState||"complete"===document.readyState)return e();setTimeout(t,50)}()})),e.isMiniCartActive=()=>{if(window.sessionStorage){for(const[e,t]of Object.entries(window.sessionStorage))if(e.includes("wc_fragments"))return!0;return!1}return!1},e.doesWooCommerceCartExist=()=>document.cookie.includes("woocommerce_items_in_cart"),e.urlHasParameter=e=>new URLSearchParams(window.location.search).has(e)}(window.wpm=window.wpm||{},jQuery)},534:(e,t,a)=>{a(584),a(473)},207:()=>{wpm.wpmDataLayerExists().then((function(){console.log("Pixel Manager for WooCommerce: "+(wpmDataLayer.version.pro?"Pro":"Free")+" Version "+wpmDataLayer.version.number+" loaded"),jQuery(document).trigger("wpmPreLoadPixels",{})})).then((function(){wpm.pageLoaded().then((function(){jQuery(document).trigger("wpmLoad",{})}))})),wpm.pageReady().then((function(){wpm.wpmDataLayerExists().then((function(){wpm.startIntersectionObserverToWatch(),wpm.startProductsMutationObserverToWatch()}))}))}},t={};function a(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,a),i.exports}a(534),wpm.jQueryExists().then((function(){a(299),a(69),a(12),a(787),a(207)}))})();
|
2 |
//# sourceMappingURL=wpm-public.p1.min.js.map
|
js/public/wpm-public.p1.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"file":"wpm-public.p1.min.js","mappings":"sBAOAA,OAAOC,UAAUC,GAAG,iBAAiB,WAAY,gBAEhC,QAAZ,EAAAC,oBAAA,mBAAcC,cAAd,mBAAsBC,gBAAtB,UAAgCC,UAAY,UAACH,oBAAD,iBAAC,EAAcC,cAAf,iBAAC,EAAsBC,gBAAvB,OAAC,EAAgCE,QAC5EC,IAAIC,SAAS,MAAO,iBAAiBD,IAAIE,uBAM/CV,OAAOC,UAAUC,GAAG,gBAAgB,SAAUS,EAAOC,GAEpD,IAAI,UACH,GAAI,UAACT,oBAAD,iBAAC,EAAcC,cAAf,iBAAC,EAAsBC,gBAAvB,QAAC,EAAgCE,OAAQ,OAE7C,IAAIM,E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A,EAAQ,IACRA,EAAQ,KAsBRA,EAAQ,S","sources":["webpack://WooCommerce-Pixel-Manager/./src/js/public/facebook/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/facebook/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/facebook/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/ads/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/ads/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/ads/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga3/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/ga4/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/analytics/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/base/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/optimize/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/optimize/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/google/optimize/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/hotjar/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/hotjar/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/hotjar/loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/cookie_consent.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/event_listeners.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/functions.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/functions_loader.js","webpack://WooCommerce-Pixel-Manager/./src/js/public/wpm/init.js","webpack://WooCommerce-Pixel-Manager/webpack/bootstrap","webpack://WooCommerce-Pixel-Manager/./src/js/public/main.js"],"sourcesContent":["/**\n * All event listeners\n *\n * https://developers.facebook.com/docs/meta-pixel/reference\n * */\n\n// Load pixel event\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.facebook?.pixel_id && !wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"facebook-ads\")) wpm.loadFacebookPixel()\n\t}\n})\n\n// AddToCart event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"AddToCart\", {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"AddToCart\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tproduct_data : product,\n\t\t\tproduct_id : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// InitiateCheckout event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmBeginCheckout\", function (event) {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"InitiateCheckout\", {}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"InitiateCheckout\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// AddToWishlist event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmAddToWishlist\", function (event, product) {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"AddToWishlist\", {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"AddToWishlist\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tproduct_data : product,\n\t\t\tproduct_id : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// ViewContent event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.fbViewContent(product)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view search event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"Search\", {}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"Search\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// load always event\njQuery(document).on(\"wpmLoadAlways\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.setFbUserData()\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view order received page event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Purchase\",\n\t\t\t{\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tcontent_ids : wpm.facebookContentIds(),\n\t\t\t},\n\t\t\t{eventID: wpmDataLayer.order.id},\n\t\t)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Add functions for Facebook\n * */\n\n(function (wpm, $, undefined) {\n\n\tlet fBUserData\n\n\twpm.loadFacebookPixel = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.facebook.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(f,b,e,v,n,t,s)\n\t\t\t{if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n\t\t\t\tn.callMethod.apply(n,arguments):n.queue.push(arguments)};\n\t\t\t\tif(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n\t\t\t\tn.queue=[];t=b.createElement(e);t.async=!0;\n\t\t\t\tt.src=v;s=b.getElementsByTagName(e)[0];\n\t\t\t\ts.parentNode.insertBefore(t,s)}(window, document,'script',\n\t\t\t\t'https://connect.facebook.net/en_US/fbevents.js');\n\t\t\t// @formatter:on\n\n\t\t\tfbq(\"init\", wpmDataLayer.pixels.facebook.pixel_id)\n\t\t\tfbq(\"track\", \"PageView\")\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\twpm.getFbUserData = () => {\n\n\t\t/**\n\t\t * We need the first one for InitiateCheckout\n\t\t * where getting the user_data from the browser is too slow\n\t\t * using wpm.getCookie(), so we cache the user_data earlier.\n\t\t * And we need the second one because the ViewContent hit happens too fast\n\t\t * after adding a variation to the cart because the function to cache\n\t\t * the user_data is too slow. But we can get the user_data using wpm.getCookie()\n\t\t * because we don't move away from the page and can wait for the browser\n\t\t * to get it.\n\t\t */\n\n\t\tif (fBUserData) {\n\t\t\treturn fBUserData\n\t\t} else {\n\t\t\treturn wpm.getFbUserDataFromBrowser()\n\t\t}\n\t}\n\n\twpm.setFbUserData = () => {\n\t\tfBUserData = wpm.getFbUserDataFromBrowser()\n\t}\n\n\twpm.getFbUserDataFromBrowser = () => {\n\n\t\tlet\n\t\t\tdata = {}\n\n\t\tif (wpm.getCookie(\"_fbp\")) {\n\t\t\tdata.fbp = wpm.getCookie(\"_fbp\")\n\t\t}\n\n\t\tif (wpm.getCookie(\"_fbc\")) {\n\t\t\tdata.fbp = wpm.getCookie(\"_fbc\")\n\t\t}\n\n\t\tif(wpmDataLayer?.user?.id){\n\t\t\tdata.external_id = wpmDataLayer.user.id\n\t\t}\n\n\t\tif (navigator.userAgent) {\n\t\t\tdata.client_user_agent = navigator.userAgent\n\t\t}\n\n\t\treturn data\n\t}\n\n\twpm.fbViewContent = product => {\n\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getRandomEventId()\n\n\t\t\tfbq(\"track\", \"ViewContent\", {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontent_name: product.name,\n\t\t\t\t// content_category: product.category,\n\t\t\t\tcontent_ids: product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\t\tvalue : product.price,\n\t\t\t}, {\n\t\t\t\teventID: eventId,\n\t\t\t})\n\n\t\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\n\t\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\t\tevent_name : \"ViewContent\",\n\t\t\t\tevent_id : eventId,\n\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\tproduct_data : product,\n\t\t\t\tproduct_id : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t\tevent_source_url: window.location.href,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.facebookContentIds = () => {\n\t\tlet prodIds = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t}\n\n\t\treturn prodIds\n\t}\n\n\twpm.trackCustomFacebookEvent = (eventName) => {\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getRandomEventId()\n\n\t\t\tfbq(\"trackCustom\", eventName, {}, {\n\t\t\t\teventID: eventId,\n\t\t\t})\n\n\t\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\t\tevent_name : eventName,\n\t\t\t\tevent_id : eventId,\n\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\tevent_source_url: window.location.href,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Facebook loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n\n","/**\n * Load Google Ads event listeners\n * */\n\n// view_item_list event\njQuery(document).on(\"wpmViewItemList\", function (event, product) {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tif (\n\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\tproduct.isVariable &&\n\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t) return\n\n\t\t// try to prevent that WC sends cached hits to Google\n\t\tif (!product) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item_list\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\titems : [{\n\t\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t\t}],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_cart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_cart\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\tvalue : product.quantity * product.price,\n\t\t\t\titems : [{\n\t\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t\t}],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\tvalue : (product.quantity ? product.quantity : 1) * product.price,\n\t\t\t\titems : [{\n\t\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\t\tquantity : (product.quantity ? product.quantity : 1),\n\t\t\t\t\tprice : product.price,\n\t\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t\t}],\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tlet products = []\n\n\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\n\t\t\tif (\n\t\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\t\tproduct.isVariable &&\n\t\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t\t) return\n\n\t\t\tproducts.push({\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t})\n\t\t}\n\n\t\t// console.log(products);\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_search_results\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\t// value : 1 * product.price,\n\t\t\t\titems: products,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\n// TODO distinguish with or without cart data active\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\titems : wpm.getGoogleAdsDynamicRemarketingOrderItems(),\n\t\t\t})\n\t\t})\n\n\t\t// console.log(wpm.getGoogleAdsDynamicRemarketingOrderItems())\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// user log in event\njQuery(document).on(\"wpmLogin\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"login\", {\n\t\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view order received page event\n// new_customer parameter: https://support.google.com/google-ads/answer/9917012\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif(jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data_basic = {}\n\t\tlet data_with_cart = {}\n\n\t\tdata_basic = {\n\t\t\tsend_to : wpm.getGoogleAdsConversionIdentifiersWithLabel(),\n\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tnew_customer : wpmDataLayer.order.new_customer,\n\t\t}\n\n\t\tif (wpmDataLayer?.order?.aw_merchant_id) {\n\t\t\tdata_with_cart = {\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\taw_merchant_id : wpmDataLayer.order.aw_merchant_id,\n\t\t\t\taw_feed_country : wpmDataLayer.order.aw_feed_country,\n\t\t\t\taw_feed_language: wpmDataLayer.order.aw_feed_language,\n\t\t\t\titems : wpm.getGoogleAdsRegularOrderItems(),\n\t\t\t}\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"conversion\", {...data_basic, ...data_with_cart})\n\t\t})\n\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n\n\n\n","/**\n * Load Google Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\tlet conversionIdentifiers = []\n\n\twpm.getGoogleAdsConversionIdentifiersWithLabel = function () {\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\tconversionIdentifiers.push(key + \"/\" + item)\n\t\t}\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsConversionIdentifiers = function () {\n\n\t\tlet conversionIdentifiers = []\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\tconversionIdentifiers.push(key)\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsRegularOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.getGoogleAdsDynamicRemarketingOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google Ads\n */\n\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Google Universal Analytics (GA3) event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.universal.property_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGAUAOrderItems(),\n\t\t\t})\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Add functions for Google Analytics Universal\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGAUAOrderItems = function () {\n\n\t\t// \"id\" : \"34\",\n\t\t// \"name\" : \"Hoodie\",\n\t\t// \"brand\" : \"\",\n\t\t// \"category\" : \"Hoodies\",\n\t\t// \"list_position\": 1,\n\t\t// \"price\" : 45,\n\t\t// \"quantity\" : 1,\n\t\t// \"variant\" : \"Color: blue | Logo: yes\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tname : item.name,\n\t\t\t\tcurrency: wpmDataLayer.order.currency,\n\t\t\t\tcategory: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItem = wpm.ga3AddListNameToProduct(orderItem)\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.ga3AddListNameToProduct = function (item_data, productPosition = null) {\n\n\t\t// if (wpm.ga3CanProductListBeSet(item_data.id)) {\n\t\t// \titem_data.listname = wpmDataLayer.shop.list_name\n\t\t//\n\t\t// \tif (productPosition) {\n\t\t// \t\titem_data.list_position = productPosition\n\t\t// \t}\n\t\t// }\n\n\t\titem_data.list_name = wpmDataLayer.shop.list_name\n\n\t\tif (productPosition) {\n\t\t\titem_data.list_position = productPosition\n\t\t}\n\n\t\treturn item_data\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Google Universal Analytics (GA3) loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load GA4 event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.ga4.measurement_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGA4OrderItems(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load GA4 functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGA4OrderItems = function () {\n\n\t\t// \"item_id\" : \"34\",\n\t\t// \"item_name\" : \"Hoodie\",\n\t\t// \"quantity\" : 1,\n\t\t// \"item_brand\" : \"\",\n\t\t// \"item_variant\" : \"Color: blue | Logo: yes\",\n\t\t// \"price\" : 45,\n\t\t// \"currency\" : \"CHF\",\n\t\t// \"item_category\": \"Hoodies\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\titem_name : item.name,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\titem_category: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * GA4 loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Google Analytics loader\n */\n\nrequire(\"./ga3/loader\")\nrequire(\"./ga4/loader\")\n","/**\n * Load Google base event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") {\n\t\tif (wpm.canGoogleLoad()) {\n\t\t\twpm.loadGoogle()\n\t\t} else {\n\t\t\twpm.logPreventedPixelLoading(\"google\", \"analytics / ads\")\n\t\t}\n\t}\n})\n","/**\n * Load Google base functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.googleConfigConditionsMet = function (type) {\n\n\t\t// always returns true if Google Consent Mode is active\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (wpm.getConsentValues().mode === \"category\") {\n\t\t\treturn wpm.getConsentValues().categories[type] === true\n\t\t} else if (wpm.getConsentValues().mode === \"pixel\") {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-\" + type)\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings = function (google_consent_settings) {\n\n\t\tif (wpm.getConsentValues().mode === \"category\") {\n\n\t\t\tif (wpm.getConsentValues().categories.analytics) google_consent_settings.analytics_storage = \"granted\"\n\t\t\tif (wpm.getConsentValues().categories.ads) google_consent_settings.ad_storage = \"granted\"\n\t\t} else if ((wpm.getConsentValues().mode === \"pixel\")) {\n\n\t\t\tgoogle_consent_settings.analytics_storage = wpm.getConsentValues().pixels.includes(\"google-analytics\") ? \"granted\" : \"denied\"\n\t\t\tgoogle_consent_settings.ad_storage = wpm.getConsentValues().pixels.includes(\"google-ads\") ? \"granted\" : \"denied\"\n\t\t}\n\n\t\treturn google_consent_settings\n\t}\n\n\twpm.updateGoogleConsentMode = function (analytics = true, ads = true) {\n\n\t\ttry {\n\t\t\tif (\n\t\t\t\t!window.gtag ||\n\t\t\t\t!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent\n\t\t\t) return\n\n\t\t\tgtag(\"consent\", \"update\", {\n\t\t\t\tanalytics_storage: analytics ? \"granted\" : \"denied\",\n\t\t\t\tad_storage : ads ? \"granted\" : \"denied\",\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAds = function () {\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.ads.state = \"loading\"\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.enhanced_conversions?.active) {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key, {\"allow_enhanced_conversions\": true})\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_label && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_number) {\n\t\t\t\tgtag(\"config\", Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0] + \"/\" + wpmDataLayer.pixels.google.ads.phone_conversion_label, {\n\t\t\t\t\tphone_conversion_number: wpmDataLayer.pixels.google.ads.phone_conversion_number,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// ! enhanced_conversion_data needs to set on the window object\n\t\t\t// https://support.google.com/google-ads/answer/9888145#zippy=%2Cvalidate-your-implementation-using-chrome-developer-tools\n\t\t\tif (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer?.order?.google?.ads?.enhanced_conversion_data) {\n\t\t\t\twindow.enhanced_conversion_data = wpmDataLayer.order.google.ads.enhanced_conversion_data\n\t\t\t}\n\n\t\t\twpmDataLayer.pixels.google.ads.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsUA = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"loading\"\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.universal.property_id, wpmDataLayer.pixels.google.analytics.universal.parameters)\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsGA4 = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"loading\"\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.ga4.measurement_id, wpmDataLayer.pixels.google.analytics.ga4.parameters)\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.isGoogleActive = function () {\n\n\t\tif (\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.universal?.property_id ||\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id ||\n\t\t\t!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)\n\t\t) {\n\t\t\treturn true\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getGoogleGtagId = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.universal.property_id\n\t\t} else if (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.ga4.measurement_id\n\t\t} else {\n\t\t\treturn Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]\n\t\t}\n\t}\n\n\twpm.loadGoogle = function () {\n\n\t\tif (wpm.isGoogleActive()) {\n\n\t\t\twpmDataLayer.pixels.google.state = \"loading\"\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googletagmanager.com/gtag/js?id=\" + wpm.getGoogleGtagId())\n\t\t\t\t.done(function (script, textStatus) {\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\t// Initiate Google dataLayer and gtag\n\t\t\t\t\t\twindow.dataLayer = window.dataLayer || []\n\t\t\t\t\t\twindow.gtag = function gtag() {\n\t\t\t\t\t\t\tdataLayer.push(arguments)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Consent Mode\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\n\t\t\t\t\t\t\tlet google_consent_settings = {\n\t\t\t\t\t\t\t\t\"ad_storage\" : wpmDataLayer.pixels.google.consent_mode.ad_storage,\n\t\t\t\t\t\t\t\t\"analytics_storage\": wpmDataLayer.pixels.google.consent_mode.analytics_storage,\n\t\t\t\t\t\t\t\t\"wait_for_update\" : wpmDataLayer.pixels.google.consent_mode.wait_for_update,\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.region) {\n\t\t\t\t\t\t\t\tgoogle_consent_settings.region = wpmDataLayer.pixels.google.consent_mode.region\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tgoogle_consent_settings = wpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings(google_consent_settings)\n\n\t\t\t\t\t\t\tgtag(\"consent\", \"default\", google_consent_settings)\n\t\t\t\t\t\t\tgtag(\"set\", \"ads_data_redaction\", wpmDataLayer.pixels.google.consent_mode.ads_data_redaction)\n\t\t\t\t\t\t\tgtag(\"set\", \"url_passthrough\", wpmDataLayer.pixels.google.consent_mode.url_passthrough)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Linker\n\t\t\t\t\t\t// https://developers.google.com/gtagjs/devguide/linker\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.linker?.settings) {\n\t\t\t\t\t\t\tgtag(\"set\", \"linker\", wpmDataLayer.pixels.google.linker.settings)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgtag(\"js\", new Date())\n\n\t\t\t\t\t\t// Google Ads loader\n\t\t\t\t\t\tif (!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) { // Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"ads\")) { \t\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAds()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-ads\", \"ads\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t// Google Universal Analytics loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) { \t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsUA()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-universal-analytics\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// GA4 loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) { \t\t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsGA4()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"ga4\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twpmDataLayer.pixels.google.state = \"ready\"\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.error(e)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\t}\n\n\twpm.canGoogleLoad = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (\"category\" === wpm.getConsentValues().mode) {\n\t\t\treturn !!(wpm.getConsentValues().categories[\"ads\"] || wpm.getConsentValues().categories[\"analytics\"])\n\t\t} else if (\"pixel\" === wpm.getConsentValues().mode) {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-ads\") || wpm.getConsentValues().pixels.includes(\"google-analytics\")\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid load condition for Google mode in wpmConsentValues\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.gtagLoaded = function () {\n\t\treturn new Promise(function (resolve, reject) {\n\n\t\t\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") reject()\n\n\t\t\tlet startTime = 0\n\t\t\tlet timeout = 5000\n\t\t\tlet frequency = 200;\n\n\t\t\t(function wait() {\n\t\t\t\tif (wpmDataLayer?.pixels?.google?.state === \"ready\") return resolve()\n\t\t\t\tif (startTime >= timeout) return reject()\n\t\t\t\tstartTime += frequency\n\t\t\t\tsetTimeout(wait, frequency)\n\t\t\t})()\n\t\t})\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Load Google base\n */\n\n// Load base\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load Google\n */\n\n// Load base\nrequire(\"./base/loader\")\n\n//Load additional Google libraries\nrequire(\"./ads/loader\")\nrequire(\"./analytics/loader\")\nrequire(\"./optimize/loader\")\n\n\n","/**\n * Load Google Optimize event listeners\n */\n\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.google?.optimize?.container_id && !wpmDataLayer?.pixels?.google?.optimize?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"google-optimize\")) wpm.load_google_optimize_pixel()\n\t}\n})\n","/**\n * Load Google Optimize functions\n */\n\n\n(function (wpm, $, undefined) {\n\n\twpm.load_google_optimize_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.optimize.loaded = true\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googleoptimize.com/optimize.js?id=\" + wpmDataLayer.pixels.google.optimize.container_id)\n\t\t\t// .done(function (script, textStatus) {\n\t\t\t// \t\tconsole.log('Google Optimize loaded')\n\t\t\t// });\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Load Google Optimize\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Hotjar event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.hotjar?.site_id && !wpmDataLayer?.pixels?.hotjar?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"hotjar\") && !wpmDataLayer?.pixels?.hotjar?.loaded) wpm.load_hotjar_pixel()\n\t}\n})\n","/**\n * Load Hotjar functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.load_hotjar_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.hotjar.loaded = true;\n\n\t\t\t// @formatter:off\n\t\t\t(function(h,o,t,j,a,r){\n\t\t\t\th.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\n\t\t\t\th._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6};\n\t\t\t\ta=o.getElementsByTagName('head')[0];\n\t\t\t\tr=o.createElement('script');r.async=1;\n\t\t\t\tr.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\n\t\t\t\ta.appendChild(r);\n\t\t\t})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');\n\t\t\t// @formatter:on\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Hotjar loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Consent Mode functions\n */\n\n(function (wpm, $, undefined) {\n\n\n\t/**\n\t * Handle Cookie Management Platforms\n\t */\n\n\tlet getComplianzCookies = () => {\n\n\t\tlet cmplz_statistics = wpm.getCookie(\"cmplz_statistics\")\n\t\tlet cmplz_marketing = wpm.getCookie(\"cmplz_marketing\")\n\t\tlet cmplz_consent_status = wpm.getCookie(\"cmplz_consent_status\") || wpm.getCookie(\"cmplz_banner-status\")\n\n\t\tif (cmplz_consent_status) {\n\t\t\treturn {\n\t\t\t\tanalytics : cmplz_statistics === \"allow\",\n\t\t\t\tads : cmplz_marketing === \"allow\",\n\t\t\t\tvisitorHasChosen: true,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tlet getCookieLawInfoCookies = () => {\n\n\t\tlet analyticsCookie = wpm.getCookie(\"cookielawinfo-checkbox-analytics\") || wpm.getCookie(\"cookielawinfo-checkbox-analytiques\")\n\t\tlet adsCookie = wpm.getCookie(\"cookielawinfo-checkbox-advertisement\") || wpm.getCookie(\"cookielawinfo-checkbox-performance\") || wpm.getCookie(\"cookielawinfo-checkbox-publicite\")\n\t\tlet visitorHasChosen = wpm.getCookie(\"CookieLawInfoConsent\")\n\n\t\tif (analyticsCookie || adsCookie) {\n\n\t\t\treturn {\n\t\t\t\tanalytics : analyticsCookie === \"yes\",\n\t\t\t\tads : adsCookie === \"yes\",\n\t\t\t\tvisitorHasChosen: !!visitorHasChosen,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\n\tlet\n\t\twpmConsentValues = {}\n\twpmConsentValues.categories = {}\n\twpmConsentValues.pixels = []\n\twpmConsentValues.mode = \"category\"\n\twpmConsentValues.visitorHasChosen = false\n\n\twpm.getConsentValues = () => wpmConsentValues\n\n\twpm.setConsentValueCategories = (analytics = false, ads = false) => {\n\t\twpmConsentValues.categories.analytics = analytics\n\t\twpmConsentValues.categories.ads = ads\n\t}\n\n\twpm.updateConsentCookieValues = (analytics = null, ads = null, explicitConsent = false) => {\n\n\t\t// ad_storage\n\t\t// analytics_storage\n\t\t// functionality_storage\n\t\t// personalization_storage\n\t\t// security_storage\n\n\t\tlet cookie\n\n\t\tif (analytics || ads) {\n\n\t\t\tif (analytics) {\n\t\t\t\twpmConsentValues.categories.analytics = !!analytics\n\t\t\t}\n\t\t\tif (ads) {\n\t\t\t\twpmConsentValues.categories.ads = !!ads\n\t\t\t}\n\n\t\t} else if (cookie = wpm.getCookie(\"CookieConsent\")) {\n\n\t\t\t// Cookiebot\n\t\t\t// https://wordpress.org/plugins/cookiebot/\n\t\t\tcookie = decodeURI(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.indexOf(\"statistics:true\") >= 0\n\t\t\twpmConsentValues.categories.ads = cookie.indexOf(\"marketing:true\") >= 0\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"CookieScriptConsent\")) {\n\n\t\t\t// Cookie Script\n\t\t\t// https://wordpress.org/plugins/cookie-script-com/\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\tif (cookie.action === \"reject\") {\n\t\t\t\twpmConsentValues.categories.analytics = false\n\t\t\t\twpmConsentValues.categories.ads = false\n\t\t\t} else if (cookie.categories.length === 2) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t} else {\n\t\t\t\twpmConsentValues.categories.analytics = cookie.categories.indexOf(\"performance\") >= 0\n\t\t\t\twpmConsentValues.categories.ads = cookie.categories.indexOf(\"targeting\") >= 0\n\t\t\t}\n\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"borlabs-cookie\")) {\n\n\t\t\t// Borlabs Cookie\n\t\t\t// https://borlabs.io/borlabs-cookie/\n\n\t\t\tcookie = decodeURI(cookie)\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie?.consents?.statistics\n\t\t\twpmConsentValues.categories.ads = !!cookie?.consents?.marketing\n\t\t\twpmConsentValues.visitorHasChosen = true\n\t\t\twpmConsentValues.pixels = [...cookie?.consents?.statistics || [], ...cookie?.consents?.marketing || []]\n\t\t\twpmConsentValues.mode = \"pixel\"\n\n\t\t} else if (cookie = getComplianzCookies()) {\n\n\t\t\t// Complianz Cookie\n\t\t\t// https://wordpress.org/plugins/complianz-gdpr/\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen\n\n\t\t} else if (cookie = wpm.getCookie(\"cookie_notice_accepted\")) {\n\n\t\t\t// Cookie Compliance (free version)\n\t\t\t// https://wordpress.org/plugins/cookie-notice/\n\n\t\t\twpmConsentValues.categories.analytics = true\n\t\t\twpmConsentValues.categories.ads = true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"hu-consent\")) {\n\n\t\t\t// Cookie Compliance (pro version)\n\t\t\t// https://wordpress.org/plugins/cookie-notice/\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie.categories[\"3\"]\n\t\t\twpmConsentValues.categories.ads = !!cookie.categories[\"4\"]\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = getCookieLawInfoCookies()) {\n\n\t\t\t// CookieYes, GDPR Cookie Consent (Cookie Law Info)\n\t\t\t// https://wordpress.org/plugins/cookie-law-info/\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen === true\n\n\t\t} else if (cookie = wpm.getCookie(\"moove_gdpr_popup\")) {\n\n\t\t\t// GDPR Cookie Compliance Plugin by Moove Agency\n\t\t\t// https://wordpress.org/plugins/gdpr-cookie-compliance/\n\t\t\t// TODO write documentation on how to set up the plugin in order for this to work properly\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.thirdparty === \"1\"\n\t\t\twpmConsentValues.categories.ads = cookie.advanced === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else {\n\t\t\t// consentValues.categories.analytics = true\n\t\t\t// consentValues.categories.ads = true\n\n\t\t\twpmConsentValues.categories.analytics = !explicitConsent\n\t\t\twpmConsentValues.categories.ads = !explicitConsent\n\t\t}\n\t}\n\n\twpm.updateConsentCookieValues()\n\n\twpm.setConsentDefaultValuesToExplicit = () => {\n\t\twpmConsentValues.categories = {\n\t\t\tanalytics: false,\n\t\t\tads : false,\n\t\t}\n\t}\n\n\twpm.canIFire = (category, pixelName) => {\n\n\t\tlet canIFireMode\n\n\t\tif (\"category\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = !!wpmConsentValues.categories[category]\n\t\t} else if (\"pixel\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(pixelName)\n\n\t\t\t// If a user sets \"bing-ads\" in Borlabs Cookie instead of\n\t\t\t// \"microsoft-ads\" in the Borlabs settings, we need to check\n\t\t\t// for that too.\n\t\t\tif (false === canIFireMode && \"microsoft-ads\" === pixelName) {\n\t\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(\"bing-ads\")\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid consent mode in wpmConsentValues\")\n\t\t\tcanIFireMode = false\n\t\t}\n\n\t\tif (canIFireMode) {\n\t\t\treturn true\n\t\t} else {\n\t\t\tif (true || wpm.urlHasParameter(\"debugConsentMode\")) {\n\t\t\t\twpm.logPreventedPixelLoading(pixelName, category)\n\t\t\t}\n\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.logPreventedPixelLoading = (pixelName, category) => {\n\n\t\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent) {\n\t\t\tconsole.log(\"WooCommerce Pixel Manager: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have not given consent for it yet. (WPM is in explicit consent mode.)\")\n\t\t} else {\n\t\t\tconsole.log(\"WooCommerce Pixel Manager: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have removed consent for this pixel. (WPM is in implicit consent mode.)\")\n\t\t}\n\t}\n\n\t/**\n\t * Runs through each script in <head> and blocks / unblocks it according to the plugin settings\n\t * and user consent.\n\t */\n\n\t// https://stackoverflow.com/q/65453565/4688612\n\twpm.scriptTagObserver = new MutationObserver((mutations) => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif ($(node).data(\"wpm-cookie-category\")) {\n\n\t\t\t\t\t\t// If the pixel category has been approved > unblock\n\t\t\t\t\t\t// If the pixel belongs to more than one category, then unblock if one of the categories has been approved\n\t\t\t\t\t\t// If no category has been approved, but the Google Consent Mode is active, then only unblock the Google scripts\n\n\t\t\t\t\t\tif (wpm.shouldScriptBeActive(node)) {\n\t\t\t\t\t\t\twpm.unblockScript(node)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twpm.blockScript(node)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\twpm.scriptTagObserver.observe(document.head, {childList: true, subtree: true})\n\tjQuery(document).on(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\n\twpm.shouldScriptBeActive = node => {\n\n\t\tif (\n\t\t\twpmDataLayer.shop.cookie_consent_mgmt.explicit_consent ||\n\t\t\twpmConsentValues.visitorHasChosen\n\t\t) {\n\n\t\t\tif (wpmConsentValues.mode === \"category\" && $(node).data(\"wpm-cookie-category\").split(\",\").some(element => wpmConsentValues.categories[element])) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && wpmConsentValues.pixels.includes($(node).data(\"wpm-pixel-name\"))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && $(node).data(\"wpm-pixel-name\") === \"google\" && [\"google-analytics\", \"google-ads\"].some(element => wpmConsentValues.pixels.includes(element))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmDataLayer?.pixels?.google?.consent_mode?.active && $(node).data(\"wpm-pixel-name\") === \"google\") {\n\t\t\t\treturn true\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\n\twpm.unblockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tlet wpmSrc = $(scriptNode).data(\"wpm-src\")\n\t\tif (wpmSrc) $(scriptNode).attr(\"src\", wpmSrc)\n\n\t\tscriptNode.type = \"text/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t}\n\n\twpm.blockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tif ($(scriptNode).attr(\"src\")) $(scriptNode).removeAttr(\"src\")\n\t\tscriptNode.type = \"blocked/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\t}\n\n\twpm.unblockAllScripts = (analytics = true, ads = true) => {\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t}\n\n\twpm.unblockSelectedPixels = () => {\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t}\n\n\n\t/**\n\t * Block or unblock scripts for each CMP immediately after cookie consent has been updated\n\t * by the visitor.\n\t */\n\n\t// Borlabs Cookie\n\t// If visitor accepts cookies in Borlabs Cookie unblock the scripts\n\tjQuery(document).on(\"borlabs-cookie-consent-saved\", () => {\n\n\t\twpm.updateConsentCookieValues()\n\n\t\tif (wpmConsentValues.mode === \"pixel\") {\n\n\t\t\twpm.unblockSelectedPixels()\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.pixels.includes(\"google-analytics\"), wpmConsentValues.pixels.includes(\"google-ads\"))\n\t\t} else {\n\n\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t}\n\t})\n\n\t// Cookiebot\n\t// If visitor accepts cookies in Cookiebot unblock the scripts\n\t// https://www.cookiebot.com/en/developer/\n\tjQuery(document).on(\"CookiebotOnAccept\", () => {\n\n\t\tif (Cookiebot.consent.statistics) wpmConsentValues.categories.analytics = true\n\t\tif (Cookiebot.consent.marketing) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\n\t}, false)\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/article/20-custom-events\n\t */\n\tjQuery(document).on(\"CookieScriptAccept\", e => {\n\n\t\tif (e.detail.categories.includes(\"performance\")) wpmConsentValues.categories.analytics = true\n\t\tif (e.detail.categories.includes(\"targeting\")) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/\n\t */\n\tjQuery(document).on(\"CookieScriptAcceptAll\", () => {\n\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t})\n\n\t/**\n\t * Complianz Cookie\n\t *\n\t * If visitor accepts cookies in Complianz unblock the scripts\n\t */\n\n\twpm.cmplzStatusChange = (cmplzConsentData) => {\n\n\t\tif (cmplzConsentData.detail.categories.includes(\"statistics\")) wpm.updateConsentCookieValues(true, null)\n\t\tif (cmplzConsentData.detail.categories.includes(\"marketing\")) wpm.updateConsentCookieValues(null, true)\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t}\n\n\tjQuery(document).on(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\tjQuery(document).on(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\n\n\t// Cookie Compliance by hu-manity.co (free and pro)\n\t// If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (free version)\n\t// https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\tjQuery(document).on(\"setCookieNotice\", () => {\n\n\t\twpm.updateConsentCookieValues()\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Compliance by hu-manity.co (free and pro)\n\t * If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (pro version)\n\t * https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\t * Because Cookie Notice has no documented API or event that is being triggered on consent save or update\n\t * we have to solve this by using a mutation observer.\n\t *\n\t * @type {MutationObserver}\n\t */\n\n\twpm.huObserver = new MutationObserver(mutations => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif (node.id === \"hu\") {\n\n\t\t\t\t\t\tjQuery(\".hu-cookies-save\").on(\"click\", function () {\n\t\t\t\t\t\t\twpm.updateConsentCookieValues()\n\t\t\t\t\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\tif (window.hu) {\n\t\twpm.huObserver.observe(document.documentElement || document.body, {childList: true, subtree: true})\n\t}\n\n\twpm.explicitConsentStateAlreadySet = () => {\n\n\t\tif (wpmConsentValues.explicitConsentStateAlreadySet) {\n\t\t\treturn true\n\t\t} else {\n\t\t\twpmConsentValues.explicitConsentStateAlreadySet = true\n\t\t}\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Register event listeners\n */\n\n// remove_from_cart event\n// jQuery('.remove_from_cart_button, .remove').on('click', function (e) {\njQuery(document).on(\"click\", \".remove_from_cart_button, .remove\", function () {\n\n\ttry {\n\n\t\tlet url = new URL(jQuery(this).attr(\"href\"))\n\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\t\twpm.removeProductFromCart(productId)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// add_to_cart event\n// jQuery('.add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .js-ajax-add-to-cart, .single_add_to_cart_button, .btn_color-2').on('click', function (e) {\njQuery(document).on(\"click\", \".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button\", function () {\n\n\ttry {\n\n\t\tif (wpmDataLayer.shop.page_type === \"product\") {\n\n\t\t\t// First process related and upsell products\n\t\t\tif (typeof jQuery(this).attr(\"href\") !== \"undefined\" && jQuery(this).attr(\"href\").includes(\"add-to-cart\")) {\n\n\t\t\t\tlet quantity = 1\n\t\t\t\tlet productId = jQuery(this).data(\"product_id\")\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t} else {\n\n\t\t\t\tif (wpmDataLayer.shop.product_type === \"simple\") {\n\n\t\t\t\t\tlet quantity = Number(jQuery(\".input-text.qty\").val())\n\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\tlet productId = jQuery(this).val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\n\t\t\t\t} else if (wpmDataLayer.shop.product_type === \"variable\") {\n\n\t\t\t\t\tlet quantity = Number(jQuery(\".input-text.qty\").val())\n\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\tlet productId = jQuery(\"[name='variation_id']\").val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\n\t\t\t\t} else if (wpmDataLayer.shop.product_type === \"grouped\") {\n\n\t\t\t\t\tjQuery(\".woocommerce-grouped-product-list-item\").each(function () {\n\n\t\t\t\t\t\tlet quantity = Number(jQuery(this).find(\".input-text.qty\").val())\n\n\t\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\t\tlet classes = jQuery(this).attr(\"class\")\n\t\t\t\t\t\tlet productId = wpm.getPostIdFromString(classes)\n\n\t\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t\t})\n\t\t\t\t} else if (wpmDataLayer.shop.product_type === \"bundle\") {\n\n\t\t\t\t\tlet quantity = Number(jQuery(\".input-text.qty\").val())\n\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\tlet productId = jQuery(\"input[name=add-to-cart]\").val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\n\t\t\tlet quantity = 1\n\t\t\tlet productId = jQuery(this).data(\"product_id\")\n\n\t\t\twpm.addProductToCart(productId, quantity)\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * If someone clicks anywhere on a custom /?add-to-cart=123 link\n * trigger the add to cart event\n */\n// jQuery('a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)').one('click', function (event) {\njQuery(document).one(\"click\", \"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\", function (event) {\n\n\ttry {\n\t\tif (jQuery(event.target).closest(\"a\").attr(\"href\")) {\n\n\t\t\tlet href = jQuery(event.target).closest(\"a\").attr(\"href\")\n\n\t\t\tif (href.includes(\"add-to-cart=\")) {\n\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) wpm.addProductToCart(matches[2], 1)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// select_content GA UA event\n// select_item GA 4 event\n// jQuery(document).on('click', '.woocommerce-LoopProduct-link, .wc-block-grid__product, .product-small.box', function (e) {\n// jQuery('.woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product').on('click', function (e) {\njQuery(document).on(\"click\", \".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\", function () {\n\n\ttry {\n\n\t\t/**\n\t\t * On some pages the event fires multiple times, and on product pages\n\t\t * even on page load. Using e.stopPropagation helps to prevent this,\n\t\t * but I don't know why. We don't even have to use this, since only a real\n\t\t * product click yields a valid productId. So we filter the invalid click\n\t\t * events out later down in the code. I'll keep it that way because this is\n\t\t * the most compatible way across shops.\n\t\t *\n\t\t * e.stopPropagation();\n\t\t * */\n\n\t\tlet productId = jQuery(this).nextAll(\".wpmProductId:first\").data(\"id\")\n\n\t\t/**\n\t\t * On product pages, for some reason, the click event is triggered on the main product on page load.\n\t\t * In that case no ID is found. But we can discard it, since we only want to trigger the event on\n\t\t * related products, which are found below.\n\t\t */\n\n\t\tif (productId) {\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmSelectContentGaUa\", product)\n\t\t\t\tjQuery(document).trigger(\"wpmSelectItem\", product)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// begin_checkout event\nlet checkoutButtonClasses = [\n\t\".checkout-button\",\n\t\".cart-checkout-button\",\n\t\".button.checkout\",\n\t\".xoo-wsc-ft-btn-checkout\", // https://xootix.com/side-cart-for-woocommerce/\n]\n\njQuery(document).one(\"click\", checkoutButtonClasses.join(\",\"), function () {\n\tjQuery(document).trigger(\"wpmBeginCheckout\")\n})\n\n\n// checkout_progress event\n// track checkout option event: entered valid billing email\njQuery(document).on(\"input\", \"#billing_email\", function () {\n\n\tif (wpm.isEmail(jQuery(this).val())) {\n\t\t// wpm.fireCheckoutOption(2);\n\t\twpm.fireCheckoutProgress(2)\n\t\twpm.emailSelected = true\n\t}\n})\n\n// track checkout option event: purchase click\njQuery(document).on(\"click\", \".wc_payment_methods\", function () {\n\n\tif (false === wpm.paymentMethodSelected) {\n\t\twpm.fireCheckoutProgress(3)\n\t}\n\n\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\twpm.paymentMethodSelected = true\n})\n\n// track checkout option event: purchase click\n// jQuery('#place_order').one('click', function () {\njQuery(document).one(\"click\", \"#place_order\", function () {\n\n\tif (false === wpm.emailSelected) {\n\t\twpm.fireCheckoutProgress(2)\n\t}\n\n\tif (false === wpm.paymentMethodSelected) {\n\t\twpm.fireCheckoutProgress(3)\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t}\n\n\twpm.fireCheckoutProgress(4)\n})\n\n// update cart event\n// jQuery(\"[name='update_cart']\").on('click', function (e) {\njQuery(document).on(\"click\", \"[name='update_cart']\", function () {\n\n\ttry {\n\t\tjQuery(\".cart_item\").each(function () {\n\n\t\t\tlet url = new URL(jQuery(this).find(\".product-remove\").find(\"a\").attr(\"href\"))\n\t\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\n\t\t\tlet quantity = jQuery(this).find(\".qty\").val()\n\n\t\t\tif (quantity === 0) {\n\t\t\t\twpm.removeProductFromCart(productId)\n\t\t\t} else if (quantity < wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.removeProductFromCart(productId, wpmDataLayer.cart[productId].quantity - quantity)\n\t\t\t} else if (quantity > wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.addProductToCart(productId, quantity - wpmDataLayer.cart[productId].quantity)\n\t\t\t}\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t\twpm.getCartItemsFromBackend()\n\t}\n})\n\n\n// add_to_wishlist\njQuery(document).on(\"click\", \".add_to_wishlist, .wl-add-to\", function () {\n\n\ttry {\n\n\t\tlet productId\n\n\t\tif (jQuery(this).data(\"productid\")) { // for the WooCommerce wishlist plugin\n\n\t\t\tproductId = jQuery(this).data(\"productid\")\n\t\t} else if (jQuery(this).data(\"product-id\")) { // for the YITH wishlist plugin\n\n\t\t\tproductId = jQuery(this).data(\"product-id\")\n\t\t}\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\tjQuery(document).trigger(\"wpmAddToWishlist\", product)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\njQuery(document).on(\"updated_cart_totals\", function () {\n\tjQuery(document).trigger(\"wpmViewCart\")\n})\n\n\n/**\n * Called when the user selects all the required dropdowns / attributes\n *\n * Has to be hooked after document ready !\n *\n * https://stackoverflow.com/a/27849208/4688612\n * https://stackoverflow.com/a/65065335/4688612\n */\n\njQuery(function () {\n\n\tjQuery(\".single_variation_wrap\").on(\"show_variation\", function (event, variation) {\n\n\t\ttry {\n\t\t\tlet productId = wpm.getIdBasedOndVariationsOutputSetting(variation.variation_id)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n\n/**\n * Called on variable products when no selection has been done yet\n * or when the visitor deselects his choice.\n *\n * Has to be hooked after document ready !\n */\n\njQuery(function () {\n\n\tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n\n\t\ttry {\n\t\t\tlet classes = jQuery(\"body\").attr(\"class\")\n\t\t\tlet productId = classes.match(/(postid-)(\\d+)/)[2]\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\t/**\n\t\t\t * If we have a variable product with no preset,\n\t\t\t * and variations output is enabled,\n\t\t\t * then we send a viewItem event with the first\n\t\t\t * variation we find for the parent.\n\t\t\t * If variations output is disabled,\n\t\t\t * we just send the parent ID.\n\t\t\t *\n\t\t\t * And if Facebook microdata is active, use the\n\t\t\t * microdata product ID.\n\t\t\t */\n\n\t\t\tif (\n\t\t\t\t\"variable\" === wpmDataLayer.shop.product_type &&\n\t\t\t\twpmDataLayer?.general?.variationsOutput\n\t\t\t) {\n\t\t\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\t\t\t\t\tif (\"parentId\" in product) {\n\n\t\t\t\t\t\tproductId = product.id\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\n\t\t\t\tif (wpmDataLayer?.pixels?.facebook?.microdata_product_id) {\n\t\t\t\t\tproductId = wpmDataLayer.pixels.facebook.microdata_product_id\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t}\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n\n/**\n * Set up wpm events\n */\n\n// populate the wpmDataLayer with the cart items\njQuery(window).on(\"wpmLoad\", function () {\n\n\ttry {\n\t\t// When a new session is initiated there are no items in the cart,\n\t\t// so we can save the call to get the cart items\n\t\tif (wpm.doesWooCommerceCartExist()) wpm.getCartItems()\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// get all add-to-cart= products from backend\njQuery(window).on(\"wpmLoad\", function () {\n\n\twpmDataLayer.products = wpmDataLayer.products || {}\n\n\t// scan page for add-to-cart= links\n\tlet productIds = wpm.getAddToCartLinkProductIds()\n\n\twpm.getProductsFromBackend(productIds)\n})\n\n/**\n * Save the referrer into a cookie\n */\n\njQuery(window).on(\"wpmLoad\", function () {\n\n\t// can't use session storage as we can't read it from the server\n\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\n\t\tif (document.referrer) {\n\t\t\tlet referrerUrl = new URL(document.referrer)\n\t\t\tlet referrerHostname = referrerUrl.hostname\n\n\t\t\tif (referrerHostname !== window.location.host) {\n\t\t\t\twpm.setCookie(\"wpmReferrer\", referrerHostname)\n\t\t\t}\n\t\t}\n\t}\n})\n\n\n/**\n * Create our own load event in order to better handle script flow execution when JS \"optimizers\" shuffle the code.\n */\n\njQuery(window).on(\"wpmLoad\", function () {\n\ttry {\n\t\tif (typeof wpmDataLayer != \"undefined\" && !wpmDataLayer?.wpmLoadFired) {\n\n\t\t\tjQuery(document).trigger(\"wpmLoadAlways\")\n\n\t\t\tif (\"product\" === wpmDataLayer.shop.page_type && \"variable\" !== wpmDataLayer.shop.product_type && wpm.getMainProductIdFromProductPage()) {\n\n\t\t\t\tlet product = wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage())\n\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\n\t\t\t} else if (\"product_category\" === wpmDataLayer.shop.page_type) {\n\n\t\t\t\tjQuery(document).trigger(\"wpmCategory\")\n\n\t\t\t} else if (\"search\" === wpmDataLayer.shop.page_type) {\n\n\t\t\t\tjQuery(document).trigger(\"wpmSearch\")\n\n\t\t\t} else if (\"cart\" === wpmDataLayer.shop.page_type) {\n\n\t\t\t\tjQuery(document).trigger(\"wpmViewCart\")\n\n\t\t\t} else if (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer.order) {\n\n\t\t\t\tif (!wpm.isOrderIdStored(wpmDataLayer.order.id)) {\n\n\t\t\t\t\tjQuery(document).trigger(\"wpmOrderReceivedPage\")\n\t\t\t\t\twpm.writeOrderIdToStorage(wpmDataLayer.order.id)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.user?.id && !wpm.hasLoginEventFired()) {\n\t\t\t\tjQuery(document).trigger(\"wpmLogin\")\n\t\t\t\twpm.setLoginEventFired()\n\t\t\t}\n\n\t\t\t// /**\n\t\t\t// * Load mini cart fragments into a wpm session storage key,\n\t\t\t// * after the document load event.\n\t\t\t// */\n\t\t\t// jQuery(document).ajaxSend(function (event, jqxhr, settings) {\n\t\t\t// \t// console.log('settings.url: ' + settings.url);\n\t\t\t//\n\t\t\t// \tif (settings.url.includes(\"get_refreshed_fragments\") && sessionStorage) {\n\t\t\t// \t\tif (!sessionStorage.getItem(\"wpmMiniCartActive\")) {\n\t\t\t// \t\t\tsessionStorage.setItem(\"wpmMiniCartActive\", JSON.stringify(true))\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// })\n\n\t\t\twpmDataLayer.wpmLoadFired = true\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n/**\n * Load all pixels\n */\njQuery(window).on(\"wpmPreLoadPixels\", function () {\n\n\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent && !wpm.explicitConsentStateAlreadySet()) {\n\t\twpm.updateConsentCookieValues(null, null,true)\n\t}\n\n\tjQuery(document).trigger(\"wpmLoadPixels\", {})\n})\n","/**\n * Create a wpm namespace under which all functions are declared\n */\n\n// https://stackoverflow.com/a/5947280/4688612\n\n(function (wpm, $, undefined) {\n\n\tconst wpmDeduper = {\n\t\tkeyName : \"_wpm_order_ids\",\n\t\tcookieExpiresDays: 365,\n\t}\n\n\tconst wpmRestSettings = {\n\t\t// cookiesAvailable : '_wpm_cookies_are_available',\n\t\tcookieWpmRestEndpointAvailable: \"_wpm_endpoint_available\",\n\t\trestEndpoint : \"/wp-json/\",\n\t\trestFails : 0,\n\t\trestFailsThreshold : 10,\n\t}\n\n\twpm.emailSelected = false\n\twpm.paymentMethodSelected = false\n\n\t// wpm.checkIfCookiesAvailable = function () {\n\t//\n\t// // read the cookie if previously set, if it is return true, otherwise continue\n\t// if (wpm.getCookie(wpmRestSettings.cookiesAvailable)) {\n\t// return true;\n\t// }\n\t//\n\t// // set the cookie for the session\n\t// Cookies.set(wpmRestSettings.cookiesAvailable, true);\n\t//\n\t// // read cookie, true if ok, false if not ok\n\t// return !!wpm.getCookie(wpmRestSettings.cookiesAvailable);\n\t// }\n\n\twpm.useRestEndpoint = () => {\n\n\t\t// only if sessionStorage is available\n\n\t\t// only if REST API endpoint is generally accessible\n\t\t// check in sessionStorage if we checked before and return answer\n\t\t// otherwise check if the endpoint is available, save answer in sessionStorage and return answer\n\n\t\t// only if not too many REST API errors happened\n\n\t\treturn wpm.isSessionStorageAvailable() &&\n\t\t\twpm.isRestEndpointAvailable() &&\n\t\t\twpm.isBelowRestErrorThreshold()\n\t}\n\n\twpm.isBelowRestErrorThreshold = () => window.sessionStorage.getItem(wpmRestSettings.restFails) <= wpmRestSettings.restFailsThreshold\n\n\twpm.isRestEndpointAvailable = () => {\n\n\t\tif (window.sessionStorage.getItem(wpmRestSettings.cookieWpmRestEndpointAvailable)) {\n\t\t\treturn JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookieWpmRestEndpointAvailable))\n\t\t} else {\n\t\t\t// return wpm.testEndpoint();\n\t\t\t// just set the value whenever possible in order not to wait or block the main thread\n\t\t\twpm.testEndpoint()\n\t\t}\n\t}\n\n\twpm.isSessionStorageAvailable = () => !!window.sessionStorage\n\n\twpm.testEndpoint = (\n\t\turl = location.protocol + \"//\" + location.host + wpmRestSettings.restEndpoint,\n\t\tcookieName = wpmRestSettings.cookieWpmRestEndpointAvailable,\n\t) => {\n\t\t// console.log('testing endpoint');\n\n\t\tjQuery.ajax(url, {\n\t\t\ttype : \"HEAD\",\n\t\t\ttimeout: 1000,\n\t\t\t// async: false,\n\t\t\tstatusCode: {\n\t\t\t\t200: function (response) {\n\t\t\t\t\t// Cookies.set(cookieName, true);\n\t\t\t\t\t// console.log('endpoint works');\n\t\t\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(true))\n\t\t\t\t},\n\t\t\t\t404: function (response) {\n\t\t\t\t\t// Cookies.set(cookieName, false);\n\t\t\t\t\t// console.log('endpoint doesn\\'t work');\n\t\t\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\t\t},\n\t\t\t\t0 : function (response) {\n\t\t\t\t\t// Cookies.set(cookieName, false);\n\t\t\t\t\t// console.log('endpoint doesn\\'t work');\n\t\t\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\t\t},\n\t\t\t},\n\t\t}).then(response => {\n\t\t\t// console.log('test done')\n\t\t\t// console.log('result: ' + JSON.parse(window.sessionStorage.getItem(cookieName)));\n\t\t\t// return JSON.parse(window.sessionStorage.getItem(cookieName));\n\t\t})\n\t}\n\n\twpm.isWpmRestEndpointAvailable = (cookieName = wpmRestSettings.cookieWpmRestEndpointAvailable) => !!wpm.getCookie(cookieName)\n\n\twpm.writeOrderIdToStorage = (orderId, expireDays = 365) => {\n\n\t\t// save the order ID in the browser storage\n\n\t\tif (!window.Storage) {\n\t\t\tlet expiresDate = new Date()\n\t\t\texpiresDate.setDate(expiresDate.getDate() + wpmDeduper.cookieExpiresDays)\n\n\t\t\tlet ids = []\n\t\t\tif (checkCookie()) {\n\t\t\t\tids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t}\n\n\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\tids.push(orderId)\n\t\t\t\tdocument.cookie = wpmDeduper.keyName + \"=\" + JSON.stringify(ids) + \";expires=\" + expiresDate.toUTCString()\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (localStorage.getItem(wpmDeduper.keyName) === null) {\n\t\t\t\tlet ids = []\n\t\t\t\tids.push(orderId)\n\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\n\t\t\t} else {\n\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\t\tids.push(orderId)\n\t\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (typeof wpm.storeOrderIdOnServer === \"function\" && wpmDataLayer.orderDeduplication) {\n\t\t\twpm.storeOrderIdOnServer(orderId)\n\t\t}\n\t}\n\n\tfunction checkCookie() {\n\t\tlet key = wpm.getCookie(wpmDeduper.keyName)\n\t\treturn key !== \"\"\n\t}\n\n\twpm.isOrderIdStored = orderId => {\n\n\t\tif (wpmDataLayer.orderDeduplication) {\n\n\t\t\tif (!window.Storage) {\n\n\t\t\t\tif (checkCookie()) {\n\t\t\t\t\tlet ids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (localStorage.getItem(wpmDeduper.keyName) !== null) {\n\t\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.log(\"order duplication prevention: off\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isEmail = email => {\n\n\t\t// https://emailregex.com/\n\n\t\tlet regex = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\n\n\t\treturn regex.test(email)\n\t}\n\n\twpm.removeProductFromCart = (productId, quantityToRemove = null) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tlet quantity\n\n\t\t\tif (quantityToRemove == null) {\n\t\t\t\tquantity = wpmDataLayer.cart[productId].quantity\n\t\t\t} else {\n\t\t\t\tquantity = quantityToRemove\n\t\t\t}\n\n\t\t\tif (wpmDataLayer.cart[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmRemoveFromCart\", product)\n\n\t\t\t\tif (quantityToRemove == null || wpmDataLayer.cart[productId].quantity === quantityToRemove) {\n\n\t\t\t\t\tdelete wpmDataLayer.cart[productId]\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t} else {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity - quantity\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\t// console.log('getting cart from back end');\n\t\t\t// wpm.getCartItemsFromBackend();\n\t\t\t// console.log('getting cart from back end done');\n\t\t}\n\t}\n\n\twpm.getIdBasedOndVariationsOutputSetting = productId => {\n\n\t\ttry {\n\t\t\tif (wpmDataLayer?.general?.variationsOutput) {\n\n\t\t\t\treturn productId\n\t\t\t} else {\n\t\t\t\tif (wpmDataLayer.products[productId].isVariation) {\n\n\t\t\t\t\treturn wpmDataLayer.products[productId].parentId\n\t\t\t\t} else {\n\n\t\t\t\t\treturn productId\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// add_to_cart\n\twpm.addProductToCart = (productId, quantity) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer?.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmAddToCart\", product)\n\n\t\t\t\t// add product to cart wpmDataLayer['cart']\n\n\t\t\t\t// if the product already exists in the object, only add the additional quantity\n\t\t\t\t// otherwise create that product object in the wpmDataLayer['cart']\n\t\t\t\tif (wpmDataLayer?.cart[productId]) {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity + quantity\n\t\t\t\t} else {\n\n\t\t\t\t\tif (!(\"cart\" in wpmDataLayer)) wpmDataLayer.cart = {}\n\n\t\t\t\t\twpmDataLayer.cart[productId] = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\t\t\t\t}\n\n\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\n\t\t\t// fallback if wpmDataLayer.cart and wpmDataLayer.products got out of sync in case cart caching has an issue\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\twpm.getCartItems = () => {\n\n\t\tif (sessionStorage) {\n\t\t\tif (!sessionStorage.getItem(\"wpmDataLayerCart\") || wpmDataLayer.shop.page_type === \"order_received_page\") {\n\t\t\t\tsessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify({}))\n\t\t\t} else {\n\t\t\t\twpm.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem(\"wpmDataLayerCart\")))\n\t\t\t}\n\t\t} else {\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\t// get all cart items from the backend\n\twpm.getCartItemsFromBackend = () => {\n\t\ttry {\n\t\t\tlet data = {\n\t\t\t\taction: \"wpm_get_cart_items\",\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"get\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (cartItems) {\n\n\t\t\t\t\t\t// save all cart items into wpmDataLayer\n\n\t\t\t\t\t\tif (!cartItems[\"cart\"]) cartItems[\"cart\"] = {}\n\n\t\t\t\t\t\twpm.saveCartObjectToDataLayer(cartItems[\"cart\"])\n\n\t\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(cartItems[\"cart\"]))\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// get productIds from the backend\n\twpm.getProductsFromBackend = productIds => {\n\n\n\t\t// reduce productIds by products already in the dataLayer\n\t\tproductIds = productIds.filter(item => !wpmDataLayer.products.hasOwnProperty(item))\n\n\t\t// if no products IDs are in the object, don't try to get anything from the server\n\t\tif (!productIds || productIds.length === 0) return\n\n\t\ttry {\n\t\t\tlet data = {\n\t\t\t\taction : \"wpm_get_product_ids\",\n\t\t\t\tproductIds: productIds,\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"get\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (products) {\n\n\t\t\t\t\t\t// merge products into wpmDataLayer.products\n\t\t\t\t\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, products)\n\t\t\t\t\t},\n\t\t\t\t\terror : function (response) {\n\t\t\t\t\t\tconsole.log(response)\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.saveCartObjectToDataLayer = cartObject => {\n\n\t\twpmDataLayer.cart = cartObject\n\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, cartObject)\n\t}\n\n\twpm.fireCheckoutOption = (step, checkout_option = null, value = null) => {\n\n\t\tlet data = {\n\t\t\tstep : step,\n\t\t\tcheckout_option: checkout_option,\n\t\t\tvalue : value,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutOption\", data)\n\t}\n\n\twpm.fireCheckoutProgress = step => {\n\n\t\tlet data = {\n\t\t\tstep: step,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutProgress\", data)\n\t}\n\n\twpm.getPostIdFromString = string => {\n\n\t\ttry {\n\t\t\treturn string.match(/(post-)(\\d+)/)[2]\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.triggerViewItemList = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tjQuery(document).trigger(\"wpmViewItemList\", wpm.getProductDataForViewItemEvent(productId))\n\t}\n\n\twpm.getProductDataForViewItemEvent = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\ttry {\n\t\t\tif (wpmDataLayer.products[productId]) {\n\n\t\t\t\treturn wpm.getProductDetailsFormattedForEvent(productId)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getMainProductIdFromProductPage = () => {\n\n\t\ttry {\n\t\t\tif ([\"simple\", \"variable\", \"grouped\", \"composite\", \"bundle\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\t\t\t\treturn jQuery(\".wpmProductId:first\").data(\"id\")\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.viewItemListTriggerTestMode = target => {\n\n\t\tjQuery(target).css({\"position\": \"relative\"})\n\t\tjQuery(target).append(\"<div id=\\\"viewItemListTriggerOverlay\\\"></div>\")\n\t\tjQuery(target).find(\"#viewItemListTriggerOverlay\").css({\n\t\t\t\"z-index\" : \"10\",\n\t\t\t\"display\" : \"block\",\n\t\t\t\"position\" : \"absolute\",\n\t\t\t\"height\" : \"100%\",\n\t\t\t\"top\" : \"0\",\n\t\t\t\"left\" : \"0\",\n\t\t\t\"right\" : \"0\",\n\t\t\t\"opacity\" : wpmDataLayer.viewItemListTrigger.opacity,\n\t\t\t\"background-color\": wpmDataLayer.viewItemListTrigger.backgroundColor,\n\t\t})\n\t}\n\n\twpm.getSearchTermFromUrl = () => {\n\n\t\ttry {\n\t\t\tlet urlParameters = new URLSearchParams(window.location.search)\n\t\t\treturn urlParameters.get(\"s\")\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// we need this to track timeouts for intersection observers\n\tlet ioTimeouts = {}\n\n\twpm.observerCallback = (entries, observer) => {\n\n\t\tentries.forEach((entry) => {\n\n\t\t\ttry {\n\t\t\t\tlet productId\n\n\t\t\t\tlet elementId = jQuery(entry.target).data(\"ioid\")\n\n\t\t\t\t// Get the productId from next element, if wpmProductId is a sibling, like in Gutenberg blocks\n\t\t\t\t// otherwise go search in children, like in regular WC loop items\n\t\t\t\tif (jQuery(entry.target).next(\".wpmProductId\").length) {\n\t\t\t\t\t// console.log('test 1');\n\t\t\t\t\tproductId = jQuery(entry.target).next(\".wpmProductId\").data(\"id\")\n\t\t\t\t} else {\n\t\t\t\t\tproductId = jQuery(entry.target).find(\".wpmProductId\").data(\"id\")\n\t\t\t\t}\n\n\n\t\t\t\tif (!productId) throw Error(\"wpmProductId element not found\")\n\n\t\t\t\tif (entry.isIntersecting) {\n\n\t\t\t\t\tioTimeouts[elementId] = setTimeout(() => {\n\n\t\t\t\t\t\twpm.triggerViewItemList(productId)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) wpm.viewItemListTriggerTestMode(entry.target)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.repeat === false) observer.unobserve(entry.target)\n\t\t\t\t\t}, wpmDataLayer.viewItemListTrigger.timeout)\n\n\t\t\t\t} else {\n\n\t\t\t\t\tclearTimeout(ioTimeouts[elementId])\n\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) jQuery(entry.target).find(\"#viewItemListTriggerOverlay\").remove()\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e)\n\t\t\t}\n\t\t})\n\t}\n\n\t// fire view_item_list only on products that have become visible\n\tlet io\n\tlet ioid = 0\n\tlet allIoElementsToWatch\n\n\tlet getAllElementsToWatch = () => {\n\n\t\tallIoElementsToWatch = jQuery(\".wpmProductId\")\n\t\t\t.map(function (i, elem) {\n\n\t\t\t\tif (\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"type-product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product-item-inner\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(elem).parent()\n\t\t\t\t} else if (\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"wc-block-grid__product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product-small\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"woocommerce-LoopProduct-link\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(this).prev()\n\t\t\t\t} else if (jQuery(elem).closest(\".product\").length) {\n\t\t\t\t\treturn jQuery(elem).closest(\".product\")\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\twpm.startIntersectionObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// enable view_item_list test mode from browser\n\t\t\tif (wpm.urlHasParameter(\"vildemomode\")) wpmDataLayer.viewItemListTrigger.testMode = true\n\n\t\t\t// set up intersection observer\n\t\t\tio = new IntersectionObserver(wpm.observerCallback, {\n\t\t\t\tthreshold: wpmDataLayer.viewItemListTrigger.threshold,\n\t\t\t})\n\n\t\t\tgetAllElementsToWatch()\n\n\t\t\tallIoElementsToWatch.each((i, elem) => {\n\n\t\t\t\tjQuery(elem[0]).data(\"ioid\", ioid++)\n\n\t\t\t\tio.observe(elem[0])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// watch DOM for new lazy loaded products and add them to the intersection observer\n\twpm.startProductsMutationObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// Pass in the target node, as well as the observer options\n\n\t\t\t// selects the most common parent node\n\t\t\t// https://stackoverflow.com/a/7648323/4688612\n\t\t\tlet productsNode = jQuery(\".wpmProductId:eq(0)\").parents().has(jQuery(\".wpmProductId:eq(1)\").parents()).first()\n\n\t\t\tif (productsNode.length) {\n\t\t\t\tproductsMutationObserver.observe(productsNode[0], {\n\t\t\t\t\tattributes : true,\n\t\t\t\t\tchildList : true,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t})\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// Create an observer instance\n\tlet productsMutationObserver = new MutationObserver(mutations => {\n\n\t\tmutations.forEach(mutation => {\n\t\t\tlet newNodes = mutation.addedNodes // DOM NodeList\n\t\t\tif (newNodes !== null) { // If there are new nodes added\n\t\t\t\tlet nodes = jQuery(newNodes) // jQuery set\n\t\t\t\tnodes.each(function () {\n\t\t\t\t\tif (\n\t\t\t\t\t\tjQuery(this).hasClass(\"type-product\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"product-small\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"wc-block-grid__product\")\n\t\t\t\t\t) {\n\t\t\t\t\t\t// check if the node has a child or sibling wpmProductId\n\t\t\t\t\t\t// if yes add it to the intersectionObserver\n\t\t\t\t\t\tif (hasWpmProductIdElement(this)) {\n\t\t\t\t\t\t\tjQuery(this).data(\"ioid\", ioid++)\n\t\t\t\t\t\t\tio.observe(this)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t})\n\n\tlet hasWpmProductIdElement = elem =>\n\t\t!!(jQuery(elem).find(\".wpmProductId\").length ||\n\t\tjQuery(elem).siblings(\".wpmProductId\").length)\n\n\twpm.setCookie = (cookieName, cookieValue = \"\", expiryDays = null) => {\n\n\t\tif (expiryDays) {\n\n\t\t\tlet d = new Date()\n\t\t\td.setTime(d.getTime() + (expiryDays * 24 * 60 * 60 * 1000))\n\t\t\tlet expires = \"expires=\" + d.toUTCString()\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";\" + expires + \";path=/\"\n\t\t} else {\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";path=/\"\n\t\t}\n\t}\n\n\twpm.getCookie = cookieName => {\n\n\t\tlet name = cookieName + \"=\"\n\t\tlet decodedCookie = decodeURIComponent(document.cookie)\n\t\tlet ca = decodedCookie.split(\";\")\n\n\t\tfor (let i = 0; i < ca.length; i++) {\n\n\t\t\tlet c = ca[i]\n\n\t\t\twhile (c.charAt(0) == \" \") {\n\t\t\t\tc = c.substring(1)\n\t\t\t}\n\n\t\t\tif (c.indexOf(name) == 0) {\n\t\t\t\treturn c.substring(name.length, c.length)\n\t\t\t}\n\t\t}\n\n\t\treturn \"\"\n\t}\n\n\twpm.getWpmSessionData = () => {\n\n\t\tif (window.sessionStorage) {\n\n\t\t\tlet data = window.sessionStorage.getItem(\"_wpm\")\n\n\t\t\tif (data !== null) {\n\t\t\t\treturn JSON.parse(data)\n\t\t\t} else {\n\t\t\t\treturn {}\n\t\t\t}\n\t\t} else {\n\t\t\treturn {}\n\t\t}\n\t}\n\n\twpm.setWpmSessionData = data => {\n\t\tif (window.sessionStorage) {\n\t\t\twindow.sessionStorage.setItem(\"_wpm\", JSON.stringify(data))\n\t\t}\n\t}\n\n\twpm.storeOrderIdOnServer = orderId => {\n\n\t\ttry {\n\t\t\t// save the state in the database\n\t\t\tlet data = {\n\t\t\t\taction : \"wpm_purchase_pixels_fired\",\n\t\t\t\torder_id: orderId,\n\t\t\t\t// nonce : ajax_object.nonce,\n\t\t\t\tnonce: wpm.nonce,\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"post\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (response) {\n\t\t\t\t\t\tif (response.success === false) {\n\t\t\t\t\t\t\tconsole.log(response)\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\terror : function (response) {\n\t\t\t\t\t\tconsole.log(response)\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getProductIdByCartItemKeyUrl = url => {\n\n\t\tlet searchParams = new URLSearchParams(url.search)\n\t\tlet cartItemKey = searchParams.get(\"remove_item\")\n\n\t\tlet productId\n\n\t\tif (wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"] === 0) {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"product_id\"]\n\t\t} else {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"]\n\t\t}\n\n\t\treturn productId\n\t}\n\n\twpm.getAddToCartLinkProductIds = () =>\n\t\tjQuery(\"a\").map(function () {\n\t\t\tlet href = jQuery(this).attr(\"href\")\n\n\t\t\tif (href && href.includes(\"?add-to-cart=\")) {\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) return matches[2]\n\t\t\t}\n\t\t}).get()\n\n\twpm.getProductDetailsFormattedForEvent = (productId, quantity = 1) => {\n\n\t\tlet product = {\n\t\t\tid : productId.toString(),\n\t\t\tdyn_r_ids : wpmDataLayer.products[productId].dyn_r_ids,\n\t\t\tname : wpmDataLayer.products[productId].name,\n\t\t\tlist_name : wpmDataLayer.shop.list_name,\n\t\t\tbrand : wpmDataLayer.products[productId].brand,\n\t\t\tcategory : wpmDataLayer.products[productId].category,\n\t\t\tvariant : wpmDataLayer.products[productId].variant,\n\t\t\tlist_position: wpmDataLayer.products[productId].position,\n\t\t\tquantity : quantity,\n\t\t\tprice : wpmDataLayer.products[productId].price,\n\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\tisVariable : wpmDataLayer.products[productId].isVariable,\n\t\t\tisVariation : wpmDataLayer.products[productId].isVariation,\n\t\t\tparentId : wpmDataLayer.products[productId].parentId,\n\t\t}\n\n\t\tif (product.isVariation) product[\"parentId_dyn_r_ids\"] = wpmDataLayer.products[productId].parentId_dyn_r_ids\n\n\t\treturn product\n\t}\n\n\twpm.setReferrerToCookie = () => {\n\n\t\t// can't use session storage as we can't read it from the server\n\t\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\t\t\twpm.setCookie(\"wpmReferrer\", document.referrer)\n\t\t}\n\t}\n\n\twpm.getReferrerFromCookie = () => {\n\n\t\tif (wpm.getCookie(\"wpmReferrer\")) {\n\t\t\treturn wpm.getCookie(\"wpmReferrer\")\n\t\t} else {\n\t\t\treturn null\n\t\t}\n\t}\n\n\twpm.getClidFromBrowser = (clidId = \"gclid\") => {\n\n\t\tlet clidCookieId\n\n\t\tclidCookieId = {\n\t\t\tgclid: \"_gcl_aw\",\n\t\t\tdclid: \"_gcl_dc\",\n\t\t}\n\n\t\tif (wpm.getCookie(clidCookieId[clidId])) {\n\n\t\t\tlet clidCookie = wpm.getCookie(clidCookieId[clidId])\n\t\t\tlet matches = clidCookie.match(/(GCL.[\\d]*.)(.*)/)\n\t\t\treturn matches[2]\n\t\t} else {\n\t\t\treturn \"\"\n\t\t}\n\t}\n\n\twpm.getUserAgent = () => navigator.userAgent\n\n\twpm.getViewPort = () => ({\n\t\twidth : Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0),\n\t\theight: Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0),\n\t})\n\n\n\twpm.version = () => {\n\t\tconsole.log(wpmDataLayer.version)\n\t}\n\n\t// https://api.jquery.com/jquery.getscript/\n\twpm.loadScriptAndCacheIt = (url, options) => {\n\n\t\t// Allow user to set any option except for dataType, cache, and url\n\t\toptions = jQuery.extend(options || {}, {\n\t\t\tdataType: \"script\",\n\t\t\tcache : true,\n\t\t\turl : url,\n\t\t})\n\n\t\t// Use $.ajax() since it is more flexible than $.getScript\n\t\t// Return the jqXHR object so we can chain callbacks\n\t\treturn jQuery.ajax(options)\n\t}\n\n\twpm.getOrderItemPrice = orderItem => (orderItem.total + orderItem.total_tax) / orderItem.quantity\n\n\twpm.hasLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\treturn data?.loginEventFired\n\t}\n\n\twpm.setLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\tdata[\"loginEventFired\"] = true\n\t\twpm.setWpmSessionData(data)\n\t}\n\n\twpm.wpmDataLayerExists = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (typeof wpmDataLayer !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.jQueryExists = () => new Promise(resolve => {\n\t\t(function waitForjQuery() {\n\t\t\tif (typeof jQuery !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForjQuery, 100)\n\t\t})()\n\t})\n\n\twpm.pageLoaded = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (\"complete\" === document.readyState) return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.pageReady = () => {\n\t\treturn new Promise(resolve => {\n\t\t\t(function waitForVar() {\n\t\t\t\tif (\"interactive\" === document.readyState || \"complete\" === document.readyState) return resolve()\n\t\t\t\tsetTimeout(waitForVar, 50)\n\t\t\t})()\n\t\t})\n\t}\n\n\twpm.isMiniCartActive = () => {\n\t\tif (window.sessionStorage) {\n\t\t\tfor (const [key, value] of Object.entries(window.sessionStorage)) {\n\t\t\t\tif (key.includes(\"wc_fragments\")) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.doesWooCommerceCartExist = () => document.cookie.includes(\"woocommerce_items_in_cart\")\n\n\twpm.urlHasParameter = parameter => {\n\t\tlet urlParams = new URLSearchParams(window.location.search)\n\t\treturn urlParams.has(parameter)\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load all WPM functions\n *\n * Ignore event listeners. They need to be loaded after\n * we made sure that jQuery has been loaded.\n */\n\nrequire(\"./functions\")\nrequire(\"./cookie_consent\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// #endif\n","/**\n * After WPM is loaded\n * we first check if wpmDataLayer is loaded,\n * and as soon as it is, we load the pixels,\n * and as soon as the page load is complete,\n * we fire the wpmLoad event.\n *\n * @param {{pro:bool}} wpmDataLayer.version\n *\n * https://stackoverflow.com/a/25868457/4688612\n * https://stackoverflow.com/a/44093516/4688612\n */\n\nwpm.wpmDataLayerExists()\n\t.then(function () {\n\t\tconsole.log(\"WooCommerce Pixel Manager: \" + (wpmDataLayer.version.pro ? \"Pro\" : \"Free\") +\" Version \" + wpmDataLayer.version.number + \" loaded\")\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t})\n\t.then(function () {\n\t\twpm.pageLoaded().then(function () {\n\t\t\tjQuery(document).trigger(\"wpmLoad\", {})\n\t\t})\n\t})\n\n\n\n/**\n * Run when page is ready\n *\n */\n\nwpm.pageReady().then(function () {\n\n\t/**\n\t * Run as soon as wpm namespace is loaded\n\t */\n\n\twpm.wpmDataLayerExists()\n\t\t.then(function () {\n\t\t\t// watch for products visible in viewport\n\t\t\twpm.startIntersectionObserverToWatch()\n\n\t\t\t// watch for lazy loaded products\n\t\t\twpm.startProductsMutationObserverToWatch()\n\t\t})\n})\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/**\n * Load all essential scripts first\n */\n\nrequire(\"./wpm/functions_loader\")\n\n// Only load the event listeners after jQuery has been loaded for sure\nwpm.jQueryExists().then(function () {\n\n\trequire(\"./wpm/event_listeners\")\n\n\trequire(\"./google/loader\")\n\trequire(\"./facebook/loader\")\n\trequire(\"./hotjar/loader\")\n\n\t/**\n\t * Load all premium scripts\n\t */\n\n\t// #if process.env.TIER === 'premium'\n// \trequire(\"./microsoft-ads/loader\")\n// \trequire(\"./pinterest/loader\")\n// \trequire(\"./snapchat/loader\")\n// \trequire(\"./tiktok/loader\")\n// \trequire(\"./twitter/loader\")\n\t// #endif\n\n\n\t/**\n\t * Initiate WPM.\n\t *\n\t * It makes sure that the script flow gets executed correctly,\n\t * no matter how JS \"optimizers\" shuffle the code.\n\t */\n\n\trequire(\"./wpm/init\")\n})\n\n"],"names":["jQuery","document","on","wpmDataLayer","pixels","facebook","pixel_id","loaded","wpm","canIFire","loadFacebookPixel","event","product","eventId","getRandomEventId","fbq","content_type","content_name","name","content_ids","dyn_r_ids","dynamic_remarketing","id_type","value","parseFloat","quantity","price","currency","eventID","shop","trigger","event_name","event_id","user_data","getFbUserData","product_data","product_id","event_source_url","window","location","href","e","console","error","fbViewContent","setFbUserData","order","value_filtered","facebookContentIds","id","$","undefined","fBUserData","f","b","n","callMethod","apply","arguments","queue","push","_fbq","version","t","createElement","async","src","s","getElementsByTagName","parentNode","insertBefore","Math","random","toString","substring","getFbUserDataFromBrowser","data","getCookie","fbp","user","external_id","navigator","userAgent","client_user_agent","prodIds","key","item","Object","entries","items","general","variationsOutput","variation_id","String","products","trackCustomFacebookEvent","eventName","require","isEmptyObject","google","ads","conversionIds","status","googleConfigConditionsMet","isVariable","send_events_with_parent_ids","gtagLoaded","then","gtag","send_to","getGoogleAdsConversionIdentifiers","google_business_vertical","getGoogleAdsDynamicRemarketingOrderItems","data_basic","data_with_cart","getGoogleAdsConversionIdentifiersWithLabel","transaction_id","number","new_customer","aw_merchant_id","discount","aw_feed_country","aw_feed_language","getGoogleAdsRegularOrderItems","conversionIdentifiers","orderItems","orderItem","analytics","universal","property_id","mp_active","affiliation","value_regular","tax","shipping","coupon","getGAUAOrderItems","category","join","variant","variant_name","brand","ga3AddListNameToProduct","item_data","productPosition","list_name","list_position","ga4","measurement_id","getGA4OrderItems","item_name","item_category","item_id","item_variant","item_brand","state","canGoogleLoad","loadGoogle","logPreventedPixelLoading","type","consent_mode","active","getConsentValues","mode","categories","includes","getVisitorConsentStatusAndUpdateGoogleConsentSettings","google_consent_settings","analytics_storage","ad_storage","updateGoogleConsentMode","cookie_consent_mgmt","explicit_consent","fireGtagGoogleAds","enhanced_conversions","phone_conversion_label","phone_conversion_number","keys","page_type","enhanced_conversion_data","fireGtagGoogleAnalyticsUA","parameters","fireGtagGoogleAnalyticsGA4","isGoogleActive","getGoogleGtagId","loadScriptAndCacheIt","done","script","textStatus","dataLayer","wait_for_update","region","ads_data_redaction","url_passthrough","linker","settings","Date","Promise","resolve","reject","startTime","wait","setTimeout","optimize","container_id","load_google_optimize_pixel","hotjar","site_id","load_hotjar_pixel","h","o","hj","q","_hjSettings","hjid","hjsv","a","r","appendChild","getComplianzCookies","cmplz_statistics","cmplz_marketing","visitorHasChosen","getCookieLawInfoCookies","analyticsCookie","adsCookie","wpmConsentValues","setConsentValueCategories","updateConsentCookieValues","cookie","explicitConsent","decodeURI","indexOf","JSON","parse","action","length","consents","statistics","marketing","thirdparty","advanced","setConsentDefaultValuesToExplicit","pixelName","canIFireMode","log","scriptTagObserver","MutationObserver","mutations","forEach","addedNodes","node","shouldScriptBeActive","unblockScript","blockScript","observe","head","childList","subtree","disconnect","split","some","element","scriptNode","removeAttach","remove","wpmSrc","attr","appendTo","removeAttr","unblockAllScripts","unblockSelectedPixels","Cookiebot","consent","detail","cmplzStatusChange","cmplzConsentData","huObserver","hu","documentElement","body","explicitConsentStateAlreadySet","url","URL","this","productId","getProductIdByCartItemKeyUrl","removeProductFromCart","addProductToCart","product_type","Number","val","each","find","classes","getPostIdFromString","one","target","closest","matches","match","nextAll","getIdBasedOndVariationsOutputSetting","Error","getProductDetailsFormattedForEvent","isEmail","fireCheckoutProgress","emailSelected","paymentMethodSelected","fireCheckoutOption","cart","getCartItemsFromBackend","variation","microdata_product_id","doesWooCommerceCartExist","getCartItems","productIds","getAddToCartLinkProductIds","getProductsFromBackend","referrer","referrerHostname","hostname","host","setCookie","wpmLoadFired","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","hasLoginEventFired","setLoginEventFired","wpmDeduper","wpmRestSettings","checkCookie","useRestEndpoint","isSessionStorageAvailable","isRestEndpointAvailable","isBelowRestErrorThreshold","sessionStorage","getItem","testEndpoint","protocol","cookieName","ajax","timeout","statusCode","response","setItem","stringify","isWpmRestEndpointAvailable","orderId","Storage","localStorage","ids","expiresDate","setDate","getDate","toUTCString","storeOrderIdOnServer","orderDeduplication","email","test","quantityToRemove","isVariation","parentId","saveCartObjectToDataLayer","dataType","ajax_url","success","cartItems","filter","hasOwnProperty","assign","cartObject","step","checkout_option","string","triggerViewItemList","viewItemListTriggerTestMode","css","append","viewItemListTrigger","opacity","backgroundColor","getSearchTermFromUrl","URLSearchParams","search","get","io","ioTimeouts","observerCallback","observer","entry","elementId","next","isIntersecting","testMode","repeat","unobserve","clearTimeout","allIoElementsToWatch","ioid","getAllElementsToWatch","map","i","elem","parent","hasClass","prev","startIntersectionObserverToWatch","urlHasParameter","IntersectionObserver","threshold","startProductsMutationObserverToWatch","productsNode","parents","has","first","productsMutationObserver","attributes","characterData","mutation","newNodes","hasWpmProductIdElement","siblings","cookieValue","expiryDays","d","setTime","getTime","expires","ca","decodeURIComponent","c","charAt","getWpmSessionData","setWpmSessionData","order_id","nonce","cartItemKey","cartItemKeys","position","parentId_dyn_r_ids","setReferrerToCookie","getReferrerFromCookie","getClidFromBrowser","clidCookieId","clidId","gclid","dclid","getUserAgent","getViewPort","width","max","clientWidth","innerWidth","height","clientHeight","innerHeight","options","extend","cache","getOrderItemPrice","total","total_tax","loginEventFired","wpmDataLayerExists","waitForVar","jQueryExists","waitForjQuery","pageLoaded","readyState","pageReady","isMiniCartActive","parameter","pro","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__"],"sourceRoot":""}
|
1 |
+
{"version":3,"file":"wpm-public.p1.min.js","mappings":"sBAOAA,OAAOC,UAAUC,GAAG,iBAAiB,WAAY,gBAEhC,QAAZ,EAAAC,oBAAA,mBAAcC,cAAd,mBAAsBC,gBAAtB,UAAgCC,UAAY,UAAC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AIse,iBAAmB,KACtB,GAAIxc,OAAOkU,eAAgB,CAC1B,IAAK,MAAO/P,EAAKlF,KAAUoF,OAAOC,QAAQtE,OAAOkU,gBAChD,GAAI/P,EAAImF,SAAS,gBAChB,OAAO,EAGT,OAAO,EAEP,OAAO,GAITpL,EAAIwU,yBAA2B,IAAM/U,SAAS2P,OAAOhE,SAAS,6BAE9DpL,EAAIua,gBAAkBgE,GACL,IAAIzF,gBAAgBhX,OAAOC,SAASgX,QACnC8B,IAAI0D,GAv2BtB,CA02BCzc,OAAO9B,IAAM8B,OAAO9B,KAAO,GAAIR,S,cCz2BjCsH,EAAQ,KACRA,EAAQ,M,SCKR9G,IAAI+d,qBACFpW,MAAK,WACLrG,QAAQC,IAAI,mCAAqC5B,aAAa8D,QAAQ+a,IAAM,MAAQ,QAAS,YAAc7e,aAAa8D,QAAQyE,OAAS,WACzI1I,OAAOC,UAAU+B,QAAQ,mBAAoB,OAE7CmG,MAAK,WACL3H,IAAIme,aAAaxW,MAAK,WACrBnI,OAAOC,UAAU+B,QAAQ,UAAW,UAWvCxB,IAAIqe,YAAY1W,MAAK,WAMpB3H,IAAI+d,qBACFpW,MAAK,WAEL3H,IAAIsa,mCAGJta,IAAI0a,+CC1CH+D,EAA2B,GAG/B,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqB7b,IAAjB8b,EACH,OAAOA,EAAaC,QAGrB,IAAIC,EAASL,EAAyBE,GAAY,CAGjDE,QAAS,IAOV,OAHAE,EAAoBJ,GAAUG,EAAQA,EAAOD,QAASH,GAG/CI,EAAOD,QCjBf/X,EAAQ,KAGR9G,IAAIie,eAAetW,MAAK,WAEvBb,EAAQ,KAERA,EAAQ,IACRA,EAAQ,IACRA,EAAQ,KAsBRA,EAAQ,S","sources":["webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/cookie_consent.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/functions_loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/init.js","webpack://Pixel-Manager-for-WooCommerce/webpack/bootstrap","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/main.js"],"sourcesContent":["/**\n * All event listeners\n *\n * https://developers.facebook.com/docs/meta-pixel/reference\n * */\n\n// Load pixel event\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.facebook?.pixel_id && !wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"facebook-ads\")) wpm.loadFacebookPixel()\n\t}\n})\n\n// AddToCart event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"AddToCart\", {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\n\t\tconsole.log(product)\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"AddToCart\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// InitiateCheckout event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmBeginCheckout\", function (event) {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"InitiateCheckout\", {}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"InitiateCheckout\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// AddToWishlist event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmAddToWishlist\", function (event, product) {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"AddToWishlist\", {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"AddToWishlist\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// ViewContent event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.fbViewContent(product)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view search event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tlet eventId = wpm.getRandomEventId()\n\n\t\tfbq(\"track\", \"Search\", {}, {\n\t\t\teventID: eventId,\n\t\t})\n\n\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\tevent_name : \"Search\",\n\t\t\tevent_id : eventId,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {\n\t\t\t\tsearch_string: wpm.getSearchTermFromUrl(),\n\t\t\t},\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// load always event\njQuery(document).on(\"wpmLoadAlways\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.setFbUserData()\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view order received page event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Purchase\",\n\t\t\t{\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tcontent_ids : wpm.facebookContentIds(),\n\t\t\t},\n\t\t\t{eventID : wpmDataLayer.order.id},\n\t\t)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Add functions for Facebook\n * */\n\n(function (wpm, $, undefined) {\n\n\tlet fBUserData\n\n\twpm.loadFacebookPixel = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.facebook.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(f,b,e,v,n,t,s)\n\t\t\t{if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n\t\t\t\tn.callMethod.apply(n,arguments):n.queue.push(arguments)};\n\t\t\t\tif(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n\t\t\t\tn.queue=[];t=b.createElement(e);t.async=!0;\n\t\t\t\tt.src=v;s=b.getElementsByTagName(e)[0];\n\t\t\t\ts.parentNode.insertBefore(t,s)}(window, document,'script',\n\t\t\t\t'https://connect.facebook.net/en_US/fbevents.js');\n\t\t\t// @formatter:on\n\n\t\t\t// https://developers.facebook.com/docs/meta-pixel/advanced/advanced-matching\n\n\t\t\tlet data = {}\n\t\t\tif (wpmDataLayer?.user?.id) data.external_id = wpmDataLayer.user.id\n\t\t\tif (wpmDataLayer?.order?.user_id) data.external_id = wpmDataLayer.order.user_id\n\t\t\tif (wpmDataLayer?.order?.billing_email_hashed) data.em = wpmDataLayer.order.billing_email_hashed\n\t\t\tif (wpmDataLayer?.order?.billing_first_name) data.fn = wpmDataLayer.order.billing_first_name\n\t\t\tif (wpmDataLayer?.order?.billing_last_name) data.ln = wpmDataLayer.order.billing_last_name\n\t\t\tif (wpmDataLayer?.order?.billing_phone) data.ph = wpmDataLayer.order.billing_phone\n\t\t\tif (wpmDataLayer?.order?.billing_city) data.ct = wpmDataLayer.order.billing_city\n\t\t\tif (wpmDataLayer?.order?.billing_state) data.st = wpmDataLayer.order.billing_state\n\t\t\tif (wpmDataLayer?.order?.billing_postcode) data.zp = wpmDataLayer.order.billing_postcode\n\t\t\tif (wpmDataLayer?.order?.billing_country) data.country = wpmDataLayer.order.billing_country\n\n\t\t\tfbq(\"init\", wpmDataLayer.pixels.facebook.pixel_id, data)\n\t\t\tfbq(\"track\", \"PageView\")\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\twpm.getFbUserData = () => {\n\n\t\t/**\n\t\t * We need the first one for InitiateCheckout\n\t\t * where getting the user_data from the browser is too slow\n\t\t * using wpm.getCookie(), so we cache the user_data earlier.\n\t\t * And we need the second one because the ViewContent hit happens too fast\n\t\t * after adding a variation to the cart because the function to cache\n\t\t * the user_data is too slow. But we can get the user_data using wpm.getCookie()\n\t\t * because we don't move away from the page and can wait for the browser\n\t\t * to get it.\n\t\t */\n\n\t\tif (fBUserData) {\n\t\t\treturn fBUserData\n\t\t} else {\n\t\t\treturn wpm.getFbUserDataFromBrowser()\n\t\t}\n\t}\n\n\twpm.setFbUserData = () => {\n\t\tfBUserData = wpm.getFbUserDataFromBrowser()\n\t}\n\n\twpm.getFbUserDataFromBrowser = () => {\n\n\t\tlet\n\t\t\tdata = {}\n\n\t\tif (wpm.getCookie(\"_fbp\")) {\n\t\t\tdata.fbp = wpm.getCookie(\"_fbp\")\n\t\t}\n\n\t\tif (wpm.getCookie(\"_fbc\")) {\n\t\t\tdata.fbp = wpm.getCookie(\"_fbc\")\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.external_id = wpmDataLayer.user.id\n\t\t}\n\n\t\tif (navigator.userAgent) {\n\t\t\tdata.client_user_agent = navigator.userAgent\n\t\t}\n\n\t\treturn data\n\t}\n\n\twpm.fbViewContent = product => {\n\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getRandomEventId()\n\n\t\t\tfbq(\"track\", \"ViewContent\", {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontent_name: product.name,\n\t\t\t\t// content_category: product.category,\n\t\t\t\tcontent_ids: product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\t\tvalue : product.price,\n\t\t\t}, {\n\t\t\t\teventID: eventId,\n\t\t\t})\n\n\t\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\n\t\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\t\tevent_name : \"ViewContent\",\n\t\t\t\tevent_id : eventId,\n\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\tevent_source_url: window.location.href,\n\t\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fbGetProductDataForCapiEvent = product => {\n\t\treturn {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_ids : [\n\t\t\t\tproduct.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t],\n\t\t\tvalue : product.quantity * product.price,\n\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t}\n\t}\n\n\twpm.facebookContentIds = () => {\n\t\tlet prodIds = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t}\n\n\t\treturn prodIds\n\t}\n\n\twpm.trackCustomFacebookEvent = (eventName, customData = {}) => {\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getRandomEventId()\n\n\t\t\tfbq(\"trackCustom\", eventName, customData, {\n\t\t\t\teventID: eventId,\n\t\t\t})\n\n\t\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\t\tevent_name : eventName,\n\t\t\t\tevent_id : eventId,\n\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\tevent_source_url: window.location.href,\n\t\t\t\tcustom_data : customData,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Facebook loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n\n","/**\n * Load Google Ads event listeners\n * */\n\n// view_item_list event\njQuery(document).on(\"wpmViewItemList\", function (event, product) {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tif (\n\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\tproduct.isVariable &&\n\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t) return\n\n\t\t// try to prevent that WC sends cached hits to Google\n\t\tif (!product) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\titems : [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}],\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item_list\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_cart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : product.quantity * product.price,\n\t\t\titems : [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tquantity : product.quantity,\n\t\t\t\tprice : product.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}],\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_cart\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\njQuery(document).on(\"wpmViewItem\", function (event, product) {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : (product.quantity ? product.quantity : 1) * product.price,\n\t\t\titems : [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tquantity : (product.quantity ? product.quantity : 1),\n\t\t\t\tprice : product.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}],\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tlet products = []\n\n\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\n\t\t\tif (\n\t\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\t\tproduct.isVariable &&\n\t\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t\t) return\n\n\t\t\tproducts.push({\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t})\n\t\t}\n\n\t\t// console.log(products);\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t// value : 1 * product.price,\n\t\t\titems: products,\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_search_results\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\n// TODO distinguish with or without cart data active\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\titems : wpm.getGoogleAdsDynamicRemarketingOrderItems(),\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", data)\n\t\t})\n\n\t\t// console.log(wpm.getGoogleAdsDynamicRemarketingOrderItems())\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// user log in event\njQuery(document).on(\"wpmLogin\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"login\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// conversion event\n// new_customer parameter: https://support.google.com/google-ads/answer/9917012\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data_basic = {}\n\t\tlet data_with_cart = {}\n\n\t\tdata_basic = {\n\t\t\tsend_to : wpm.getGoogleAdsConversionIdentifiersWithLabel(),\n\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tnew_customer : wpmDataLayer.order.new_customer,\n\t\t}\n\n\t\tif (wpmDataLayer?.order?.clv_order_value_filtered) {\n\t\t\tdata_basic.customer_lifetime_value = wpmDataLayer.order.clv_order_value_filtered\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata_basic.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\tif (wpmDataLayer?.order?.aw_merchant_id) {\n\t\t\tdata_with_cart = {\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\taw_merchant_id : wpmDataLayer.order.aw_merchant_id,\n\t\t\t\taw_feed_country : wpmDataLayer.order.aw_feed_country,\n\t\t\t\taw_feed_language: wpmDataLayer.order.aw_feed_language,\n\t\t\t\titems : wpm.getGoogleAdsRegularOrderItems(),\n\t\t\t}\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"conversion\", {...data_basic, ...data_with_cart})\n\t\t})\n\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load Google Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\tlet conversionIdentifiers = []\n\n\twpm.getGoogleAdsConversionIdentifiersWithLabel = function () {\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\tconversionIdentifiers.push(key + \"/\" + item)\n\t\t}\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsConversionIdentifiers = function () {\n\n\t\tlet conversionIdentifiers = []\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\tconversionIdentifiers.push(key)\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsRegularOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.getGoogleAdsDynamicRemarketingOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google Ads\n */\n\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Google Universal Analytics (GA3) event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.universal.property_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGAUAOrderItems(),\n\t\t\t})\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Add functions for Google Analytics Universal\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGAUAOrderItems = function () {\n\n\t\t// \"id\" : \"34\",\n\t\t// \"name\" : \"Hoodie\",\n\t\t// \"brand\" : \"\",\n\t\t// \"category\" : \"Hoodies\",\n\t\t// \"list_position\": 1,\n\t\t// \"price\" : 45,\n\t\t// \"quantity\" : 1,\n\t\t// \"variant\" : \"Color: blue | Logo: yes\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tname : item.name,\n\t\t\t\tcurrency: wpmDataLayer.order.currency,\n\t\t\t\tcategory: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItem = wpm.ga3AddListNameToProduct(orderItem)\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.ga3AddListNameToProduct = function (item_data, productPosition = null) {\n\n\t\t// if (wpm.ga3CanProductListBeSet(item_data.id)) {\n\t\t// \titem_data.listname = wpmDataLayer.shop.list_name\n\t\t//\n\t\t// \tif (productPosition) {\n\t\t// \t\titem_data.list_position = productPosition\n\t\t// \t}\n\t\t// }\n\n\t\titem_data.list_name = wpmDataLayer.shop.list_name\n\n\t\tif (productPosition) {\n\t\t\titem_data.list_position = productPosition\n\t\t}\n\n\t\treturn item_data\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Google Universal Analytics (GA3) loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load GA4 event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.ga4.measurement_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGA4OrderItems(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load GA4 functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGA4OrderItems = function () {\n\n\t\t// \"item_id\" : \"34\",\n\t\t// \"item_name\" : \"Hoodie\",\n\t\t// \"quantity\" : 1,\n\t\t// \"item_brand\" : \"\",\n\t\t// \"item_variant\" : \"Color: blue | Logo: yes\",\n\t\t// \"price\" : 45,\n\t\t// \"currency\" : \"CHF\",\n\t\t// \"item_category\": \"Hoodies\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\titem_name : item.name,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\titem_category: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * GA4 loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Google Analytics loader\n */\n\nrequire(\"./ga3/loader\")\nrequire(\"./ga4/loader\")\n","/**\n * Load Google base event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") {\n\t\tif (wpm.canGoogleLoad()) {\n\t\t\twpm.loadGoogle()\n\t\t} else {\n\t\t\twpm.logPreventedPixelLoading(\"google\", \"analytics / ads\")\n\t\t}\n\t}\n})\n","/**\n * Load Google base functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.googleConfigConditionsMet = function (type) {\n\n\t\t// always returns true if Google Consent Mode is active\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (wpm.getConsentValues().mode === \"category\") {\n\t\t\treturn wpm.getConsentValues().categories[type] === true\n\t\t} else if (wpm.getConsentValues().mode === \"pixel\") {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-\" + type)\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings = function (google_consent_settings) {\n\n\t\tif (wpm.getConsentValues().mode === \"category\") {\n\n\t\t\tif (wpm.getConsentValues().categories.analytics) google_consent_settings.analytics_storage = \"granted\"\n\t\t\tif (wpm.getConsentValues().categories.ads) google_consent_settings.ad_storage = \"granted\"\n\t\t} else if ((wpm.getConsentValues().mode === \"pixel\")) {\n\n\t\t\tgoogle_consent_settings.analytics_storage = wpm.getConsentValues().pixels.includes(\"google-analytics\") ? \"granted\" : \"denied\"\n\t\t\tgoogle_consent_settings.ad_storage = wpm.getConsentValues().pixels.includes(\"google-ads\") ? \"granted\" : \"denied\"\n\t\t}\n\n\t\treturn google_consent_settings\n\t}\n\n\twpm.updateGoogleConsentMode = function (analytics = true, ads = true) {\n\n\t\ttry {\n\t\t\tif (\n\t\t\t\t!window.gtag ||\n\t\t\t\t!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent\n\t\t\t) return\n\n\t\t\tgtag(\"consent\", \"update\", {\n\t\t\t\tanalytics_storage: analytics ? \"granted\" : \"denied\",\n\t\t\t\tad_storage : ads ? \"granted\" : \"denied\",\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAds = function () {\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.ads.state = \"loading\"\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.enhanced_conversions?.active) {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key, {\"allow_enhanced_conversions\": true})\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_label && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_number) {\n\t\t\t\tgtag(\"config\", Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0] + \"/\" + wpmDataLayer.pixels.google.ads.phone_conversion_label, {\n\t\t\t\t\tphone_conversion_number: wpmDataLayer.pixels.google.ads.phone_conversion_number,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// ! enhanced_conversion_data needs to set on the window object\n\t\t\t// https://support.google.com/google-ads/answer/9888145#zippy=%2Cvalidate-your-implementation-using-chrome-developer-tools\n\t\t\tif (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer?.order?.google?.ads?.enhanced_conversion_data) {\n\t\t\t\twindow.enhanced_conversion_data = wpmDataLayer.order.google.ads.enhanced_conversion_data\n\t\t\t}\n\n\t\t\twpmDataLayer.pixels.google.ads.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsUA = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"loading\"\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.universal.property_id, wpmDataLayer.pixels.google.analytics.universal.parameters)\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsGA4 = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"loading\"\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.ga4.measurement_id, wpmDataLayer.pixels.google.analytics.ga4.parameters)\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.isGoogleActive = function () {\n\n\t\tif (\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.universal?.property_id ||\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id ||\n\t\t\t!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)\n\t\t) {\n\t\t\treturn true\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getGoogleGtagId = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.universal.property_id\n\t\t} else if (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.ga4.measurement_id\n\t\t} else {\n\t\t\treturn Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]\n\t\t}\n\t}\n\n\twpm.loadGoogle = function () {\n\n\t\tif (wpm.isGoogleActive()) {\n\n\t\t\twpmDataLayer.pixels.google.state = \"loading\"\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googletagmanager.com/gtag/js?id=\" + wpm.getGoogleGtagId())\n\t\t\t\t.done(function (script, textStatus) {\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\t// Initiate Google dataLayer and gtag\n\t\t\t\t\t\twindow.dataLayer = window.dataLayer || []\n\t\t\t\t\t\twindow.gtag = function gtag() {\n\t\t\t\t\t\t\tdataLayer.push(arguments)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Consent Mode\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\n\t\t\t\t\t\t\tlet google_consent_settings = {\n\t\t\t\t\t\t\t\t\"ad_storage\" : wpmDataLayer.pixels.google.consent_mode.ad_storage,\n\t\t\t\t\t\t\t\t\"analytics_storage\": wpmDataLayer.pixels.google.consent_mode.analytics_storage,\n\t\t\t\t\t\t\t\t\"wait_for_update\" : wpmDataLayer.pixels.google.consent_mode.wait_for_update,\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.region) {\n\t\t\t\t\t\t\t\tgoogle_consent_settings.region = wpmDataLayer.pixels.google.consent_mode.region\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tgoogle_consent_settings = wpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings(google_consent_settings)\n\n\t\t\t\t\t\t\tgtag(\"consent\", \"default\", google_consent_settings)\n\t\t\t\t\t\t\tgtag(\"set\", \"ads_data_redaction\", wpmDataLayer.pixels.google.consent_mode.ads_data_redaction)\n\t\t\t\t\t\t\tgtag(\"set\", \"url_passthrough\", wpmDataLayer.pixels.google.consent_mode.url_passthrough)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Linker\n\t\t\t\t\t\t// https://developers.google.com/gtagjs/devguide/linker\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.linker?.settings) {\n\t\t\t\t\t\t\tgtag(\"set\", \"linker\", wpmDataLayer.pixels.google.linker.settings)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgtag(\"js\", new Date())\n\n\t\t\t\t\t\t// Google Ads loader\n\t\t\t\t\t\tif (!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) { // Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"ads\")) { \t\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAds()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-ads\", \"ads\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t// Google Universal Analytics loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) { \t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsUA()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-universal-analytics\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// GA4 loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) { \t\t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsGA4()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"ga4\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twpmDataLayer.pixels.google.state = \"ready\"\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.error(e)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\t}\n\n\twpm.canGoogleLoad = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (\"category\" === wpm.getConsentValues().mode) {\n\t\t\treturn !!(wpm.getConsentValues().categories[\"ads\"] || wpm.getConsentValues().categories[\"analytics\"])\n\t\t} else if (\"pixel\" === wpm.getConsentValues().mode) {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-ads\") || wpm.getConsentValues().pixels.includes(\"google-analytics\")\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid load condition for Google mode in wpmConsentValues\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.gtagLoaded = function () {\n\t\treturn new Promise(function (resolve, reject) {\n\n\t\t\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") reject()\n\n\t\t\tlet startTime = 0\n\t\t\tlet timeout = 5000\n\t\t\tlet frequency = 200;\n\n\t\t\t(function wait() {\n\t\t\t\tif (wpmDataLayer?.pixels?.google?.state === \"ready\") return resolve()\n\t\t\t\tif (startTime >= timeout) return reject()\n\t\t\t\tstartTime += frequency\n\t\t\t\tsetTimeout(wait, frequency)\n\t\t\t})()\n\t\t})\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Load Google base\n */\n\n// Load base\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load Google\n */\n\n// Load base\nrequire(\"./base/loader\")\n\n//Load additional Google libraries\nrequire(\"./ads/loader\")\nrequire(\"./analytics/loader\")\nrequire(\"./optimize/loader\")\n\n\n","/**\n * Load Google Optimize event listeners\n */\n\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.google?.optimize?.container_id && !wpmDataLayer?.pixels?.google?.optimize?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"google-optimize\")) wpm.load_google_optimize_pixel()\n\t}\n})\n","/**\n * Load Google Optimize functions\n */\n\n\n(function (wpm, $, undefined) {\n\n\twpm.load_google_optimize_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.optimize.loaded = true\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googleoptimize.com/optimize.js?id=\" + wpmDataLayer.pixels.google.optimize.container_id)\n\t\t\t// .done(function (script, textStatus) {\n\t\t\t// \t\tconsole.log('Google Optimize loaded')\n\t\t\t// });\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Load Google Optimize\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Hotjar event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.hotjar?.site_id && !wpmDataLayer?.pixels?.hotjar?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"hotjar\") && !wpmDataLayer?.pixels?.hotjar?.loaded) wpm.load_hotjar_pixel()\n\t}\n})\n","/**\n * Load Hotjar functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.load_hotjar_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.hotjar.loaded = true;\n\n\t\t\t// @formatter:off\n\t\t\t(function(h,o,t,j,a,r){\n\t\t\t\th.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\n\t\t\t\th._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6};\n\t\t\t\ta=o.getElementsByTagName('head')[0];\n\t\t\t\tr=o.createElement('script');r.async=1;\n\t\t\t\tr.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\n\t\t\t\ta.appendChild(r);\n\t\t\t})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');\n\t\t\t// @formatter:on\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Hotjar loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Consent Mode functions\n */\n\n(function (wpm, $, undefined) {\n\n\n\t/**\n\t * Handle Cookie Management Platforms\n\t */\n\n\tlet getComplianzCookies = () => {\n\n\t\tlet cmplz_statistics = wpm.getCookie(\"cmplz_statistics\")\n\t\tlet cmplz_marketing = wpm.getCookie(\"cmplz_marketing\")\n\t\tlet cmplz_consent_status = wpm.getCookie(\"cmplz_consent_status\") || wpm.getCookie(\"cmplz_banner-status\")\n\n\t\tif (cmplz_consent_status) {\n\t\t\treturn {\n\t\t\t\tanalytics : cmplz_statistics === \"allow\",\n\t\t\t\tads : cmplz_marketing === \"allow\",\n\t\t\t\tvisitorHasChosen: true,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tlet getCookieLawInfoCookies = () => {\n\n\t\tlet analyticsCookie = wpm.getCookie(\"cookielawinfo-checkbox-analytics\") || wpm.getCookie(\"cookielawinfo-checkbox-analytiques\")\n\t\tlet adsCookie = wpm.getCookie(\"cookielawinfo-checkbox-advertisement\") || wpm.getCookie(\"cookielawinfo-checkbox-performance\") || wpm.getCookie(\"cookielawinfo-checkbox-publicite\")\n\t\tlet visitorHasChosen = wpm.getCookie(\"CookieLawInfoConsent\")\n\n\t\tif (analyticsCookie || adsCookie) {\n\n\t\t\treturn {\n\t\t\t\tanalytics : analyticsCookie === \"yes\",\n\t\t\t\tads : adsCookie === \"yes\",\n\t\t\t\tvisitorHasChosen: !!visitorHasChosen,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\n\tlet\n\t\twpmConsentValues = {}\n\twpmConsentValues.categories = {}\n\twpmConsentValues.pixels = []\n\twpmConsentValues.mode = \"category\"\n\twpmConsentValues.visitorHasChosen = false\n\n\twpm.getConsentValues = () => wpmConsentValues\n\n\twpm.setConsentValueCategories = (analytics = false, ads = false) => {\n\t\twpmConsentValues.categories.analytics = analytics\n\t\twpmConsentValues.categories.ads = ads\n\t}\n\n\twpm.updateConsentCookieValues = (analytics = null, ads = null, explicitConsent = false) => {\n\n\t\t// ad_storage\n\t\t// analytics_storage\n\t\t// functionality_storage\n\t\t// personalization_storage\n\t\t// security_storage\n\n\t\tlet cookie\n\n\t\tif (analytics || ads) {\n\n\t\t\tif (analytics) {\n\t\t\t\twpmConsentValues.categories.analytics = !!analytics\n\t\t\t}\n\t\t\tif (ads) {\n\t\t\t\twpmConsentValues.categories.ads = !!ads\n\t\t\t}\n\n\t\t} else if (cookie = wpm.getCookie(\"CookieConsent\")) {\n\n\t\t\t// Cookiebot\n\t\t\t// https://wordpress.org/plugins/cookiebot/\n\t\t\tcookie = decodeURI(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.indexOf(\"statistics:true\") >= 0\n\t\t\twpmConsentValues.categories.ads = cookie.indexOf(\"marketing:true\") >= 0\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"CookieScriptConsent\")) {\n\n\t\t\t// Cookie Script\n\t\t\t// https://wordpress.org/plugins/cookie-script-com/\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\tif (cookie.action === \"reject\") {\n\t\t\t\twpmConsentValues.categories.analytics = false\n\t\t\t\twpmConsentValues.categories.ads = false\n\t\t\t} else if (cookie.categories.length === 2) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t} else {\n\t\t\t\twpmConsentValues.categories.analytics = cookie.categories.indexOf(\"performance\") >= 0\n\t\t\t\twpmConsentValues.categories.ads = cookie.categories.indexOf(\"targeting\") >= 0\n\t\t\t}\n\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"borlabs-cookie\")) {\n\n\t\t\t// Borlabs Cookie\n\t\t\t// https://borlabs.io/borlabs-cookie/\n\n\t\t\tcookie = decodeURI(cookie)\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie?.consents?.statistics\n\t\t\twpmConsentValues.categories.ads = !!cookie?.consents?.marketing\n\t\t\twpmConsentValues.visitorHasChosen = true\n\t\t\twpmConsentValues.pixels = [...cookie?.consents?.statistics || [], ...cookie?.consents?.marketing || []]\n\t\t\twpmConsentValues.mode = \"pixel\"\n\n\t\t} else if (cookie = getComplianzCookies()) {\n\n\t\t\t// Complianz Cookie\n\t\t\t// https://wordpress.org/plugins/complianz-gdpr/\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen\n\n\t\t} else if (cookie = wpm.getCookie(\"cookie_notice_accepted\")) {\n\n\t\t\t// Cookie Compliance (free version)\n\t\t\t// https://wordpress.org/plugins/cookie-notice/\n\n\t\t\twpmConsentValues.categories.analytics = true\n\t\t\twpmConsentValues.categories.ads = true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = wpm.getCookie(\"hu-consent\")) {\n\n\t\t\t// Cookie Compliance (pro version)\n\t\t\t// https://wordpress.org/plugins/cookie-notice/\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie.categories[\"3\"]\n\t\t\twpmConsentValues.categories.ads = !!cookie.categories[\"4\"]\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else if (cookie = getCookieLawInfoCookies()) {\n\n\t\t\t// CookieYes, GDPR Cookie Consent (Cookie Law Info)\n\t\t\t// https://wordpress.org/plugins/cookie-law-info/\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen === true\n\n\t\t} else if (cookie = wpm.getCookie(\"moove_gdpr_popup\")) {\n\n\t\t\t// GDPR Cookie Compliance Plugin by Moove Agency\n\t\t\t// https://wordpress.org/plugins/gdpr-cookie-compliance/\n\t\t\t// TODO write documentation on how to set up the plugin in order for this to work properly\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.thirdparty === \"1\"\n\t\t\twpmConsentValues.categories.ads = cookie.advanced === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t} else {\n\t\t\t// consentValues.categories.analytics = true\n\t\t\t// consentValues.categories.ads = true\n\n\t\t\twpmConsentValues.categories.analytics = !explicitConsent\n\t\t\twpmConsentValues.categories.ads = !explicitConsent\n\t\t}\n\t}\n\n\twpm.updateConsentCookieValues()\n\n\twpm.setConsentDefaultValuesToExplicit = () => {\n\t\twpmConsentValues.categories = {\n\t\t\tanalytics: false,\n\t\t\tads : false,\n\t\t}\n\t}\n\n\twpm.canIFire = (category, pixelName) => {\n\n\t\tlet canIFireMode\n\n\t\tif (\"category\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = !!wpmConsentValues.categories[category]\n\t\t} else if (\"pixel\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(pixelName)\n\n\t\t\t// If a user sets \"bing-ads\" in Borlabs Cookie instead of\n\t\t\t// \"microsoft-ads\" in the Borlabs settings, we need to check\n\t\t\t// for that too.\n\t\t\tif (false === canIFireMode && \"microsoft-ads\" === pixelName) {\n\t\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(\"bing-ads\")\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid consent mode in wpmConsentValues\")\n\t\t\tcanIFireMode = false\n\t\t}\n\n\t\tif (canIFireMode) {\n\t\t\treturn true\n\t\t} else {\n\t\t\tif (true || wpm.urlHasParameter(\"debugConsentMode\")) {\n\t\t\t\twpm.logPreventedPixelLoading(pixelName, category)\n\t\t\t}\n\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.logPreventedPixelLoading = (pixelName, category) => {\n\n\t\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent) {\n\t\t\tconsole.log(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have not given consent for it yet. (WPM is in explicit consent mode.)\")\n\t\t} else {\n\t\t\tconsole.log(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have removed consent for this pixel. (WPM is in implicit consent mode.)\")\n\t\t}\n\t}\n\n\t/**\n\t * Runs through each script in <head> and blocks / unblocks it according to the plugin settings\n\t * and user consent.\n\t */\n\n\t// https://stackoverflow.com/q/65453565/4688612\n\twpm.scriptTagObserver = new MutationObserver((mutations) => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif ($(node).data(\"wpm-cookie-category\")) {\n\n\t\t\t\t\t\t// If the pixel category has been approved > unblock\n\t\t\t\t\t\t// If the pixel belongs to more than one category, then unblock if one of the categories has been approved\n\t\t\t\t\t\t// If no category has been approved, but the Google Consent Mode is active, then only unblock the Google scripts\n\n\t\t\t\t\t\tif (wpm.shouldScriptBeActive(node)) {\n\t\t\t\t\t\t\twpm.unblockScript(node)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twpm.blockScript(node)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\twpm.scriptTagObserver.observe(document.head, {childList: true, subtree: true})\n\tjQuery(document).on(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\n\twpm.shouldScriptBeActive = node => {\n\n\t\tif (\n\t\t\twpmDataLayer.shop.cookie_consent_mgmt.explicit_consent ||\n\t\t\twpmConsentValues.visitorHasChosen\n\t\t) {\n\n\t\t\tif (wpmConsentValues.mode === \"category\" && $(node).data(\"wpm-cookie-category\").split(\",\").some(element => wpmConsentValues.categories[element])) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && wpmConsentValues.pixels.includes($(node).data(\"wpm-pixel-name\"))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && $(node).data(\"wpm-pixel-name\") === \"google\" && [\"google-analytics\", \"google-ads\"].some(element => wpmConsentValues.pixels.includes(element))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmDataLayer?.pixels?.google?.consent_mode?.active && $(node).data(\"wpm-pixel-name\") === \"google\") {\n\t\t\t\treturn true\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\n\twpm.unblockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tlet wpmSrc = $(scriptNode).data(\"wpm-src\")\n\t\tif (wpmSrc) $(scriptNode).attr(\"src\", wpmSrc)\n\n\t\tscriptNode.type = \"text/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t}\n\n\twpm.blockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tif ($(scriptNode).attr(\"src\")) $(scriptNode).removeAttr(\"src\")\n\t\tscriptNode.type = \"blocked/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\t}\n\n\twpm.unblockAllScripts = (analytics = true, ads = true) => {\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t}\n\n\twpm.unblockSelectedPixels = () => {\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t}\n\n\n\t/**\n\t * Block or unblock scripts for each CMP immediately after cookie consent has been updated\n\t * by the visitor.\n\t */\n\n\t// Borlabs Cookie\n\t// If visitor accepts cookies in Borlabs Cookie unblock the scripts\n\tjQuery(document).on(\"borlabs-cookie-consent-saved\", () => {\n\n\t\twpm.updateConsentCookieValues()\n\n\t\tif (wpmConsentValues.mode === \"pixel\") {\n\n\t\t\twpm.unblockSelectedPixels()\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.pixels.includes(\"google-analytics\"), wpmConsentValues.pixels.includes(\"google-ads\"))\n\t\t} else {\n\n\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t}\n\t})\n\n\t// Cookiebot\n\t// If visitor accepts cookies in Cookiebot unblock the scripts\n\t// https://www.cookiebot.com/en/developer/\n\tjQuery(document).on(\"CookiebotOnAccept\", () => {\n\n\t\tif (Cookiebot.consent.statistics) wpmConsentValues.categories.analytics = true\n\t\tif (Cookiebot.consent.marketing) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\n\t}, false)\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/article/20-custom-events\n\t */\n\tjQuery(document).on(\"CookieScriptAccept\", e => {\n\n\t\tif (e.detail.categories.includes(\"performance\")) wpmConsentValues.categories.analytics = true\n\t\tif (e.detail.categories.includes(\"targeting\")) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/\n\t */\n\tjQuery(document).on(\"CookieScriptAcceptAll\", () => {\n\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t})\n\n\t/**\n\t * Complianz Cookie\n\t *\n\t * If visitor accepts cookies in Complianz unblock the scripts\n\t */\n\n\twpm.cmplzStatusChange = (cmplzConsentData) => {\n\n\t\tif (cmplzConsentData.detail.categories.includes(\"statistics\")) wpm.updateConsentCookieValues(true, null)\n\t\tif (cmplzConsentData.detail.categories.includes(\"marketing\")) wpm.updateConsentCookieValues(null, true)\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t}\n\n\tjQuery(document).on(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\tjQuery(document).on(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\n\n\t// Cookie Compliance by hu-manity.co (free and pro)\n\t// If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (free version)\n\t// https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\tjQuery(document).on(\"setCookieNotice\", () => {\n\n\t\twpm.updateConsentCookieValues()\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Compliance by hu-manity.co (free and pro)\n\t * If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (pro version)\n\t * https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\t * Because Cookie Notice has no documented API or event that is being triggered on consent save or update\n\t * we have to solve this by using a mutation observer.\n\t *\n\t * @type {MutationObserver}\n\t */\n\n\twpm.huObserver = new MutationObserver(mutations => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif (node.id === \"hu\") {\n\n\t\t\t\t\t\tjQuery(\".hu-cookies-save\").on(\"click\", function () {\n\t\t\t\t\t\t\twpm.updateConsentCookieValues()\n\t\t\t\t\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\tif (window.hu) {\n\t\twpm.huObserver.observe(document.documentElement || document.body, {childList: true, subtree: true})\n\t}\n\n\twpm.explicitConsentStateAlreadySet = () => {\n\n\t\tif (wpmConsentValues.explicitConsentStateAlreadySet) {\n\t\t\treturn true\n\t\t} else {\n\t\t\twpmConsentValues.explicitConsentStateAlreadySet = true\n\t\t}\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Register event listeners\n */\n\n// remove_from_cart event\n// jQuery('.remove_from_cart_button, .remove').on('click', function (e) {\njQuery(document).on(\"click\", \".remove_from_cart_button, .remove\", function () {\n\n\ttry {\n\n\t\tlet url = new URL(jQuery(this).attr(\"href\"))\n\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\t\twpm.removeProductFromCart(productId)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// add_to_cart event\n// jQuery('.add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .js-ajax-add-to-cart, .single_add_to_cart_button, .btn_color-2').on('click', function (e) {\njQuery(document).on(\"click\", \".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button\", function () {\n\n\ttry {\n\n\t\tif (wpmDataLayer.shop.page_type === \"product\") {\n\n\t\t\t// First process related and upsell products\n\t\t\tif (typeof jQuery(this).attr(\"href\") !== \"undefined\" && jQuery(this).attr(\"href\").includes(\"add-to-cart\")) {\n\n\t\t\t\tlet quantity = 1\n\t\t\t\tlet productId = jQuery(this).data(\"product_id\")\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t} else {\n\n\t\t\t\tif (wpmDataLayer.shop.product_type === \"simple\") {\n\n\t\t\t\t\tlet quantity = Number(jQuery(\".input-text.qty\").val())\n\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\tlet productId = jQuery(this).val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\n\t\t\t\t} else if (wpmDataLayer.shop.product_type === \"variable\") {\n\n\t\t\t\t\tlet quantity = Number(jQuery(\".input-text.qty\").val())\n\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\tlet productId = jQuery(\"[name='variation_id']\").val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\n\t\t\t\t} else if (wpmDataLayer.shop.product_type === \"grouped\") {\n\n\t\t\t\t\tjQuery(\".woocommerce-grouped-product-list-item\").each(function () {\n\n\t\t\t\t\t\tlet quantity = Number(jQuery(this).find(\".input-text.qty\").val())\n\n\t\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\t\tlet classes = jQuery(this).attr(\"class\")\n\t\t\t\t\t\tlet productId = wpm.getPostIdFromString(classes)\n\n\t\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t\t})\n\t\t\t\t} else if (wpmDataLayer.shop.product_type === \"bundle\") {\n\n\t\t\t\t\tlet quantity = Number(jQuery(\".input-text.qty\").val())\n\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\n\t\t\t\t\tlet productId = jQuery(\"input[name=add-to-cart]\").val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\n\t\t\tlet quantity = 1\n\t\t\tlet productId = jQuery(this).data(\"product_id\")\n\n\t\t\twpm.addProductToCart(productId, quantity)\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * If someone clicks anywhere on a custom /?add-to-cart=123 link\n * trigger the add to cart event\n */\n// jQuery('a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)').one('click', function (event) {\njQuery(document).one(\"click\", \"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\", function (event) {\n\n\ttry {\n\t\tif (jQuery(event.target).closest(\"a\").attr(\"href\")) {\n\n\t\t\tlet href = jQuery(event.target).closest(\"a\").attr(\"href\")\n\n\t\t\tif (href.includes(\"add-to-cart=\")) {\n\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) wpm.addProductToCart(matches[2], 1)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// select_content GA UA event\n// select_item GA 4 event\n// jQuery(document).on('click', '.woocommerce-LoopProduct-link, .wc-block-grid__product, .product-small.box', function (e) {\n// jQuery('.woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product').on('click', function (e) {\njQuery(document).on(\"click\", \".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\", function () {\n\n\ttry {\n\n\t\t/**\n\t\t * On some pages the event fires multiple times, and on product pages\n\t\t * even on page load. Using e.stopPropagation helps to prevent this,\n\t\t * but I don't know why. We don't even have to use this, since only a real\n\t\t * product click yields a valid productId. So we filter the invalid click\n\t\t * events out later down in the code. I'll keep it that way because this is\n\t\t * the most compatible way across shops.\n\t\t *\n\t\t * e.stopPropagation();\n\t\t * */\n\n\t\tlet productId = jQuery(this).nextAll(\".wpmProductId:first\").data(\"id\")\n\n\t\t/**\n\t\t * On product pages, for some reason, the click event is triggered on the main product on page load.\n\t\t * In that case no ID is found. But we can discard it, since we only want to trigger the event on\n\t\t * related products, which are found below.\n\t\t */\n\n\t\tif (productId) {\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmSelectContentGaUa\", product)\n\t\t\t\tjQuery(document).trigger(\"wpmSelectItem\", product)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// begin_checkout event\nlet checkoutButtonClasses = [\n\t\".checkout-button\",\n\t\".cart-checkout-button\",\n\t\".button.checkout\",\n\t\".xoo-wsc-ft-btn-checkout\", // https://xootix.com/side-cart-for-woocommerce/\n]\n\njQuery(document).one(\"click\", checkoutButtonClasses.join(\",\"), function () {\n\tjQuery(document).trigger(\"wpmBeginCheckout\")\n})\n\n\n// checkout_progress event\n// track checkout option event: entered valid billing email\njQuery(document).on(\"input\", \"#billing_email\", function () {\n\n\tif (wpm.isEmail(jQuery(this).val())) {\n\t\t// wpm.fireCheckoutOption(2);\n\t\twpm.fireCheckoutProgress(2)\n\t\twpm.emailSelected = true\n\t}\n})\n\n// track checkout option event: purchase click\njQuery(document).on(\"click\", \".wc_payment_methods\", function () {\n\n\tif (false === wpm.paymentMethodSelected) {\n\t\twpm.fireCheckoutProgress(3)\n\t}\n\n\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\twpm.paymentMethodSelected = true\n})\n\n// track checkout option event: purchase click\n// jQuery('#place_order').one('click', function () {\njQuery(document).one(\"click\", \"#place_order\", function () {\n\n\tif (false === wpm.emailSelected) {\n\t\twpm.fireCheckoutProgress(2)\n\t}\n\n\tif (false === wpm.paymentMethodSelected) {\n\t\twpm.fireCheckoutProgress(3)\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t}\n\n\twpm.fireCheckoutProgress(4)\n})\n\n// update cart event\n// jQuery(\"[name='update_cart']\").on('click', function (e) {\njQuery(document).on(\"click\", \"[name='update_cart']\", function () {\n\n\ttry {\n\t\tjQuery(\".cart_item\").each(function () {\n\n\t\t\tlet url = new URL(jQuery(this).find(\".product-remove\").find(\"a\").attr(\"href\"))\n\t\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\n\t\t\tlet quantity = jQuery(this).find(\".qty\").val()\n\n\t\t\tif (quantity === 0) {\n\t\t\t\twpm.removeProductFromCart(productId)\n\t\t\t} else if (quantity < wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.removeProductFromCart(productId, wpmDataLayer.cart[productId].quantity - quantity)\n\t\t\t} else if (quantity > wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.addProductToCart(productId, quantity - wpmDataLayer.cart[productId].quantity)\n\t\t\t}\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t\twpm.getCartItemsFromBackend()\n\t}\n})\n\n\n// add_to_wishlist\njQuery(document).on(\"click\", \".add_to_wishlist, .wl-add-to\", function () {\n\n\ttry {\n\n\t\tlet productId\n\n\t\tif (jQuery(this).data(\"productid\")) { // for the WooCommerce wishlist plugin\n\n\t\t\tproductId = jQuery(this).data(\"productid\")\n\t\t} else if (jQuery(this).data(\"product-id\")) { // for the YITH wishlist plugin\n\n\t\t\tproductId = jQuery(this).data(\"product-id\")\n\t\t}\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\tjQuery(document).trigger(\"wpmAddToWishlist\", product)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\njQuery(document).on(\"updated_cart_totals\", function () {\n\tjQuery(document).trigger(\"wpmViewCart\")\n})\n\n\n/**\n * Called when the user selects all the required dropdowns / attributes\n *\n * Has to be hooked after document ready !\n *\n * https://stackoverflow.com/a/27849208/4688612\n * https://stackoverflow.com/a/65065335/4688612\n */\n\njQuery(function () {\n\n\tjQuery(\".single_variation_wrap\").on(\"show_variation\", function (event, variation) {\n\n\t\ttry {\n\t\t\tlet productId = wpm.getIdBasedOndVariationsOutputSetting(variation.variation_id)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n\n/**\n * Called on variable products when no selection has been done yet\n * or when the visitor deselects his choice.\n *\n * Has to be hooked after document ready !\n */\n\njQuery(function () {\n\n\tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n\n\t\ttry {\n\t\t\tlet classes = jQuery(\"body\").attr(\"class\")\n\t\t\tlet productId = classes.match(/(postid-)(\\d+)/)[2]\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\t/**\n\t\t\t * If we have a variable product with no preset,\n\t\t\t * and variations output is enabled,\n\t\t\t * then we send a viewItem event with the first\n\t\t\t * variation we find for the parent.\n\t\t\t * If variations output is disabled,\n\t\t\t * we just send the parent ID.\n\t\t\t *\n\t\t\t * And if Facebook microdata is active, use the\n\t\t\t * microdata product ID.\n\t\t\t */\n\n\t\t\tif (\n\t\t\t\t\"variable\" === wpmDataLayer.shop.product_type &&\n\t\t\t\twpmDataLayer?.general?.variationsOutput\n\t\t\t) {\n\t\t\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\t\t\t\t\tif (\"parentId\" in product) {\n\n\t\t\t\t\t\tproductId = product.id\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\n\t\t\t\tif (wpmDataLayer?.pixels?.facebook?.microdata_product_id) {\n\t\t\t\t\tproductId = wpmDataLayer.pixels.facebook.microdata_product_id\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t}\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n\n/**\n * Set up wpm events\n */\n\n// populate the wpmDataLayer with the cart items\njQuery(window).on(\"wpmLoad\", function () {\n\n\ttry {\n\t\t// When a new session is initiated there are no items in the cart,\n\t\t// so we can save the call to get the cart items\n\t\tif (wpm.doesWooCommerceCartExist()) wpm.getCartItems()\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// get all add-to-cart= products from backend\njQuery(window).on(\"wpmLoad\", function () {\n\n\twpmDataLayer.products = wpmDataLayer.products || {}\n\n\t// scan page for add-to-cart= links\n\tlet productIds = wpm.getAddToCartLinkProductIds()\n\n\twpm.getProductsFromBackend(productIds)\n})\n\n/**\n * Save the referrer into a cookie\n */\n\njQuery(window).on(\"wpmLoad\", function () {\n\n\t// can't use session storage as we can't read it from the server\n\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\n\t\tif (document.referrer) {\n\t\t\tlet referrerUrl = new URL(document.referrer)\n\t\t\tlet referrerHostname = referrerUrl.hostname\n\n\t\t\tif (referrerHostname !== window.location.host) {\n\t\t\t\twpm.setCookie(\"wpmReferrer\", referrerHostname)\n\t\t\t}\n\t\t}\n\t}\n})\n\n\n/**\n * Create our own load event in order to better handle script flow execution when JS \"optimizers\" shuffle the code.\n */\n\njQuery(window).on(\"wpmLoad\", function () {\n\ttry {\n\t\tif (typeof wpmDataLayer != \"undefined\" && !wpmDataLayer?.wpmLoadFired) {\n\n\t\t\tjQuery(document).trigger(\"wpmLoadAlways\")\n\n\t\t\tif (\"product\" === wpmDataLayer.shop.page_type && \"variable\" !== wpmDataLayer.shop.product_type && wpm.getMainProductIdFromProductPage()) {\n\n\t\t\t\tlet product = wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage())\n\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\n\t\t\t} else if (\"product_category\" === wpmDataLayer.shop.page_type) {\n\n\t\t\t\tjQuery(document).trigger(\"wpmCategory\")\n\n\t\t\t} else if (\"search\" === wpmDataLayer.shop.page_type) {\n\n\t\t\t\tjQuery(document).trigger(\"wpmSearch\")\n\n\t\t\t} else if (\"cart\" === wpmDataLayer.shop.page_type) {\n\n\t\t\t\tjQuery(document).trigger(\"wpmViewCart\")\n\n\t\t\t} else if (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer.order) {\n\n\t\t\t\tif (!wpm.isOrderIdStored(wpmDataLayer.order.id)) {\n\n\t\t\t\t\tjQuery(document).trigger(\"wpmOrderReceivedPage\")\n\t\t\t\t\twpm.writeOrderIdToStorage(wpmDataLayer.order.id)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.user?.id && !wpm.hasLoginEventFired()) {\n\t\t\t\tjQuery(document).trigger(\"wpmLogin\")\n\t\t\t\twpm.setLoginEventFired()\n\t\t\t}\n\n\t\t\t// /**\n\t\t\t// * Load mini cart fragments into a wpm session storage key,\n\t\t\t// * after the document load event.\n\t\t\t// */\n\t\t\t// jQuery(document).ajaxSend(function (event, jqxhr, settings) {\n\t\t\t// \t// console.log('settings.url: ' + settings.url);\n\t\t\t//\n\t\t\t// \tif (settings.url.includes(\"get_refreshed_fragments\") && sessionStorage) {\n\t\t\t// \t\tif (!sessionStorage.getItem(\"wpmMiniCartActive\")) {\n\t\t\t// \t\t\tsessionStorage.setItem(\"wpmMiniCartActive\", JSON.stringify(true))\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// })\n\n\t\t\twpmDataLayer.wpmLoadFired = true\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n/**\n * Load all pixels\n */\njQuery(window).on(\"wpmPreLoadPixels\", function () {\n\n\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent && !wpm.explicitConsentStateAlreadySet()) {\n\t\twpm.updateConsentCookieValues(null, null,true)\n\t}\n\n\tjQuery(document).trigger(\"wpmLoadPixels\", {})\n})\n","/**\n * Create a wpm namespace under which all functions are declared\n */\n\n// https://stackoverflow.com/a/5947280/4688612\n\n(function (wpm, $, undefined) {\n\n\tconst wpmDeduper = {\n\t\tkeyName : \"_wpm_order_ids\",\n\t\tcookieExpiresDays: 365,\n\t}\n\n\tconst wpmRestSettings = {\n\t\t// cookiesAvailable : '_wpm_cookies_are_available',\n\t\tcookieWpmRestEndpointAvailable: \"_wpm_endpoint_available\",\n\t\trestEndpoint : \"/wp-json/\",\n\t\trestFails : 0,\n\t\trestFailsThreshold : 10,\n\t}\n\n\twpm.emailSelected = false\n\twpm.paymentMethodSelected = false\n\n\t// wpm.checkIfCookiesAvailable = function () {\n\t//\n\t// // read the cookie if previously set, if it is return true, otherwise continue\n\t// if (wpm.getCookie(wpmRestSettings.cookiesAvailable)) {\n\t// return true;\n\t// }\n\t//\n\t// // set the cookie for the session\n\t// Cookies.set(wpmRestSettings.cookiesAvailable, true);\n\t//\n\t// // read cookie, true if ok, false if not ok\n\t// return !!wpm.getCookie(wpmRestSettings.cookiesAvailable);\n\t// }\n\n\twpm.useRestEndpoint = () => {\n\n\t\t// only if sessionStorage is available\n\n\t\t// only if REST API endpoint is generally accessible\n\t\t// check in sessionStorage if we checked before and return answer\n\t\t// otherwise check if the endpoint is available, save answer in sessionStorage and return answer\n\n\t\t// only if not too many REST API errors happened\n\n\t\treturn wpm.isSessionStorageAvailable() &&\n\t\t\twpm.isRestEndpointAvailable() &&\n\t\t\twpm.isBelowRestErrorThreshold()\n\t}\n\n\twpm.isBelowRestErrorThreshold = () => window.sessionStorage.getItem(wpmRestSettings.restFails) <= wpmRestSettings.restFailsThreshold\n\n\twpm.isRestEndpointAvailable = () => {\n\n\t\tif (window.sessionStorage.getItem(wpmRestSettings.cookieWpmRestEndpointAvailable)) {\n\t\t\treturn JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookieWpmRestEndpointAvailable))\n\t\t} else {\n\t\t\t// return wpm.testEndpoint();\n\t\t\t// just set the value whenever possible in order not to wait or block the main thread\n\t\t\twpm.testEndpoint()\n\t\t}\n\t}\n\n\twpm.isSessionStorageAvailable = () => !!window.sessionStorage\n\n\twpm.testEndpoint = (\n\t\turl = location.protocol + \"//\" + location.host + wpmRestSettings.restEndpoint,\n\t\tcookieName = wpmRestSettings.cookieWpmRestEndpointAvailable,\n\t) => {\n\t\t// console.log('testing endpoint');\n\n\t\tjQuery.ajax(url, {\n\t\t\ttype : \"HEAD\",\n\t\t\ttimeout: 1000,\n\t\t\t// async: false,\n\t\t\tstatusCode: {\n\t\t\t\t200: function (response) {\n\t\t\t\t\t// Cookies.set(cookieName, true);\n\t\t\t\t\t// console.log('endpoint works');\n\t\t\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(true))\n\t\t\t\t},\n\t\t\t\t404: function (response) {\n\t\t\t\t\t// Cookies.set(cookieName, false);\n\t\t\t\t\t// console.log('endpoint doesn\\'t work');\n\t\t\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\t\t},\n\t\t\t\t0 : function (response) {\n\t\t\t\t\t// Cookies.set(cookieName, false);\n\t\t\t\t\t// console.log('endpoint doesn\\'t work');\n\t\t\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\t\t},\n\t\t\t},\n\t\t}).then(response => {\n\t\t\t// console.log('test done')\n\t\t\t// console.log('result: ' + JSON.parse(window.sessionStorage.getItem(cookieName)));\n\t\t\t// return JSON.parse(window.sessionStorage.getItem(cookieName));\n\t\t})\n\t}\n\n\twpm.isWpmRestEndpointAvailable = (cookieName = wpmRestSettings.cookieWpmRestEndpointAvailable) => !!wpm.getCookie(cookieName)\n\n\twpm.writeOrderIdToStorage = (orderId, expireDays = 365) => {\n\n\t\t// save the order ID in the browser storage\n\n\t\tif (!window.Storage) {\n\t\t\tlet expiresDate = new Date()\n\t\t\texpiresDate.setDate(expiresDate.getDate() + wpmDeduper.cookieExpiresDays)\n\n\t\t\tlet ids = []\n\t\t\tif (checkCookie()) {\n\t\t\t\tids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t}\n\n\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\tids.push(orderId)\n\t\t\t\tdocument.cookie = wpmDeduper.keyName + \"=\" + JSON.stringify(ids) + \";expires=\" + expiresDate.toUTCString()\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (localStorage.getItem(wpmDeduper.keyName) === null) {\n\t\t\t\tlet ids = []\n\t\t\t\tids.push(orderId)\n\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\n\t\t\t} else {\n\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\t\tids.push(orderId)\n\t\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (typeof wpm.storeOrderIdOnServer === \"function\" && wpmDataLayer.orderDeduplication) {\n\t\t\twpm.storeOrderIdOnServer(orderId)\n\t\t}\n\t}\n\n\tfunction checkCookie() {\n\t\tlet key = wpm.getCookie(wpmDeduper.keyName)\n\t\treturn key !== \"\"\n\t}\n\n\twpm.isOrderIdStored = orderId => {\n\n\t\tif (wpmDataLayer.orderDeduplication) {\n\n\t\t\tif (!window.Storage) {\n\n\t\t\t\tif (checkCookie()) {\n\t\t\t\t\tlet ids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (localStorage.getItem(wpmDeduper.keyName) !== null) {\n\t\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.log(\"order duplication prevention: off\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isEmail = email => {\n\n\t\t// https://emailregex.com/\n\n\t\tlet regex = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\n\n\t\treturn regex.test(email)\n\t}\n\n\twpm.removeProductFromCart = (productId, quantityToRemove = null) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tlet quantity\n\n\t\t\tif (quantityToRemove == null) {\n\t\t\t\tquantity = wpmDataLayer.cart[productId].quantity\n\t\t\t} else {\n\t\t\t\tquantity = quantityToRemove\n\t\t\t}\n\n\t\t\tif (wpmDataLayer.cart[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmRemoveFromCart\", product)\n\n\t\t\t\tif (quantityToRemove == null || wpmDataLayer.cart[productId].quantity === quantityToRemove) {\n\n\t\t\t\t\tdelete wpmDataLayer.cart[productId]\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t} else {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity - quantity\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\t// console.log('getting cart from back end');\n\t\t\t// wpm.getCartItemsFromBackend();\n\t\t\t// console.log('getting cart from back end done');\n\t\t}\n\t}\n\n\twpm.getIdBasedOndVariationsOutputSetting = productId => {\n\n\t\ttry {\n\t\t\tif (wpmDataLayer?.general?.variationsOutput) {\n\n\t\t\t\treturn productId\n\t\t\t} else {\n\t\t\t\tif (wpmDataLayer.products[productId].isVariation) {\n\n\t\t\t\t\treturn wpmDataLayer.products[productId].parentId\n\t\t\t\t} else {\n\n\t\t\t\t\treturn productId\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// add_to_cart\n\twpm.addProductToCart = (productId, quantity) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer?.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmAddToCart\", product)\n\n\t\t\t\t// add product to cart wpmDataLayer['cart']\n\n\t\t\t\t// if the product already exists in the object, only add the additional quantity\n\t\t\t\t// otherwise create that product object in the wpmDataLayer['cart']\n\t\t\t\tif (wpmDataLayer?.cart[productId]) {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity + quantity\n\t\t\t\t} else {\n\n\t\t\t\t\tif (!(\"cart\" in wpmDataLayer)) wpmDataLayer.cart = {}\n\n\t\t\t\t\twpmDataLayer.cart[productId] = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\t\t\t\t}\n\n\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\n\t\t\t// fallback if wpmDataLayer.cart and wpmDataLayer.products got out of sync in case cart caching has an issue\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\twpm.getCartItems = () => {\n\n\t\tif (sessionStorage) {\n\t\t\tif (!sessionStorage.getItem(\"wpmDataLayerCart\") || wpmDataLayer.shop.page_type === \"order_received_page\") {\n\t\t\t\tsessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify({}))\n\t\t\t} else {\n\t\t\t\twpm.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem(\"wpmDataLayerCart\")))\n\t\t\t}\n\t\t} else {\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\t// get all cart items from the backend\n\twpm.getCartItemsFromBackend = () => {\n\t\ttry {\n\t\t\tlet data = {\n\t\t\t\taction: \"wpm_get_cart_items\",\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"get\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (cartItems) {\n\n\t\t\t\t\t\t// save all cart items into wpmDataLayer\n\n\t\t\t\t\t\tif (!cartItems[\"cart\"]) cartItems[\"cart\"] = {}\n\n\t\t\t\t\t\twpm.saveCartObjectToDataLayer(cartItems[\"cart\"])\n\n\t\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(cartItems[\"cart\"]))\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// get productIds from the backend\n\twpm.getProductsFromBackend = productIds => {\n\n\n\t\t// reduce productIds by products already in the dataLayer\n\t\tproductIds = productIds.filter(item => !wpmDataLayer.products.hasOwnProperty(item))\n\n\t\t// if no products IDs are in the object, don't try to get anything from the server\n\t\tif (!productIds || productIds.length === 0) return\n\n\t\ttry {\n\t\t\tlet data = {\n\t\t\t\taction : \"wpm_get_product_ids\",\n\t\t\t\tproductIds: productIds,\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"get\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (products) {\n\n\t\t\t\t\t\t// merge products into wpmDataLayer.products\n\t\t\t\t\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, products)\n\t\t\t\t\t},\n\t\t\t\t\terror : function (response) {\n\t\t\t\t\t\tconsole.log(response)\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.saveCartObjectToDataLayer = cartObject => {\n\n\t\twpmDataLayer.cart = cartObject\n\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, cartObject)\n\t}\n\n\twpm.fireCheckoutOption = (step, checkout_option = null, value = null) => {\n\n\t\tlet data = {\n\t\t\tstep : step,\n\t\t\tcheckout_option: checkout_option,\n\t\t\tvalue : value,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutOption\", data)\n\t}\n\n\twpm.fireCheckoutProgress = step => {\n\n\t\tlet data = {\n\t\t\tstep: step,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutProgress\", data)\n\t}\n\n\twpm.getPostIdFromString = string => {\n\n\t\ttry {\n\t\t\treturn string.match(/(post-)(\\d+)/)[2]\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.triggerViewItemList = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tjQuery(document).trigger(\"wpmViewItemList\", wpm.getProductDataForViewItemEvent(productId))\n\t}\n\n\twpm.getProductDataForViewItemEvent = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\ttry {\n\t\t\tif (wpmDataLayer.products[productId]) {\n\n\t\t\t\treturn wpm.getProductDetailsFormattedForEvent(productId)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getMainProductIdFromProductPage = () => {\n\n\t\ttry {\n\t\t\tif ([\"simple\", \"variable\", \"grouped\", \"composite\", \"bundle\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\t\t\t\treturn jQuery(\".wpmProductId:first\").data(\"id\")\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.viewItemListTriggerTestMode = target => {\n\n\t\tjQuery(target).css({\"position\": \"relative\"})\n\t\tjQuery(target).append(\"<div id=\\\"viewItemListTriggerOverlay\\\"></div>\")\n\t\tjQuery(target).find(\"#viewItemListTriggerOverlay\").css({\n\t\t\t\"z-index\" : \"10\",\n\t\t\t\"display\" : \"block\",\n\t\t\t\"position\" : \"absolute\",\n\t\t\t\"height\" : \"100%\",\n\t\t\t\"top\" : \"0\",\n\t\t\t\"left\" : \"0\",\n\t\t\t\"right\" : \"0\",\n\t\t\t\"opacity\" : wpmDataLayer.viewItemListTrigger.opacity,\n\t\t\t\"background-color\": wpmDataLayer.viewItemListTrigger.backgroundColor,\n\t\t})\n\t}\n\n\twpm.getSearchTermFromUrl = () => {\n\n\t\ttry {\n\t\t\tlet urlParameters = new URLSearchParams(window.location.search)\n\t\t\treturn urlParameters.get(\"s\")\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// we need this to track timeouts for intersection observers\n\tlet ioTimeouts = {}\n\n\twpm.observerCallback = (entries, observer) => {\n\n\t\tentries.forEach((entry) => {\n\n\t\t\ttry {\n\t\t\t\tlet productId\n\n\t\t\t\tlet elementId = jQuery(entry.target).data(\"ioid\")\n\n\t\t\t\t// Get the productId from next element, if wpmProductId is a sibling, like in Gutenberg blocks\n\t\t\t\t// otherwise go search in children, like in regular WC loop items\n\t\t\t\tif (jQuery(entry.target).next(\".wpmProductId\").length) {\n\t\t\t\t\t// console.log('test 1');\n\t\t\t\t\tproductId = jQuery(entry.target).next(\".wpmProductId\").data(\"id\")\n\t\t\t\t} else {\n\t\t\t\t\tproductId = jQuery(entry.target).find(\".wpmProductId\").data(\"id\")\n\t\t\t\t}\n\n\n\t\t\t\tif (!productId) throw Error(\"wpmProductId element not found\")\n\n\t\t\t\tif (entry.isIntersecting) {\n\n\t\t\t\t\tioTimeouts[elementId] = setTimeout(() => {\n\n\t\t\t\t\t\twpm.triggerViewItemList(productId)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) wpm.viewItemListTriggerTestMode(entry.target)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.repeat === false) observer.unobserve(entry.target)\n\t\t\t\t\t}, wpmDataLayer.viewItemListTrigger.timeout)\n\n\t\t\t\t} else {\n\n\t\t\t\t\tclearTimeout(ioTimeouts[elementId])\n\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) jQuery(entry.target).find(\"#viewItemListTriggerOverlay\").remove()\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e)\n\t\t\t}\n\t\t})\n\t}\n\n\t// fire view_item_list only on products that have become visible\n\tlet io\n\tlet ioid = 0\n\tlet allIoElementsToWatch\n\n\tlet getAllElementsToWatch = () => {\n\n\t\tallIoElementsToWatch = jQuery(\".wpmProductId\")\n\t\t\t.map(function (i, elem) {\n\n\t\t\t\tif (\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"type-product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product-item-inner\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(elem).parent()\n\t\t\t\t} else if (\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"wc-block-grid__product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product-small\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"woocommerce-LoopProduct-link\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(this).prev()\n\t\t\t\t} else if (jQuery(elem).closest(\".product\").length) {\n\t\t\t\t\treturn jQuery(elem).closest(\".product\")\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\twpm.startIntersectionObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// enable view_item_list test mode from browser\n\t\t\tif (wpm.urlHasParameter(\"vildemomode\")) wpmDataLayer.viewItemListTrigger.testMode = true\n\n\t\t\t// set up intersection observer\n\t\t\tio = new IntersectionObserver(wpm.observerCallback, {\n\t\t\t\tthreshold: wpmDataLayer.viewItemListTrigger.threshold,\n\t\t\t})\n\n\t\t\tgetAllElementsToWatch()\n\n\t\t\tallIoElementsToWatch.each((i, elem) => {\n\n\t\t\t\tjQuery(elem[0]).data(\"ioid\", ioid++)\n\n\t\t\t\tio.observe(elem[0])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// watch DOM for new lazy loaded products and add them to the intersection observer\n\twpm.startProductsMutationObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// Pass in the target node, as well as the observer options\n\n\t\t\t// selects the most common parent node\n\t\t\t// https://stackoverflow.com/a/7648323/4688612\n\t\t\tlet productsNode = jQuery(\".wpmProductId:eq(0)\").parents().has(jQuery(\".wpmProductId:eq(1)\").parents()).first()\n\n\t\t\tif (productsNode.length) {\n\t\t\t\tproductsMutationObserver.observe(productsNode[0], {\n\t\t\t\t\tattributes : true,\n\t\t\t\t\tchildList : true,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t})\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// Create an observer instance\n\tlet productsMutationObserver = new MutationObserver(mutations => {\n\n\t\tmutations.forEach(mutation => {\n\t\t\tlet newNodes = mutation.addedNodes // DOM NodeList\n\t\t\tif (newNodes !== null) { // If there are new nodes added\n\t\t\t\tlet nodes = jQuery(newNodes) // jQuery set\n\t\t\t\tnodes.each(function () {\n\t\t\t\t\tif (\n\t\t\t\t\t\tjQuery(this).hasClass(\"type-product\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"product-small\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"wc-block-grid__product\")\n\t\t\t\t\t) {\n\t\t\t\t\t\t// check if the node has a child or sibling wpmProductId\n\t\t\t\t\t\t// if yes add it to the intersectionObserver\n\t\t\t\t\t\tif (hasWpmProductIdElement(this)) {\n\t\t\t\t\t\t\tjQuery(this).data(\"ioid\", ioid++)\n\t\t\t\t\t\t\tio.observe(this)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t})\n\n\tlet hasWpmProductIdElement = elem =>\n\t\t!!(jQuery(elem).find(\".wpmProductId\").length ||\n\t\tjQuery(elem).siblings(\".wpmProductId\").length)\n\n\twpm.setCookie = (cookieName, cookieValue = \"\", expiryDays = null) => {\n\n\t\tif (expiryDays) {\n\n\t\t\tlet d = new Date()\n\t\t\td.setTime(d.getTime() + (expiryDays * 24 * 60 * 60 * 1000))\n\t\t\tlet expires = \"expires=\" + d.toUTCString()\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";\" + expires + \";path=/\"\n\t\t} else {\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";path=/\"\n\t\t}\n\t}\n\n\twpm.getCookie = cookieName => {\n\n\t\tlet name = cookieName + \"=\"\n\t\tlet decodedCookie = decodeURIComponent(document.cookie)\n\t\tlet ca = decodedCookie.split(\";\")\n\n\t\tfor (let i = 0; i < ca.length; i++) {\n\n\t\t\tlet c = ca[i]\n\n\t\t\twhile (c.charAt(0) == \" \") {\n\t\t\t\tc = c.substring(1)\n\t\t\t}\n\n\t\t\tif (c.indexOf(name) == 0) {\n\t\t\t\treturn c.substring(name.length, c.length)\n\t\t\t}\n\t\t}\n\n\t\treturn \"\"\n\t}\n\n\twpm.getWpmSessionData = () => {\n\n\t\tif (window.sessionStorage) {\n\n\t\t\tlet data = window.sessionStorage.getItem(\"_wpm\")\n\n\t\t\tif (data !== null) {\n\t\t\t\treturn JSON.parse(data)\n\t\t\t} else {\n\t\t\t\treturn {}\n\t\t\t}\n\t\t} else {\n\t\t\treturn {}\n\t\t}\n\t}\n\n\twpm.setWpmSessionData = data => {\n\t\tif (window.sessionStorage) {\n\t\t\twindow.sessionStorage.setItem(\"_wpm\", JSON.stringify(data))\n\t\t}\n\t}\n\n\twpm.storeOrderIdOnServer = orderId => {\n\n\t\ttry {\n\t\t\t// save the state in the database\n\t\t\tlet data = {\n\t\t\t\taction : \"wpm_purchase_pixels_fired\",\n\t\t\t\torder_id: orderId,\n\t\t\t\t// nonce : ajax_object.nonce,\n\t\t\t\tnonce: wpm.nonce,\n\t\t\t}\n\n\t\t\tjQuery.ajax(\n\t\t\t\t{\n\t\t\t\t\ttype : \"post\",\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t// url : ajax_object.ajax_url,\n\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\tdata : data,\n\t\t\t\t\tsuccess: function (response) {\n\t\t\t\t\t\tif (response.success === false) {\n\t\t\t\t\t\t\tconsole.log(response)\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\terror : function (response) {\n\t\t\t\t\t\tconsole.log(response)\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getProductIdByCartItemKeyUrl = url => {\n\n\t\tlet searchParams = new URLSearchParams(url.search)\n\t\tlet cartItemKey = searchParams.get(\"remove_item\")\n\n\t\tlet productId\n\n\t\tif (wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"] === 0) {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"product_id\"]\n\t\t} else {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"]\n\t\t}\n\n\t\treturn productId\n\t}\n\n\twpm.getAddToCartLinkProductIds = () =>\n\t\tjQuery(\"a\").map(function () {\n\t\t\tlet href = jQuery(this).attr(\"href\")\n\n\t\t\tif (href && href.includes(\"?add-to-cart=\")) {\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) return matches[2]\n\t\t\t}\n\t\t}).get()\n\n\twpm.getProductDetailsFormattedForEvent = (productId, quantity = 1) => {\n\n\t\tlet product = {\n\t\t\tid : productId.toString(),\n\t\t\tdyn_r_ids : wpmDataLayer.products[productId].dyn_r_ids,\n\t\t\tname : wpmDataLayer.products[productId].name,\n\t\t\tlist_name : wpmDataLayer.shop.list_name,\n\t\t\tbrand : wpmDataLayer.products[productId].brand,\n\t\t\tcategory : wpmDataLayer.products[productId].category,\n\t\t\tvariant : wpmDataLayer.products[productId].variant,\n\t\t\tlist_position: wpmDataLayer.products[productId].position,\n\t\t\tquantity : quantity,\n\t\t\tprice : wpmDataLayer.products[productId].price,\n\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\tisVariable : wpmDataLayer.products[productId].isVariable,\n\t\t\tisVariation : wpmDataLayer.products[productId].isVariation,\n\t\t\tparentId : wpmDataLayer.products[productId].parentId,\n\t\t}\n\n\t\tif (product.isVariation) product[\"parentId_dyn_r_ids\"] = wpmDataLayer.products[productId].parentId_dyn_r_ids\n\n\t\treturn product\n\t}\n\n\twpm.setReferrerToCookie = () => {\n\n\t\t// can't use session storage as we can't read it from the server\n\t\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\t\t\twpm.setCookie(\"wpmReferrer\", document.referrer)\n\t\t}\n\t}\n\n\twpm.getReferrerFromCookie = () => {\n\n\t\tif (wpm.getCookie(\"wpmReferrer\")) {\n\t\t\treturn wpm.getCookie(\"wpmReferrer\")\n\t\t} else {\n\t\t\treturn null\n\t\t}\n\t}\n\n\twpm.getClidFromBrowser = (clidId = \"gclid\") => {\n\n\t\tlet clidCookieId\n\n\t\tclidCookieId = {\n\t\t\tgclid: \"_gcl_aw\",\n\t\t\tdclid: \"_gcl_dc\",\n\t\t}\n\n\t\tif (wpm.getCookie(clidCookieId[clidId])) {\n\n\t\t\tlet clidCookie = wpm.getCookie(clidCookieId[clidId])\n\t\t\tlet matches = clidCookie.match(/(GCL.[\\d]*.)(.*)/)\n\t\t\treturn matches[2]\n\t\t} else {\n\t\t\treturn \"\"\n\t\t}\n\t}\n\n\twpm.getUserAgent = () => navigator.userAgent\n\n\twpm.getViewPort = () => ({\n\t\twidth : Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0),\n\t\theight: Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0),\n\t})\n\n\n\twpm.version = () => {\n\t\tconsole.log(wpmDataLayer.version)\n\t}\n\n\t// https://api.jquery.com/jquery.getscript/\n\twpm.loadScriptAndCacheIt = (url, options) => {\n\n\t\t// Allow user to set any option except for dataType, cache, and url\n\t\toptions = jQuery.extend(options || {}, {\n\t\t\tdataType: \"script\",\n\t\t\tcache : true,\n\t\t\turl : url,\n\t\t})\n\n\t\t// Use $.ajax() since it is more flexible than $.getScript\n\t\t// Return the jqXHR object so we can chain callbacks\n\t\treturn jQuery.ajax(options)\n\t}\n\n\twpm.getOrderItemPrice = orderItem => (orderItem.total + orderItem.total_tax) / orderItem.quantity\n\n\twpm.hasLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\treturn data?.loginEventFired\n\t}\n\n\twpm.setLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\tdata[\"loginEventFired\"] = true\n\t\twpm.setWpmSessionData(data)\n\t}\n\n\twpm.wpmDataLayerExists = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (typeof wpmDataLayer !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.jQueryExists = () => new Promise(resolve => {\n\t\t(function waitForjQuery() {\n\t\t\tif (typeof jQuery !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForjQuery, 100)\n\t\t})()\n\t})\n\n\twpm.pageLoaded = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (\"complete\" === document.readyState) return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.pageReady = () => {\n\t\treturn new Promise(resolve => {\n\t\t\t(function waitForVar() {\n\t\t\t\tif (\"interactive\" === document.readyState || \"complete\" === document.readyState) return resolve()\n\t\t\t\tsetTimeout(waitForVar, 50)\n\t\t\t})()\n\t\t})\n\t}\n\n\twpm.isMiniCartActive = () => {\n\t\tif (window.sessionStorage) {\n\t\t\tfor (const [key, value] of Object.entries(window.sessionStorage)) {\n\t\t\t\tif (key.includes(\"wc_fragments\")) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.doesWooCommerceCartExist = () => document.cookie.includes(\"woocommerce_items_in_cart\")\n\n\twpm.urlHasParameter = parameter => {\n\t\tlet urlParams = new URLSearchParams(window.location.search)\n\t\treturn urlParams.has(parameter)\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load all WPM functions\n *\n * Ignore event listeners. They need to be loaded after\n * we made sure that jQuery has been loaded.\n */\n\nrequire(\"./functions\")\nrequire(\"./cookie_consent\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// #endif\n","/**\n * After WPM is loaded\n * we first check if wpmDataLayer is loaded,\n * and as soon as it is, we load the pixels,\n * and as soon as the page load is complete,\n * we fire the wpmLoad event.\n *\n * @param {{pro:bool}} wpmDataLayer.version\n *\n * https://stackoverflow.com/a/25868457/4688612\n * https://stackoverflow.com/a/44093516/4688612\n */\n\nwpm.wpmDataLayerExists()\n\t.then(function () {\n\t\tconsole.log(\"Pixel Manager for WooCommerce: \" + (wpmDataLayer.version.pro ? \"Pro\" : \"Free\") +\" Version \" + wpmDataLayer.version.number + \" loaded\")\n\t\tjQuery(document).trigger(\"wpmPreLoadPixels\", {})\n\t})\n\t.then(function () {\n\t\twpm.pageLoaded().then(function () {\n\t\t\tjQuery(document).trigger(\"wpmLoad\", {})\n\t\t})\n\t})\n\n\n\n/**\n * Run when page is ready\n *\n */\n\nwpm.pageReady().then(function () {\n\n\t/**\n\t * Run as soon as wpm namespace is loaded\n\t */\n\n\twpm.wpmDataLayerExists()\n\t\t.then(function () {\n\t\t\t// watch for products visible in viewport\n\t\t\twpm.startIntersectionObserverToWatch()\n\n\t\t\t// watch for lazy loaded products\n\t\t\twpm.startProductsMutationObserverToWatch()\n\t\t})\n})\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/**\n * Load all essential scripts first\n */\n\nrequire(\"./wpm/functions_loader\")\n\n// Only load the event listeners after jQuery has been loaded for sure\nwpm.jQueryExists().then(function () {\n\n\trequire(\"./wpm/event_listeners\")\n\n\trequire(\"./google/loader\")\n\trequire(\"./facebook/loader\")\n\trequire(\"./hotjar/loader\")\n\n\t/**\n\t * Load all premium scripts\n\t */\n\n\t// #if process.env.TIER === 'premium'\n// \trequire(\"./microsoft-ads/loader\")\n// \trequire(\"./pinterest/loader\")\n// \trequire(\"./snapchat/loader\")\n// \trequire(\"./tiktok/loader\")\n// \trequire(\"./twitter/loader\")\n\t// #endif\n\n\n\t/**\n\t * Initiate WPM.\n\t *\n\t * It makes sure that the script flow gets executed correctly,\n\t * no matter how JS \"optimizers\" shuffle the code.\n\t */\n\n\trequire(\"./wpm/init\")\n})\n\n"],"names":["jQuery","document","on","wpmDataLayer","pixels","facebook","pixel_id","loaded","wpm","canIFire","loadFacebookPixel","event","product","eventId","getRandomEventId","fbq","content_type","content_name","name","content_ids","dyn_r_ids","dynamic_remarketing","id_type","value","parseFloat","quantity","price","currency","eventID","shop","console","log","trigger","event_name","event_id","user_data","getFbUserData","event_source_url","window","location","href","custom_data","fbGetProductDataForCapiEvent","e","error","fbViewContent","search_string","getSearchTermFromUrl","setFbUserData","order","value_filtered","facebookContentIds","id","$","undefined","fBUserData","f","b","n","callMethod","apply","arguments","queue","push","_fbq","version","t","createElement","async","src","s","getElementsByTagName","parentNode","insertBefore","data","user","external_id","user_id","billing_email_hashed","em","billing_first_name","fn","billing_last_name","ln","billing_phone","ph","billing_city","ct","billing_state","st","billing_postcode","zp","billing_country","country","Math","random","toString","substring","getFbUserDataFromBrowser","getCookie","fbp","navigator","userAgent","client_user_agent","prodIds","key","item","Object","entries","items","general","variationsOutput","variation_id","String","products","trackCustomFacebookEvent","eventName","customData","require","isEmptyObject","google","ads","conversionIds","status","googleConfigConditionsMet","isVariable","send_events_with_parent_ids","send_to","getGoogleAdsConversionIdentifiers","google_business_vertical","gtagLoaded","then","gtag","getGoogleAdsDynamicRemarketingOrderItems","data_basic","data_with_cart","getGoogleAdsConversionIdentifiersWithLabel","transaction_id","number","new_customer","clv_order_value_filtered","customer_lifetime_value","aw_merchant_id","discount","aw_feed_country","aw_feed_language","getGoogleAdsRegularOrderItems","conversionIdentifiers","orderItems","orderItem","analytics","universal","property_id","mp_active","affiliation","value_regular","tax","shipping","coupon","getGAUAOrderItems","category","join","variant","variant_name","brand","ga3AddListNameToProduct","item_data","productPosition","list_name","list_position","ga4","measurement_id","getGA4OrderItems","item_name","item_category","item_id","item_variant","item_brand","state","canGoogleLoad","loadGoogle","logPreventedPixelLoading","type","consent_mode","active","getConsentValues","mode","categories","includes","getVisitorConsentStatusAndUpdateGoogleConsentSettings","google_consent_settings","analytics_storage","ad_storage","updateGoogleConsentMode","cookie_consent_mgmt","explicit_consent","fireGtagGoogleAds","enhanced_conversions","phone_conversion_label","phone_conversion_number","keys","page_type","enhanced_conversion_data","fireGtagGoogleAnalyticsUA","parameters","fireGtagGoogleAnalyticsGA4","isGoogleActive","getGoogleGtagId","loadScriptAndCacheIt","done","script","textStatus","dataLayer","wait_for_update","region","ads_data_redaction","url_passthrough","linker","settings","Date","Promise","resolve","reject","startTime","wait","setTimeout","optimize","container_id","load_google_optimize_pixel","hotjar","site_id","load_hotjar_pixel","h","o","hj","q","_hjSettings","hjid","hjsv","a","r","appendChild","getComplianzCookies","cmplz_statistics","cmplz_marketing","visitorHasChosen","getCookieLawInfoCookies","analyticsCookie","adsCookie","wpmConsentValues","setConsentValueCategories","updateConsentCookieValues","cookie","explicitConsent","decodeURI","indexOf","JSON","parse","action","length","consents","statistics","marketing","thirdparty","advanced","setConsentDefaultValuesToExplicit","pixelName","canIFireMode","scriptTagObserver","MutationObserver","mutations","forEach","addedNodes","node","shouldScriptBeActive","unblockScript","blockScript","observe","head","childList","subtree","disconnect","split","some","element","scriptNode","removeAttach","remove","wpmSrc","attr","appendTo","removeAttr","unblockAllScripts","unblockSelectedPixels","Cookiebot","consent","detail","cmplzStatusChange","cmplzConsentData","huObserver","hu","documentElement","body","explicitConsentStateAlreadySet","url","URL","this","productId","getProductIdByCartItemKeyUrl","removeProductFromCart","addProductToCart","product_type","Number","val","each","find","classes","getPostIdFromString","one","target","closest","matches","match","nextAll","getIdBasedOndVariationsOutputSetting","Error","getProductDetailsFormattedForEvent","isEmail","fireCheckoutProgress","emailSelected","paymentMethodSelected","fireCheckoutOption","cart","getCartItemsFromBackend","variation","microdata_product_id","doesWooCommerceCartExist","getCartItems","productIds","getAddToCartLinkProductIds","getProductsFromBackend","referrer","referrerHostname","hostname","host","setCookie","wpmLoadFired","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","hasLoginEventFired","setLoginEventFired","wpmDeduper","wpmRestSettings","checkCookie","useRestEndpoint","isSessionStorageAvailable","isRestEndpointAvailable","isBelowRestErrorThreshold","sessionStorage","getItem","testEndpoint","protocol","cookieName","ajax","timeout","statusCode","response","setItem","stringify","isWpmRestEndpointAvailable","orderId","Storage","localStorage","ids","expiresDate","setDate","getDate","toUTCString","storeOrderIdOnServer","orderDeduplication","email","test","quantityToRemove","isVariation","parentId","saveCartObjectToDataLayer","dataType","ajax_url","success","cartItems","filter","hasOwnProperty","assign","cartObject","step","checkout_option","string","triggerViewItemList","viewItemListTriggerTestMode","css","append","viewItemListTrigger","opacity","backgroundColor","URLSearchParams","search","get","io","ioTimeouts","observerCallback","observer","entry","elementId","next","isIntersecting","testMode","repeat","unobserve","clearTimeout","allIoElementsToWatch","ioid","getAllElementsToWatch","map","i","elem","parent","hasClass","prev","startIntersectionObserverToWatch","urlHasParameter","IntersectionObserver","threshold","startProductsMutationObserverToWatch","productsNode","parents","has","first","productsMutationObserver","attributes","characterData","mutation","newNodes","hasWpmProductIdElement","siblings","cookieValue","expiryDays","d","setTime","getTime","expires","ca","decodeURIComponent","c","charAt","getWpmSessionData","setWpmSessionData","order_id","nonce","cartItemKey","cartItemKeys","position","parentId_dyn_r_ids","setReferrerToCookie","getReferrerFromCookie","getClidFromBrowser","clidCookieId","clidId","gclid","dclid","getUserAgent","getViewPort","width","max","clientWidth","innerWidth","height","clientHeight","innerHeight","options","extend","cache","getOrderItemPrice","total","total_tax","loginEventFired","wpmDataLayerExists","waitForVar","jQueryExists","waitForjQuery","pageLoaded","readyState","pageReady","isMiniCartActive","parameter","pro","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__"],"sourceRoot":""}
|
languages/woocommerce-google-adwords-conversion-tracking-tag.pot
CHANGED
@@ -2,22 +2,22 @@
|
|
2 |
# This file is distributed under the GNU General Public License v3.0.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version:
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/src\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2022-05-
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.6.0\n"
|
15 |
"X-Domain: woocommerce-google-adwords-conversion-tracking-tag\n"
|
16 |
|
17 |
#. Plugin Name of the plugin
|
18 |
-
#: wgact.php:
|
19 |
-
#: wgact.php:
|
20 |
-
msgid "
|
21 |
msgstr ""
|
22 |
|
23 |
#. Plugin URI of the plugin
|
@@ -245,13 +245,13 @@ msgstr ""
|
|
245 |
msgid "Author"
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: classes/admin/class-admin.php:
|
249 |
msgid ""
|
250 |
"It looks like you are using some sort of ad or script blocker which is blocking the script and CSS files of this plugin.\n"
|
251 |
" In order for the plugin to work properly you need to disable the script blocker."
|
252 |
msgstr ""
|
253 |
|
254 |
-
#: classes/admin/class-admin.php:
|
255 |
#: classes/admin/class-notifications.php:31
|
256 |
#: classes/admin/class-notifications.php:73
|
257 |
#: classes/admin/class-notifications.php:114
|
@@ -259,413 +259,413 @@ msgstr ""
|
|
259 |
msgid "Learn more"
|
260 |
msgstr ""
|
261 |
|
262 |
-
#: classes/admin/class-admin.php:
|
263 |
msgid "Profit Driven Marketing by SweetCode"
|
264 |
msgstr ""
|
265 |
|
266 |
-
#: classes/admin/class-admin.php:
|
267 |
msgid "Visit us here:"
|
268 |
msgstr ""
|
269 |
|
270 |
-
#: classes/admin/class-admin.php:
|
271 |
msgid "Contacting Support"
|
272 |
msgstr ""
|
273 |
|
274 |
-
#: classes/admin/class-admin.php:
|
275 |
msgid "Debug Information"
|
276 |
msgstr ""
|
277 |
|
278 |
-
#: classes/admin/class-admin.php:
|
279 |
msgid "copy to clipboard"
|
280 |
msgstr ""
|
281 |
|
282 |
-
#: classes/admin/class-admin.php:
|
283 |
msgid "Translations"
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: classes/admin/class-admin.php:
|
287 |
msgid "If you want to participate improving the translations of this plugin into your language, please follow this link:"
|
288 |
msgstr ""
|
289 |
|
290 |
-
#: classes/admin/class-admin.php:
|
291 |
msgid "Post a support request in the WordPress support forum here: "
|
292 |
msgstr ""
|
293 |
|
294 |
-
#: classes/admin/class-admin.php:
|
295 |
msgid "Support forum"
|
296 |
msgstr ""
|
297 |
|
298 |
-
#: classes/admin/class-admin.php:
|
299 |
msgid "(Never post the debug or other sensitive information to the support forum. Instead send us the information by email.)"
|
300 |
msgstr ""
|
301 |
|
302 |
-
#: classes/admin/class-admin.php:
|
303 |
msgid "Or send us an email to the following address: "
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: classes/admin/class-admin.php:
|
307 |
msgid "Send us your support request through the WooCommerce.com dashboard: "
|
308 |
msgstr ""
|
309 |
|
310 |
-
#: classes/admin/class-admin.php:
|
311 |
msgid "More details about the developer of this plugin: "
|
312 |
msgstr ""
|
313 |
|
314 |
-
#: classes/admin/class-admin.php:
|
315 |
msgid "Developer: SweetCode"
|
316 |
msgstr ""
|
317 |
|
318 |
-
#: classes/admin/class-admin.php:
|
319 |
msgid "Website: "
|
320 |
msgstr ""
|
321 |
|
322 |
-
#: classes/admin/class-admin.php:
|
323 |
msgid "The Google Analytics Universal property ID looks like this:"
|
324 |
msgstr ""
|
325 |
|
326 |
-
#: classes/admin/class-admin.php:
|
327 |
msgid "The Google Analytics 4 measurement ID looks like this:"
|
328 |
msgstr ""
|
329 |
|
330 |
-
#: classes/admin/class-admin.php:
|
331 |
msgid "The conversion ID looks similar to this:"
|
332 |
msgstr ""
|
333 |
|
334 |
-
#: classes/admin/class-admin.php:
|
335 |
msgid "The purchase conversion label looks similar to this:"
|
336 |
msgstr ""
|
337 |
|
338 |
-
#: classes/admin/class-admin.php:
|
339 |
-
#: classes/admin/class-admin.php:
|
340 |
msgid "Requires an active Google Ads Conversion ID"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: classes/admin/class-admin.php:
|
344 |
msgid "The Google Optimize container ID looks like this:"
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: classes/admin/class-admin.php:
|
348 |
msgid "The Meta (Facebook) pixel ID looks similar to this:"
|
349 |
msgstr ""
|
350 |
|
351 |
-
#: classes/admin/class-admin.php:
|
352 |
msgid "The Microsoft Advertising UET tag ID looks similar to this:"
|
353 |
msgstr ""
|
354 |
|
355 |
-
#: classes/admin/class-admin.php:
|
356 |
msgid "The Twitter pixel ID looks similar to this:"
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: classes/admin/class-admin.php:
|
360 |
msgid "The Pinterest pixel ID looks similar to this:"
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: classes/admin/class-admin.php:
|
364 |
msgid "The Snapchat pixel ID looks similar to this:"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: classes/admin/class-admin.php:
|
368 |
msgid "The TikTok pixel ID looks similar to this:"
|
369 |
msgstr ""
|
370 |
|
371 |
-
#: classes/admin/class-admin.php:
|
372 |
msgid "The Hotjar site ID looks similar to this:"
|
373 |
msgstr ""
|
374 |
|
375 |
-
#: classes/admin/class-admin.php:
|
376 |
msgid "Use order_subtotal: Doesn't include tax and shipping (default)"
|
377 |
msgstr ""
|
378 |
|
379 |
-
#: classes/admin/class-admin.php:
|
380 |
msgid "Use order_total: Includes tax and shipping"
|
381 |
msgstr ""
|
382 |
|
383 |
-
#: classes/admin/class-admin.php:
|
384 |
msgid "This is the order total amount reported back to Google Ads"
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: classes/admin/class-admin.php:
|
388 |
msgid "open the documentation"
|
389 |
msgstr ""
|
390 |
|
391 |
-
#: classes/admin/class-admin.php:
|
392 |
msgid "Enable Google consent mode with standard settings"
|
393 |
msgstr ""
|
394 |
|
395 |
-
#: classes/admin/class-admin.php:
|
396 |
msgid "If no region is set, then the restrictions are enabled for all regions. If you specify one or more regions, then the restrictions only apply for the specified regions."
|
397 |
msgstr ""
|
398 |
|
399 |
-
#: classes/admin/class-admin.php:
|
400 |
msgid "Enable Google Analytics enhanced e-commerce"
|
401 |
msgstr ""
|
402 |
|
403 |
-
#: classes/admin/class-admin.php:
|
404 |
-
#: classes/admin/class-admin.php:
|
405 |
-
#: classes/admin/class-admin.php:
|
406 |
msgid "You need to activate at least Google Analytics UA or Google Analytics 4"
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: classes/admin/class-admin.php:
|
410 |
msgid "Google Analytics 4 activation required"
|
411 |
msgstr ""
|
412 |
|
413 |
-
#: classes/admin/class-admin.php:
|
414 |
msgid "Enhanced E-Commerce activation required"
|
415 |
msgstr ""
|
416 |
|
417 |
-
#: classes/admin/class-admin.php:
|
418 |
msgid "If enabled, purchase and refund events will be sent to Google through the measurement protocol for increased accuracy."
|
419 |
msgstr ""
|
420 |
|
421 |
-
#: classes/admin/class-admin.php:
|
422 |
msgid "Enable Google Analytics enhanced link attribution"
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: classes/admin/class-admin.php:
|
426 |
msgid "Enable Google user ID"
|
427 |
msgstr ""
|
428 |
|
429 |
-
#: classes/admin/class-admin.php:
|
430 |
msgid "Enable Google Ads Enhanced Conversions"
|
431 |
msgstr ""
|
432 |
|
433 |
-
#: classes/admin/class-admin.php:
|
434 |
msgid "You need to activate Google Ads"
|
435 |
msgstr ""
|
436 |
|
437 |
-
#: classes/admin/class-admin.php:
|
438 |
msgid "The Google Ads phone conversion number must be in the same format as on the website."
|
439 |
msgstr ""
|
440 |
|
441 |
-
#: classes/admin/class-admin.php:
|
442 |
msgid "Borlabs Cookie detected. Automatic support is:"
|
443 |
msgstr ""
|
444 |
|
445 |
-
#: classes/admin/class-admin.php:
|
446 |
msgid "Cookiebot detected. Automatic support is:"
|
447 |
msgstr ""
|
448 |
|
449 |
-
#: classes/admin/class-admin.php:
|
450 |
msgid "Complianz GDPR detected. Automatic support is:"
|
451 |
msgstr ""
|
452 |
|
453 |
-
#: classes/admin/class-admin.php:
|
454 |
msgid "Cookie Notice (by hu-manity.co) detected. Automatic support is:"
|
455 |
msgstr ""
|
456 |
|
457 |
-
#: classes/admin/class-admin.php:
|
458 |
msgid "Cookie Script (by cookie-script.com) detected. Automatic support is:"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: classes/admin/class-admin.php:
|
462 |
msgid "GDPR Cookie Compliance (by Moove Agency) detected. Automatic support is:"
|
463 |
msgstr ""
|
464 |
|
465 |
-
#: classes/admin/class-admin.php:
|
466 |
msgid "GDPR Cookie Consent (by WebToffee) detected. Automatic support is:"
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: classes/admin/class-admin.php:
|
470 |
msgid "Enable Explicit Consent Mode"
|
471 |
msgstr ""
|
472 |
|
473 |
-
#: classes/admin/class-admin.php:
|
474 |
msgid "Only activate the Explicit Consent Mode if you are also using a Cookie Management Platform (a cookie banner) that is compatible with this plugin. Find a list of compatible plugins in the documentation."
|
475 |
msgstr ""
|
476 |
|
477 |
-
#: classes/admin/class-admin.php:
|
478 |
-
#: classes/admin/class-admin.php:
|
479 |
-
#: classes/admin/class-admin.php:
|
480 |
-
#: classes/admin/class-admin.php:
|
481 |
msgid "You need to activate the Meta (Facebook) pixel"
|
482 |
msgstr ""
|
483 |
|
484 |
-
#: classes/admin/class-admin.php:
|
485 |
msgid "Send CAPI hits for anonymous visitors who likely have blocked the Meta (Facebook) pixel."
|
486 |
msgstr ""
|
487 |
|
488 |
-
#: classes/admin/class-admin.php:
|
489 |
msgid "Include additional visitor's identifiers, such as IP address, email and shop ID in the CAPI hit."
|
490 |
msgstr ""
|
491 |
|
492 |
-
#: classes/admin/class-admin.php:
|
493 |
msgid "Enable Meta (Facebook) product microdata output"
|
494 |
msgstr ""
|
495 |
|
496 |
-
#: classes/admin/class-admin.php:
|
497 |
msgid "Only disable order duplication prevention for testing. Remember to re-enable the setting once done."
|
498 |
msgstr ""
|
499 |
|
500 |
-
#: classes/admin/class-admin.php:
|
501 |
msgid "Enable the maximum compatibility mode"
|
502 |
msgstr ""
|
503 |
|
504 |
-
#: classes/admin/class-admin.php:
|
505 |
msgid "Advanced order duplication prevention is "
|
506 |
msgstr ""
|
507 |
|
508 |
-
#: classes/admin/class-admin.php:
|
509 |
msgid "Basic order duplication prevention is "
|
510 |
msgstr ""
|
511 |
|
512 |
-
#: classes/admin/class-admin.php:
|
513 |
msgid "Enable dynamic remarketing audience collection"
|
514 |
msgstr ""
|
515 |
|
516 |
-
#: classes/admin/class-admin.php:
|
517 |
msgid "You need to choose the correct product identifier setting in order to match the product identifiers in the product feeds."
|
518 |
msgstr ""
|
519 |
|
520 |
-
#: classes/admin/class-admin.php:
|
521 |
msgid "Enable variations output"
|
522 |
msgstr ""
|
523 |
|
524 |
-
#: classes/admin/class-admin.php:
|
525 |
msgid "In order for this to work you need to upload your product feed including product variations and the item_group_id. Disable it, if you choose only to upload the parent product for variable products."
|
526 |
msgstr ""
|
527 |
|
528 |
-
#: classes/admin/class-admin.php:
|
529 |
msgid "Retail"
|
530 |
msgstr ""
|
531 |
|
532 |
-
#: classes/admin/class-admin.php:
|
533 |
msgid "Education"
|
534 |
msgstr ""
|
535 |
|
536 |
-
#: classes/admin/class-admin.php:
|
537 |
msgid "Hotels and rentals"
|
538 |
msgstr ""
|
539 |
|
540 |
-
#: classes/admin/class-admin.php:
|
541 |
msgid "Jobs"
|
542 |
msgstr ""
|
543 |
|
544 |
-
#: classes/admin/class-admin.php:
|
545 |
msgid "Local deals"
|
546 |
msgstr ""
|
547 |
|
548 |
-
#: classes/admin/class-admin.php:
|
549 |
msgid "Real estate"
|
550 |
msgstr ""
|
551 |
|
552 |
-
#: classes/admin/class-admin.php:
|
553 |
msgid "Custom"
|
554 |
msgstr ""
|
555 |
|
556 |
-
#: classes/admin/class-admin.php:
|
557 |
msgid "ID of your Google Merchant Center account. It looks like this: 12345678"
|
558 |
msgstr ""
|
559 |
|
560 |
-
#: classes/admin/class-admin.php:
|
561 |
msgid "post ID (default)"
|
562 |
msgstr ""
|
563 |
|
564 |
-
#: classes/admin/class-admin.php:
|
565 |
msgid "SKU"
|
566 |
msgstr ""
|
567 |
|
568 |
-
#: classes/admin/class-admin.php:
|
569 |
msgid "ID for the WooCommerce Google Product Feed. Outputs the post ID with woocommerce_gpf_ prefix *"
|
570 |
msgstr ""
|
571 |
|
572 |
-
#: classes/admin/class-admin.php:
|
573 |
msgid "ID for the WooCommerce Google Listings & Ads Plugin. Outputs the post ID with gla_ prefix **"
|
574 |
msgstr ""
|
575 |
|
576 |
-
#: classes/admin/class-admin.php:
|
577 |
msgid "Choose a product identifier."
|
578 |
msgstr ""
|
579 |
|
580 |
-
#: classes/admin/class-admin.php:
|
581 |
msgid "* This is for users of the WooCommerce Google Product Feed Plugin"
|
582 |
msgstr ""
|
583 |
|
584 |
-
#: classes/admin/class-admin.php:
|
585 |
msgid "** This is for users of the WooCommerce Google Listings & Ads Plugin"
|
586 |
msgstr ""
|
587 |
|
588 |
-
#: classes/admin/class-admin.php:
|
589 |
msgid "beta"
|
590 |
msgstr ""
|
591 |
|
592 |
-
#: classes/admin/class-admin.php:
|
593 |
-
#: classes/admin/class-admin.php:
|
594 |
msgid "active"
|
595 |
msgstr ""
|
596 |
|
597 |
-
#: classes/admin/class-admin.php:
|
598 |
-
#: classes/admin/class-admin.php:
|
599 |
msgid "inactive"
|
600 |
msgstr ""
|
601 |
|
602 |
-
#: classes/admin/class-admin.php:
|
603 |
-
#: classes/admin/class-admin.php:
|
604 |
msgid "partially active"
|
605 |
msgstr ""
|
606 |
|
607 |
-
#: classes/admin/class-admin.php:
|
608 |
msgid "Pro Feature"
|
609 |
msgstr ""
|
610 |
|
611 |
-
#: classes/admin/class-admin.php:
|
612 |
msgid "You have entered an invalid Google Analytics Universal property ID."
|
613 |
msgstr ""
|
614 |
|
615 |
-
#: classes/admin/class-admin.php:
|
616 |
msgid "You have entered an invalid Google Analytics 4 measurement ID."
|
617 |
msgstr ""
|
618 |
|
619 |
-
#: classes/admin/class-admin.php:
|
620 |
msgid "You have entered an invalid Google Analytics 4 API key."
|
621 |
msgstr ""
|
622 |
|
623 |
-
#: classes/admin/class-admin.php:
|
624 |
msgid "You have entered an invalid conversion ID. It only contains 8 to 10 digits."
|
625 |
msgstr ""
|
626 |
|
627 |
-
#: classes/admin/class-admin.php:
|
628 |
-
#: classes/admin/class-admin.php:
|
629 |
msgid "You have entered an invalid conversion label."
|
630 |
msgstr ""
|
631 |
|
632 |
-
#: classes/admin/class-admin.php:
|
633 |
msgid "You have entered an invalid merchant ID. It only contains 6 to 12 digits."
|
634 |
msgstr ""
|
635 |
|
636 |
-
#: classes/admin/class-admin.php:
|
637 |
msgid "You have entered an invalid Google Optimize container ID."
|
638 |
msgstr ""
|
639 |
|
640 |
-
#: classes/admin/class-admin.php:
|
641 |
msgid "You have entered an invalid Meta (Facebook) pixel ID. It only contains 14 to 16 digits."
|
642 |
msgstr ""
|
643 |
|
644 |
-
#: classes/admin/class-admin.php:
|
645 |
msgid "You have entered an invalid Meta (Facebook) CAPI token."
|
646 |
msgstr ""
|
647 |
|
648 |
-
#: classes/admin/class-admin.php:
|
649 |
msgid "You have entered an invalid Bing Ads UET tag ID. It only contains 7 to 9 digits."
|
650 |
msgstr ""
|
651 |
|
652 |
-
#: classes/admin/class-admin.php:
|
653 |
msgid "You have entered an invalid Twitter pixel ID. It only contains 5 to 7 lowercase letters and numbers."
|
654 |
msgstr ""
|
655 |
|
656 |
-
#: classes/admin/class-admin.php:
|
657 |
msgid "You have entered an invalid Pinterest pixel ID. It only contains 13 digits."
|
658 |
msgstr ""
|
659 |
|
660 |
-
#: classes/admin/class-admin.php:
|
661 |
msgid "You have entered an invalid Snapchat pixel ID."
|
662 |
msgstr ""
|
663 |
|
664 |
-
#: classes/admin/class-admin.php:
|
665 |
msgid "You have entered an invalid TikTok pixel ID."
|
666 |
msgstr ""
|
667 |
|
668 |
-
#: classes/admin/class-admin.php:
|
669 |
msgid "You have entered an invalid Hotjar site ID. It only contains 6 to 9 digits."
|
670 |
msgstr ""
|
671 |
|
@@ -734,7 +734,7 @@ msgid "And I swear that I triple checked that the visitor and conversion trackin
|
|
734 |
msgstr ""
|
735 |
|
736 |
#: classes/admin/class-notifications.php:107
|
737 |
-
msgid "The
|
738 |
msgstr ""
|
739 |
|
740 |
#: classes/admin/class-notifications.php:119
|
@@ -747,7 +747,7 @@ msgid "Click here to dismiss this warning forever"
|
|
747 |
msgstr ""
|
748 |
|
749 |
#: classes/admin/class-notifications.php:145
|
750 |
-
msgid "The following plugin is not compatible with the
|
751 |
msgstr ""
|
752 |
|
753 |
#: classes/admin/class-notifications.php:151
|
@@ -762,14 +762,14 @@ msgstr ""
|
|
762 |
msgid "Find more information about the the reason in our documentation: "
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: wgact.php:
|
766 |
-
msgid "
|
767 |
msgstr ""
|
768 |
|
769 |
-
#: wgact.php:
|
770 |
msgid "Your environment doesn't meet all the system requirements listed below."
|
771 |
msgstr ""
|
772 |
|
773 |
-
#: wgact.php:
|
774 |
msgid "The WooCommerce plugin needs to be activated"
|
775 |
msgstr ""
|
2 |
# This file is distributed under the GNU General Public License v3.0.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Pixel Manager for WooCommerce 1.17.0\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/src\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2022-05-12T07:25:26+00:00\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.6.0\n"
|
15 |
"X-Domain: woocommerce-google-adwords-conversion-tracking-tag\n"
|
16 |
|
17 |
#. Plugin Name of the plugin
|
18 |
+
#: wgact.php:208
|
19 |
+
#: wgact.php:209
|
20 |
+
msgid "Pixel Manager for WooCommerce"
|
21 |
msgstr ""
|
22 |
|
23 |
#. Plugin URI of the plugin
|
245 |
msgid "Author"
|
246 |
msgstr ""
|
247 |
|
248 |
+
#: classes/admin/class-admin.php:1090
|
249 |
msgid ""
|
250 |
"It looks like you are using some sort of ad or script blocker which is blocking the script and CSS files of this plugin.\n"
|
251 |
" In order for the plugin to work properly you need to disable the script blocker."
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: classes/admin/class-admin.php:1097
|
255 |
#: classes/admin/class-notifications.php:31
|
256 |
#: classes/admin/class-notifications.php:73
|
257 |
#: classes/admin/class-notifications.php:114
|
259 |
msgid "Learn more"
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: classes/admin/class-admin.php:1142
|
263 |
msgid "Profit Driven Marketing by SweetCode"
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: classes/admin/class-admin.php:1167
|
267 |
msgid "Visit us here:"
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: classes/admin/class-admin.php:1212
|
271 |
msgid "Contacting Support"
|
272 |
msgstr ""
|
273 |
|
274 |
+
#: classes/admin/class-admin.php:1226
|
275 |
msgid "Debug Information"
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: classes/admin/class-admin.php:1235
|
279 |
msgid "copy to clipboard"
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: classes/admin/class-admin.php:1249
|
283 |
msgid "Translations"
|
284 |
msgstr ""
|
285 |
|
286 |
+
#: classes/admin/class-admin.php:1250
|
287 |
msgid "If you want to participate improving the translations of this plugin into your language, please follow this link:"
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: classes/admin/class-admin.php:1268
|
291 |
msgid "Post a support request in the WordPress support forum here: "
|
292 |
msgstr ""
|
293 |
|
294 |
+
#: classes/admin/class-admin.php:1271
|
295 |
msgid "Support forum"
|
296 |
msgstr ""
|
297 |
|
298 |
+
#: classes/admin/class-admin.php:1275
|
299 |
msgid "(Never post the debug or other sensitive information to the support forum. Instead send us the information by email.)"
|
300 |
msgstr ""
|
301 |
|
302 |
+
#: classes/admin/class-admin.php:1278
|
303 |
msgid "Or send us an email to the following address: "
|
304 |
msgstr ""
|
305 |
|
306 |
+
#: classes/admin/class-admin.php:1294
|
307 |
msgid "Send us your support request through the WooCommerce.com dashboard: "
|
308 |
msgstr ""
|
309 |
|
310 |
+
#: classes/admin/class-admin.php:1308
|
311 |
msgid "More details about the developer of this plugin: "
|
312 |
msgstr ""
|
313 |
|
314 |
+
#: classes/admin/class-admin.php:1311
|
315 |
msgid "Developer: SweetCode"
|
316 |
msgstr ""
|
317 |
|
318 |
+
#: classes/admin/class-admin.php:1313
|
319 |
msgid "Website: "
|
320 |
msgstr ""
|
321 |
|
322 |
+
#: classes/admin/class-admin.php:1336
|
323 |
msgid "The Google Analytics Universal property ID looks like this:"
|
324 |
msgstr ""
|
325 |
|
326 |
+
#: classes/admin/class-admin.php:1352
|
327 |
msgid "The Google Analytics 4 measurement ID looks like this:"
|
328 |
msgstr ""
|
329 |
|
330 |
+
#: classes/admin/class-admin.php:1368
|
331 |
msgid "The conversion ID looks similar to this:"
|
332 |
msgstr ""
|
333 |
|
334 |
+
#: classes/admin/class-admin.php:1384
|
335 |
msgid "The purchase conversion label looks similar to this:"
|
336 |
msgstr ""
|
337 |
|
338 |
+
#: classes/admin/class-admin.php:1388
|
339 |
+
#: classes/admin/class-admin.php:2115
|
340 |
msgid "Requires an active Google Ads Conversion ID"
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: classes/admin/class-admin.php:1406
|
344 |
msgid "The Google Optimize container ID looks like this:"
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: classes/admin/class-admin.php:1422
|
348 |
msgid "The Meta (Facebook) pixel ID looks similar to this:"
|
349 |
msgstr ""
|
350 |
|
351 |
+
#: classes/admin/class-admin.php:1440
|
352 |
msgid "The Microsoft Advertising UET tag ID looks similar to this:"
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: classes/admin/class-admin.php:1459
|
356 |
msgid "The Twitter pixel ID looks similar to this:"
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: classes/admin/class-admin.php:1478
|
360 |
msgid "The Pinterest pixel ID looks similar to this:"
|
361 |
msgstr ""
|
362 |
|
363 |
+
#: classes/admin/class-admin.php:1497
|
364 |
msgid "The Snapchat pixel ID looks similar to this:"
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: classes/admin/class-admin.php:1516
|
368 |
msgid "The TikTok pixel ID looks similar to this:"
|
369 |
msgstr ""
|
370 |
|
371 |
+
#: classes/admin/class-admin.php:1528
|
372 |
msgid "The Hotjar site ID looks similar to this:"
|
373 |
msgstr ""
|
374 |
|
375 |
+
#: classes/admin/class-admin.php:1538
|
376 |
msgid "Use order_subtotal: Doesn't include tax and shipping (default)"
|
377 |
msgstr ""
|
378 |
|
379 |
+
#: classes/admin/class-admin.php:1545
|
380 |
msgid "Use order_total: Includes tax and shipping"
|
381 |
msgstr ""
|
382 |
|
383 |
+
#: classes/admin/class-admin.php:1548
|
384 |
msgid "This is the order total amount reported back to Google Ads"
|
385 |
msgstr ""
|
386 |
|
387 |
+
#: classes/admin/class-admin.php:1568
|
388 |
msgid "open the documentation"
|
389 |
msgstr ""
|
390 |
|
391 |
+
#: classes/admin/class-admin.php:1588
|
392 |
msgid "Enable Google consent mode with standard settings"
|
393 |
msgstr ""
|
394 |
|
395 |
+
#: classes/admin/class-admin.php:1626
|
396 |
msgid "If no region is set, then the restrictions are enabled for all regions. If you specify one or more regions, then the restrictions only apply for the specified regions."
|
397 |
msgstr ""
|
398 |
|
399 |
+
#: classes/admin/class-admin.php:1647
|
400 |
msgid "Enable Google Analytics enhanced e-commerce"
|
401 |
msgstr ""
|
402 |
|
403 |
+
#: classes/admin/class-admin.php:1658
|
404 |
+
#: classes/admin/class-admin.php:1719
|
405 |
+
#: classes/admin/class-admin.php:1749
|
406 |
msgid "You need to activate at least Google Analytics UA or Google Analytics 4"
|
407 |
msgstr ""
|
408 |
|
409 |
+
#: classes/admin/class-admin.php:1680
|
410 |
msgid "Google Analytics 4 activation required"
|
411 |
msgstr ""
|
412 |
|
413 |
+
#: classes/admin/class-admin.php:1685
|
414 |
msgid "Enhanced E-Commerce activation required"
|
415 |
msgstr ""
|
416 |
|
417 |
+
#: classes/admin/class-admin.php:1688
|
418 |
msgid "If enabled, purchase and refund events will be sent to Google through the measurement protocol for increased accuracy."
|
419 |
msgstr ""
|
420 |
|
421 |
+
#: classes/admin/class-admin.php:1703
|
422 |
msgid "Enable Google Analytics enhanced link attribution"
|
423 |
msgstr ""
|
424 |
|
425 |
+
#: classes/admin/class-admin.php:1738
|
426 |
msgid "Enable Google user ID"
|
427 |
msgstr ""
|
428 |
|
429 |
+
#: classes/admin/class-admin.php:1768
|
430 |
msgid "Enable Google Ads Enhanced Conversions"
|
431 |
msgstr ""
|
432 |
|
433 |
+
#: classes/admin/class-admin.php:1779
|
434 |
msgid "You need to activate Google Ads"
|
435 |
msgstr ""
|
436 |
|
437 |
+
#: classes/admin/class-admin.php:1799
|
438 |
msgid "The Google Ads phone conversion number must be in the same format as on the website."
|
439 |
msgstr ""
|
440 |
|
441 |
+
#: classes/admin/class-admin.php:1821
|
442 |
msgid "Borlabs Cookie detected. Automatic support is:"
|
443 |
msgstr ""
|
444 |
|
445 |
+
#: classes/admin/class-admin.php:1827
|
446 |
msgid "Cookiebot detected. Automatic support is:"
|
447 |
msgstr ""
|
448 |
|
449 |
+
#: classes/admin/class-admin.php:1833
|
450 |
msgid "Complianz GDPR detected. Automatic support is:"
|
451 |
msgstr ""
|
452 |
|
453 |
+
#: classes/admin/class-admin.php:1839
|
454 |
msgid "Cookie Notice (by hu-manity.co) detected. Automatic support is:"
|
455 |
msgstr ""
|
456 |
|
457 |
+
#: classes/admin/class-admin.php:1845
|
458 |
msgid "Cookie Script (by cookie-script.com) detected. Automatic support is:"
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: classes/admin/class-admin.php:1851
|
462 |
msgid "GDPR Cookie Compliance (by Moove Agency) detected. Automatic support is:"
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: classes/admin/class-admin.php:1857
|
466 |
msgid "GDPR Cookie Consent (by WebToffee) detected. Automatic support is:"
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: classes/admin/class-admin.php:1876
|
470 |
msgid "Enable Explicit Consent Mode"
|
471 |
msgstr ""
|
472 |
|
473 |
+
#: classes/admin/class-admin.php:1885
|
474 |
msgid "Only activate the Explicit Consent Mode if you are also using a Cookie Management Platform (a cookie banner) that is compatible with this plugin. Find a list of compatible plugins in the documentation."
|
475 |
msgstr ""
|
476 |
|
477 |
+
#: classes/admin/class-admin.php:1904
|
478 |
+
#: classes/admin/class-admin.php:1937
|
479 |
+
#: classes/admin/class-admin.php:1966
|
480 |
+
#: classes/admin/class-admin.php:1994
|
481 |
msgid "You need to activate the Meta (Facebook) pixel"
|
482 |
msgstr ""
|
483 |
|
484 |
+
#: classes/admin/class-admin.php:1928
|
485 |
msgid "Send CAPI hits for anonymous visitors who likely have blocked the Meta (Facebook) pixel."
|
486 |
msgstr ""
|
487 |
|
488 |
+
#: classes/admin/class-admin.php:1957
|
489 |
msgid "Include additional visitor's identifiers, such as IP address, email and shop ID in the CAPI hit."
|
490 |
msgstr ""
|
491 |
|
492 |
+
#: classes/admin/class-admin.php:1985
|
493 |
msgid "Enable Meta (Facebook) product microdata output"
|
494 |
msgstr ""
|
495 |
|
496 |
+
#: classes/admin/class-admin.php:2021
|
497 |
msgid "Only disable order duplication prevention for testing. Remember to re-enable the setting once done."
|
498 |
msgstr ""
|
499 |
|
500 |
+
#: classes/admin/class-admin.php:2038
|
501 |
msgid "Enable the maximum compatibility mode"
|
502 |
msgstr ""
|
503 |
|
504 |
+
#: classes/admin/class-admin.php:2074
|
505 |
msgid "Advanced order duplication prevention is "
|
506 |
msgstr ""
|
507 |
|
508 |
+
#: classes/admin/class-admin.php:2076
|
509 |
msgid "Basic order duplication prevention is "
|
510 |
msgstr ""
|
511 |
|
512 |
+
#: classes/admin/class-admin.php:2100
|
513 |
msgid "Enable dynamic remarketing audience collection"
|
514 |
msgstr ""
|
515 |
|
516 |
+
#: classes/admin/class-admin.php:2121
|
517 |
msgid "You need to choose the correct product identifier setting in order to match the product identifiers in the product feeds."
|
518 |
msgstr ""
|
519 |
|
520 |
+
#: classes/admin/class-admin.php:2139
|
521 |
msgid "Enable variations output"
|
522 |
msgstr ""
|
523 |
|
524 |
+
#: classes/admin/class-admin.php:2150
|
525 |
msgid "In order for this to work you need to upload your product feed including product variations and the item_group_id. Disable it, if you choose only to upload the parent product for variable products."
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: classes/admin/class-admin.php:2165
|
529 |
msgid "Retail"
|
530 |
msgstr ""
|
531 |
|
532 |
+
#: classes/admin/class-admin.php:2175
|
533 |
msgid "Education"
|
534 |
msgstr ""
|
535 |
|
536 |
+
#: classes/admin/class-admin.php:2185
|
537 |
msgid "Hotels and rentals"
|
538 |
msgstr ""
|
539 |
|
540 |
+
#: classes/admin/class-admin.php:2195
|
541 |
msgid "Jobs"
|
542 |
msgstr ""
|
543 |
|
544 |
+
#: classes/admin/class-admin.php:2205
|
545 |
msgid "Local deals"
|
546 |
msgstr ""
|
547 |
|
548 |
+
#: classes/admin/class-admin.php:2215
|
549 |
msgid "Real estate"
|
550 |
msgstr ""
|
551 |
|
552 |
+
#: classes/admin/class-admin.php:2225
|
553 |
msgid "Custom"
|
554 |
msgstr ""
|
555 |
|
556 |
+
#: classes/admin/class-admin.php:2244
|
557 |
msgid "ID of your Google Merchant Center account. It looks like this: 12345678"
|
558 |
msgstr ""
|
559 |
|
560 |
+
#: classes/admin/class-admin.php:2253
|
561 |
msgid "post ID (default)"
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: classes/admin/class-admin.php:2259
|
565 |
msgid "SKU"
|
566 |
msgstr ""
|
567 |
|
568 |
+
#: classes/admin/class-admin.php:2266
|
569 |
msgid "ID for the WooCommerce Google Product Feed. Outputs the post ID with woocommerce_gpf_ prefix *"
|
570 |
msgstr ""
|
571 |
|
572 |
+
#: classes/admin/class-admin.php:2273
|
573 |
msgid "ID for the WooCommerce Google Listings & Ads Plugin. Outputs the post ID with gla_ prefix **"
|
574 |
msgstr ""
|
575 |
|
576 |
+
#: classes/admin/class-admin.php:2277
|
577 |
msgid "Choose a product identifier."
|
578 |
msgstr ""
|
579 |
|
580 |
+
#: classes/admin/class-admin.php:2280
|
581 |
msgid "* This is for users of the WooCommerce Google Product Feed Plugin"
|
582 |
msgstr ""
|
583 |
|
584 |
+
#: classes/admin/class-admin.php:2284
|
585 |
msgid "** This is for users of the WooCommerce Google Listings & Ads Plugin"
|
586 |
msgstr ""
|
587 |
|
588 |
+
#: classes/admin/class-admin.php:2293
|
589 |
msgid "beta"
|
590 |
msgstr ""
|
591 |
|
592 |
+
#: classes/admin/class-admin.php:2297
|
593 |
+
#: classes/admin/class-admin.php:2302
|
594 |
msgid "active"
|
595 |
msgstr ""
|
596 |
|
597 |
+
#: classes/admin/class-admin.php:2307
|
598 |
+
#: classes/admin/class-admin.php:2312
|
599 |
msgid "inactive"
|
600 |
msgstr ""
|
601 |
|
602 |
+
#: classes/admin/class-admin.php:2317
|
603 |
+
#: classes/admin/class-admin.php:2322
|
604 |
msgid "partially active"
|
605 |
msgstr ""
|
606 |
|
607 |
+
#: classes/admin/class-admin.php:2333
|
608 |
msgid "Pro Feature"
|
609 |
msgstr ""
|
610 |
|
611 |
+
#: classes/admin/class-admin.php:2377
|
612 |
msgid "You have entered an invalid Google Analytics Universal property ID."
|
613 |
msgstr ""
|
614 |
|
615 |
+
#: classes/admin/class-admin.php:2385
|
616 |
msgid "You have entered an invalid Google Analytics 4 measurement ID."
|
617 |
msgstr ""
|
618 |
|
619 |
+
#: classes/admin/class-admin.php:2393
|
620 |
msgid "You have entered an invalid Google Analytics 4 API key."
|
621 |
msgstr ""
|
622 |
|
623 |
+
#: classes/admin/class-admin.php:2401
|
624 |
msgid "You have entered an invalid conversion ID. It only contains 8 to 10 digits."
|
625 |
msgstr ""
|
626 |
|
627 |
+
#: classes/admin/class-admin.php:2409
|
628 |
+
#: classes/admin/class-admin.php:2417
|
629 |
msgid "You have entered an invalid conversion label."
|
630 |
msgstr ""
|
631 |
|
632 |
+
#: classes/admin/class-admin.php:2425
|
633 |
msgid "You have entered an invalid merchant ID. It only contains 6 to 12 digits."
|
634 |
msgstr ""
|
635 |
|
636 |
+
#: classes/admin/class-admin.php:2433
|
637 |
msgid "You have entered an invalid Google Optimize container ID."
|
638 |
msgstr ""
|
639 |
|
640 |
+
#: classes/admin/class-admin.php:2441
|
641 |
msgid "You have entered an invalid Meta (Facebook) pixel ID. It only contains 14 to 16 digits."
|
642 |
msgstr ""
|
643 |
|
644 |
+
#: classes/admin/class-admin.php:2449
|
645 |
msgid "You have entered an invalid Meta (Facebook) CAPI token."
|
646 |
msgstr ""
|
647 |
|
648 |
+
#: classes/admin/class-admin.php:2457
|
649 |
msgid "You have entered an invalid Bing Ads UET tag ID. It only contains 7 to 9 digits."
|
650 |
msgstr ""
|
651 |
|
652 |
+
#: classes/admin/class-admin.php:2465
|
653 |
msgid "You have entered an invalid Twitter pixel ID. It only contains 5 to 7 lowercase letters and numbers."
|
654 |
msgstr ""
|
655 |
|
656 |
+
#: classes/admin/class-admin.php:2473
|
657 |
msgid "You have entered an invalid Pinterest pixel ID. It only contains 13 digits."
|
658 |
msgstr ""
|
659 |
|
660 |
+
#: classes/admin/class-admin.php:2481
|
661 |
msgid "You have entered an invalid Snapchat pixel ID."
|
662 |
msgstr ""
|
663 |
|
664 |
+
#: classes/admin/class-admin.php:2489
|
665 |
msgid "You have entered an invalid TikTok pixel ID."
|
666 |
msgstr ""
|
667 |
|
668 |
+
#: classes/admin/class-admin.php:2497
|
669 |
msgid "You have entered an invalid Hotjar site ID. It only contains 6 to 9 digits."
|
670 |
msgstr ""
|
671 |
|
734 |
msgstr ""
|
735 |
|
736 |
#: classes/admin/class-notifications.php:107
|
737 |
+
msgid "The Pixel Manager for WooCommerce plugin detected that the PayPal standard payment gateway is active. The PayPal standard payment gateway is an off-site payment gateway which impairs conversion tracking significantly. Please switch to an on-site payment gateway as soon as possible in order to increase your conversion tracking accuracy."
|
738 |
msgstr ""
|
739 |
|
740 |
#: classes/admin/class-notifications.php:119
|
747 |
msgstr ""
|
748 |
|
749 |
#: classes/admin/class-notifications.php:145
|
750 |
+
msgid "The following plugin is not compatible with the Pixel Manager for WooCommerce: "
|
751 |
msgstr ""
|
752 |
|
753 |
#: classes/admin/class-notifications.php:151
|
762 |
msgid "Find more information about the the reason in our documentation: "
|
763 |
msgstr ""
|
764 |
|
765 |
+
#: wgact.php:224
|
766 |
+
msgid "Pixel Manager for WooCommerce error"
|
767 |
msgstr ""
|
768 |
|
769 |
+
#: wgact.php:226
|
770 |
msgid "Your environment doesn't meet all the system requirements listed below."
|
771 |
msgstr ""
|
772 |
|
773 |
+
#: wgact.php:230
|
774 |
msgid "The WooCommerce plugin needs to be activated"
|
775 |
msgstr ""
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
===
|
2 |
Contributors: alekv, wolfbaer
|
3 |
Tags: woocommerce, google ads, google analytics, facebook pixel, conversion tracking, dynamic retargeting, remarketing, meta pixel, facebook conversion api, woocommerce google, woocommerce facebook
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 5.9
|
6 |
Requires PHP: 7.3
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -21,7 +21,7 @@ Out of many things, probably high tracking accuracy and a simple user interface
|
|
21 |
|
22 |
Additionally, to the standard features offered by the tracking pixels we've developed more functional layers into the plugin which help increase measurement accuracy. For instance, if the plugin detects problems in the shop setup that might lower or prevent accurate tracking, it either fixes them seamlessly, or shows warnings with guidance on how to fix the problems.
|
23 |
|
24 |
-
Read more about the importance of tracking accuracy over [here](https://sweetcode.com/docs/wpm/faq/?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=
|
25 |
|
26 |
<strong>The plugin comes with integrations for:</strong>
|
27 |
|
@@ -98,11 +98,11 @@ The plugin supports and works with following third party plugins.
|
|
98 |
|
99 |
<strong>Documentation</strong>
|
100 |
|
101 |
-
Link to the full documentation of the plugin: [Open the documentation](https://sweetcode.com/docs/wpm/?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=
|
102 |
|
103 |
<strong>Roadmap</strong>
|
104 |
|
105 |
-
Take a look at our [roadmap](https://roadmap.sweetcode.com/
|
106 |
|
107 |
<strong>Cookie Consent Management</strong>
|
108 |
|
@@ -118,13 +118,13 @@ It works with the following Cookie Consent Management plugins out of the box:
|
|
118 |
* [Cookie Law Info](https://wordpress.org/plugins/cookie-law-info/)
|
119 |
* [GDPR Cookie Compliance](https://wordpress.org/plugins/gdpr-cookie-compliance/)
|
120 |
* [Borlabs Cookie](https://borlabs.io/borlabs-cookie/) (from version 2.1.0)
|
121 |
-
[Borlabs Cookie Setup](https://sweetcode.com/docs/wpm/consent-management/borlabs-cookie?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=
|
122 |
|
123 |
-
Please read the following for additional [setup information](https://sweetcode.com/docs/wpm/consent-management/platforms?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=
|
124 |
|
125 |
<strong>Requirements</strong>
|
126 |
|
127 |
-
[List of requirements](https://sweetcode.com/docs/wpm/setup/requirements?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=
|
128 |
|
129 |
== Installation ==
|
130 |
|
@@ -137,7 +137,7 @@ Please read the following for additional [setup information](https://sweetcode.c
|
|
137 |
|
138 |
= Is there detailed documentation for the plugin? =
|
139 |
|
140 |
-
Yes. Head over to this link: [Documentation](https://sweetcode.com/docs/wpm/?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=
|
141 |
|
142 |
= How do I check if the plugin is working properly? =
|
143 |
|
@@ -177,7 +177,7 @@ Therefore, we recommend admins of the shop to exclude their own shop from the bl
|
|
177 |
|
178 |
= Where can I report a bug or suggest improvements? =
|
179 |
|
180 |
-
Please post your problem in the
|
181 |
You can send the link to the front page of your shop too if you think it would be of help.
|
182 |
|
183 |
== Screenshots ==
|
@@ -186,6 +186,18 @@ You can send the link to the front page of your shop too if you think it would b
|
|
186 |
|
187 |
== Changelog ==
|
188 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
= 1.16.14 = 02.05.2022
|
190 |
|
191 |
|
@@ -319,8 +331,8 @@ Fix: Fix for view item events on single variation pages
|
|
319 |
|
320 |
= 1.15.0 = 15.03.2022
|
321 |
|
322 |
-
* Experiment: Added experimental filter which defers the WPM script. The filter may be removed without prior notice. If you like the filter vote it up over here: https://
|
323 |
-
* Experiment: Added experimental filter which moves the WPM script to the footer. The filter may be removed without prior notice. If you like the filter vote it up over here: https://
|
324 |
* Tweak: Moved sourcemaps into correct folder
|
325 |
* Tweak: Moved parts of the back-end logic to the front-end in order to gain much more flexibility and better handle front-end script flow
|
326 |
* Tweak: Bumped up WC version
|
1 |
+
=== Pixel Manager for WooCommerce ===
|
2 |
Contributors: alekv, wolfbaer
|
3 |
Tags: woocommerce, google ads, google analytics, facebook pixel, conversion tracking, dynamic retargeting, remarketing, meta pixel, facebook conversion api, woocommerce google, woocommerce facebook
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 5.9
|
6 |
Requires PHP: 7.3
|
7 |
+
Stable tag: 1.17.0
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
21 |
|
22 |
Additionally, to the standard features offered by the tracking pixels we've developed more functional layers into the plugin which help increase measurement accuracy. For instance, if the plugin detects problems in the shop setup that might lower or prevent accurate tracking, it either fixes them seamlessly, or shows warnings with guidance on how to fix the problems.
|
23 |
|
24 |
+
Read more about the importance of tracking accuracy over [here](https://sweetcode.com/docs/wpm/faq/?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=tracking-accuracy#why-is-tracking-accuracy-so-important).
|
25 |
|
26 |
<strong>The plugin comes with integrations for:</strong>
|
27 |
|
98 |
|
99 |
<strong>Documentation</strong>
|
100 |
|
101 |
+
Link to the full documentation of the plugin: [Open the documentation](https://sweetcode.com/docs/wpm/?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=pixel-manager-for-woocommerce-docs)
|
102 |
|
103 |
<strong>Roadmap</strong>
|
104 |
|
105 |
+
Take a look at our [roadmap](https://roadmap.sweetcode.com/pixel-manager-for-woocommerce) to see what's coming next.
|
106 |
|
107 |
<strong>Cookie Consent Management</strong>
|
108 |
|
118 |
* [Cookie Law Info](https://wordpress.org/plugins/cookie-law-info/)
|
119 |
* [GDPR Cookie Compliance](https://wordpress.org/plugins/gdpr-cookie-compliance/)
|
120 |
* [Borlabs Cookie](https://borlabs.io/borlabs-cookie/) (from version 2.1.0)
|
121 |
+
[Borlabs Cookie Setup](https://sweetcode.com/docs/wpm/consent-management/borlabs-cookie?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=borlabs-cookie)
|
122 |
|
123 |
+
Please read the following for additional [setup information](https://sweetcode.com/docs/wpm/consent-management/platforms?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=cookie-consent-plugins)
|
124 |
|
125 |
<strong>Requirements</strong>
|
126 |
|
127 |
+
[List of requirements](https://sweetcode.com/docs/wpm/setup/requirements?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=requirements)
|
128 |
|
129 |
== Installation ==
|
130 |
|
137 |
|
138 |
= Is there detailed documentation for the plugin? =
|
139 |
|
140 |
+
Yes. Head over to this link: [Documentation](https://sweetcode.com/docs/wpm/?utm_source=wordpress.org&utm_medium=wpm-plugin-page&utm_campaign=pixel-manager-for-woocommerce-docs)
|
141 |
|
142 |
= How do I check if the plugin is working properly? =
|
143 |
|
177 |
|
178 |
= Where can I report a bug or suggest improvements? =
|
179 |
|
180 |
+
Please post your problem in the Pixel Manager for WooCommerce Support forum: http://wordpress.org/support/plugin/woocommerce-google-adwords-conversion-tracking-tag
|
181 |
You can send the link to the front page of your shop too if you think it would be of help.
|
182 |
|
183 |
== Screenshots ==
|
186 |
|
187 |
== Changelog ==
|
188 |
|
189 |
+
= 1.17.0 = 12.05.2022
|
190 |
+
|
191 |
+
|
192 |
+
* New: Added customer lifetime value output for Google Ads
|
193 |
+
* Tweak: Renamed the plugin from Pixel Manager for WooCommerce to Pixel Manager for WooCommerce
|
194 |
+
* Tweak: Added user identifiers for FB for orders and logged in users
|
195 |
+
* Tweak: Temporary disabled off_site_payment_gateway check
|
196 |
+
* Fix: Now the cache is only flushed when the Pixel Manager itself is updated
|
197 |
+
* Fix: Fixed the new_customer evaluation for guest buyers
|
198 |
+
* Fix: Fixed the position of the 'scripts blocked' warning message in the back-end if admin scripts don't load
|
199 |
+
* Fix: Fixed the link of the 'admin scripts not loaded' message
|
200 |
+
|
201 |
= 1.16.14 = 02.05.2022
|
202 |
|
203 |
|
331 |
|
332 |
= 1.15.0 = 15.03.2022
|
333 |
|
334 |
+
* Experiment: Added experimental filter which defers the WPM script. The filter may be removed without prior notice. If you like the filter vote it up over here: https://roadmap.sweetcode.com/pixel-manager-for-woocommerce?card=622f4ba9d0b938002e8378c0
|
335 |
+
* Experiment: Added experimental filter which moves the WPM script to the footer. The filter may be removed without prior notice. If you like the filter vote it up over here: https://roadmap.sweetcode.com/pixel-manager-for-woocommerce?card=622f4bc2d0b938002e8378e2
|
336 |
* Tweak: Moved sourcemaps into correct folder
|
337 |
* Tweak: Moved parts of the back-end logic to the front-end in order to gain much more flexibility and better handle front-end script flow
|
338 |
* Tweak: Bumped up WC version
|
wgact.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
-
* Plugin Name:
|
5 |
* Description: Visitor and conversion value tracking for WooCommerce. Highly optimized for data accuracy.
|
6 |
* Author: SweetCode
|
7 |
* Plugin URI: https://wordpress.org/plugins/woocommerce-google-adwords-conversion-tracking-tag/
|
@@ -10,7 +10,7 @@
|
|
10 |
* Developer URI: https://sweetcode.com
|
11 |
* Text Domain: woocommerce-google-adwords-conversion-tracking-tag
|
12 |
* Domain path: /languages
|
13 |
-
* * Version: 1.
|
14 |
*
|
15 |
* WC requires at least: 3.7
|
16 |
* WC tested up to: 6.4
|
@@ -20,7 +20,7 @@
|
|
20 |
*
|
21 |
*
|
22 |
**/
|
23 |
-
const WPM_CURRENT_VERSION = '1.
|
24 |
// TODO export settings function
|
25 |
// TODO add option checkbox on uninstall and ask if user wants to delete options from db
|
26 |
|
@@ -33,6 +33,7 @@ use WCPM\Classes\Admin\Admin ;
|
|
33 |
use WCPM\Classes\Admin\Environment_Check ;
|
34 |
use WCPM\Classes\Db_Upgrade ;
|
35 |
use WCPM\Classes\Default_Options ;
|
|
|
36 |
use WCPM\Classes\Pixels\Pixel_Manager ;
|
37 |
use WCPM\Classes\Admin\Ask_For_Rating ;
|
38 |
|
@@ -58,7 +59,7 @@ if ( function_exists( 'wpm_fs' ) ) {
|
|
58 |
'navigation' => 'tabs',
|
59 |
'id' => '7498',
|
60 |
'slug' => 'woocommerce-google-adwords-conversion-tracking-tag',
|
61 |
-
'premium_slug' => '
|
62 |
'type' => 'plugin',
|
63 |
'public_key' => 'pk_d4182c5e1dc92c6032e59abbfdb91',
|
64 |
'is_premium' => false,
|
@@ -101,7 +102,6 @@ if ( function_exists( 'wpm_fs' ) ) {
|
|
101 |
wpm_fs()->add_filter( 'after_pending_connect_url', 'wpm_fs_settings_url' );
|
102 |
}
|
103 |
|
104 |
-
// ... Your plugin's main file logic ...
|
105 |
class WCPM
|
106 |
{
|
107 |
protected $options ;
|
@@ -113,6 +113,7 @@ if ( function_exists( 'wpm_fs' ) ) {
|
|
113 |
define( 'WPM_DB_OPTIONS_NAME', 'wgact_plugin_options' );
|
114 |
define( 'WPM_DB_NOTIFICATIONS_NAME', 'wgact_notifications' );
|
115 |
define( 'WPM_PLUGIN_DIR_PATH', plugin_dir_url( __FILE__ ) );
|
|
|
116 |
define( 'WPM_DB_RATINGS', 'wgact_ratings' );
|
117 |
// check if WooCommerce is running
|
118 |
// currently this is the most reliable test for single and multisite setups
|
@@ -154,7 +155,7 @@ if ( function_exists( 'wpm_fs' ) ) {
|
|
154 |
} else {
|
155 |
add_action( 'admin_menu', [ $this, 'add_empty_admin_page' ], 99 );
|
156 |
add_action( 'admin_notices', [ $this, 'requirements_error' ] );
|
157 |
-
// error_log('The
|
158 |
}
|
159 |
|
160 |
}
|
@@ -174,8 +175,8 @@ if ( function_exists( 'wpm_fs' ) ) {
|
|
174 |
{
|
175 |
add_submenu_page(
|
176 |
'woocommerce',
|
177 |
-
esc_html__( '
|
178 |
-
esc_html__( '
|
179 |
'manage_options',
|
180 |
'wpm',
|
181 |
function () {
|
@@ -192,7 +193,7 @@ if ( function_exists( 'wpm_fs' ) ) {
|
|
192 |
<p>
|
193 |
<strong>
|
194 |
<?php
|
195 |
-
esc_html_e( '
|
196 |
?>
|
197 |
</strong>:
|
198 |
<?php
|
@@ -207,9 +208,9 @@ if ( function_exists( 'wpm_fs' ) ) {
|
|
207 |
</ul>
|
208 |
</div>
|
209 |
<style>
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
</style>
|
214 |
|
215 |
<?php
|
@@ -227,14 +228,9 @@ if ( function_exists( 'wpm_fs' ) ) {
|
|
227 |
|
228 |
public function environment_check_admin_notices()
|
229 |
{
|
230 |
-
if (
|
231 |
-
|
232 |
-
|
233 |
-
'1.13.0',
|
234 |
-
'wpm_show_admin_alerts'
|
235 |
-
) ) ) {
|
236 |
-
$this->environment_check->check_active_off_site_payment_gateways();
|
237 |
-
}
|
238 |
}
|
239 |
|
240 |
// startup all functions
|
@@ -250,6 +246,7 @@ if ( function_exists( 'wpm_fs' ) ) {
|
|
250 |
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), [ $this, 'wpm_settings_link' ] );
|
251 |
}
|
252 |
|
|
|
253 |
// inject pixels into front end
|
254 |
// add_action('after_setup_theme', [$this, 'inject_pixels']);
|
255 |
$this->inject_pixels();
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
+
* Plugin Name: Pixel Manager for WooCommerce
|
5 |
* Description: Visitor and conversion value tracking for WooCommerce. Highly optimized for data accuracy.
|
6 |
* Author: SweetCode
|
7 |
* Plugin URI: https://wordpress.org/plugins/woocommerce-google-adwords-conversion-tracking-tag/
|
10 |
* Developer URI: https://sweetcode.com
|
11 |
* Text Domain: woocommerce-google-adwords-conversion-tracking-tag
|
12 |
* Domain path: /languages
|
13 |
+
* * Version: 1.17.0
|
14 |
*
|
15 |
* WC requires at least: 3.7
|
16 |
* WC tested up to: 6.4
|
20 |
*
|
21 |
*
|
22 |
**/
|
23 |
+
const WPM_CURRENT_VERSION = '1.17.0' ;
|
24 |
// TODO export settings function
|
25 |
// TODO add option checkbox on uninstall and ask if user wants to delete options from db
|
26 |
|
33 |
use WCPM\Classes\Admin\Environment_Check ;
|
34 |
use WCPM\Classes\Db_Upgrade ;
|
35 |
use WCPM\Classes\Default_Options ;
|
36 |
+
use WCPM\Classes\Deprecated_Filters ;
|
37 |
use WCPM\Classes\Pixels\Pixel_Manager ;
|
38 |
use WCPM\Classes\Admin\Ask_For_Rating ;
|
39 |
|
59 |
'navigation' => 'tabs',
|
60 |
'id' => '7498',
|
61 |
'slug' => 'woocommerce-google-adwords-conversion-tracking-tag',
|
62 |
+
'premium_slug' => 'pixel-manager-pro-for-woocommerce',
|
63 |
'type' => 'plugin',
|
64 |
'public_key' => 'pk_d4182c5e1dc92c6032e59abbfdb91',
|
65 |
'is_premium' => false,
|
102 |
wpm_fs()->add_filter( 'after_pending_connect_url', 'wpm_fs_settings_url' );
|
103 |
}
|
104 |
|
|
|
105 |
class WCPM
|
106 |
{
|
107 |
protected $options ;
|
113 |
define( 'WPM_DB_OPTIONS_NAME', 'wgact_plugin_options' );
|
114 |
define( 'WPM_DB_NOTIFICATIONS_NAME', 'wgact_notifications' );
|
115 |
define( 'WPM_PLUGIN_DIR_PATH', plugin_dir_url( __FILE__ ) );
|
116 |
+
define( 'WPM_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
|
117 |
define( 'WPM_DB_RATINGS', 'wgact_ratings' );
|
118 |
// check if WooCommerce is running
|
119 |
// currently this is the most reliable test for single and multisite setups
|
155 |
} else {
|
156 |
add_action( 'admin_menu', [ $this, 'add_empty_admin_page' ], 99 );
|
157 |
add_action( 'admin_notices', [ $this, 'requirements_error' ] );
|
158 |
+
// error_log('The Pixel Manager for WooCommerce requires the WooCommerce plugin to be active.');
|
159 |
}
|
160 |
|
161 |
}
|
175 |
{
|
176 |
add_submenu_page(
|
177 |
'woocommerce',
|
178 |
+
esc_html__( 'Pixel Manager for WooCommerce', 'woocommerce-google-adwords-conversion-tracking-tag' ),
|
179 |
+
esc_html__( 'Pixel Manager for WooCommerce', 'woocommerce-google-adwords-conversion-tracking-tag' ),
|
180 |
'manage_options',
|
181 |
'wpm',
|
182 |
function () {
|
193 |
<p>
|
194 |
<strong>
|
195 |
<?php
|
196 |
+
esc_html_e( 'Pixel Manager for WooCommerce error', 'woocommerce-google-adwords-conversion-tracking-tag' );
|
197 |
?>
|
198 |
</strong>:
|
199 |
<?php
|
208 |
</ul>
|
209 |
</div>
|
210 |
<style>
|
211 |
+
.fs-tab {
|
212 |
+
display: none !important;
|
213 |
+
}
|
214 |
</style>
|
215 |
|
216 |
<?php
|
228 |
|
229 |
public function environment_check_admin_notices()
|
230 |
{
|
231 |
+
// if (apply_filters('wpm_show_admin_alerts', apply_filters_deprecated('wooptpm_show_admin_alerts', [true], '1.13.0', 'wpm_show_admin_alerts'))) {
|
232 |
+
// $this->environment_check->check_active_off_site_payment_gateways();
|
233 |
+
// }
|
|
|
|
|
|
|
|
|
|
|
234 |
}
|
235 |
|
236 |
// startup all functions
|
246 |
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), [ $this, 'wpm_settings_link' ] );
|
247 |
}
|
248 |
|
249 |
+
( new Deprecated_Filters() )->load_deprecated_filters();
|
250 |
// inject pixels into front end
|
251 |
// add_action('after_setup_theme', [$this, 'inject_pixels']);
|
252 |
$this->inject_pixels();
|