Pixel Manager for WooCommerce – Track Google Analytics, Google Ads, Facebook and more - Version 1.26.0

Version Description

07.11.2022

  • Tweak: Added tracking exclusion patterns for Facebook.
  • Tweak: Added filter that enables shop managers to add more tracking exclusion patterns for Facebook.
  • Tweak: Added exclusion for tracking over gtm-msr.appspot.com
  • Tweak: Added new text for pro features demo, so that is clear no pro features are enabled with this.
  • Tweak: Added a filter to decode HTML entities in the product names before output into the data layer.
  • Tweak: Implemented transient caching for volatile products.
  • Tweak: Use a different approach to attach event listeners to events like add-to-cart to increase compatibility with themes that prevent event propagation.

  • Fix: Fixed a bug which would overwrite the data layer if products are added to it above the pmw main script.

Download this release

Release Info

Developer alekv
Plugin Icon 128x128 Pixel Manager for WooCommerce – Track Google Analytics, Google Ads, Facebook and more
Version 1.26.0
Comparing to
See all releases

Code changes from version 1.25.1 to 1.26.0

classes/admin/class-admin.php CHANGED
@@ -36,6 +36,7 @@ class Admin
36
  $this->plugin_hook = 'woocommerce_page_wpm';
37
  $this->google = new Google( $this->options );
38
  add_action( 'admin_enqueue_scripts', [ $this, 'wpm_admin_scripts' ] );
 
39
  add_action( 'admin_enqueue_scripts', [ $this, 'wpm_admin_css' ] );
40
  // add the admin options page
41
  add_action( 'admin_menu', [ $this, 'wpm_plugin_admin_add_page' ], 99 );
@@ -48,63 +49,21 @@ class Admin
48
  wpm_fs()->add_filter( 'templates/checkout.php', [ $this, 'fs_inject_additional_scripts' ] );
49
  wpm_fs()->add_filter( 'checkout/purchaseCompleted', [ $this, 'fs_after_purchase_js' ] );
50
  // end __construct
51
- // https://stackoverflow.com/a/45617265/4688612
52
- // https://stackoverflow.com/a/37780501/4688612
53
- // add_action('add_meta_boxes', function () {
54
- //
55
- // $screen = Helpers::is_wc_hpos_enabled() && wc_get_container()->get(\Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController::class)->custom_orders_table_usage_is_enabled()
56
- // ? wc_get_page_screen_id('shop-order')
57
- // : 'shop_order';
58
- //
59
- // add_meta_box(
60
- // 'ga4-attribution-modal',
61
- // esc_html__('GA4 Attribution', 'woocommerce-google-adwords-conversion-tracking-tag'),
62
- // [$this, 'ga4_attribution_modal'],
63
- // $screen,
64
- // 'side',
65
- // 'core'
66
- // );
67
- // });
68
- }
69
-
70
- public function ga4_attribution_modal( $post_or_order_object )
71
- {
72
- $order = ( $post_or_order_object instanceof WP_Post ? wc_get_order( $post_or_order_object->ID ) : $post_or_order_object );
73
- // echo 'order ID: ' . $post->ID . '<br>';
74
- // echo 'order key: ' . $order->get_order_key() . '<br>';
75
- // echo 'order number: ' . $order->get_order_number() . '<br>';
76
- // Table with heading channel, attribution value and attribution value percentage
77
- // last row shows total
78
- ?>
79
- <table>
80
- <tr>
81
- <th>Channel</th>
82
- <th class="pmw-ga4-attr-values">Attr. Val.</th>
83
- <th class="pmw-ga4-attr-values">Attr. %</th>
84
- </tr>
85
- <tr>
86
- <td>Organic</td>
87
- <td class="pmw-ga4-attr-values">0</td>
88
- <td class="pmw-ga4-attr-values">0%</td>
89
- </tr>
90
- <tr>
91
- <td>Direct</td>
92
- <td class="pmw-ga4-attr-values">0</td>
93
- <td class="pmw-ga4-attr-values">0%</td>
94
- </tr>
95
- <tr>
96
- <td>Referral</td>
97
- <td class="pmw-ga4-attr-values">0</td>
98
- <td class="pmw-ga4-attr-values">0%</td>
99
- </tr>
100
- <tr>
101
- <td><b>Total</b></td>
102
- <td class="pmw-ga4-attr-values"><b>0</b></td>
103
- <td class="pmw-ga4-attr-values"><b>0%</b></td>
104
- </tr>
105
-
106
- </table>
107
- <?php
108
  }
109
 
110
  protected function if_is_wpm_admin_page()
@@ -195,6 +154,29 @@ class Admin
195
  );
196
  }
197
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
  // Load text domain function
199
  public function load_plugin_textdomain()
200
  {
@@ -561,28 +543,22 @@ class Admin
561
  'wpm_plugin_options_page',
562
  $section_ids['settings_name']
563
  );
564
- // Add fields for the GA4 Data API credentials upload
565
- // add_settings_field(
566
- // 'pmw_setting_ga4_data_api_credentials',
567
- // esc_html__(
568
- // 'GA4 Data API Credentials',
569
- // 'woocommerce-google-adwords-conversion-tracking-tag'
570
- // ) . $this->html_beta(),
571
- // [$this, 'pmw_setting_html_g4_data_api_credentials'],
572
- // 'wpm_plugin_options_page',
573
- // $section_ids['settings_name']
574
- // );
575
  // Add fields for the GA4 Data API property ID
576
- // add_settings_field(
577
- // 'pmw_setting_ga4_property_id',
578
- // esc_html__(
579
- // 'GA4 Property ID',
580
- // 'woocommerce-google-adwords-conversion-tracking-tag'
581
- // ) . $this->html_beta(),
582
- // [$this, 'pmw_setting_html_ga4_property_id'],
583
- // 'wpm_plugin_options_page',
584
- // $section_ids['settings_name']
585
- // );
 
 
 
 
 
586
  }
587
 
588
  // add fields for the Google Analytics link attribution
@@ -1017,17 +993,19 @@ class Admin
1017
  <div class="pmw-developer-banner">
1018
  <div style="display: flex; justify-content: space-between">
1019
  <span>
1020
- <?php
1021
  esc_html_e( 'Profit Driven Marketing by SweetCode', 'woocommerce-google-adwords-conversion-tracking-tag' );
1022
  ?>
1023
- </span>
1024
 
1025
  <?php
1026
  ?>
1027
 
1028
- <div style="float: right; padding-left: 20px">
1029
  <span style="padding-right: 6px">
1030
- Enable Pro version demo features
 
 
1031
  </span>
1032
  <label class="pmw-switch" id="wpm_pro_version_demo">
1033
 
@@ -1041,6 +1019,10 @@ class Admin
1041
  />
1042
  <span class="pmw-slider round"></span>
1043
  </label>
 
 
 
 
1044
  </div>
1045
 
1046
  <?php
@@ -2116,101 +2098,160 @@ class Admin
2116
  esc_html_e( 'If enabled, purchase and refund events will be sent to Google through the measurement protocol for increased accuracy.', 'woocommerce-google-adwords-conversion-tracking-tag' );
2117
  }
2118
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2119
  public function pmw_setting_html_g4_data_api_credentials()
2120
  {
2121
- $feed_url = get_site_url() . '/wp-json/pmw/v1/google-ads/conversion-adjustments.csv';
2122
- $feed_url_length = strlen( $feed_url );
2123
  ?>
2124
  <div style="margin-top: 5px">
2125
 
2126
  <input
2127
- id='pmw_plugin_google_ads_conversion_adjustments_feed'
2128
- name='pmw_plugin_google_ads_conversion_adjustments_feed'
2129
  size='<?php
2130
- esc_html_e( $feed_url_length );
2131
  ?>'
2132
  type='text'
2133
  value='<?php
2134
- echo esc_url( get_site_url() . '/wp-json/pmw/v1/google-ads/conversion-adjustments.csv' ) ;
2135
  ?>'
2136
  disabled
2137
  style="font-family: monospace; color:#505050"
2138
  />
2139
- <script>
2140
- const pmwCopyToClipboardCA = () => {
2141
 
2142
- // const feedUrlElement = document.getElementById("pmw_plugin_google_ads_conversion_adjustments_feed")
2143
- // feedUrlElement.select()
2144
- // feedUrlElement.setSelectionRange(0, 99999)
2145
- navigator.clipboard.writeText(document.getElementById("pmw_plugin_google_ads_conversion_adjustments_feed").value)
2146
-
2147
- const pmwCaFeedTooltip = document.getElementById("myPmwCaTooltip")
2148
- pmwCaFeedTooltip.innerHTML = "Copied feed URL to clipboard"
2149
  }
2150
 
2151
- const resetCaCopyButton = () => {
2152
- const pmwCaFeedTooltip = document.getElementById("myPmwCaTooltip")
2153
- pmwCaFeedTooltip.innerHTML = "Copy to clipboard"
 
 
2154
  }
2155
  </script>
 
2156
  <div class="pmwCaTooltip">
2157
  <a href="javascript:void(0)" class="pmw-copy-icon pmwCaTooltip"
2158
- onclick="pmwCopyToClipboardCA()" onmouseout="resetCaCopyButton()"></a>
2159
- <span class="pmwCaTooltiptext" id="myPmwCaTooltip">Copy to clipboard</span>
 
 
 
2160
  </div>
 
 
2161
  <?php
2162
- $this->get_status_icon( $this->options['google']['ads']['conversion_adjustments']['conversion_name'], $this->google->is_google_ads_active() );
2163
  ?>
2164
  <?php
2165
- $this->get_documentation_html_by_key( 'google_ads_conversion_adjustments' );
2166
  ?>
2167
  <?php
2168
  $this->html_pro_feature();
2169
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2170
  <div style="margin-top: 20px">
2171
  <?php
2172
 
2173
- if ( !$this->options['google']['ads']['conversion_adjustments']['conversion_name'] ) {
2174
  ?>
2175
  <span class="dashicons dashicons-info" style="padding-right: 10px"></span>
2176
  <?php
2177
- esc_html_e( 'The Conversion Name must be set.', 'woocommerce-google-adwords-conversion-tracking-tag' );
2178
  ?>
2179
  <?php
2180
  }
2181
 
2182
  ?>
2183
  </div>
2184
- </div>
2185
- <?php
2186
- }
2187
-
2188
- public function pmw_setting_html_ga4_property_id()
2189
- {
2190
  ?>
2191
- <input
2192
- id='pmw_setting_ga4_property_id'
2193
- name='wgact_plugin_options[google][analytics][ga4][data_api][property_id]'
2194
- size='40'
2195
- type='text'
2196
- value='<?php
2197
- esc_html_e( $this->options['google']['analytics']['ga4']['data_api']['property_id'] );
2198
- ?>'
2199
- <?php
2200
- esc_html_e( $this->disable_if_demo() );
2201
  ?>
2202
- />
 
 
 
 
 
 
 
 
 
 
 
2203
  <?php
2204
- $this->get_status_icon( $this->options['google']['analytics']['ga4']['data_api']['property_id'] );
2205
- $this->get_documentation_html_by_key( 'ga4_data_api_property_id' );
2206
- $this->html_pro_feature();
2207
- // echo '<br><br>';
2208
- // if (!$this->options['google']['analytics']['ga4']['measurement_id']) {
2209
- // echo '<p></p><span class="dashicons dashicons-info" style="margin-right: 10px"></span>';
2210
- // esc_html_e('Google Analytics 4 activation required', 'woocommerce-google-adwords-conversion-tracking-tag');
2211
- // echo '</p>';
2212
- // }
2213
- // esc_html_e('If enabled, purchase and refund events will be sent to Google through the measurement protocol for increased accuracy.', 'woocommerce-google-adwords-conversion-tracking-tag');
2214
  }
2215
 
2216
  public function wpm_setting_html_google_analytics_link_attribution()
@@ -2412,7 +2453,7 @@ class Admin
2412
  public function pmw_setting_html_google_ads_conversion_adjustments_feed()
2413
  {
2414
  $feed_url = get_site_url() . '/wp-json/pmw/v1/google-ads/conversion-adjustments.csv';
2415
- $feed_url_length = strlen( $feed_url );
2416
  ?>
2417
  <div style="margin-top: 5px">
2418
 
@@ -2438,18 +2479,25 @@ class Admin
2438
  navigator.clipboard.writeText(document.getElementById("pmw_plugin_google_ads_conversion_adjustments_feed").value)
2439
 
2440
  const pmwCaFeedTooltip = document.getElementById("myPmwCaTooltip")
2441
- pmwCaFeedTooltip.innerHTML = "Copied feed URL to clipboard"
 
 
2442
  }
2443
 
2444
  const resetCaCopyButton = () => {
2445
  const pmwCaFeedTooltip = document.getElementById("myPmwCaTooltip")
2446
- pmwCaFeedTooltip.innerHTML = "Copy to clipboard"
 
 
2447
  }
2448
  </script>
2449
  <div class="pmwCaTooltip">
2450
  <a href="javascript:void(0)" class="pmw-copy-icon pmwCaTooltip"
2451
  onclick="pmwCopyToClipboardCA()" onmouseout="resetCaCopyButton()"></a>
2452
- <span class="pmwCaTooltiptext" id="myPmwCaTooltip">Copy to clipboard</span>
 
 
 
2453
  </div>
2454
  <?php
2455
  $this->get_status_icon( $this->options['google']['ads']['conversion_adjustments']['conversion_name'], $this->google->is_google_ads_active() );
@@ -3313,6 +3361,15 @@ class Admin
3313
  add_settings_error( 'wgact_plugin_options', 'invalid-google-analytics-4-measurement-id', esc_html__( 'You have entered an invalid Google Analytics 4 API key.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
3314
  }
3315
 
 
 
 
 
 
 
 
 
 
3316
  }
3317
  // validate ['google]['ads']['conversion_id']
3318
  if ( isset( $input['google']['ads']['conversion_id'] ) ) {
@@ -3518,15 +3575,26 @@ class Admin
3518
  return $array_output;
3519
  }
3520
 
 
 
 
 
 
3521
  protected function non_form_keys( $input )
3522
  {
3523
- // place here what could be overwritten when a form field is missing
3524
- // and what should not be re-set to the default value
3525
- // but should be preserved
3526
  $non_form_keys = [
3527
  'db_version' => $this->options['db_version'],
3528
  'shop' => [
3529
  'disable_tracking_for' => [],
 
 
 
 
 
 
 
 
 
3530
  ],
3531
  ];
3532
  // in case the form field input is missing
36
  $this->plugin_hook = 'woocommerce_page_wpm';
37
  $this->google = new Google( $this->options );
38
  add_action( 'admin_enqueue_scripts', [ $this, 'wpm_admin_scripts' ] );
39
+ add_action( 'admin_enqueue_scripts', [ $this, 'pmw_edit_order_scripts' ] );
40
  add_action( 'admin_enqueue_scripts', [ $this, 'wpm_admin_css' ] );
41
  // add the admin options page
42
  add_action( 'admin_menu', [ $this, 'wpm_plugin_admin_add_page' ], 99 );
49
  wpm_fs()->add_filter( 'templates/checkout.php', [ $this, 'fs_inject_additional_scripts' ] );
50
  wpm_fs()->add_filter( 'checkout/purchaseCompleted', [ $this, 'fs_after_purchase_js' ] );
51
  // end __construct
52
+ if ( wpm_fs()->is__premium_only() && $this->google->is_ga4_data_api_active() ) {
53
+ // https://stackoverflow.com/a/45617265/4688612
54
+ // https://stackoverflow.com/a/37780501/4688612
55
+ add_action( 'add_meta_boxes', function () {
56
+ $screen = ( Helpers::is_wc_hpos_enabled() && wc_get_container()->get( \Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController::class )->custom_orders_table_usage_is_enabled() ? wc_get_page_screen_id( 'shop-order' ) : 'shop_order' );
57
+ add_meta_box(
58
+ 'ga4-attribution-modal',
59
+ esc_html__( 'GA4 Attribution', 'woocommerce-google-adwords-conversion-tracking-tag' ) . $this->html_beta(),
60
+ [ $this, 'ga4_attribution_modal__premium_only' ],
61
+ $screen,
62
+ 'side',
63
+ 'core'
64
+ );
65
+ } );
66
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  }
68
 
69
  protected function if_is_wpm_admin_page()
154
  );
155
  }
156
 
157
+ public function pmw_edit_order_scripts( $hook_suffix )
158
+ {
159
+ // error_log('hook_suffix: ' . $hook_suffix);
160
+ // error_log('get_current_screen: ' . get_current_screen()->id);
161
+ // Only output the remaining scripts on PMW settings page
162
+ if ( 'shop_order' !== get_current_screen()->id ) {
163
+ return;
164
+ }
165
+ // error_log('pmw_edit_order_scripts');
166
+ //
167
+ wp_enqueue_script(
168
+ 'pmw-edit-order',
169
+ WPM_PLUGIN_DIR_PATH . 'js/admin/edit-order.js',
170
+ [ 'jquery' ],
171
+ WPM_CURRENT_VERSION,
172
+ false
173
+ );
174
+ wp_localize_script( 'pmw-edit-order', 'pmwAdminApi', [
175
+ 'root' => esc_url_raw( rest_url() ),
176
+ 'nonce' => wp_create_nonce( 'wp_rest' ),
177
+ ] );
178
+ }
179
+
180
  // Load text domain function
181
  public function load_plugin_textdomain()
182
  {
543
  'wpm_plugin_options_page',
544
  $section_ids['settings_name']
545
  );
 
 
 
 
 
 
 
 
 
 
 
546
  // Add fields for the GA4 Data API property ID
547
+ add_settings_field(
548
+ 'pmw_setting_ga4_property_id',
549
+ esc_html__( 'GA4 Property ID', 'woocommerce-google-adwords-conversion-tracking-tag' ) . $this->html_beta(),
550
+ [ $this, 'pmw_setting_html_ga4_property_id' ],
551
+ 'wpm_plugin_options_page',
552
+ $section_ids['settings_name']
553
+ );
554
+ // Add fields for the GA4 Data API credentials upload
555
+ add_settings_field(
556
+ 'pmw_setting_ga4_data_api_credentials',
557
+ esc_html__( 'GA4 Data API Credentials', 'woocommerce-google-adwords-conversion-tracking-tag' ) . $this->html_beta(),
558
+ [ $this, 'pmw_setting_html_g4_data_api_credentials' ],
559
+ 'wpm_plugin_options_page',
560
+ $section_ids['settings_name']
561
+ );
562
  }
563
 
564
  // add fields for the Google Analytics link attribution
993
  <div class="pmw-developer-banner">
994
  <div style="display: flex; justify-content: space-between">
995
  <span>
996
+ <?php
997
  esc_html_e( 'Profit Driven Marketing by SweetCode', 'woocommerce-google-adwords-conversion-tracking-tag' );
998
  ?>
999
+ </span>
1000
 
1001
  <?php
1002
  ?>
1003
 
1004
+ <div class="pmwCaTooltip" style="float: right; padding-left: 20px">
1005
  <span style="padding-right: 6px">
1006
+ <?php
1007
+ esc_html_e( 'Show Pro version settings', 'woocommerce-google-adwords-conversion-tracking-tag' );
1008
+ ?>
1009
  </span>
1010
  <label class="pmw-switch" id="wpm_pro_version_demo">
1011
 
1019
  />
1020
  <span class="pmw-slider round"></span>
1021
  </label>
1022
+ <span class="pmwCaTooltiptext" id="myPmwCaTooltip"
1023
+ style="width: 400px; text-align: left"><?php
1024
+ esc_html_e( "Enabling this will only show you the pro settings in the user interface. It won't actually enable the pro features. If you want to try out the pro features head over to sweetcode.com and sign up for a trial.", 'woocommerce-google-adwords-conversion-tracking-tag' );
1025
+ ?></span>
1026
  </div>
1027
 
1028
  <?php
2098
  esc_html_e( 'If enabled, purchase and refund events will be sent to Google through the measurement protocol for increased accuracy.', 'woocommerce-google-adwords-conversion-tracking-tag' );
2099
  }
2100
 
2101
+ public function pmw_setting_html_ga4_property_id()
2102
+ {
2103
+ ?>
2104
+ <input
2105
+ id='pmw_setting_ga4_property_id'
2106
+ name='wgact_plugin_options[google][analytics][ga4][data_api][property_id]'
2107
+ size='40'
2108
+ type='text'
2109
+ value='<?php
2110
+ esc_html_e( $this->options['google']['analytics']['ga4']['data_api']['property_id'] );
2111
+ ?>'
2112
+ <?php
2113
+ esc_html_e( $this->disable_if_demo() );
2114
+ ?>
2115
+ />
2116
+ <?php
2117
+ $this->get_status_icon( $this->options['google']['analytics']['ga4']['data_api']['property_id'], count( $this->options['google']['analytics']['ga4']['data_api']['credentials'] ) > 0 );
2118
+ $this->get_documentation_html_by_key( 'ga4_data_api_property_id' );
2119
+ $this->html_pro_feature();
2120
+ // echo '<br><br>';
2121
+ // if (!$this->options['google']['analytics']['ga4']['measurement_id']) {
2122
+ // echo '<p></p><span class="dashicons dashicons-info" style="margin-right: 10px"></span>';
2123
+ // esc_html_e('Google Analytics 4 activation required', 'woocommerce-google-adwords-conversion-tracking-tag');
2124
+ // echo '</p>';
2125
+ // }
2126
+ // esc_html_e('If enabled, purchase and refund events will be sent to Google through the measurement protocol for increased accuracy.', 'woocommerce-google-adwords-conversion-tracking-tag');
2127
+ }
2128
+
2129
  public function pmw_setting_html_g4_data_api_credentials()
2130
  {
2131
+ $client_email = ( isset( $this->options['google']['analytics']['ga4']['data_api']['credentials']['client_email'] ) ? $this->options['google']['analytics']['ga4']['data_api']['credentials']['client_email'] : '' );
2132
+ $field_with = ( 0 === strlen( $client_email ) ? 80 : strlen( $client_email ) - 1 );
2133
  ?>
2134
  <div style="margin-top: 5px">
2135
 
2136
  <input
2137
+ id='pmw_setting_ga4_data_api_client_email'
2138
+ name='pmw_setting_ga4_data_api_client_email'
2139
  size='<?php
2140
+ esc_html_e( $field_with );
2141
  ?>'
2142
  type='text'
2143
  value='<?php
2144
+ esc_html_e( $client_email );
2145
  ?>'
2146
  disabled
2147
  style="font-family: monospace; color:#505050"
2148
  />
 
 
2149
 
2150
+ <script>
2151
+ const pmwCopyGa4ClientEmailToClipboardCA = () => {
2152
+ navigator.clipboard.writeText(document.getElementById("pmw_setting_ga4_data_api_client_email").value)
2153
+ const pmwCaFeedTooltip = document.getElementById("myPmwGa4ClientEmailTooltip")
2154
+ pmwCaFeedTooltip.innerHTML = "<?php
2155
+ esc_html_e( 'Copied feed URL to clipboard', 'woocommerce-google-adwords-conversion-tracking-tag' );
2156
+ ?>"
2157
  }
2158
 
2159
+ const resetGa4ClientEmailCopyButton = () => {
2160
+ const pmwCaFeedTooltip = document.getElementById("myPmwGa4ClientEmailTooltip")
2161
+ pmwCaFeedTooltip.innerHTML = "<?php
2162
+ esc_html_e( 'Copy to clipboard', 'woocommerce-google-adwords-conversion-tracking-tag' );
2163
+ ?>"
2164
  }
2165
  </script>
2166
+
2167
  <div class="pmwCaTooltip">
2168
  <a href="javascript:void(0)" class="pmw-copy-icon pmwCaTooltip"
2169
+ onclick="pmwCopyGa4ClientEmailToClipboardCA()" onmouseout="resetGa4ClientEmailCopyButton()"></a>
2170
+ <span class="pmwCaTooltiptext"
2171
+ id="myPmwGa4ClientEmailTooltip"><?php
2172
+ esc_html_e( 'Copy to clipboard', 'woocommerce-google-adwords-conversion-tracking-tag' );
2173
+ ?></span>
2174
  </div>
2175
+
2176
+
2177
  <?php
2178
+ $this->get_status_icon( isset( $this->options['google']['analytics']['ga4']['data_api']['credentials']['client_email'] ), $this->options['google']['analytics']['ga4']['data_api']['property_id'] );
2179
  ?>
2180
  <?php
2181
+ $this->get_documentation_html_by_key( 'ga4_data_api_credentials' );
2182
  ?>
2183
  <?php
2184
  $this->html_pro_feature();
2185
  ?>
2186
+
2187
+ <div style="margin-top: 5px">
2188
+
2189
+ <!-- Import Settings -->
2190
+ <div class="button">
2191
+ <div>
2192
+ <label for="ga4-data-api-credentials-upload-button">
2193
+ <?php
2194
+ esc_html_e( 'Import credentials', 'woocommerce-google-adwords-conversion-tracking-tag' );
2195
+ ?>
2196
+ <input type="file" id="ga4-data-api-credentials-upload-button" style="display: none;"/>
2197
+ </label>
2198
+ </div>
2199
+ </div>
2200
+ <!-- Import Settings -->
2201
+
2202
+ <!-- Delete Settings -->
2203
+ <div class="button">
2204
+ <div>
2205
+ <label for="ga4-data-api-credentials-delete-button">
2206
+ <?php
2207
+ esc_html_e( 'Delete credentials', 'woocommerce-google-adwords-conversion-tracking-tag' );
2208
+ ?>
2209
+ <input id="ga4-data-api-credentials-delete-button" style="display: none;"/>
2210
+ </label>
2211
+ </div>
2212
+ </div>
2213
+ <!-- Delete Settings -->
2214
+ </div>
2215
+
2216
  <div style="margin-top: 20px">
2217
  <?php
2218
 
2219
+ if ( !$this->options['google']['analytics']['ga4']['data_api']['property_id'] ) {
2220
  ?>
2221
  <span class="dashicons dashicons-info" style="padding-right: 10px"></span>
2222
  <?php
2223
+ esc_html_e( 'The GA4 property ID must be set.', 'woocommerce-google-adwords-conversion-tracking-tag' );
2224
  ?>
2225
  <?php
2226
  }
2227
 
2228
  ?>
2229
  </div>
2230
+
2231
+ <div>
2232
+ <pre id="ga4-api-credentials-upload-status-success" style="display: none; white-space: pre-line;">
2233
+ <span style="color: green; font-weight: bold">
2234
+ <?php
2235
+ esc_html_e( 'Settings imported successfully!', 'woocommerce-google-adwords-conversion-tracking-tag' );
2236
  ?>
2237
+ </span>
2238
+ <span>
2239
+ <?php
2240
+ esc_html_e( 'Reloading...(in 5 seconds)!', 'woocommerce-google-adwords-conversion-tracking-tag' );
 
 
 
 
 
 
2241
  ?>
2242
+ </span>
2243
+ </pre>
2244
+
2245
+ <pre id="ga4-api-credentials-upload-status-error" style="display: none; white-space: pre-line;">
2246
+ <span style="color: red; font-weight: bold">
2247
+ <?php
2248
+ esc_html_e( 'There was an error importing that file! Please try again.', 'woocommerce-google-adwords-conversion-tracking-tag' );
2249
+ ?>
2250
+ </span>
2251
+ </pre>
2252
+ </div>
2253
+ </div>
2254
  <?php
 
 
 
 
 
 
 
 
 
 
2255
  }
2256
 
2257
  public function wpm_setting_html_google_analytics_link_attribution()
2453
  public function pmw_setting_html_google_ads_conversion_adjustments_feed()
2454
  {
2455
  $feed_url = get_site_url() . '/wp-json/pmw/v1/google-ads/conversion-adjustments.csv';
2456
+ $feed_url_length = strlen( $feed_url ) - 1;
2457
  ?>
2458
  <div style="margin-top: 5px">
2459
 
2479
  navigator.clipboard.writeText(document.getElementById("pmw_plugin_google_ads_conversion_adjustments_feed").value)
2480
 
2481
  const pmwCaFeedTooltip = document.getElementById("myPmwCaTooltip")
2482
+ pmwCaFeedTooltip.innerHTML = "<?php
2483
+ esc_html_e( 'Copied feed URL to clipboard', 'woocommerce-google-adwords-conversion-tracking-tag' );
2484
+ ?>"
2485
  }
2486
 
2487
  const resetCaCopyButton = () => {
2488
  const pmwCaFeedTooltip = document.getElementById("myPmwCaTooltip")
2489
+ pmwCaFeedTooltip.innerHTML = "<?php
2490
+ esc_html_e( 'Copy to clipboard', 'woocommerce-google-adwords-conversion-tracking-tag' );
2491
+ ?>"
2492
  }
2493
  </script>
2494
  <div class="pmwCaTooltip">
2495
  <a href="javascript:void(0)" class="pmw-copy-icon pmwCaTooltip"
2496
  onclick="pmwCopyToClipboardCA()" onmouseout="resetCaCopyButton()"></a>
2497
+ <span class="pmwCaTooltiptext"
2498
+ id="myPmwCaTooltip"><?php
2499
+ esc_html_e( 'Copy to clipboard', 'woocommerce-google-adwords-conversion-tracking-tag' );
2500
+ ?></span>
2501
  </div>
2502
  <?php
2503
  $this->get_status_icon( $this->options['google']['ads']['conversion_adjustments']['conversion_name'], $this->google->is_google_ads_active() );
3361
  add_settings_error( 'wgact_plugin_options', 'invalid-google-analytics-4-measurement-id', esc_html__( 'You have entered an invalid Google Analytics 4 API key.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
3362
  }
3363
 
3364
+ }
3365
+ // Validate the Google Analytics 4 property ID
3366
+ if ( isset( $input['google']['analytics']['ga4']['data_api']['property_id'] ) ) {
3367
+
3368
+ if ( !Validations::is_google_analytics_4_property_id( $input['google']['analytics']['ga4']['data_api']['property_id'] ) ) {
3369
+ $input['google']['analytics']['ga4']['data_api']['property_id'] = ( isset( $this->options['google']['analytics']['ga4']['data_api']['property_id'] ) ? $this->options['google']['analytics']['ga4']['data_api']['property_id'] : '' );
3370
+ add_settings_error( 'wgact_plugin_options', 'invalid-google-analytics-4-property-id', esc_html__( 'You have entered an invalid Google Analytics 4 property ID.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
3371
+ }
3372
+
3373
  }
3374
  // validate ['google]['ads']['conversion_id']
3375
  if ( isset( $input['google']['ads']['conversion_id'] ) ) {
3575
  return $array_output;
3576
  }
3577
 
3578
+ /**
3579
+ * Place here what could be overwritten when a form field is missing
3580
+ * and what should not be re-set to the default value
3581
+ * but should be preserved
3582
+ */
3583
  protected function non_form_keys( $input )
3584
  {
 
 
 
3585
  $non_form_keys = [
3586
  'db_version' => $this->options['db_version'],
3587
  'shop' => [
3588
  'disable_tracking_for' => [],
3589
+ ],
3590
+ 'google' => [
3591
+ 'analytics' => [
3592
+ 'ga4' => [
3593
+ 'data_api' => [
3594
+ 'credentials' => $this->options['google']['analytics']['ga4']['data_api']['credentials'],
3595
+ ],
3596
+ ],
3597
+ ],
3598
  ],
3599
  ];
3600
  // in case the form field input is missing
classes/admin/class-documentation.php CHANGED
@@ -175,7 +175,13 @@ class Documentation {
175
  'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/general-settings/#section-8'],
176
  'google_ads_conversion_adjustments' => [
177
  'default' => '/docs/wpm/plugin-configuration/google-ads#conversion-adjustments',
178
- 'wcm' => '/document/pixel-manager-pro-for-woocommerce/'],
 
 
 
 
 
 
179
  ];
180
 
181
  if (array_key_exists($key, $documentation_links)) {
175
  'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/general-settings/#section-8'],
176
  'google_ads_conversion_adjustments' => [
177
  'default' => '/docs/wpm/plugin-configuration/google-ads#conversion-adjustments',
178
+ 'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/google-ads/#section-6'],
179
+ 'ga4_data_api_property_id' => [
180
+ 'default' => '/docs/wpm/plugin-configuration/google-analytics#ga4-property-id',
181
+ 'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/google-analytics/#ga4-property-id'],
182
+ 'ga4_data_api_credentials' => [
183
+ 'default' => '/docs/wpm/plugin-configuration/google-analytics#ga4-data-api-credentials',
184
+ 'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/google-analytics/#ga4-data-api-credentials'],
185
  ];
186
 
187
  if (array_key_exists($key, $documentation_links)) {
classes/admin/class-environment-check.php CHANGED
@@ -1028,6 +1028,16 @@ class Environment_Check {
1028
  if ($this->is_pmw_google_ads_active()) {
1029
  add_filter('woocommerce_gla_disable_gtag_tracking', '__return_true');
1030
  }
 
 
 
 
 
 
 
 
 
 
1031
  }
1032
 
1033
  private function disable_woocommerce_google_ads_dynamic_remarketing() {
1028
  if ($this->is_pmw_google_ads_active()) {
1029
  add_filter('woocommerce_gla_disable_gtag_tracking', '__return_true');
1030
  }
1031
+
1032
+ /**
1033
+ * WooCommerce Gutenberg Blocks Google Analytics Tracking
1034
+ *
1035
+ * Disable gtag if Google Analytics is active in PMW
1036
+ */
1037
+
1038
+ if ($this->is_pmw_google_ads_active()) {
1039
+ add_filter('woocommerce_ga_disable_tracking', '__return_true');
1040
+ }
1041
  }
1042
 
1043
  private function disable_woocommerce_google_ads_dynamic_remarketing() {
classes/admin/class-validations.php CHANGED
@@ -2,6 +2,8 @@
2
 
3
  namespace WCPM\Classes\Admin;
4
 
 
 
5
  class Validations {
6
 
7
  public static function validate_imported_options( $options ) {
@@ -14,6 +16,65 @@ class Validations {
14
  }
15
  }
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  public static function is_gads_conversion_id( $string ) {
18
  if (empty($string)) {
19
  return true;
@@ -126,6 +187,16 @@ class Validations {
126
  return self::validate_with_regex($re, $string);
127
  }
128
 
 
 
 
 
 
 
 
 
 
 
129
  public static function is_facebook_pixel_id( $string ) {
130
  if (empty($string)) {
131
  return true;
2
 
3
  namespace WCPM\Classes\Admin;
4
 
5
+ use WCPM\Classes\Helpers;
6
+
7
  class Validations {
8
 
9
  public static function validate_imported_options( $options ) {
16
  }
17
  }
18
 
19
+ public static function validate_ga4_data_api_credentials( $credentials ) {
20
+
21
+ // If $credentials is an empty array (thus the default empty value), return true
22
+ if (empty($credentials)) {
23
+ return true;
24
+ }
25
+
26
+ if (isset($credentials['type']) && 'service_account' !== $credentials['type']) {
27
+ return false;
28
+ }
29
+
30
+ // Abort if $credentials['project_id'] is not regular string
31
+ if (isset($credentials['project_id']) && !is_string($credentials['project_id'])) {
32
+ return false;
33
+ }
34
+
35
+ // Abort if $credentials['private_key_id'] is not a private key ID
36
+ if (isset($credentials['private_key_id']) && !is_string($credentials['private_key_id'])) {
37
+ return false;
38
+ }
39
+
40
+ // Abort if $credentials['private_key'] is not a private key
41
+ if (isset($credentials['private_key']) && !is_string($credentials['private_key'])) {
42
+ return false;
43
+ }
44
+
45
+ // Abort if $credentials['client_email'] is not a client email
46
+ if (isset($credentials['client_email']) && !Helpers::is_email($credentials['client_email'])) {
47
+ return false;
48
+ }
49
+
50
+ // Abort if $credentials['client_id'] is not only numbers
51
+ if (isset($credentials['client_id']) && !is_numeric($credentials['client_id'])) {
52
+ return false;
53
+ }
54
+
55
+ // Abort if $credentials['auth_uri'] is not a valid URL
56
+ if (isset($credentials['auth_uri']) && !Helpers::is_url($credentials['auth_uri'])) {
57
+ return false;
58
+ }
59
+
60
+ // Abort if $credentials['token_uri'] is not a valid URL
61
+ if (isset($credentials['token_uri']) && !Helpers::is_url($credentials['token_uri'])) {
62
+ return false;
63
+ }
64
+
65
+ // Abort if $credentials['auth_provider_x509_cert_url'] is not a valid URL
66
+ if (isset($credentials['auth_provider_x509_cert_url']) && !Helpers::is_url($credentials['auth_provider_x509_cert_url'])) {
67
+ return false;
68
+ }
69
+
70
+ // Abort if $credentials['client_x509_cert_url'] is not a valid URL
71
+ if (isset($credentials['client_x509_cert_url']) && !Helpers::is_url($credentials['client_x509_cert_url'])) {
72
+ return false;
73
+ }
74
+
75
+ return true;
76
+ }
77
+
78
  public static function is_gads_conversion_id( $string ) {
79
  if (empty($string)) {
80
  return true;
187
  return self::validate_with_regex($re, $string);
188
  }
189
 
190
+ public static function is_google_analytics_4_property_id( $string ) {
191
+ if (empty($string)) {
192
+ return true;
193
+ }
194
+
195
+ $re = '/^\d{6,12}$/m';
196
+
197
+ return self::validate_with_regex($re, $string);
198
+ }
199
+
200
  public static function is_facebook_pixel_id( $string ) {
201
  if (empty($string)) {
202
  return true;
classes/class-helpers.php CHANGED
@@ -78,4 +78,28 @@ class Helpers {
78
 
79
  return self::generic_sanitization($input_vars);
80
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  }
78
 
79
  return self::generic_sanitization($input_vars);
80
  }
81
+
82
+ public static function is_email( $email ) {
83
+ return filter_var($email, FILTER_VALIDATE_EMAIL);
84
+ }
85
+
86
+ public static function is_url( $url ) {
87
+ return filter_var($url, FILTER_VALIDATE_URL);
88
+ }
89
+
90
+ public static function get_options_object( $options ) {
91
+
92
+ // TODO find out why I did this weird transformation and simplify it
93
+ $options_obj = json_decode(wp_json_encode($options));
94
+
95
+ if (function_exists('get_woocommerce_currency')) {
96
+ $options_obj->shop->currency = get_woocommerce_currency();
97
+ }
98
+
99
+ return $options_obj;
100
+ }
101
+
102
+ public static function clean_product_name_for_output( $name ) {
103
+ return html_entity_decode($name, ENT_QUOTES | ENT_HTML5, 'UTF-8');
104
+ }
105
  }
classes/pixels/class-pixel-manager.php CHANGED
@@ -4,6 +4,7 @@ namespace WCPM\Classes\Pixels;
4
 
5
  use WCPM\Classes\Admin\Environment_Check ;
6
  use WCPM\Classes\Admin\Validations ;
 
7
  use WCPM\Classes\Helpers ;
8
  use WCPM\Classes\Http\Facebook_CAPI ;
9
  use WCPM\Classes\Http\Google_MP ;
@@ -47,7 +48,7 @@ class Pixel_Manager
47
  * Initialize options
48
  */
49
  $this->options = get_option( WPM_DB_OPTIONS_NAME );
50
- $this->options_obj = $this->get_options_object( $this->options );
51
  if ( function_exists( 'get_woocommerce_currency' ) ) {
52
  $this->options_obj->shop->currency = get_woocommerce_currency();
53
  }
@@ -71,6 +72,13 @@ class Pixel_Manager
71
  $this->microdata_product_id = ( new Facebook_Microdata( $this->options ) )->inject_schema( wc_get_product( get_the_ID() ) );
72
  }
73
  }
 
 
 
 
 
 
 
74
  $this->inject_data_layer();
75
  } );
76
  /**
@@ -159,6 +167,32 @@ class Pixel_Manager
159
  */
160
  add_action( 'template_redirect', [ $this, 'run_background_processes' ] );
161
  add_action( 'rest_api_init', [ $this, 'register_rest_routes' ] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  }
163
 
164
  protected function pmw_get_current_order()
@@ -235,13 +269,25 @@ class Pixel_Manager
235
  register_rest_route( $this->rest_namespace, '/products/', [
236
  'methods' => 'POST',
237
  'callback' => function ( $request ) {
238
- $product_ids = $request->get_json_params();
239
- $product_ids = Helpers::generic_sanitization( $product_ids );
240
 
241
  if ( !$product_ids ) {
242
  wp_send_json_error( 'No product ids provided' );
243
  } else {
244
- wp_send_json_success( $this->get_products_for_datalayer( $product_ids ) );
 
 
 
 
 
 
 
 
 
 
 
 
245
  }
246
 
247
  },
@@ -270,109 +316,6 @@ class Pixel_Manager
270
  ] );
271
  }
272
 
273
- // https://support.google.com/google-ads/answer/7686280
274
- // CSV template https://www.gstatic.com/conversiontracking/conversion-adjustment-template-oid.csv
275
- private function get_google_ads_conversion_adjustments()
276
- {
277
- // error_log('timezone:' . date_default_timezone_get());
278
- // error_log('wp_timezone_string(): ' . wp_timezone_string());
279
- // error_log('timezone string: ' . get_option( 'timezone_string' ));
280
- // error_log('timezone_name_get(): ' . timezone_name_get(wp_timezone()));
281
- // Timezone http://goo.gl/T1C5Ov
282
- $timezone = apply_filters( 'pmw_experimental_google_ads_conversion_adjustments_timezone', wp_timezone_string() );
283
- // $csv = 'Parameters:TimeZone=' . $timezone . ';' . PHP_EOL;
284
- $conversion_name = $this->options_obj->google->ads->conversion_adjustments->conversion_name;
285
- $title_row = [
286
- 'Order ID',
287
- 'Conversion Name',
288
- 'Adjustment Time',
289
- 'Adjustment Type',
290
- 'Adjusted Value',
291
- 'Adjusted Value Currency'
292
- ];
293
- $csv = implode( ',', $title_row ) . PHP_EOL;
294
- $date_before = gmdate( 'Y-m-d H:i:s', strtotime( '-2 days' ) );
295
- $date_after = gmdate( 'Y-m-d H:i:s', strtotime( '-4 days' ) );
296
- /**
297
- * Get all cancelled orders that were cancelled within the last 2 and 4 days
298
- * and retract them
299
- */
300
- $orders = wc_get_orders( [
301
- 'limit' => -1,
302
- 'status' => 'cancelled',
303
- 'date_modified' => $date_after . '...' . $date_before,
304
- ] );
305
- foreach ( $orders as $order ) {
306
- // Get the order ID
307
- // $order_id = $order->get_id();
308
- $order_id = $order->get_order_number();
309
- // Get the modified date
310
- $adjustment_time = $order->get_date_modified();
311
- $adjustment_time = $adjustment_time->format( 'Y-m-d H:i:s' ) . ' ' . $timezone;
312
- // Set adjustment type
313
- $adjustment_type = 'RETRACT';
314
- $adjusted_value = null;
315
- $adjusted_value_currency = null;
316
- // Compile new row
317
- $row = [
318
- $order_id,
319
- $conversion_name,
320
- $adjustment_time,
321
- $adjustment_type,
322
- $adjusted_value,
323
- $adjusted_value_currency
324
- ];
325
- $csv .= implode( ',', $row ) . PHP_EOL;
326
- }
327
- /**
328
- * Get all refunds from 2 up to 3 days ago
329
- */
330
- $refunds = wc_get_orders( [
331
- 'type' => 'shop_order_refund',
332
- 'status' => 'completed',
333
- 'date_after' => $date_after,
334
- 'date_before' => $date_before,
335
- ] );
336
- // error_log('refunds: ' . print_r($refunds, true));
337
- foreach ( $refunds as $refund ) {
338
- $parent_order = wc_get_order( $refund->get_parent_id() );
339
- // Get the order ID
340
- $order_id = $parent_order->get_order_number();
341
- // $refund_id = $refund->get_id();
342
- // Get the refund date
343
- $adjustment_time = $refund->get_date_created();
344
- // $adjustment_time->setTimezone(new \DateTimeZone($timezone));
345
- $adjustment_time = $adjustment_time->format( 'Y-m-d H:i:s' ) . ' ' . $timezone;
346
- // Get adjustment type
347
- // Get parent order status
348
- $parent_order_status = $parent_order->get_status();
349
-
350
- if ( 'refunded' === $parent_order_status || 'cancelled' === $parent_order_status ) {
351
- $adjustment_type = 'RETRACT';
352
- $adjusted_value = null;
353
- $adjusted_value_currency = null;
354
- } else {
355
- $adjustment_type = 'RESTATE';
356
- // Get the total value of the parent order
357
- $adjusted_value = $this->get_order_value_after_refunds( $parent_order );
358
- $adjusted_value_currency = $refund->get_currency();
359
- }
360
-
361
- // Adjusted value currency
362
- // Compile new row
363
- $row = [
364
- $order_id,
365
- $conversion_name,
366
- $adjustment_time,
367
- $adjustment_type,
368
- $adjusted_value,
369
- $adjusted_value_currency
370
- ];
371
- $csv .= implode( ',', $row ) . PHP_EOL;
372
- }
373
- return $csv;
374
- }
375
-
376
  private function get_order_value_after_refunds( $order )
377
  {
378
  $refunds = $order->get_refunds();
@@ -620,9 +563,9 @@ class Pixel_Manager
620
  <script>
621
 
622
  window.wpmDataLayer = window.wpmDataLayer || {}
623
- window.wpmDataLayer = <?php
624
  echo wp_json_encode( $this->get_data_for_data_layer(), JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ) ;
625
- ?>;
626
 
627
  </script>
628
 
@@ -769,6 +712,7 @@ class Pixel_Manager
769
  'id_type' => $this->get_dyn_r_id_type( 'facebook' ),
770
  ],
771
  'capi' => (bool) $this->options_obj->facebook->capi->token,
 
772
  ];
773
  if ( wpm_fs()->is__premium_only() && Environment_Check::get_instance()->is_woocommerce_active() && is_product() && $this->options_obj->facebook->microdata ) {
774
  $data['microdata_product_id'] = $this->microdata_product_id;
@@ -829,7 +773,7 @@ class Pixel_Manager
829
  ],
830
  'purchase_event_name' => apply_filters_deprecated(
831
  'wpm_tiktok_purchase_event_name',
832
- [ 'Purchase' ],
833
  '1.25.1',
834
  null,
835
  'This filter has been deprecated without replacement'
@@ -1208,7 +1152,7 @@ class Pixel_Manager
1208
 
1209
  public function wpm_front_end_scripts()
1210
  {
1211
- $wpm_dependencies = [ 'jquery' ];
1212
  // enable polyfill.io with filter
1213
 
1214
  if ( wpm_fs()->is__premium_only() && apply_filters( 'wpm_experimental_inject_polyfill_io', false ) ) {
@@ -1219,13 +1163,13 @@ class Pixel_Manager
1219
  WPM_CURRENT_VERSION,
1220
  false
1221
  );
1222
- $wpm_dependencies[] = 'polyfill-io';
1223
  }
1224
 
1225
  wp_enqueue_script(
1226
  'wpm',
1227
  WPM_PLUGIN_DIR_PATH . 'js/public/wpm-public.p1.min.js',
1228
- $wpm_dependencies,
1229
  WPM_CURRENT_VERSION,
1230
  $this->move_wpm_script_to_footer()
1231
  );
@@ -1356,6 +1300,7 @@ class Pixel_Manager
1356
  'variationsOutput' => (bool) $this->options_obj->general->variations_output,
1357
  'userLoggedIn' => is_user_logged_in(),
1358
  'scrollTrackingThresholds' => $this->options_obj->general->scroll_tracker_thresholds,
 
1359
  ];
1360
  }
1361
 
4
 
5
  use WCPM\Classes\Admin\Environment_Check ;
6
  use WCPM\Classes\Admin\Validations ;
7
+ use WCPM\Classes\Data\GA4_Data_API ;
8
  use WCPM\Classes\Helpers ;
9
  use WCPM\Classes\Http\Facebook_CAPI ;
10
  use WCPM\Classes\Http\Google_MP ;
48
  * Initialize options
49
  */
50
  $this->options = get_option( WPM_DB_OPTIONS_NAME );
51
+ $this->options_obj = Helpers::get_options_object( $this->options );
52
  if ( function_exists( 'get_woocommerce_currency' ) ) {
53
  $this->options_obj->shop->currency = get_woocommerce_currency();
54
  }
72
  $this->microdata_product_id = ( new Facebook_Microdata( $this->options ) )->inject_schema( wc_get_product( get_the_ID() ) );
73
  }
74
  }
75
+ // Add products to data layer from page transient
76
+
77
+ if ( get_transient( 'pmw_products_for_datalayer_' . get_the_ID() ) ) {
78
+ $products = get_transient( 'pmw_products_for_datalayer_' . get_the_ID() );
79
+ $this->inject_products_from_transient_into_datalayer( $products );
80
+ }
81
+
82
  $this->inject_data_layer();
83
  } );
84
  /**
167
  */
168
  add_action( 'template_redirect', [ $this, 'run_background_processes' ] );
169
  add_action( 'rest_api_init', [ $this, 'register_rest_routes' ] );
170
+ // When updating a page, delete any transient data set by the PM
171
+ add_action(
172
+ 'save_post',
173
+ [ $this, 'delete_pmw_products_transient' ],
174
+ 10,
175
+ 3
176
+ );
177
+ }
178
+
179
+ public function delete_pmw_products_transient( $post_id, $post, $update )
180
+ {
181
+ if ( $update ) {
182
+ delete_transient( 'pmw_products_for_datalayer_' . $post_id );
183
+ }
184
+ }
185
+
186
+ public function inject_products_from_transient_into_datalayer( $products )
187
+ {
188
+ ?>
189
+ <script>
190
+ (window.wpmDataLayer = window.wpmDataLayer || {}).products = window.wpmDataLayer.products || {}
191
+ window.wpmDataLayer.products = Object.assign(window.wpmDataLayer.products, <?php
192
+ echo wp_json_encode( (object) $products ) ;
193
+ ?>)
194
+ </script>
195
+ <?php
196
  }
197
 
198
  protected function pmw_get_current_order()
269
  register_rest_route( $this->rest_namespace, '/products/', [
270
  'methods' => 'POST',
271
  'callback' => function ( $request ) {
272
+ $request_decoded = $request->get_json_params();
273
+ $product_ids = Helpers::generic_sanitization( $request_decoded['productIds'] );
274
 
275
  if ( !$product_ids ) {
276
  wp_send_json_error( 'No product ids provided' );
277
  } else {
278
+ $products = $this->get_products_for_datalayer( $product_ids );
279
+ // Check if a data layer products transient for this page exists
280
+ // If it does, add the products from the transient to $products
281
+
282
+ if ( get_transient( 'pmw_products_for_datalayer_' . $request_decoded['pageId'] ) ) {
283
+ $products_in_transient = get_transient( 'pmw_products_for_datalayer_' . $request_decoded['pageId'] );
284
+ // Merge the associative arrays with nested arrays $products and $products_in_transient preserving the keys
285
+ $products = array_replace_recursive( $products, $products_in_transient );
286
+ }
287
+
288
+ // Set transient with products for $request_decoded['pageId']
289
+ set_transient( 'pmw_products_for_datalayer_' . $request_decoded['pageId'], $products, MONTH_IN_SECONDS );
290
+ wp_send_json_success( $products );
291
  }
292
 
293
  },
316
  ] );
317
  }
318
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
  private function get_order_value_after_refunds( $order )
320
  {
321
  $refunds = $order->get_refunds();
563
  <script>
564
 
565
  window.wpmDataLayer = window.wpmDataLayer || {}
566
+ window.wpmDataLayer = Object.assign(window.wpmDataLayer, <?php
567
  echo wp_json_encode( $this->get_data_for_data_layer(), JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ) ;
568
+ ?>)
569
 
570
  </script>
571
 
712
  'id_type' => $this->get_dyn_r_id_type( 'facebook' ),
713
  ],
714
  'capi' => (bool) $this->options_obj->facebook->capi->token,
715
+ 'exclusion_patterns' => apply_filters( 'pmw_facebook_tracking_exclusion_patterns', [] ),
716
  ];
717
  if ( wpm_fs()->is__premium_only() && Environment_Check::get_instance()->is_woocommerce_active() && is_product() && $this->options_obj->facebook->microdata ) {
718
  $data['microdata_product_id'] = $this->microdata_product_id;
773
  ],
774
  'purchase_event_name' => apply_filters_deprecated(
775
  'wpm_tiktok_purchase_event_name',
776
+ [ 'CompletePayment' ],
777
  '1.25.1',
778
  null,
779
  'This filter has been deprecated without replacement'
1152
 
1153
  public function wpm_front_end_scripts()
1154
  {
1155
+ $pmw_dependencies = [ 'jquery', 'wp-hooks' ];
1156
  // enable polyfill.io with filter
1157
 
1158
  if ( wpm_fs()->is__premium_only() && apply_filters( 'wpm_experimental_inject_polyfill_io', false ) ) {
1163
  WPM_CURRENT_VERSION,
1164
  false
1165
  );
1166
+ $pmw_dependencies[] = 'polyfill-io';
1167
  }
1168
 
1169
  wp_enqueue_script(
1170
  'wpm',
1171
  WPM_PLUGIN_DIR_PATH . 'js/public/wpm-public.p1.min.js',
1172
+ $pmw_dependencies,
1173
  WPM_CURRENT_VERSION,
1174
  $this->move_wpm_script_to_footer()
1175
  );
1300
  'variationsOutput' => (bool) $this->options_obj->general->variations_output,
1301
  'userLoggedIn' => is_user_logged_in(),
1302
  'scrollTrackingThresholds' => $this->options_obj->general->scroll_tracker_thresholds,
1303
+ 'pageId' => get_the_ID(),
1304
  ];
1305
  }
1306
 
classes/pixels/class-pixel.php CHANGED
@@ -2,6 +2,8 @@
2
 
3
  namespace WCPM\Classes\Pixels;
4
 
 
 
5
  if (!defined('ABSPATH')) {
6
  exit; // Exit if accessed directly
7
  }
@@ -30,7 +32,7 @@ class Pixel {
30
  * Initialize options
31
  */
32
  $this->options = $options;
33
- $this->options_obj = $this->get_options_object($options);
34
 
35
  if (function_exists('get_woocommerce_currency')) {
36
  $this->options_obj->shop->currency = get_woocommerce_currency();
2
 
3
  namespace WCPM\Classes\Pixels;
4
 
5
+ use WCPM\Classes\Helpers;
6
+
7
  if (!defined('ABSPATH')) {
8
  exit; // Exit if accessed directly
9
  }
32
  * Initialize options
33
  */
34
  $this->options = $options;
35
+ $this->options_obj = Helpers::get_options_object($options);
36
 
37
  if (function_exists('get_woocommerce_currency')) {
38
  $this->options_obj->shop->currency = get_woocommerce_currency();
classes/pixels/google/class-google-pixel-manager.php CHANGED
@@ -25,7 +25,7 @@ class Google_Pixel_Manager
25
  public function __construct( $options )
26
  {
27
  $this->google_pixel = new Google( $options );
28
- $this->options_obj = $this->get_options_object( $options );
29
  }
30
 
31
  public function wpm_woocommerce_order_status_changed(
25
  public function __construct( $options )
26
  {
27
  $this->google_pixel = new Google( $options );
28
+ $this->options_obj = Helpers::get_options_object( $options );
29
  }
30
 
31
  public function wpm_woocommerce_order_status_changed(
classes/pixels/google/class-google.php CHANGED
@@ -115,6 +115,14 @@ class Google extends Pixel
115
 
116
  }
117
 
 
 
 
 
 
 
 
 
118
  public function is_google_analytics_active()
119
  {
120
 
115
 
116
  }
117
 
118
+ public function is_ga4_data_api_active()
119
+ {
120
+ if ( $this->options['google']['analytics']['ga4']['data_api']['property_id'] && 0 < count( $this->options['google']['analytics']['ga4']['data_api']['credentials'] ) ) {
121
+ return true;
122
+ }
123
+ return false;
124
+ }
125
+
126
  public function is_google_analytics_active()
127
  {
128
 
classes/pixels/trait-product.php CHANGED
@@ -3,6 +3,7 @@
3
  namespace WCPM\Classes\Pixels;
4
 
5
  use WCPM\Classes\Admin\Environment_Check;
 
6
  use WCPM\Classes\Pixels\Google\Google;
7
 
8
  if (!defined('ABSPATH')) {
@@ -399,8 +400,7 @@ trait Trait_Product {
399
 
400
  if ($parent_product) {
401
 
402
- $product_details['name'] = $parent_product->get_name();
403
-
404
  $product_details['parentId_dyn_r_ids'] = $this->get_dyn_r_ids($parent_product);
405
  $product_details['parentId'] = $parent_product->get_id();
406
  $product_details['brand'] = $this->get_brand_name($parent_product->get_id());
@@ -414,7 +414,7 @@ trait Trait_Product {
414
  $product_details['isVariation'] = true;
415
  } else { // It's not a variation, so get the fields for a regular product
416
 
417
- $product_details['name'] = (string) $product->get_name();
418
  $product_details['category'] = $this->get_product_category($product->get_id());
419
  $product_details['isVariation'] = false;
420
  }
3
  namespace WCPM\Classes\Pixels;
4
 
5
  use WCPM\Classes\Admin\Environment_Check;
6
+ use WCPM\Classes\Helpers;
7
  use WCPM\Classes\Pixels\Google\Google;
8
 
9
  if (!defined('ABSPATH')) {
400
 
401
  if ($parent_product) {
402
 
403
+ $product_details['name'] = Helpers::clean_product_name_for_output($parent_product->get_name());
 
404
  $product_details['parentId_dyn_r_ids'] = $this->get_dyn_r_ids($parent_product);
405
  $product_details['parentId'] = $parent_product->get_id();
406
  $product_details['brand'] = $this->get_brand_name($parent_product->get_id());
414
  $product_details['isVariation'] = true;
415
  } else { // It's not a variation, so get the fields for a regular product
416
 
417
+ $product_details['name'] = Helpers::clean_product_name_for_output((string) $product->get_name());
418
  $product_details['category'] = $this->get_product_category($product->get_id());
419
  $product_details['isVariation'] = false;
420
  }
classes/pixels/trait-shop.php CHANGED
@@ -278,7 +278,7 @@ trait Trait_Shop
278
  protected function can_clv_query_be_run( $billing_email )
279
  {
280
  // Abort if is not a valid email
281
- if ( !$this->is_email( $billing_email ) ) {
282
  return false;
283
  }
284
  // Abort if memory_limit is too low
@@ -579,21 +579,6 @@ trait Trait_Shop
579
  <?php
580
  }
581
 
582
- protected function get_options_object( $options )
583
- {
584
- // TODO find out why I did this weird transformation and simplify it
585
- $options_obj = json_decode( wp_json_encode( $options ) );
586
- if ( function_exists( 'get_woocommerce_currency' ) ) {
587
- $options_obj->shop->currency = get_woocommerce_currency();
588
- }
589
- return $options_obj;
590
- }
591
-
592
- protected function is_email( $email )
593
- {
594
- return filter_var( $email, FILTER_VALIDATE_EMAIL );
595
- }
596
-
597
  private function get_percentage( $counter, $denominator )
598
  {
599
  return ( $denominator > 0 ? round( $counter / $denominator * 100 ) : 0 );
278
  protected function can_clv_query_be_run( $billing_email )
279
  {
280
  // Abort if is not a valid email
281
+ if ( !Helpers::is_email( $billing_email ) ) {
282
  return false;
283
  }
284
  // Abort if memory_limit is too low
579
  <?php
580
  }
581
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
582
  private function get_percentage( $counter, $denominator )
583
  {
584
  return ( $denominator > 0 ? round( $counter / $denominator * 100 ) : 0 );
js/admin/edit-order.js ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function ($) {
2
+
3
+ // Get the data element order-id from the div with ID order-attribution-data
4
+ let orderId = $("#order-attribution-data").data("order-id")
5
+
6
+ // use fetch to post data to the server
7
+ fetch(pmwAdminApi.root + "pmw/v1/ga4/data-api/get-order-attribution-data/", {
8
+ method : "POST",
9
+ credentials: "same-origin",
10
+ headers : {
11
+ "Content-Type": "application/json",
12
+ "X-WP-Nonce" : pmwAdminApi.nonce,
13
+ },
14
+ body : JSON.stringify(orderId),
15
+ })
16
+ .then(response => response.json())
17
+ .then(async message => {
18
+ // If message.success is true, then we have data to display
19
+ if (message.success) {
20
+ $("#order-attribution-data").html(message.data)
21
+ } else {
22
+ // If message.success is false, then we have an error to display
23
+ // console.log(message)
24
+ $("#order-attribution-data").html(message.data)
25
+ }
26
+ })
27
+ })
28
+
js/admin/helpers.js CHANGED
@@ -11,7 +11,20 @@ jQuery(function () {
11
  })
12
 
13
  document.getElementById("json-settings-file-input")
14
- .addEventListener("change", wpm.readSingleFile, false)
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  });
16
 
17
  (function (wpm, $, undefined) {
@@ -47,7 +60,7 @@ jQuery(function () {
47
  // )
48
  }
49
 
50
- wpm.readSingleFile = e => {
51
 
52
  let file = e.target.files[0]
53
  if (!file) return
@@ -64,17 +77,17 @@ jQuery(function () {
64
 
65
  wpm.saveImportedSettingsToDb = settings => {
66
 
67
- fetch(pmwAdminApi.root + 'pmw/v1/settings/', {
68
- method: 'POST',
69
- credentials: 'same-origin',
70
- headers: {
71
- 'Content-Type': 'application/json',
72
- 'X-WP-Nonce': pmwAdminApi.nonce
73
  },
74
- body: JSON.stringify(settings)
75
  })
76
  .then(response => response.json())
77
- .then(async message=> {
78
  if (message.success) {
79
  console.log(message)
80
  // reload window
@@ -93,6 +106,55 @@ jQuery(function () {
93
  })
94
  }
95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
97
  }(window.wpm = window.wpm || {}, jQuery))
98
 
11
  })
12
 
13
  document.getElementById("json-settings-file-input")
14
+ .addEventListener("change", wpm.readSettingsFile, false)
15
+
16
+ // if element ga4-data-api-credentials-upload-button exists, then we are on the GA4 settings page
17
+ if (document.getElementById("ga4-data-api-credentials-upload-button")) {
18
+
19
+ document.getElementById("ga4-data-api-credentials-upload-button")
20
+ .addEventListener("change", wpm.readGa4DataApiCredentials, false)
21
+
22
+ document.getElementById("ga4-data-api-credentials-delete-button")
23
+ .addEventListener("click", () => {
24
+ wpm.saveGa4DataApiCredentialsToDb({})
25
+ }, false)
26
+ }
27
+
28
  });
29
 
30
  (function (wpm, $, undefined) {
60
  // )
61
  }
62
 
63
+ wpm.readSettingsFile = e => {
64
 
65
  let file = e.target.files[0]
66
  if (!file) return
77
 
78
  wpm.saveImportedSettingsToDb = settings => {
79
 
80
+ fetch(pmwAdminApi.root + "pmw/v1/settings/", {
81
+ method : "POST",
82
+ credentials: "same-origin",
83
+ headers : {
84
+ "Content-Type": "application/json",
85
+ "X-WP-Nonce" : pmwAdminApi.nonce,
86
  },
87
+ body : JSON.stringify(settings),
88
  })
89
  .then(response => response.json())
90
+ .then(async message => {
91
  if (message.success) {
92
  console.log(message)
93
  // reload window
106
  })
107
  }
108
 
109
+ wpm.readGa4DataApiCredentials = e => {
110
+
111
+ let file = e.target.files[0]
112
+ if (!file) return
113
+ let reader = new FileReader()
114
+ reader.onload = function (e) {
115
+ let contents = JSON.parse(e.target.result)
116
+
117
+ // document.getElementById("import-settings-json").textContent = JSON.stringify(contents)
118
+
119
+ wpm.saveGa4DataApiCredentialsToDb(contents)
120
+ }
121
+ reader.readAsText(file)
122
+ }
123
+
124
+ wpm.deleteGa4DataApiCredentials = e => {
125
+ wpm.saveGa4DataApiCredentialsToDb({})
126
+ }
127
+
128
+ wpm.saveGa4DataApiCredentialsToDb = credentials => {
129
+
130
+ fetch(pmwAdminApi.root + "pmw/v1/ga4/data-api/credentials", {
131
+ method : "POST",
132
+ credentials: "same-origin",
133
+ headers : {
134
+ "Content-Type": "application/json",
135
+ "X-WP-Nonce" : pmwAdminApi.nonce,
136
+ },
137
+ body : JSON.stringify(credentials),
138
+ })
139
+ .then(response => response.json())
140
+ .then(async message => {
141
+ if (message.success) {
142
+ console.log(message)
143
+ // reload window
144
+ document.getElementById("ga4-api-credentials-upload-status-success").style.display = "block"
145
+ // wait 5 seconds
146
+ // await new Promise(resolve => setTimeout(resolve, 5000))
147
+ window.location.reload()
148
+ } else {
149
+ console.log(message)
150
+ document.getElementById("ga4-api-credentials-upload-status-error").style.display = "block"
151
+ }
152
+ })
153
+ .catch(error => {
154
+ console.error(error)
155
+ document.getElementById("ga4-api-credentials-upload-status-error").style.display = "block"
156
+ })
157
+ }
158
 
159
  }(window.wpm = window.wpm || {}, jQuery))
160
 
js/admin/main.js CHANGED
@@ -8,4 +8,8 @@ require("./helpers")
8
  require("./script-blocker-warning")
9
  require("./tabs")
10
 
 
 
 
 
11
  // console.log('Pixel Manager for WooCommerce admin script')
8
  require("./script-blocker-warning")
9
  require("./tabs")
10
 
11
+ // #if process.env.TIER === 'premium'
12
+ // require("./helpers_premium")
13
+ // #endif
14
+
15
  // console.log('Pixel Manager for WooCommerce admin script')
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,WAG7D,GACD,IAEQC,QAAQN,OAAO,aAAaI,KAAK,sBAAsB,GAAI,CACnEG,YAAY,GAKb,CAFC,MAAOC,GACRC,QAAQD,MAAMA,EACd,CApBF,G,GCCIE,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,CAAC,GAOX,OAHAE,EAAoBL,GAAUI,EAAQA,EAAOD,QAASJ,GAG/CK,EAAOD,OACf,CCrBAG,CAAQ,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/./src/js/admin/main-freemius.js"],"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","\nrequire(\"./freemius-keep-deactivate-button-enabled\")\n"],"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__","require"],"sourceRoot":""}
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,WAG9D,GACD,IAESC,QAAQN,OAAO,aAAaI,KAAK,sBAAsB,GAAI,CACnEG,YAAY,GAKd,CAFE,MAAOC,GACRC,QAAQD,MAAMA,EACf,CACA,CArBD,E,GCCIE,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,CAAC,GAOX,OAHAE,EAAoBL,GAAUI,EAAQA,EAAOD,QAASJ,GAG/CK,EAAOD,OACf,CCrBAG,CAAQ,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/./src/js/admin/main-freemius.js"],"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","\nrequire(\"./freemius-keep-deactivate-button-enabled\")\n"],"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__","require"],"sourceRoot":""}
js/admin/wpm-admin.p1.min.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{var e={663:()=>{jQuery((function(){jQuery("#debug-info-button").on("click",(function(){jQuery("#debug-info-textarea").select(),document.execCommand("copy")})),jQuery("#wpm_pro_version_demo").on("click",(function(){jQuery("#submit").trigger("click")})),document.getElementById("json-settings-file-input").addEventListener("change",wpm.readSingleFile,!1)})),function(e,t,n){e.saveSettingsToDisk=()=>{let t=document.getElementById("export-settings-json").value;t=t.replace(/\n/g,"\r\n");let n=new Blob([t],{type:"text/plain"}),s=document.createElement("a");s.download="pixel-manager-settings-"+e.getCurrentDateForFileName()+".json",s.href=window.URL.createObjectURL(n),s.target="_blank",s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)},e.getCurrentDateForFileName=()=>{let e=new Date;return e.getFullYear()+"."+("0"+(e.getMonth()+1)).slice(-2)+"."+("0"+e.getDate()).slice(-2)},e.readSingleFile=t=>{let n=t.target.files[0];if(!n)return;let s=new FileReader;s.onload=function(t){let n=JSON.parse(t.target.result);e.saveImportedSettingsToDb(n)},s.readAsText(n)},e.saveImportedSettingsToDb=e=>{fetch(pmwAdminApi.root+"pmw/v1/settings/",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":pmwAdminApi.nonce},body:JSON.stringify(e)}).then((e=>e.json())).then((async e=>{e.success?(console.log(e),document.getElementById("upload-status-success").style.display="block",await new Promise((e=>setTimeout(e,5e3))),window.location.reload()):(console.log(e),document.getElementById("upload-status-error").style.display="block")})).catch((e=>{console.error(e),document.getElementById("upload-status-error").style.display="block"}))}}(window.wpm=window.wpm||{},jQuery)},958:()=>{function e(){jQuery("#script-blocker-notice").hide()}e(),jQuery((function(){e()}))},966:()=>{function e(){const e=window.location.search,t=new URLSearchParams(e);return!!t.get("section")&&{section:t.get("section"),subsection:t.get("subsection")}}function t(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const s=window.location.search,i=new URLSearchParams(s);i.delete("section"),i.delete("subsection");let a="section="+e;a+=t?"&subsection="+t:"",history.pushState("","wpm"+e,document.location.pathname+"?page=wpm&"+a),jQuery('input[name ="_wp_http_referer"]').val(n()+"?page=wpm&"+a+"&settings-updated=true")}function n(){return new URL(jQuery("#wp-admin-canonical").attr("href")).pathname}jQuery((function(){if("wpm"!==wpmGetPageId())return;let n=[],s={};if(jQuery(".section").closest("tr").hide(),jQuery(".section").each((function(){n.push({slug:jQuery(this).data("sectionSlug"),title:jQuery(this).data("sectionTitle")})})),jQuery(".subsection").each((function(){s[jQuery(this).data("sectionSlug")]=s[jQuery(this).data("sectionSlug")]||[],s[jQuery(this).data("sectionSlug")].push({title:jQuery(this).data("subsectionTitle"),slug:jQuery(this).data("subsectionSlug")})})),n.forEach((function(e){jQuery(".nav-tab-wrapper").append('<a href="#" class="nav-tab" data-section-slug="'+e.slug+'">'+e.title+"</a>")})),jQuery(".nav-tab-wrapper").after(function(e){let t=Object.keys(e),n="";return t.forEach((function(t){n+='<ul class="pmw-subnav-tabs" data-section-slug="'+t+'">',e[t].forEach((function(e){n+='<li class="pmw-subnav-li pmw-subnav-li-inactive" style="cursor: pointer;" data-subsection-slug="'+e.slug+'">'+e.title+"</li>"})),n+="</ul>"})),n}(s)),jQuery(".nav-tab-wrapper a").on("click",(function(e){e.preventDefault(),jQuery(this).addClass("nav-tab-active").siblings().removeClass("nav-tab-active");let i=jQuery(this).data("section-slug");!function(e,n){jQuery("#wpm_settings_form > h2").nextUntil(".submit").andSelf().hide(),jQuery(".pmw-subnav-tabs").hide(),jQuery(".pmw-subnav-tabs[data-section-slug="+e+"]").show();let s=n.findIndex((t=>t.slug===e));jQuery("div[data-section-slug="+e+"]").closest("table").prevAll("h2:first").next().nextUntil("h2, .submit").andSelf().show(),t(n[s].slug)}(i,n),i in s&&jQuery("ul[data-section-slug="+i+"]").children(":first").trigger("click")})),jQuery(".pmw-subnav-li").on("click",(function(e){var n,s;e.preventDefault(),jQuery(this).addClass("pmw-subnav-li-active").removeClass("pmw-subnav-li-inactive").siblings().addClass("pmw-subnav-li-inactive").removeClass("pmw-subnav-li-active"),n=jQuery(this).parent().data("section-slug"),s=jQuery(this).data("subsection-slug"),jQuery("#wpm_settings_form > h2").nextUntil(".submit").andSelf().hide(),jQuery("[data-section-slug="+n+"][data-subsection-slug="+s+"]").closest("tr").siblings().andSelf().hide(),jQuery("[data-section-slug="+n+"][data-subsection-slug="+s+"]").closest("table").show(),jQuery("[data-section-slug="+n+"][data-subsection-slug="+s+"]").closest("tr").nextUntil(jQuery("[data-section-slug="+n+"][data-subsection-slug]").closest("tr")).show(),t(n,s)})),e()){let t=e();jQuery("a[data-section-slug="+t.section+"]").trigger("click"),!1!==t.subsection&&jQuery("ul[data-section-slug="+t.section+"]").children("[data-subsection-slug="+t.subsection+"]").trigger("click")}else jQuery("a[data-section-slug="+n[0].slug+"]").trigger("click")})),wpmGetPageId=()=>{const e=window.location.search;return new URLSearchParams(e).get("page")}}},t={};function n(s){var i=t[s];if(void 0!==i)return i.exports;var a=t[s]={exports:{}};return e[s](a,a.exports,n),a.exports}n(663),n(958),n(966)})();
2
  //# sourceMappingURL=wpm-admin.p1.min.js.map
1
+ (()=>{var e={663:()=>{jQuery((function(){jQuery("#debug-info-button").on("click",(function(){jQuery("#debug-info-textarea").select(),document.execCommand("copy")})),jQuery("#wpm_pro_version_demo").on("click",(function(){jQuery("#submit").trigger("click")})),document.getElementById("json-settings-file-input").addEventListener("change",wpm.readSettingsFile,!1),document.getElementById("ga4-data-api-credentials-upload-button")&&(document.getElementById("ga4-data-api-credentials-upload-button").addEventListener("change",wpm.readGa4DataApiCredentials,!1),document.getElementById("ga4-data-api-credentials-delete-button").addEventListener("click",(()=>{wpm.saveGa4DataApiCredentialsToDb({})}),!1))})),function(e,t,a){e.saveSettingsToDisk=()=>{let t=document.getElementById("export-settings-json").value;t=t.replace(/\n/g,"\r\n");let a=new Blob([t],{type:"text/plain"}),n=document.createElement("a");n.download="pixel-manager-settings-"+e.getCurrentDateForFileName()+".json",n.href=window.URL.createObjectURL(a),n.target="_blank",n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)},e.getCurrentDateForFileName=()=>{let e=new Date;return e.getFullYear()+"."+("0"+(e.getMonth()+1)).slice(-2)+"."+("0"+e.getDate()).slice(-2)},e.readSettingsFile=t=>{let a=t.target.files[0];if(!a)return;let n=new FileReader;n.onload=function(t){let a=JSON.parse(t.target.result);e.saveImportedSettingsToDb(a)},n.readAsText(a)},e.saveImportedSettingsToDb=e=>{fetch(pmwAdminApi.root+"pmw/v1/settings/",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":pmwAdminApi.nonce},body:JSON.stringify(e)}).then((e=>e.json())).then((async e=>{e.success?(console.log(e),document.getElementById("upload-status-success").style.display="block",await new Promise((e=>setTimeout(e,5e3))),window.location.reload()):(console.log(e),document.getElementById("upload-status-error").style.display="block")})).catch((e=>{console.error(e),document.getElementById("upload-status-error").style.display="block"}))},e.readGa4DataApiCredentials=t=>{let a=t.target.files[0];if(!a)return;let n=new FileReader;n.onload=function(t){let a=JSON.parse(t.target.result);e.saveGa4DataApiCredentialsToDb(a)},n.readAsText(a)},e.deleteGa4DataApiCredentials=t=>{e.saveGa4DataApiCredentialsToDb({})},e.saveGa4DataApiCredentialsToDb=e=>{fetch(pmwAdminApi.root+"pmw/v1/ga4/data-api/credentials",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":pmwAdminApi.nonce},body:JSON.stringify(e)}).then((e=>e.json())).then((async e=>{e.success?(console.log(e),document.getElementById("ga4-api-credentials-upload-status-success").style.display="block",window.location.reload()):(console.log(e),document.getElementById("ga4-api-credentials-upload-status-error").style.display="block")})).catch((e=>{console.error(e),document.getElementById("ga4-api-credentials-upload-status-error").style.display="block"}))}}(window.wpm=window.wpm||{},jQuery)},958:()=>{function e(){jQuery("#script-blocker-notice").hide()}e(),jQuery((function(){e()}))},966:()=>{function e(){const e=window.location.search,t=new URLSearchParams(e);return!!t.get("section")&&{section:t.get("section"),subsection:t.get("subsection")}}function t(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=window.location.search,s=new URLSearchParams(n);s.delete("section"),s.delete("subsection");let i="section="+e;i+=t?"&subsection="+t:"",history.pushState("","wpm"+e,document.location.pathname+"?page=wpm&"+i),jQuery('input[name ="_wp_http_referer"]').val(a()+"?page=wpm&"+i+"&settings-updated=true")}function a(){return new URL(jQuery("#wp-admin-canonical").attr("href")).pathname}jQuery((function(){if("wpm"!==wpmGetPageId())return;let a=[],n={};if(jQuery(".section").closest("tr").hide(),jQuery(".section").each((function(){a.push({slug:jQuery(this).data("sectionSlug"),title:jQuery(this).data("sectionTitle")})})),jQuery(".subsection").each((function(){n[jQuery(this).data("sectionSlug")]=n[jQuery(this).data("sectionSlug")]||[],n[jQuery(this).data("sectionSlug")].push({title:jQuery(this).data("subsectionTitle"),slug:jQuery(this).data("subsectionSlug")})})),a.forEach((function(e){jQuery(".nav-tab-wrapper").append('<a href="#" class="nav-tab" data-section-slug="'+e.slug+'">'+e.title+"</a>")})),jQuery(".nav-tab-wrapper").after(function(e){let t=Object.keys(e),a="";return t.forEach((function(t){a+='<ul class="pmw-subnav-tabs" data-section-slug="'+t+'">',e[t].forEach((function(e){a+='<li class="pmw-subnav-li pmw-subnav-li-inactive" style="cursor: pointer;" data-subsection-slug="'+e.slug+'">'+e.title+"</li>"})),a+="</ul>"})),a}(n)),jQuery(".nav-tab-wrapper a").on("click",(function(e){e.preventDefault(),jQuery(this).addClass("nav-tab-active").siblings().removeClass("nav-tab-active");let s=jQuery(this).data("section-slug");!function(e,a){jQuery("#wpm_settings_form > h2").nextUntil(".submit").andSelf().hide(),jQuery(".pmw-subnav-tabs").hide(),jQuery(".pmw-subnav-tabs[data-section-slug="+e+"]").show();let n=a.findIndex((t=>t.slug===e));jQuery("div[data-section-slug="+e+"]").closest("table").prevAll("h2:first").next().nextUntil("h2, .submit").andSelf().show(),t(a[n].slug)}(s,a),s in n&&jQuery("ul[data-section-slug="+s+"]").children(":first").trigger("click")})),jQuery(".pmw-subnav-li").on("click",(function(e){var a,n;e.preventDefault(),jQuery(this).addClass("pmw-subnav-li-active").removeClass("pmw-subnav-li-inactive").siblings().addClass("pmw-subnav-li-inactive").removeClass("pmw-subnav-li-active"),a=jQuery(this).parent().data("section-slug"),n=jQuery(this).data("subsection-slug"),jQuery("#wpm_settings_form > h2").nextUntil(".submit").andSelf().hide(),jQuery("[data-section-slug="+a+"][data-subsection-slug="+n+"]").closest("tr").siblings().andSelf().hide(),jQuery("[data-section-slug="+a+"][data-subsection-slug="+n+"]").closest("table").show(),jQuery("[data-section-slug="+a+"][data-subsection-slug="+n+"]").closest("tr").nextUntil(jQuery("[data-section-slug="+a+"][data-subsection-slug]").closest("tr")).show(),t(a,n)})),e()){let t=e();jQuery("a[data-section-slug="+t.section+"]").trigger("click"),!1!==t.subsection&&jQuery("ul[data-section-slug="+t.section+"]").children("[data-subsection-slug="+t.subsection+"]").trigger("click")}else jQuery("a[data-section-slug="+a[0].slug+"]").trigger("click")})),wpmGetPageId=()=>{const e=window.location.search;return new URLSearchParams(e).get("page")}}},t={};function a(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,a),i.exports}a(663),a(958),a(966)})();
2
  //# sourceMappingURL=wpm-admin.p1.min.js.map
js/admin/wpm-admin.p1.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"wpm-admin.p1.min.js","mappings":"sBAAAA,QAAO,WAGNA,OAAO,sBAAsBC,GAAG,SAAS,WACxCD,OAAO,wBAAwBE,SAC/BC,SAASC,YAAY,OACrB,IAEDJ,OAAO,yBAAyBC,GAAG,SAAS,WAC3CD,OAAO,WAAWK,QAAQ,QAC1B,IAEDF,SAASG,eAAe,4BACtBC,iBAAiB,SAAUC,IAAIC,gBAAgB,EACjD,IAEA,SAAUD,EAAKE,EAAGC,GAElBH,EAAII,mBAAqB,KACxB,IAAIC,EAAmBV,SAASG,eAAe,wBAAwBQ,MACvED,EAAuBA,EAAKE,QAAQ,MAAO,QAC3C,IAAIC,EAAmB,IAAIC,KAAK,CAACJ,GAAO,CAACK,KAAM,eAC3CC,EAAmBhB,SAASiB,cAAc,KAC9CD,EAAOE,SAAgB,0BAA4Bb,EAAI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G,OAAO,2BAA2BsH,UAAU,WAAWC,UAAU1C,OACjE7E,OAAO,sBAAwBqF,EAAc,0BAA4BC,EAAiB,KAAKY,QAAQ,MAAMkB,WAAWG,UAAU1C,OAElI7E,OAAO,sBAAwBqF,EAAc,0BAA4BC,EAAiB,KAAKY,QAAQ,SAASsB,OAChHxH,OAAO,sBAAwBqF,EAAc,0BAA4BC,EAAiB,KAAKY,QAAQ,MAAMoB,UAAUtH,OAAO,sBAAwBqF,EAAc,2BAA2Ba,QAAQ,OAAOsB,OAG9MpC,EAAUC,EAAaC,EAxFtB,IASGR,IAAuB,CAE1B,IAAImD,EAAgBnD,IAEpB9E,OAAO,uBAAyBiI,EAAa,QAAc,KAAK5H,QAAQ,UAEpC,IAAhC4H,EAAa,YAChBjI,OAAO,wBAA0BiI,EAAa,QAAc,KAAKF,SAAS,yBAA2BE,EAAa,WAAiB,KAAK5H,QAAQ,QAEjJ,MACAL,OAAO,uBAAyBgG,EAAS,GAAT,KAAsB,KAAK3F,QAAQ,QAEpE,IA6FD0F,aAAe,KAEd,MAAMhB,EAAcvD,OAAOgD,SAASQ,OAGpC,OAFoB,IAAIE,gBAAgBH,GAEvBI,IAAI,OAArB,C,GC7LG+C,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBzH,IAAjB0H,EACH,OAAOA,EAAaC,QAGrB,IAAIC,EAASL,EAAyBE,GAAY,CAGjDE,QAAS,CAAC,GAOX,OAHAE,EAAoBJ,GAAUG,EAAQA,EAAOD,QAASH,GAG/CI,EAAOD,OACf,CChBAG,EAAQ,KACRA,EAAQ,KACRA,EAAQ,I","sources":["webpack://Pixel-Manager-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/./src/js/admin/main.js"],"sourcesContent":["jQuery(function () {\n\n\t// copy debug info textarea\n\tjQuery(\"#debug-info-button\").on(\"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\").trigger(\"click\")\n\t})\n\n\tdocument.getElementById(\"json-settings-file-input\")\n\t\t.addEventListener(\"change\", wpm.readSingleFile, false)\n});\n\n(function (wpm, $, undefined) {\n\n\twpm.saveSettingsToDisk = () => {\n\t\tlet text = document.getElementById(\"export-settings-json\").value\n\t\ttext = text.replace(/\\n/g, \"\\r\\n\") // To retain the Line breaks.\n\t\tlet blob = new Blob([text], {type: \"text/plain\"})\n\t\tlet anchor = document.createElement(\"a\")\n\t\tanchor.download = \"pixel-manager-settings-\" + wpm.getCurrentDateForFileName() + \".json\"\n\t\tanchor.href = window.URL.createObjectURL(blob)\n\t\tanchor.target = \"_blank\"\n\t\tanchor.style.display = \"none\" // just to be safe!\n\t\tdocument.body.appendChild(anchor)\n\t\tanchor.click()\n\t\tdocument.body.removeChild(anchor)\n\t}\n\n\t// Get date in year month day divided by dots. Month and day have to be zero padded.\n\twpm.getCurrentDateForFileName = () => {\n\t\tlet date = new Date()\n\t\tlet year = date.getFullYear()\n\t\tlet month = (\"0\" + (date.getMonth() + 1)).slice(-2)\n\t\tlet day = (\"0\" + date.getDate()).slice(-2)\n\t\treturn year + \".\" + month + \".\" + day\n\n\t\t// return date.toLocaleDateString(\n\t\t// \t\"en-US\", {\n\t\t// \t\tyear : \"numeric\",\n\t\t// \t\tmonth: \"2-digit\",\n\t\t// \t\tday : \"2-digit\",\n\t\t// \t},\n\t\t// )\n\t}\n\n\twpm.readSingleFile = e => {\n\n\t\tlet file = e.target.files[0]\n\t\tif (!file) return\n\t\tlet reader = new FileReader()\n\t\treader.onload = function (e) {\n\t\t\tlet contents = JSON.parse(e.target.result)\n\n\t\t\t// document.getElementById(\"import-settings-json\").textContent = JSON.stringify(contents)\n\n\t\t\twpm.saveImportedSettingsToDb(contents)\n\t\t}\n\t\treader.readAsText(file)\n\t}\n\n\twpm.saveImportedSettingsToDb = settings => {\n\n\t\tfetch(pmwAdminApi.root + 'pmw/v1/settings/', {\n\t\t\tmethod: 'POST',\n\t\t\tcredentials: 'same-origin',\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t'X-WP-Nonce': pmwAdminApi.nonce\n\t\t\t},\n\t\t\tbody: JSON.stringify(settings)\n\t\t})\n\t\t\t.then(response => response.json())\n\t\t\t.then(async message=> {\n\t\t\t\tif (message.success) {\n\t\t\t\t\tconsole.log(message)\n\t\t\t\t\t// reload window\n\t\t\t\t\tdocument.getElementById(\"upload-status-success\").style.display = \"block\"\n\t\t\t\t\t// wait 5 seconds\n\t\t\t\t\tawait new Promise(resolve => setTimeout(resolve, 5000))\n\t\t\t\t\twindow.location.reload()\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(message)\n\t\t\t\t\tdocument.getElementById(\"upload-status-error\").style.display = \"block\"\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tconsole.error(error)\n\t\t\t\tdocument.getElementById(\"upload-status-error\").style.display = \"block\"\n\t\t\t})\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery))\n\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(\".pmw-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(\"pmw-subnav-li-active\").removeClass(\"pmw-subnav-li-inactive\")\n\t\t\t.siblings()\n\t\t\t.addClass(\"pmw-subnav-li-inactive\").removeClass(\"pmw-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=\\\"pmw-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=\\\"pmw-subnav-li pmw-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(\".pmw-subnav-tabs\").hide()\n\tjQuery(\".pmw-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\n\tconst queryString = window.location.search\n\tconst urlParams = new URLSearchParams(queryString)\n\n\treturn urlParams.get(\"page\")\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 * Combine all admin scripts\n * (which only run on the wpm pages)\n */\n\n// require(\"./environment-check\")\nrequire(\"./helpers\")\nrequire(\"./script-blocker-warning\")\nrequire(\"./tabs\")\n\n// console.log('Pixel Manager for WooCommerce admin script')\n"],"names":["jQuery","on","select","document","execCommand","trigger","getElementById","addEventListener","wpm","readSingleFile","$","undefined","saveSettingsToDisk","text","value","replace","blob","Blob","type","anchor","createElement","download","getCurrentDateForFileName","href","window","URL","createObjectURL","target","style","display","body","appendChild","click","removeChild","date","Date","getFullYear","getMonth","slice","getDate","e","file","files","reader","FileReader","onload","contents","JSON","parse","result","saveImportedSettingsToDb","readAsText","settings","fetch","pmwAdminApi","root","method","credentials","headers","nonce","stringify","then","response","json","async","message","success","console","log","Promise","resolve","setTimeout","location","reload","catch","error","wpm_hide_script_blocker_warning","hide","wpmGetSectionParams","queryString","search","urlParams","URLSearchParams","get","wpmSetUrl","sectionSlug","subsectionSlug","delete","newParams","history","pushState","pathname","val","wpmGetAdminPath","attr","wpmGetPageId","sections","subsections","closest","each","push","this","data","forEach","section","append","after","subsectionsKeys","Object","keys","html","subsectionKey","subtab","wpmCreateSubtabUlHtml","preventDefault","addClass","siblings","removeClass","nextUntil","andSelf","show","sectionPos","findIndex","arrayElement","prevAll","next","wpmToggleSections","children","parent","sectionParams","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","require"],"sourceRoot":""}
1
+ {"version":3,"file":"wpm-admin.p1.min.js","mappings":"sBAAAA,QAAO,WAGNA,OAAO,sBAAsBC,GAAG,SAAS,WACxCD,OAAO,wBAAwBE,SAC/BC,SAASC,YAAY,OACtB,IAEAJ,OAAO,yBAAyBC,GAAG,SAAS,WAC3CD,OAAO,WAAWK,QAAQ,QAC3B,IAEAF,SAASG,eAAe,4BACtBC,iBAAiB,SAAUC,IAAIC,kBAAkB,GAG/CN,SAASG,eAAe,4CAE3BH,SAASG,eAAe,0CACtBC,iBAAiB,SAAUC,IAAIE,2BAA2B,GAE5DP,SAASG,eAAe,0CACtBC,iBAAiB,SAAS,KAC1BC,IAAIG,8BAA8B,CAAC,EAAE,IACnC,GAGN,IAEC,SAAUH,EAAKI,EAAGC,GAElBL,EAAIM,mBAAqB,KACxB,IAAIC,EAAmBZ,SAASG,eAAe,wBAAwBU,MACvED,EAAuBA,EAAKE,QAAQ,MAAO,QAC3C,IAAIC,EAAmB,IAAIC,KAAK,CAACJ,GAAO,CAACK,KAAM,eAC3CC,EAAmBlB,SAASmB,cAAc,KAC9CD,EAAOE,SAAgB,0BAA4Bf,EAAIgB,4BAA8B,QACrFH,EAAOI,KAAgBC,OAAOC,IAAIC,gBAAgBV,GAClDG,EAAOQ,OAAgB,SACvBR,EAAOS,MAAMC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,SAAS,yBAA2BE,EAA0B,WAAI,KAAK/H,QAAQ,QAElJ,MACCL,OAAO,uBAAyBmG,EAAS,GAAS,KAAI,KAAK9F,QAAQ,QAErE,IA6FA6F,aAAe,KAEd,MAAMhB,EAAcxD,OAAOgD,SAASS,OAGpC,OAFoB,IAAIE,gBAAgBH,GAEvBI,IAAI,OAAO,C,GC7LzB+C,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqB1H,IAAjB2H,EACH,OAAOA,EAAaC,QAGrB,IAAIC,EAASL,EAAyBE,GAAY,CAGjDE,QAAS,CAAC,GAOX,OAHAE,EAAoBJ,GAAUG,EAAQA,EAAOD,QAASH,GAG/CI,EAAOD,OACf,CChBAG,EAAQ,KACRA,EAAQ,KACRA,EAAQ,I","sources":["webpack://Pixel-Manager-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/./src/js/admin/main.js"],"sourcesContent":["jQuery(function () {\n\n\t// copy debug info textarea\n\tjQuery(\"#debug-info-button\").on(\"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\").trigger(\"click\")\n\t})\n\n\tdocument.getElementById(\"json-settings-file-input\")\n\t\t.addEventListener(\"change\", wpm.readSettingsFile, false)\n\n\t// if element ga4-data-api-credentials-upload-button exists, then we are on the GA4 settings page\n\tif (document.getElementById(\"ga4-data-api-credentials-upload-button\")) {\n\n\t\tdocument.getElementById(\"ga4-data-api-credentials-upload-button\")\n\t\t\t.addEventListener(\"change\", wpm.readGa4DataApiCredentials, false)\n\n\t\tdocument.getElementById(\"ga4-data-api-credentials-delete-button\")\n\t\t\t.addEventListener(\"click\", () => {\n\t\t\t\twpm.saveGa4DataApiCredentialsToDb({})\n\t\t\t}, false)\n\t}\n\n});\n\n(function (wpm, $, undefined) {\n\n\twpm.saveSettingsToDisk = () => {\n\t\tlet text = document.getElementById(\"export-settings-json\").value\n\t\ttext = text.replace(/\\n/g, \"\\r\\n\") // To retain the Line breaks.\n\t\tlet blob = new Blob([text], {type: \"text/plain\"})\n\t\tlet anchor = document.createElement(\"a\")\n\t\tanchor.download = \"pixel-manager-settings-\" + wpm.getCurrentDateForFileName() + \".json\"\n\t\tanchor.href = window.URL.createObjectURL(blob)\n\t\tanchor.target = \"_blank\"\n\t\tanchor.style.display = \"none\" // just to be safe!\n\t\tdocument.body.appendChild(anchor)\n\t\tanchor.click()\n\t\tdocument.body.removeChild(anchor)\n\t}\n\n\t// Get date in year month day divided by dots. Month and day have to be zero padded.\n\twpm.getCurrentDateForFileName = () => {\n\t\tlet date = new Date()\n\t\tlet year = date.getFullYear()\n\t\tlet month = (\"0\" + (date.getMonth() + 1)).slice(-2)\n\t\tlet day = (\"0\" + date.getDate()).slice(-2)\n\t\treturn year + \".\" + month + \".\" + day\n\n\t\t// return date.toLocaleDateString(\n\t\t// \t\"en-US\", {\n\t\t// \t\tyear : \"numeric\",\n\t\t// \t\tmonth: \"2-digit\",\n\t\t// \t\tday : \"2-digit\",\n\t\t// \t},\n\t\t// )\n\t}\n\n\twpm.readSettingsFile = e => {\n\n\t\tlet file = e.target.files[0]\n\t\tif (!file) return\n\t\tlet reader = new FileReader()\n\t\treader.onload = function (e) {\n\t\t\tlet contents = JSON.parse(e.target.result)\n\n\t\t\t// document.getElementById(\"import-settings-json\").textContent = JSON.stringify(contents)\n\n\t\t\twpm.saveImportedSettingsToDb(contents)\n\t\t}\n\t\treader.readAsText(file)\n\t}\n\n\twpm.saveImportedSettingsToDb = settings => {\n\n\t\tfetch(pmwAdminApi.root + \"pmw/v1/settings/\", {\n\t\t\tmethod : \"POST\",\n\t\t\tcredentials: \"same-origin\",\n\t\t\theaders : {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\"X-WP-Nonce\" : pmwAdminApi.nonce,\n\t\t\t},\n\t\t\tbody : JSON.stringify(settings),\n\t\t})\n\t\t\t.then(response => response.json())\n\t\t\t.then(async message => {\n\t\t\t\tif (message.success) {\n\t\t\t\t\tconsole.log(message)\n\t\t\t\t\t// reload window\n\t\t\t\t\tdocument.getElementById(\"upload-status-success\").style.display = \"block\"\n\t\t\t\t\t// wait 5 seconds\n\t\t\t\t\tawait new Promise(resolve => setTimeout(resolve, 5000))\n\t\t\t\t\twindow.location.reload()\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(message)\n\t\t\t\t\tdocument.getElementById(\"upload-status-error\").style.display = \"block\"\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tconsole.error(error)\n\t\t\t\tdocument.getElementById(\"upload-status-error\").style.display = \"block\"\n\t\t\t})\n\t}\n\n\twpm.readGa4DataApiCredentials = e => {\n\n\t\tlet file = e.target.files[0]\n\t\tif (!file) return\n\t\tlet reader = new FileReader()\n\t\treader.onload = function (e) {\n\t\t\tlet contents = JSON.parse(e.target.result)\n\n\t\t\t// document.getElementById(\"import-settings-json\").textContent = JSON.stringify(contents)\n\n\t\t\twpm.saveGa4DataApiCredentialsToDb(contents)\n\t\t}\n\t\treader.readAsText(file)\n\t}\n\n\twpm.deleteGa4DataApiCredentials = e => {\n\t\twpm.saveGa4DataApiCredentialsToDb({})\n\t}\n\n\twpm.saveGa4DataApiCredentialsToDb = credentials => {\n\n\t\tfetch(pmwAdminApi.root + \"pmw/v1/ga4/data-api/credentials\", {\n\t\t\tmethod : \"POST\",\n\t\t\tcredentials: \"same-origin\",\n\t\t\theaders : {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\"X-WP-Nonce\" : pmwAdminApi.nonce,\n\t\t\t},\n\t\t\tbody : JSON.stringify(credentials),\n\t\t})\n\t\t\t.then(response => response.json())\n\t\t\t.then(async message => {\n\t\t\t\tif (message.success) {\n\t\t\t\t\tconsole.log(message)\n\t\t\t\t\t// reload window\n\t\t\t\t\tdocument.getElementById(\"ga4-api-credentials-upload-status-success\").style.display = \"block\"\n\t\t\t\t\t// wait 5 seconds\n\t\t\t\t\t// await new Promise(resolve => setTimeout(resolve, 5000))\n\t\t\t\t\twindow.location.reload()\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(message)\n\t\t\t\t\tdocument.getElementById(\"ga4-api-credentials-upload-status-error\").style.display = \"block\"\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tconsole.error(error)\n\t\t\t\tdocument.getElementById(\"ga4-api-credentials-upload-status-error\").style.display = \"block\"\n\t\t\t})\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n\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(\".pmw-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(\"pmw-subnav-li-active\").removeClass(\"pmw-subnav-li-inactive\")\n\t\t\t.siblings()\n\t\t\t.addClass(\"pmw-subnav-li-inactive\").removeClass(\"pmw-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=\\\"pmw-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=\\\"pmw-subnav-li pmw-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(\".pmw-subnav-tabs\").hide()\n\tjQuery(\".pmw-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\n\tconst queryString = window.location.search\n\tconst urlParams = new URLSearchParams(queryString)\n\n\treturn urlParams.get(\"page\")\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 * Combine all admin scripts\n * (which only run on the wpm pages)\n */\n\n// require(\"./environment-check\")\nrequire(\"./helpers\")\nrequire(\"./script-blocker-warning\")\nrequire(\"./tabs\")\n\n// #if process.env.TIER === 'premium'\n// // require(\"./helpers_premium\")\n// #endif\n\n// console.log('Pixel Manager for WooCommerce admin script')\n"],"names":["jQuery","on","select","document","execCommand","trigger","getElementById","addEventListener","wpm","readSettingsFile","readGa4DataApiCredentials","saveGa4DataApiCredentialsToDb","$","undefined","saveSettingsToDisk","text","value","replace","blob","Blob","type","anchor","createElement","download","getCurrentDateForFileName","href","window","URL","createObjectURL","target","style","display","body","appendChild","click","removeChild","date","Date","getFullYear","getMonth","slice","getDate","e","file","files","reader","FileReader","onload","contents","JSON","parse","result","saveImportedSettingsToDb","readAsText","settings","fetch","pmwAdminApi","root","method","credentials","headers","nonce","stringify","then","response","json","async","message","success","console","log","Promise","resolve","setTimeout","location","reload","catch","error","deleteGa4DataApiCredentials","wpm_hide_script_blocker_warning","hide","wpmGetSectionParams","queryString","search","urlParams","URLSearchParams","get","wpmSetUrl","sectionSlug","subsectionSlug","delete","newParams","history","pushState","pathname","val","wpmGetAdminPath","attr","wpmGetPageId","sections","subsections","closest","each","push","this","data","forEach","section","append","after","subsectionsKeys","Object","keys","html","subsectionKey","subtab","wpmCreateSubtabUlHtml","preventDefault","addClass","siblings","removeClass","nextUntil","andSelf","show","sectionPos","findIndex","arrayElement","prevAll","next","wpmToggleSections","children","parent","sectionParams","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","require"],"sourceRoot":""}
js/public/wpm-public.p1.min.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{var e={164:()=>{jQuery(document).on("wpmLoadPixels",(()=>{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("wpmClientSideAddToCart",((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;fbq("track","AddToCart",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideBeginCheckout",((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;fbq("track","InitiateCheckout",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideAddToWishlist",((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;fbq("track","AddToWishlist",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideViewItem",((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;fbq("track","ViewContent",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideSearch",((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;fbq("track","Search",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmLoadAlways",(()=>{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("wpmClientSideOrderReceivedPage",((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;fbq("track","Purchase",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}}))},1:()=>{!function(e,t,a){let o;e.loadFacebookPixel=()=>{try{wpmDataLayer.pixels.facebook.loaded=!0,t=window,a=document,o="script",t.fbq||(r=t.fbq=function(){r.callMethod?r.callMethod.apply(r,arguments):r.queue.push(arguments)},t._fbq||(t._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[],(i=a.createElement(o)).async=!0,i.src="https://connect.facebook.net/en_US/fbevents.js",(n=a.getElementsByTagName(o)[0]).parentNode.insertBefore(i,n));let l={};e.isFbpSet()&&(l={...e.getUserIdentifiersForFb()}),fbq("init",wpmDataLayer.pixels.facebook.pixel_id,l),fbq("track","PageView")}catch(o){console.error(o)}var t,a,o,r,i,n},e.getUserIdentifiersForFb=()=>{var e,t,a,o,r,i,n,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D,b,C,k,x,j,S,I,Q,P,O,E,A,T,F,V,G,U,R,q,M,N;let W={};return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.user)&&void 0!==t&&t.id&&(W.external_id=wpmDataLayer.user.id),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.order)&&void 0!==o&&o.user_id&&(W.external_id=wpmDataLayer.order.user_id),null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.user)&&void 0!==i&&null!==(n=i.facebook)&&void 0!==n&&n.email&&(W.em=wpmDataLayer.user.facebook.email),null!==(l=wpmDataLayer)&&void 0!==l&&null!==(d=l.order)&&void 0!==d&&d.billing_email_hashed&&(W.em=wpmDataLayer.order.billing_email_hashed),null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&null!==(u=c.facebook)&&void 0!==u&&u.first_name&&(W.fn=wpmDataLayer.user.facebook.first_name),null!==(p=wpmDataLayer)&&void 0!==p&&null!==(m=p.order)&&void 0!==m&&m.billing_first_name&&(W.fn=wpmDataLayer.order.billing_first_name.toLowerCase()),null!==(g=wpmDataLayer)&&void 0!==g&&null!==(y=g.user)&&void 0!==y&&null!==(w=y.facebook)&&void 0!==w&&w.last_name&&(W.ln=wpmDataLayer.user.facebook.last_name),null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.order)&&void 0!==_&&_.billing_last_name&&(W.ln=wpmDataLayer.order.billing_last_name.toLowerCase()),null!==(f=wpmDataLayer)&&void 0!==f&&null!==(h=f.user)&&void 0!==h&&null!==(L=h.facebook)&&void 0!==L&&L.phone&&(W.ph=wpmDataLayer.user.facebook.phone),null!==(D=wpmDataLayer)&&void 0!==D&&null!==(b=D.order)&&void 0!==b&&b.billing_phone&&(W.ph=wpmDataLayer.order.billing_phone.replace("+","")),null!==(C=wpmDataLayer)&&void 0!==C&&null!==(k=C.user)&&void 0!==k&&null!==(x=k.facebook)&&void 0!==x&&x.city&&(W.ct=wpmDataLayer.user.facebook.city),null!==(j=wpmDataLayer)&&void 0!==j&&null!==(S=j.order)&&void 0!==S&&S.billing_city&&(W.ct=wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g,"")),null!==(I=wpmDataLayer)&&void 0!==I&&null!==(Q=I.user)&&void 0!==Q&&null!==(P=Q.facebook)&&void 0!==P&&P.state&&(W.st=wpmDataLayer.user.facebook.state),null!==(O=wpmDataLayer)&&void 0!==O&&null!==(E=O.order)&&void 0!==E&&E.billing_state&&(W.st=wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/,"")),null!==(A=wpmDataLayer)&&void 0!==A&&null!==(T=A.user)&&void 0!==T&&null!==(F=T.facebook)&&void 0!==F&&F.postcode&&(W.zp=wpmDataLayer.user.facebook.postcode),null!==(V=wpmDataLayer)&&void 0!==V&&null!==(G=V.order)&&void 0!==G&&G.billing_postcode&&(W.zp=wpmDataLayer.order.billing_postcode),null!==(U=wpmDataLayer)&&void 0!==U&&null!==(R=U.user)&&void 0!==R&&null!==(q=R.facebook)&&void 0!==q&&q.country&&(W.country=wpmDataLayer.user.facebook.country),null!==(M=wpmDataLayer)&&void 0!==M&&null!==(N=M.order)&&void 0!==N&&N.billing_country&&(W.country=wpmDataLayer.order.billing_country.toLowerCase()),W},e.getFbRandomEventId=()=>(Math.random()+1).toString(36).substring(2),e.getFbUserData=()=>(o={...o,...e.getFbUserDataFromBrowser()},o),e.setFbUserData=()=>{o=e.getFbUserDataFromBrowser()},e.getFbUserDataFromBrowser=()=>{var t,a;let o={};return e.getCookie("_fbp")&&e.isValidFbp(e.getCookie("_fbp"))&&(o.fbp=e.getCookie("_fbp")),e.getCookie("_fbc")&&e.isValidFbc(e.getCookie("_fbc"))&&(o.fbc=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.isFbpSet=()=>!!e.getCookie("_fbp"),e.isValidFbp=e=>new RegExp(/^fb\.[0-2]\.\d{13}\.\d{8,20}$/).test(e),e.isValidFbc=e=>new RegExp(/^fb\.[0-2]\.\d{13}\.[\da-zA-Z_-]{8,}/).test(e),e.fbGetProductDataForCapiEvent=e=>({content_type:"product",content_name:e.name,content_ids:[e.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]],value:parseFloat(e.quantity*e.price),currency:e.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.getFbRandomEventId();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)}},e.fbGetContentIdsFromCart=()=>{let e=[];for(const t in wpmDataLayer.cart)e.push(wpmDataLayer.products[t].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]);return 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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;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()};t&&(e.value=(t.quantity?t.quantity:1)*t.price,e.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;if(jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel()))return;if(!wpm.googleConfigConditionsMet("ads"))return;let n={},l={};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!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.order)&&void 0!==t&&t.clv_order_value_filtered&&(n.customer_lifetime_value=wpmDataLayer.order.clv_order_value_filtered),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&o.id&&(n.user_id=wpmDataLayer.user.id),null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.order)&&void 0!==i&&i.aw_merchant_id&&(l={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,...l})}))}catch(e){console.error(e)}}))},42:()=>{!function(e,t,a){e.getGoogleAdsConversionIdentifiersWithLabel=function(){var e,t,a,o;let r=[];if(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&&o.conversionIds)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))t&&r.push(e+"/"+t);return r},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,L,D;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&&gtag("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}),null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.shop)&&void 0!==_&&_.page_type&&"order_received_page"===wpmDataLayer.shop.page_type&&null!==(f=wpmDataLayer)&&void 0!==f&&null!==(h=f.order)&&void 0!==h&&null!==(L=h.google)&&void 0!==L&&null!==(D=L.ads)&&void 0!==D&&D.enhanced_conversion_data&&gtag("set","user_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{var e,t,a,o,r;wpmDataLayer.pixels.google.analytics.ga4.state="loading";let i=wpmDataLayer.pixels.google.analytics.ga4.parameters;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.debug_mode&&(i.debug_mode=!0),gtag("config",wpmDataLayer.pixels.google.analytics.ga4.measurement_id,i),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()).then((function(t,a){try{var o,r,i,n,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D,b,C;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 k,x,j,S;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!==(k=wpmDataLayer)&&void 0!==k&&null!==(x=k.pixels)&&void 0!==x&&null!==(j=x.google)&&void 0!==j&&null!==(S=j.consent_mode)&&void 0!==S&&S.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&&gtag("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!==(b=D.analytics)&&void 0!==b&&null!==(C=b.ga4)&&void 0!==C&&C.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(i.categories.analytics=!d,i.categories.ads=!d,n||l)return n&&(i.categories.analytics=!!n),void(l&&(i.categories.ads=!!l));if(t=e.getCookie("pmw_cookie_consent"))return t=JSON.parse(t),i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,void(i.visitorHasChosen=!0);if(t=e.getCookie("CookieConsent"))return t=decodeURI(t),i.categories.analytics=t.indexOf("statistics:true")>=0,i.categories.ads=t.indexOf("marketing:true")>=0,void(i.visitorHasChosen=!0);if(t=e.getCookie("CookieScriptConsent"))return 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),void(i.visitorHasChosen=!0);var s,c,u,p,m,g,y,w;if(t=e.getCookie("borlabs-cookie"))return 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)||[]],void(i.mode="pixel");if(t=o())return i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,void(i.visitorHasChosen=t.visitorHasChosen);if(t=e.getCookie("cookie_notice_accepted"))return i.categories.analytics=!0,i.categories.ads=!0,void(i.visitorHasChosen=!0);if(t=e.getCookie("hu-consent"))return t=JSON.parse(t),i.categories.analytics=!!t.categories[3],i.categories.ads=!!t.categories[4],void(i.visitorHasChosen=!0);if(t=r())return i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,void(i.visitorHasChosen=!0===t.visitorHasChosen);if(t=e.getCookie("moove_gdpr_popup"))return t=JSON.parse(t),i.categories.analytics="1"===t.thirdparty,i.categories.ads="1"===t.advanced,void(i.visitorHasChosen=!0);if(t=e.getCookie("wpautoterms-cookies-notice")){if("1"!==t)return;return i.categories.analytics=!0,i.categories.ads=!0,void(i.visitorHasChosen=!0)}if(window.localStorage&&window.localStorage.getItem("uc_settings")){if(console.log("Usercentrics settings detected"),"undefined"==typeof UC_UI)return void window.addEventListener("UC_UI_INITIALIZED",(function(t){e.ucUiProcessConsent()}));if(UC_UI.areAllConsentsAccepted())return i.categories.analytics=!0,i.categories.ads=!0,void(i.visitorHasChosen=!0);e.ucUiProcessConsent()}if(t=e.getCookie("OptanonConsent")){let e=new URLSearchParams(t).get("groups").split(","),a={};return e.forEach((e=>{let t=e.split(":");a[t[0]]=t[1]})),i.categories.analytics="1"===groubsObject[2],i.categories.ads="1"===a[4],void(i.visitorHasChosen=!0)}},e.ucUiProcessConsent=function(){if("undefined"==typeof UC_UI)return;UC_UI.areAllConsentsAccepted()&&pmw.consentAcceptAll();const e=UC_UI.getSettingsLabels().categories.filter((e=>"Statistics"===e.label))[0].slug;pmw.consentAdjustSelectively({analytics:!UC_UI.getServicesBaseInfo().filter((t=>t.categorySlug===e&&!1===t.consent.status)).length>0,ads:!UC_UI.getServicesBaseInfo().filter((e=>"marketing"===e.categorySlug&&!1===e.consent.status)).length>0})},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. (PMW 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. (PMW 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}),document.addEventListener("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"),document.dispatchEvent(new Event("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(){let t=!(arguments.length>0&&arguments[0]!==a)||arguments[0],o=!(arguments.length>1&&arguments[1]!==a)||arguments[1];e.setConsentValueCategories(t,o),document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.unblockSelectedPixels=()=>{document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.explicitConsentStateAlreadySet=()=>{if(i.explicitConsentStateAlreadySet)return!0;i.explicitConsentStateAlreadySet=!0},document.addEventListener("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))})),document.addEventListener("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),document.addEventListener("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)})),document.addEventListener("CookieScriptAcceptAll",(()=>{e.setConsentValueCategories(!0,!0),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)},document.addEventListener("cmplzStatusChange",e.cmplzStatusChange),document.addEventListener("cmplz_status_change",e.cmplzStatusChange),document.addEventListener("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&&document.querySelector(".hu-cookies-save").addEventListener("click",(()=>{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}),window.addEventListener("ucEvent",(function(e){e.detail&&"consent_status"==e.detail.event&&(!0===e.detail["Google Ads Remarketing"]?console.log("Google Ads Remarketing has consent"):console.log("Google Ads Remarketing has no consent"))})),window.addEventListener("UC_UI_CMP_EVENT",(function(e){"ACCEPT_ALL"===e.detail.type&&pmw.consentAcceptAll(),"DENY_ALL"===e.detail.type&&pmw.consentRevokeAll(),"SAVE"===e.detail.type&&console.log("event.detail",e.detail)})),jQuery("#accept-recommended-btn-handler, #onetrust-accept-btn-handler").on("click",(function(){void 0!==window.OneTrust&&pmw.consentAcceptAll()})),jQuery(".ot-pc-refuse-all-handler, #onetrust-reject-all-handler").on("click",(function(){pmw.consentRevokeAll()})),jQuery(".save-preference-btn-handler.onetrust-close-btn-handler").on("click",(function(){location.reload()}))}(window.wpm=window.wpm||{},jQuery),function(e,t,a){e.consentAcceptAll=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:{};t.duration=t.duration||365,e.consentSetCookie(!0,!0,t.duration),wpm.unblockAllScripts(!0,!0),wpm.updateGoogleConsentMode(!0,!0)},e.consentAdjustSelectively=t=>{t.analytics=t.analytics!==a?t.analytics:wpm.getConsentValues().categories.analytics,t.ads=t.ads!==a?t.ads:wpm.getConsentValues().categories.ads,t.duration=t.duration||365,e.consentSetCookie(t.analytics,t.ads,t.duration),wpm.unblockAllScripts(t.analytics,t.ads),wpm.updateGoogleConsentMode(t.analytics,t.ads)},e.consentRevokeAll=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:{};t.duration=t.duration||365,wpm.setConsentValueCategories(!1,!1),e.consentSetCookie(!1,!1,t.duration),wpm.updateGoogleConsentMode(!1,!1)},e.consentSetCookie=function(e,t){let o=arguments.length>2&&arguments[2]!==a?arguments[2]:365;wpm.setCookie("pmw_cookie_consent",JSON.stringify({analytics:e,ads:t}),o)},jQuery(document).trigger("pmw_cookie_consent_management_loaded")}(window.pmw=window.pmw||{},jQuery)},299:()=>{jQuery(document).on("click",".remove_from_cart_button, .remove",(e=>{try{let t=new URL(jQuery(e.currentTarget).attr("href")),a=wpm.getProductIdByCartItemKeyUrl(t);wpm.removeProductFromCart(a)}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",(e=>{try{let t,a=1;"product"===wpmDataLayer.shop.page_type?(void 0!==jQuery(e.currentTarget).attr("href")&&jQuery(e.currentTarget).attr("href").includes("add-to-cart")&&(t=jQuery(e.currentTarget).data("product_id"),wpm.addProductToCart(t,a)),"simple"===wpmDataLayer.shop.product_type&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery(e.currentTarget).val(),wpm.addProductToCart(t,a)),["variable","variable-subscription"].indexOf(wpmDataLayer.shop.product_type)>=0&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery("[name='variation_id']").val(),wpm.addProductToCart(t,a)),"grouped"===wpmDataLayer.shop.product_type&&jQuery(".woocommerce-grouped-product-list-item").each(((e,o)=>{a=Number(jQuery(o).find(".input-text.qty").val()),a||0===a||(a=1);let r=jQuery(o).attr("class");t=wpm.getPostIdFromString(r),wpm.addProductToCart(t,a)})),"bundle"===wpmDataLayer.shop.product_type&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery("input[name=add-to-cart]").val(),wpm.addProductToCart(t,a))):(t=jQuery(e.currentTarget).data("product_id"),wpm.addProductToCart(t,a))}catch(e){console.error(e)}})),jQuery(document).one("click","a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)",(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",(e=>{try{let t=jQuery(e.currentTarget).nextAll(".wpmProductId:first").data("id");if(t){if(t=wpm.getIdBasedOndVariationsOutputSetting(t),!t)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[t]){let e=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmSelectContentGaUa",e),jQuery(document).trigger("wpmSelectItem",e)}}}catch(e){console.error(e)}})),jQuery(document).one("click init_checkout",[".checkout-button",".cart-checkout-button",".button.checkout",".xoo-wsc-ft-btn-checkout",".elementor-button--checkout"].join(","),(()=>{jQuery(document).trigger("wpmBeginCheckout")})),jQuery(document).on("input","#billing_email",(e=>{wpm.isEmail(jQuery(e.currentTarget).val())&&(wpm.fireCheckoutProgress(2),wpm.emailSelected=!0)})),jQuery(document).on("wpmLoad",(e=>{jQuery(document).on("payment_method_selected",(()=>{!1===wpm.paymentMethodSelected&&wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val()),wpm.paymentMethodSelected=!0}))})),jQuery((()=>{jQuery("form.checkout").on("checkout_place_order_success",(()=>{!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).trigger("wpmPlaceOrder",{})}))})),jQuery(document).on("click","[name='update_cart']",(e=>{try{jQuery(".cart_item").each(((e,t)=>{let a=new URL(jQuery(t).find(".product-remove").find("a").attr("href")),o=wpm.getProductIdByCartItemKeyUrl(a),r=jQuery(t).find(".qty").val();0===r?wpm.removeProductFromCart(o):r<wpmDataLayer.cart[o].quantity?wpm.removeProductFromCart(o,wpmDataLayer.cart[o].quantity-r):r>wpmDataLayer.cart[o].quantity&&wpm.addProductToCart(o,r-wpmDataLayer.cart[o].quantity)}))}catch(e){console.error(e),wpm.getCartItemsFromBackend()}})),jQuery((function(){jQuery(".add_to_wishlist,.wl-add-to").on("click",(e=>{try{let t;if(jQuery(e.currentTarget).data("productid")?t=jQuery(e.currentTarget).data("productid"):jQuery(e.currentTarget).data("product-id")&&(t=jQuery(e.currentTarget).data("product-id")),!t)throw Error("Wasn't able to retrieve a productId");let a=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmAddToWishlist",a)}catch(e){console.error(e)}}))})),jQuery(document).on("updated_cart_totals",(()=>{jQuery(document).trigger("wpmViewCart")})),jQuery((()=>{jQuery(".single_variation_wrap").on("show_variation",((e,t)=>{try{let e=wpm.getIdBasedOndVariationsOutputSetting(t.variation_id);if(!e)throw Error("Wasn't able to retrieve a productId");wpm.triggerViewItemEventPrep(e)}catch(e){console.error(e)}}))})),jQuery(document).on("wpmLoad",(()=>{try{wpm.doesWooCommerceCartExist()&&wpm.getCartItems()}catch(e){console.error(e)}})),jQuery(document).on("wpmLoad",(()=>{wpmDataLayer.products=wpmDataLayer.products||{};let e=wpm.getAddToCartLinkProductIds();wpm.getProductsFromBackend(e)})),jQuery(document).on("wpmLoad",(()=>{if(!wpm.getCookie("wpmReferrer")&&document.referrer){let e=new URL(document.referrer).hostname;e!==window.location.host&&wpm.setCookie("wpmReferrer",e)}})),jQuery(document).on("wpmLoad",(()=>{try{var e;if("undefined"!=typeof wpmDataLayer&&(null===(e=wpmDataLayer)||void 0===e||!e.wpmLoadFired)){var t,a,o;if(jQuery(document).trigger("wpmLoadAlways"),null!==(t=wpmDataLayer)&&void 0!==t&&t.shop)if("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),"function"==typeof wpm.acrRemoveCookie&&wpm.acrRemoveCookie()):jQuery(document).trigger("wpmEverywhereElse");else jQuery(document).trigger("wpmEverywhereElse");null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&o.id&&!wpm.hasLoginEventFired()&&(jQuery(document).trigger("wpmLogin"),wpm.setLoginEventFired()),wpmDataLayer.wpmLoadFired=!0}}catch(e){console.error(e)}})),jQuery(document).on("wpmLoad",(async()=>{window.sessionStorage&&window.sessionStorage.getItem("_pmw_endpoint_available")&&!JSON.parse(window.sessionStorage.getItem("_pmw_endpoint_available"))&&console.error("Pixel Manager for WooCommerce: REST endpoint is not available. Using admin-ajax.php instead.")})),jQuery(document).on("wpmPreLoadPixels",(()=>{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",{})})),jQuery(document).on("wpmAddToCart",((e,t)=>{var a,o,r;let i={event:"addToCart",product:t};null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.loaded&&(i.facebook={event_name:"AddToCart",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),jQuery(document).trigger("wpmClientSideAddToCart",i),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(i)})),jQuery(document).on("wpmBeginCheckout",(()=>{var e,t,a;let o={event:"beginCheckout"};var r;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(o.facebook={event_name:"InitiateCheckout",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},null!==(r=wpmDataLayer)&&void 0!==r&&r.cart&&!jQuery.isEmptyObject(wpmDataLayer.cart)&&(o.facebook.custom_data={content_type:"product",content_ids:wpm.fbGetContentIdsFromCart(),value:wpm.getCartValue(),currency:wpmDataLayer.shop.currency})),jQuery(document).trigger("wpmClientSideBeginCheckout",o),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(o)})),jQuery(document).on("wpmAddToWishlist",((e,t)=>{var a,o,r;let i={event:"addToWishlist",product:t};null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.loaded&&(i.facebook={event_name:"AddToWishlist",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),jQuery(document).trigger("wpmClientSideAddToWishlist",i),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(i)})),jQuery(document).on("wpmViewItem",(function(e){var t,a,o;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i={event:"viewItem",product:r};null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.pixels)&&void 0!==a&&null!==(o=a.facebook)&&void 0!==o&&o.loaded&&(i.facebook={event_name:"ViewContent",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},r&&(i.facebook.custom_data=wpm.fbGetProductDataForCapiEvent(r))),jQuery(document).trigger("wpmClientSideViewItem",i),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(i)})),jQuery(document).on("wpmSearch",(()=>{var e,t,a;let o={event:"search"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(o.facebook={event_name:"Search",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{search_string:wpm.getSearchTermFromUrl()}}),jQuery(document).trigger("wpmClientSideSearch",o),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(o)})),jQuery(document).on("wpmOrderReceivedPage",(()=>{var e,t,a;let o={event:"orderReceived"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(o.facebook={event_name:"Purchase",event_id:wpmDataLayer.order.id,user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{content_type:"product",value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,content_ids:wpm.facebookContentIds()}}),jQuery(document).trigger("wpmClientSideOrderReceivedPage",o)}))},584:()=>{!function(e,t,a){const o="_wpm_order_ids",r="_pmw_endpoint_available",i="pmw/v1/test/";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=async()=>window.sessionStorage.getItem(r)?JSON.parse(window.sessionStorage.getItem(r)):await e.testEndpoint(),e.isSessionStorageAvailable=()=>!!window.sessionStorage,e.testEndpoint=async function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:e.root+i,o=arguments.length>1&&arguments[1]!==a?arguments[1]:r,n=await fetch(t,{method:"POST",mode:"cors",cache:"no-cache",keepalive:!0});return 200===n.status?(window.sessionStorage.setItem(o,JSON.stringify(!0)),!0):404===n.status||0===n.status?(window.sessionStorage.setItem(o,JSON.stringify(!1)),!1):void 0},e.isWpmRestEndpointAvailable=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:r;return!!e.getCookie(t)},e.writeOrderIdToStorage=function(t){let r=arguments.length>1&&arguments[1]!==a?arguments[1]:"thankyou_page";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,r)},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{fetch(e.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_cart_items"}),keepalive:!0}).then((e=>{if(e.ok)return e.json();throw Error("Error getting cart items from backend")})).then((t=>{if(!t.success)throw Error("Error getting cart items from backend");t.data.cart||(t.data.cart={}),e.saveCartObjectToDataLayer(t.data.cart),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(t.data.cart))}))}catch(e){console.error(e)}},e.getProductsFromBackend=async t=>{var a;if(null!==(a=wpmDataLayer)&&void 0!==a&&a.products&&(t=t.filter((e=>!wpmDataLayer.products.hasOwnProperty(e)))),t&&0!==t.length){try{let a;if(a=await e.isRestEndpointAvailable()?await fetch(e.root+"pmw/v1/products/",{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}):await fetch(e.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_product_ids",productIds:t})}),a.ok){let e=await a.json();e.success&&(wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e.data))}else console.error("Error getting products from backend")}catch(e){console.error(e)}return!0}},e.saveCartObjectToDataLayer=e=>{wpmDataLayer.cart=e,wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},e.triggerViewItemEventPrep=async t=>{wpmDataLayer.products&&wpmDataLayer.products[t]||await e.getProductsFromBackend([t]),e.triggerViewItemEvent(t)},e.triggerViewItemEvent=t=>{let a=e.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmViewItem",a)},e.triggerViewItemEventNoProduct=()=>{jQuery(document).trigger("wpmViewItem")},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.deleteCookie=t=>{e.setCookie(t,"",-1)},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=async(t,a)=>{try{let o;o=await e.isRestEndpointAvailable()?await fetch(e.root+"pmw/v1/pixels-fired/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({order_id:t,source:a}),keepalive:!0,cache:"no-cache"}):await fetch(e.ajax_url,{method:"POST",body:new URLSearchParams({action:"pmw_purchase_pixels_fired",order_id:t,source:a}),keepalive:!0}),o.ok?console.log("wpm.storeOrderIdOnServer success"):console.error("wpm.storeOrderIdOnServer error")}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=>{let t={dataType:"script",cache:!0,url:e};return 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),e.hashAsync=(e,t)=>crypto.subtle.digest(e,new TextEncoder("utf-8").encode(t)).then((e=>Array.prototype.map.call(new Uint8Array(e),(e=>("00"+e.toString(16)).slice(-2))).join(""))),e.getCartValue=()=>{var e;let t=0;if(null!==(e=wpmDataLayer)&&void 0!==e&&e.cart)for(const e in wpmDataLayer.cart){let a=wpmDataLayer.cart[e];t+=a.quantity*a.price}return t}}(window.wpm=window.wpm||{},jQuery)},534:(e,t,a)=>{a(584),a(473)},207:()=>{wpm.wpmDataLayerExists().then((()=>{console.log("Pixel Manager for WooCommerce: "+(wpmDataLayer.version.pro?"Pro":"Free")+" Version "+wpmDataLayer.version.number+" loaded"),document.dispatchEvent(new Event("wpmPreLoadPixels"))})).then((()=>{wpm.pageLoaded().then((function(){document.dispatchEvent(new Event("wpmLoad"))}))})),wpm.pageReady().then((function(){wpm.wpmDataLayerExists().then((()=>{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",(()=>{var e,t,a,o,r,n,i,l,d;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!==(n=r.facebook)&&void 0!==n&&n.loaded||wpm.doesUrlContainPatterns(null===(i=wpmDataLayer)||void 0===i||null===(l=i.pixels)||void 0===l||null===(d=l.facebook)||void 0===d?void 0:d.exclusion_patterns)||wpm.canIFire("ads","facebook-ads")&&wpm.loadFacebookPixel()})),jQuery(document).on("wpmClientSideAddToCart",((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;fbq("track","AddToCart",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideBeginCheckout",((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;fbq("track","InitiateCheckout",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideAddToWishlist",((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;fbq("track","AddToWishlist",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideViewItem",((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;fbq("track","ViewContent",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideSearch",((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;fbq("track","Search",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmLoadAlways",(()=>{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("wpmClientSideOrderReceivedPage",((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;fbq("track","Purchase",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}}))},1:()=>{!function(e,t,a){let o;e.loadFacebookPixel=()=>{try{wpmDataLayer.pixels.facebook.loaded=!0,t=window,a=document,o="script",t.fbq||(r=t.fbq=function(){r.callMethod?r.callMethod.apply(r,arguments):r.queue.push(arguments)},t._fbq||(t._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[],(n=a.createElement(o)).async=!0,n.src="https://connect.facebook.net/en_US/fbevents.js",(i=a.getElementsByTagName(o)[0]).parentNode.insertBefore(n,i));let l={};e.isFbpSet()&&(l={...e.getUserIdentifiersForFb()}),fbq("init",wpmDataLayer.pixels.facebook.pixel_id,l),fbq("track","PageView")}catch(o){console.error(o)}var t,a,o,r,n,i},e.getUserIdentifiersForFb=()=>{var e,t,a,o,r,n,i,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D,b,C,k,x,j,S,I,Q,P,O,E,A,T,F,V,U,G,R,q,M,N;let W={};return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.user)&&void 0!==t&&t.id&&(W.external_id=wpmDataLayer.user.id),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.order)&&void 0!==o&&o.user_id&&(W.external_id=wpmDataLayer.order.user_id),null!==(r=wpmDataLayer)&&void 0!==r&&null!==(n=r.user)&&void 0!==n&&null!==(i=n.facebook)&&void 0!==i&&i.email&&(W.em=wpmDataLayer.user.facebook.email),null!==(l=wpmDataLayer)&&void 0!==l&&null!==(d=l.order)&&void 0!==d&&d.billing_email_hashed&&(W.em=wpmDataLayer.order.billing_email_hashed),null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&null!==(u=c.facebook)&&void 0!==u&&u.first_name&&(W.fn=wpmDataLayer.user.facebook.first_name),null!==(p=wpmDataLayer)&&void 0!==p&&null!==(m=p.order)&&void 0!==m&&m.billing_first_name&&(W.fn=wpmDataLayer.order.billing_first_name.toLowerCase()),null!==(g=wpmDataLayer)&&void 0!==g&&null!==(y=g.user)&&void 0!==y&&null!==(w=y.facebook)&&void 0!==w&&w.last_name&&(W.ln=wpmDataLayer.user.facebook.last_name),null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.order)&&void 0!==_&&_.billing_last_name&&(W.ln=wpmDataLayer.order.billing_last_name.toLowerCase()),null!==(f=wpmDataLayer)&&void 0!==f&&null!==(h=f.user)&&void 0!==h&&null!==(L=h.facebook)&&void 0!==L&&L.phone&&(W.ph=wpmDataLayer.user.facebook.phone),null!==(D=wpmDataLayer)&&void 0!==D&&null!==(b=D.order)&&void 0!==b&&b.billing_phone&&(W.ph=wpmDataLayer.order.billing_phone.replace("+","")),null!==(C=wpmDataLayer)&&void 0!==C&&null!==(k=C.user)&&void 0!==k&&null!==(x=k.facebook)&&void 0!==x&&x.city&&(W.ct=wpmDataLayer.user.facebook.city),null!==(j=wpmDataLayer)&&void 0!==j&&null!==(S=j.order)&&void 0!==S&&S.billing_city&&(W.ct=wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g,"")),null!==(I=wpmDataLayer)&&void 0!==I&&null!==(Q=I.user)&&void 0!==Q&&null!==(P=Q.facebook)&&void 0!==P&&P.state&&(W.st=wpmDataLayer.user.facebook.state),null!==(O=wpmDataLayer)&&void 0!==O&&null!==(E=O.order)&&void 0!==E&&E.billing_state&&(W.st=wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/,"")),null!==(A=wpmDataLayer)&&void 0!==A&&null!==(T=A.user)&&void 0!==T&&null!==(F=T.facebook)&&void 0!==F&&F.postcode&&(W.zp=wpmDataLayer.user.facebook.postcode),null!==(V=wpmDataLayer)&&void 0!==V&&null!==(U=V.order)&&void 0!==U&&U.billing_postcode&&(W.zp=wpmDataLayer.order.billing_postcode),null!==(G=wpmDataLayer)&&void 0!==G&&null!==(R=G.user)&&void 0!==R&&null!==(q=R.facebook)&&void 0!==q&&q.country&&(W.country=wpmDataLayer.user.facebook.country),null!==(M=wpmDataLayer)&&void 0!==M&&null!==(N=M.order)&&void 0!==N&&N.billing_country&&(W.country=wpmDataLayer.order.billing_country.toLowerCase()),W},e.getFbRandomEventId=()=>(Math.random()+1).toString(36).substring(2),e.getFbUserData=()=>(o={...o,...e.getFbUserDataFromBrowser()},o),e.setFbUserData=()=>{o=e.getFbUserDataFromBrowser()},e.getFbUserDataFromBrowser=()=>{var t,a;let o={};return e.getCookie("_fbp")&&e.isValidFbp(e.getCookie("_fbp"))&&(o.fbp=e.getCookie("_fbp")),e.getCookie("_fbc")&&e.isValidFbc(e.getCookie("_fbc"))&&(o.fbc=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.isFbpSet=()=>!!e.getCookie("_fbp"),e.isValidFbp=e=>new RegExp(/^fb\.[0-2]\.\d{13}\.\d{8,20}$/).test(e),e.isValidFbc=e=>new RegExp(/^fb\.[0-2]\.\d{13}\.[\da-zA-Z_-]{8,}/).test(e),e.fbGetProductDataForCapiEvent=e=>({content_type:"product",content_name:e.name,content_ids:[e.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]],value:parseFloat(e.quantity*e.price),currency:e.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,n,i;if(null===(r=wpmDataLayer)||void 0===r||null===(n=r.pixels)||void 0===n||null===(i=n.facebook)||void 0===i||!i.loaded)return;let a=e.getFbRandomEventId();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)}},e.fbGetContentIdsFromCart=()=>{let e=[];for(const t in wpmDataLayer.cart)e.push(wpmDataLayer.products[t].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]);return 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,n,i,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===(n=r.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.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,n,i,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===(n=r.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var a,o,r,n,i,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===(n=r.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.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()};t&&(e.value=(t.quantity?t.quantity:1)*t.price,e.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,n,i,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===(n=r.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.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,n,i,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===(n=r.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.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,n,i,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===(n=r.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.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,n;if(jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel()))return;if(!wpm.googleConfigConditionsMet("ads"))return;let i={},l={};i={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!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.order)&&void 0!==t&&t.clv_order_value_filtered&&(i.customer_lifetime_value=wpmDataLayer.order.clv_order_value_filtered),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&o.id&&(i.user_id=wpmDataLayer.user.id),null!==(r=wpmDataLayer)&&void 0!==r&&null!==(n=r.order)&&void 0!==n&&n.aw_merchant_id&&(l={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",{...i,...l})}))}catch(e){console.error(e)}}))},42:()=>{!function(e,t,a){e.getGoogleAdsConversionIdentifiersWithLabel=function(){var e,t,a,o;let r=[];if(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&&o.conversionIds)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))t&&r.push(e+"/"+t);return r},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,n,i,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!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.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,n]of Object.entries(wpmDataLayer.order.items)){var a,o;let r;r={quantity:n.quantity,price:n.price,name:n.name,currency:wpmDataLayer.order.currency,category:wpmDataLayer.products[n.id].category.join("/")},null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.general)&&void 0!==o&&o.variationsOutput&&0!==n.variation_id?(r.id=String(wpmDataLayer.products[n.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.variant=wpmDataLayer.products[n.variation_id].variant_name,r.brand=wpmDataLayer.products[n.variation_id].brand):(r.id=String(wpmDataLayer.products[n.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.brand=wpmDataLayer.products[n.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,n,i,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!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.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,n;return!(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)||("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,n,i,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D;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!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.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&&gtag("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}),null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.shop)&&void 0!==_&&_.page_type&&"order_received_page"===wpmDataLayer.shop.page_type&&null!==(f=wpmDataLayer)&&void 0!==f&&null!==(h=f.order)&&void 0!==h&&null!==(L=h.google)&&void 0!==L&&null!==(D=L.ads)&&void 0!==D&&D.enhanced_conversion_data&&gtag("set","user_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{var e,t,a,o,r;wpmDataLayer.pixels.google.analytics.ga4.state="loading";let n=wpmDataLayer.pixels.google.analytics.ga4.parameters;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.debug_mode&&(n.debug_mode=!0),gtag("config",wpmDataLayer.pixels.google.analytics.ga4.measurement_id,n),wpmDataLayer.pixels.google.analytics.ga4.state="ready"}catch(e){console.error(e)}},e.isGoogleActive=function(){var e,t,a,o,r,n,i,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!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.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,n,i,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!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.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()).then((function(t,a){try{var o,r,n,i,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D,b,C;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!==(n=r.google)&&void 0!==n&&null!==(i=n.consent_mode)&&void 0!==i&&i.active){var k,x,j,S;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!==(k=wpmDataLayer)&&void 0!==k&&null!==(x=k.pixels)&&void 0!==x&&null!==(j=x.google)&&void 0!==j&&null!==(S=j.consent_mode)&&void 0!==S&&S.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&&gtag("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!==(b=D.analytics)&&void 0!==b&&null!==(C=b.ga4)&&void 0!==C&&C.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 n=0;!function a(){var o,r,i;return"ready"===(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(i=r.google)||void 0===i?void 0:i.state)?e():n>=5e3?t():(n+=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,n,i,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!==(n=r.pixels)&&void 0!==n&&null!==(i=n.google)&&void 0!==i&&null!==(l=i.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,n,i,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!==(n=r.hotjar)&&void 0!==n&&n.loaded||!wpm.canIFire("analytics","hotjar")||null!==(i=wpmDataLayer)&&void 0!==i&&null!==(l=i.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}},n={categories:{},pixels:[],mode:"category",visitorHasChosen:!1};e.getConsentValues=()=>n,e.setConsentValueCategories=function(){let e=arguments.length>0&&arguments[0]!==a&&arguments[0],t=arguments.length>1&&arguments[1]!==a&&arguments[1];n.categories.analytics=e,n.categories.ads=t},e.updateConsentCookieValues=function(){let t,i=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.categories.analytics=!d,n.categories.ads=!d,i||l)return i&&(n.categories.analytics=!!i),void(l&&(n.categories.ads=!!l));if(t=e.getCookie("pmw_cookie_consent"))return t=JSON.parse(t),n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,void(n.visitorHasChosen=!0);if(t=e.getCookie("CookieConsent"))return t=decodeURI(t),n.categories.analytics=t.indexOf("statistics:true")>=0,n.categories.ads=t.indexOf("marketing:true")>=0,void(n.visitorHasChosen=!0);if(t=e.getCookie("CookieScriptConsent"))return t=JSON.parse(t),"reject"===t.action?(n.categories.analytics=!1,n.categories.ads=!1):2===t.categories.length?(n.categories.analytics=!0,n.categories.ads=!0):(n.categories.analytics=t.categories.indexOf("performance")>=0,n.categories.ads=t.categories.indexOf("targeting")>=0),void(n.visitorHasChosen=!0);var s,c,u,p,m,g,y,w;if(t=e.getCookie("borlabs-cookie"))return t=decodeURI(t),t=JSON.parse(t),n.categories.analytics=!(null===(s=t)||void 0===s||null===(c=s.consents)||void 0===c||!c.statistics),n.categories.ads=!(null===(u=t)||void 0===u||null===(p=u.consents)||void 0===p||!p.marketing),n.visitorHasChosen=!0,n.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)||[]],void(n.mode="pixel");if(t=o())return n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,void(n.visitorHasChosen=t.visitorHasChosen);if(t=e.getCookie("cookie_notice_accepted"))return n.categories.analytics=!0,n.categories.ads=!0,void(n.visitorHasChosen=!0);if(t=e.getCookie("hu-consent"))return t=JSON.parse(t),n.categories.analytics=!!t.categories[3],n.categories.ads=!!t.categories[4],void(n.visitorHasChosen=!0);if(t=r())return n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,void(n.visitorHasChosen=!0===t.visitorHasChosen);if(t=e.getCookie("moove_gdpr_popup"))return t=JSON.parse(t),n.categories.analytics="1"===t.thirdparty,n.categories.ads="1"===t.advanced,void(n.visitorHasChosen=!0);if(t=e.getCookie("wpautoterms-cookies-notice")){if("1"!==t)return;return n.categories.analytics=!0,n.categories.ads=!0,void(n.visitorHasChosen=!0)}if(window.localStorage&&window.localStorage.getItem("uc_settings")){if(console.log("Usercentrics settings detected"),"undefined"==typeof UC_UI)return void window.addEventListener("UC_UI_INITIALIZED",(function(t){e.ucUiProcessConsent()}));if(UC_UI.areAllConsentsAccepted())return n.categories.analytics=!0,n.categories.ads=!0,void(n.visitorHasChosen=!0);e.ucUiProcessConsent()}if(t=e.getCookie("OptanonConsent")){let e=new URLSearchParams(t).get("groups").split(","),a={};return e.forEach((e=>{let t=e.split(":");a[t[0]]=t[1]})),n.categories.analytics="1"===groubsObject[2],n.categories.ads="1"===a[4],void(n.visitorHasChosen=!0)}},e.ucUiProcessConsent=function(){if("undefined"==typeof UC_UI)return;UC_UI.areAllConsentsAccepted()&&pmw.consentAcceptAll();const e=UC_UI.getSettingsLabels().categories.filter((e=>"Statistics"===e.label))[0].slug;pmw.consentAdjustSelectively({analytics:!UC_UI.getServicesBaseInfo().filter((t=>t.categorySlug===e&&!1===t.consent.status)).length>0,ads:!UC_UI.getServicesBaseInfo().filter((e=>"marketing"===e.categorySlug&&!1===e.consent.status)).length>0})},e.updateConsentCookieValues(),e.setConsentDefaultValuesToExplicit=()=>{n.categories={analytics:!1,ads:!1}},e.canIFire=(t,a)=>{let o;return"category"===n.mode?o=!!n.categories[t]:"pixel"===n.mode?(o=n.pixels.includes(a),!1===o&&"microsoft-ads"===a&&(o=n.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. (PMW 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. (PMW 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}),document.addEventListener("DOMContentLoaded",(()=>e.scriptTagObserver.disconnect())),e.shouldScriptBeActive=e=>{var a,o,r,i;return!((wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent||n.visitorHasChosen)&&("category"!==n.mode||!t(e).data("wpm-cookie-category").split(",").some((e=>n.categories[e])))&&("pixel"!==n.mode||!n.pixels.includes(t(e).data("wpm-pixel-name")))&&("pixel"!==n.mode||"google"!==t(e).data("wpm-pixel-name")||!["google-analytics","google-ads"].some((e=>n.pixels.includes(e))))&&(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||"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"),document.dispatchEvent(new Event("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(){let t=!(arguments.length>0&&arguments[0]!==a)||arguments[0],o=!(arguments.length>1&&arguments[1]!==a)||arguments[1];e.setConsentValueCategories(t,o),document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.unblockSelectedPixels=()=>{document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.explicitConsentStateAlreadySet=()=>{if(n.explicitConsentStateAlreadySet)return!0;n.explicitConsentStateAlreadySet=!0},document.addEventListener("borlabs-cookie-consent-saved",(()=>{e.updateConsentCookieValues(),"pixel"===n.mode?(e.unblockSelectedPixels(),e.updateGoogleConsentMode(n.pixels.includes("google-analytics"),n.pixels.includes("google-ads"))):(e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads))})),document.addEventListener("CookiebotOnAccept",(()=>{Cookiebot.consent.statistics&&(n.categories.analytics=!0),Cookiebot.consent.marketing&&(n.categories.ads=!0),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)}),!1),document.addEventListener("CookieScriptAccept",(t=>{t.detail.categories.includes("performance")&&(n.categories.analytics=!0),t.detail.categories.includes("targeting")&&(n.categories.ads=!0),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)})),document.addEventListener("CookieScriptAcceptAll",(()=>{e.setConsentValueCategories(!0,!0),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(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)},document.addEventListener("cmplzStatusChange",e.cmplzStatusChange),document.addEventListener("cmplz_status_change",e.cmplzStatusChange),document.addEventListener("setCookieNotice",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)})),e.huObserver=new MutationObserver((t=>{t.forEach((t=>{let{addedNodes:a}=t;[...a].forEach((t=>{"hu"===t.id&&document.querySelector(".hu-cookies-save").addEventListener("click",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)}))}))}))})),window.hu&&e.huObserver.observe(document.documentElement||document.body,{childList:!0,subtree:!0}),window.addEventListener("ucEvent",(function(e){e.detail&&"consent_status"==e.detail.event&&(!0===e.detail["Google Ads Remarketing"]?console.log("Google Ads Remarketing has consent"):console.log("Google Ads Remarketing has no consent"))})),window.addEventListener("UC_UI_CMP_EVENT",(function(e){"ACCEPT_ALL"===e.detail.type&&pmw.consentAcceptAll(),"DENY_ALL"===e.detail.type&&pmw.consentRevokeAll(),"SAVE"===e.detail.type&&console.log("event.detail",e.detail)})),jQuery("#accept-recommended-btn-handler, #onetrust-accept-btn-handler").on("click",(function(){void 0!==window.OneTrust&&pmw.consentAcceptAll()})),jQuery(".ot-pc-refuse-all-handler, #onetrust-reject-all-handler").on("click",(function(){pmw.consentRevokeAll()})),jQuery(".save-preference-btn-handler.onetrust-close-btn-handler").on("click",(function(){location.reload()}))}(window.wpm=window.wpm||{},jQuery),function(e,t,a){e.consentAcceptAll=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:{};t.duration=t.duration||365,e.consentSetCookie(!0,!0,t.duration),wpm.unblockAllScripts(!0,!0),wpm.updateGoogleConsentMode(!0,!0)},e.consentAdjustSelectively=t=>{t.analytics=t.analytics!==a?t.analytics:wpm.getConsentValues().categories.analytics,t.ads=t.ads!==a?t.ads:wpm.getConsentValues().categories.ads,t.duration=t.duration||365,e.consentSetCookie(t.analytics,t.ads,t.duration),wpm.unblockAllScripts(t.analytics,t.ads),wpm.updateGoogleConsentMode(t.analytics,t.ads)},e.consentRevokeAll=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:{};t.duration=t.duration||365,wpm.setConsentValueCategories(!1,!1),e.consentSetCookie(!1,!1,t.duration),wpm.updateGoogleConsentMode(!1,!1)},e.consentSetCookie=function(e,t){let o=arguments.length>2&&arguments[2]!==a?arguments[2]:365;wpm.setCookie("pmw_cookie_consent",JSON.stringify({analytics:e,ads:t}),o)},jQuery(document).trigger("pmw_cookie_consent_management_loaded")}(window.pmw=window.pmw||{},jQuery)},299:()=>{jQuery(document).on("click",".remove_from_cart_button, .remove",(e=>{try{let t=new URL(jQuery(e.currentTarget).attr("href")),a=wpm.getProductIdByCartItemKeyUrl(t);wpm.removeProductFromCart(a)}catch(e){console.error(e)}}));const e=[".add_to_cart_button:not(.product_type_variable)",".ajax_add_to_cart",".single_add_to_cart_button"].join(",");jQuery(document).on("ready",(()=>{jQuery(e).on("click",(e=>{try{let t,a=1;"product"===wpmDataLayer.shop.page_type?(void 0!==jQuery(e.currentTarget).attr("href")&&jQuery(e.currentTarget).attr("href").includes("add-to-cart")&&(t=jQuery(e.currentTarget).data("product_id"),wpm.addProductToCart(t,a)),"simple"===wpmDataLayer.shop.product_type&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery(e.currentTarget).val(),wpm.addProductToCart(t,a)),["variable","variable-subscription"].indexOf(wpmDataLayer.shop.product_type)>=0&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery("[name='variation_id']").val(),wpm.addProductToCart(t,a)),"grouped"===wpmDataLayer.shop.product_type&&jQuery(".woocommerce-grouped-product-list-item").each(((e,o)=>{a=Number(jQuery(o).find(".input-text.qty").val()),a||0===a||(a=1);let r=jQuery(o).attr("class");t=wpm.getPostIdFromString(r),wpm.addProductToCart(t,a)})),"bundle"===wpmDataLayer.shop.product_type&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery("input[name=add-to-cart]").val(),wpm.addProductToCart(t,a))):(t=jQuery(e.currentTarget).data("product_id"),wpm.addProductToCart(t,a))}catch(e){console.error(e)}}))})),jQuery(document).on("ready",(()=>{jQuery("a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)").one("click",(function(e){try{if(jQuery(e.target).closest("a").attr("href")){let t=new URL(jQuery(e.currentTarget).attr("href"),window.location.origin);if(t.searchParams.has("add-to-cart")){let e=t.searchParams.get("add-to-cart");wpm.addProductToCart(e,1)}}}catch(e){console.error(e)}}))})),jQuery(document).on("ready",(()=>{jQuery(".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product").on("click",(e=>{try{let t=jQuery(e.currentTarget).nextAll(".wpmProductId:first").data("id");if(t){if(t=wpm.getIdBasedOndVariationsOutputSetting(t),!t)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[t]){let e=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmSelectContentGaUa",e),jQuery(document).trigger("wpmSelectItem",e)}}}catch(e){console.error(e)}}))}));let t=[".checkout-button",".cart-checkout-button",".button.checkout",".xoo-wsc-ft-btn-checkout",".elementor-button--checkout"].join(",");jQuery(document).one("click init_checkout",t,(()=>{jQuery(document).trigger("wpmBeginCheckout")})),jQuery(document).on("input","#billing_email",(e=>{wpm.isEmail(jQuery(e.currentTarget).val())&&(wpm.fireCheckoutProgress(2),wpm.emailSelected=!0)})),jQuery(document).on("wpmLoad",(e=>{jQuery(document).on("payment_method_selected",(()=>{!1===wpm.paymentMethodSelected&&wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val()),wpm.paymentMethodSelected=!0}))})),jQuery(document).on("ready",(()=>{jQuery("form.checkout").on("checkout_place_order_success",(()=>{!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).trigger("wpmPlaceOrder",{})}))})),jQuery(document).on("ready",(()=>{jQuery("[name='update_cart']").on("click",(()=>{try{jQuery(".cart_item").each(((e,t)=>{let a=new URL(jQuery(t).find(".product-remove").find("a").attr("href")),o=wpm.getProductIdByCartItemKeyUrl(a),r=jQuery(t).find(".qty").val();0===r?wpm.removeProductFromCart(o):r<wpmDataLayer.cart[o].quantity?wpm.removeProductFromCart(o,wpmDataLayer.cart[o].quantity-r):r>wpmDataLayer.cart[o].quantity&&wpm.addProductToCart(o,r-wpmDataLayer.cart[o].quantity)}))}catch(e){console.error(e),wpm.getCartItemsFromBackend()}}))})),jQuery(document).on("ready",(()=>{jQuery(".add_to_wishlist,.wl-add-to").on("click",(e=>{try{let t;if(jQuery(e.currentTarget).data("productid")?t=jQuery(e.currentTarget).data("productid"):jQuery(e.currentTarget).data("product-id")&&(t=jQuery(e.currentTarget).data("product-id")),!t)throw Error("Wasn't able to retrieve a productId");let a=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmAddToWishlist",a)}catch(e){console.error(e)}}))})),jQuery(document).on("updated_cart_totals",(()=>{jQuery(document).trigger("wpmViewCart")})),jQuery(document).on("ready",(()=>{jQuery(".single_variation_wrap").on("show_variation",((e,t)=>{try{let e=wpm.getIdBasedOndVariationsOutputSetting(t.variation_id);if(!e)throw Error("Wasn't able to retrieve a productId");wpm.triggerViewItemEventPrep(e)}catch(e){console.error(e)}}))})),jQuery(document).on("wpmLoad",(()=>{try{wpm.doesWooCommerceCartExist()&&wpm.getCartItems()}catch(e){console.error(e)}})),jQuery(document).on("wpmLoad",(()=>{wpmDataLayer.products=wpmDataLayer.products||{};let e=wpm.getAddToCartLinkProductIds();wpm.getProductsFromBackend(e)})),jQuery(document).on("wpmLoad",(()=>{if(!wpm.getCookie("wpmReferrer")&&document.referrer){let e=new URL(document.referrer).hostname;e!==window.location.host&&wpm.setCookie("wpmReferrer",e)}})),jQuery(document).on("wpmLoad",(()=>{try{var e;if("undefined"!=typeof wpmDataLayer&&(null===(e=wpmDataLayer)||void 0===e||!e.wpmLoadFired)){var t,a,o;if(jQuery(document).trigger("wpmLoadAlways"),null!==(t=wpmDataLayer)&&void 0!==t&&t.shop)if("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),"function"==typeof wpm.acrRemoveCookie&&wpm.acrRemoveCookie()):jQuery(document).trigger("wpmEverywhereElse");else jQuery(document).trigger("wpmEverywhereElse");null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&o.id&&!wpm.hasLoginEventFired()&&(jQuery(document).trigger("wpmLogin"),wpm.setLoginEventFired()),wpmDataLayer.wpmLoadFired=!0}}catch(e){console.error(e)}})),jQuery(document).on("wpmLoad",(async()=>{window.sessionStorage&&window.sessionStorage.getItem("_pmw_endpoint_available")&&!JSON.parse(window.sessionStorage.getItem("_pmw_endpoint_available"))&&console.error("Pixel Manager for WooCommerce: REST endpoint is not available. Using admin-ajax.php instead.")})),jQuery(document).on("wpmPreLoadPixels",(()=>{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",{})})),jQuery(document).on("wpmAddToCart",((e,t)=>{var a,o,r;let n={event:"addToCart",product:t};null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.loaded&&(n.facebook={event_name:"AddToCart",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),jQuery(document).trigger("wpmClientSideAddToCart",n),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(n)})),jQuery(document).on("wpmBeginCheckout",(()=>{var e,t,a;let o={event:"beginCheckout"};var r;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(o.facebook={event_name:"InitiateCheckout",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},null!==(r=wpmDataLayer)&&void 0!==r&&r.cart&&!jQuery.isEmptyObject(wpmDataLayer.cart)&&(o.facebook.custom_data={content_type:"product",content_ids:wpm.fbGetContentIdsFromCart(),value:wpm.getCartValue(),currency:wpmDataLayer.shop.currency})),jQuery(document).trigger("wpmClientSideBeginCheckout",o),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(o)})),jQuery(document).on("wpmAddToWishlist",((e,t)=>{var a,o,r;let n={event:"addToWishlist",product:t};null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.loaded&&(n.facebook={event_name:"AddToWishlist",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),jQuery(document).trigger("wpmClientSideAddToWishlist",n),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(n)})),jQuery(document).on("wpmViewItem",(function(e){var t,a,o;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={event:"viewItem",product:r};null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.pixels)&&void 0!==a&&null!==(o=a.facebook)&&void 0!==o&&o.loaded&&(n.facebook={event_name:"ViewContent",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},r&&(n.facebook.custom_data=wpm.fbGetProductDataForCapiEvent(r))),jQuery(document).trigger("wpmClientSideViewItem",n),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(n)})),jQuery(document).on("wpmSearch",(()=>{var e,t,a;let o={event:"search"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(o.facebook={event_name:"Search",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{search_string:wpm.getSearchTermFromUrl()}}),jQuery(document).trigger("wpmClientSideSearch",o),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(o)})),jQuery(document).on("wpmOrderReceivedPage",(()=>{var e,t,a;let o={event:"orderReceived"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(o.facebook={event_name:"Purchase",event_id:wpmDataLayer.order.id,user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{content_type:"product",value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,content_ids:wpm.facebookContentIds()}}),jQuery(document).trigger("wpmClientSideOrderReceivedPage",o)}))},584:()=>{!function(e,t,a){const o="_wpm_order_ids",r="_pmw_endpoint_available",n="pmw/v1/test/";function i(){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=async()=>window.sessionStorage.getItem(r)?JSON.parse(window.sessionStorage.getItem(r)):await e.testEndpoint(),e.isSessionStorageAvailable=()=>!!window.sessionStorage,e.testEndpoint=async function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:e.root+n,o=arguments.length>1&&arguments[1]!==a?arguments[1]:r,i=await fetch(t,{method:"POST",mode:"cors",cache:"no-cache",keepalive:!0});return 200===i.status?(window.sessionStorage.setItem(o,JSON.stringify(!0)),!0):404===i.status||0===i.status?(window.sessionStorage.setItem(o,JSON.stringify(!1)),!1):void 0},e.isWpmRestEndpointAvailable=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:r;return!!e.getCookie(t)},e.writeOrderIdToStorage=function(t){let r=arguments.length>1&&arguments[1]!==a?arguments[1]:"thankyou_page";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=[];i()&&(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,r)},e.isOrderIdStored=t=>wpmDataLayer.orderDeduplication?window.Storage?null!==localStorage.getItem(o)&&JSON.parse(localStorage.getItem(o)).includes(t):!!i()&&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{fetch(e.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_cart_items"}),keepalive:!0}).then((e=>{if(e.ok)return e.json();throw Error("Error getting cart items from backend")})).then((t=>{if(!t.success)throw Error("Error getting cart items from backend");t.data.cart||(t.data.cart={}),e.saveCartObjectToDataLayer(t.data.cart),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(t.data.cart))}))}catch(e){console.error(e)}},e.getProductsFromBackend=async t=>{var a;if(null!==(a=wpmDataLayer)&&void 0!==a&&a.products&&(t=t.filter((e=>!(e in wpmDataLayer.products)))),t&&0!==t.length){try{let a;if(a=await e.isRestEndpointAvailable()?await fetch(e.root+"pmw/v1/products/",{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({pageId:wpmDataLayer.general.pageId,productIds:t})}):await fetch(e.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_product_ids",productIds:t})}),a.ok){let e=await a.json();e.success&&(wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e.data))}else console.error("Error getting products from backend")}catch(e){console.error(e)}return!0}},e.saveCartObjectToDataLayer=e=>{wpmDataLayer.cart=e,wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},e.triggerViewItemEventPrep=async t=>{wpmDataLayer.products&&wpmDataLayer.products[t]||await e.getProductsFromBackend([t]),e.triggerViewItemEvent(t)},e.triggerViewItemEvent=t=>{let a=e.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmViewItem",a)},e.triggerViewItemEventNoProduct=()=>{jQuery(document).trigger("wpmViewItem")},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.deleteCookie=t=>{e.setCookie(t,"",-1)},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=async(t,a)=>{try{let o;o=await e.isRestEndpointAvailable()?await fetch(e.root+"pmw/v1/pixels-fired/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({order_id:t,source:a}),keepalive:!0,cache:"no-cache"}):await fetch(e.ajax_url,{method:"POST",body:new URLSearchParams({action:"pmw_purchase_pixels_fired",order_id:t,source:a}),keepalive:!0}),o.ok?console.log("wpm.storeOrderIdOnServer success"):console.error("wpm.storeOrderIdOnServer error")}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=>{let t={dataType:"script",cache:!0,url:e};return 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),e.hashAsync=(e,t)=>crypto.subtle.digest(e,new TextEncoder("utf-8").encode(t)).then((e=>Array.prototype.map.call(new Uint8Array(e),(e=>("00"+e.toString(16)).slice(-2))).join(""))),e.getCartValue=()=>{var e;let t=0;if(null!==(e=wpmDataLayer)&&void 0!==e&&e.cart)for(const e in wpmDataLayer.cart){let a=wpmDataLayer.cart[e];t+=a.quantity*a.price}return t},e.doesUrlContainPatterns=e=>{for(const t of e)if(new RegExp(t).test(window.location.href))return!0;return!1},e.excludeDomainFromTracking=()=>!!["appspot.com","tranlsate.google.com"].some((e=>window.location.href.includes(e)))}(window.wpm=window.wpm||{},jQuery)},534:(e,t,a)=>{a(584),a(473)},207:()=>{wpm.wpmDataLayerExists().then((()=>{console.log("Pixel Manager for WooCommerce: "+(wpmDataLayer.version.pro?"Pro":"Free")+" Version "+wpmDataLayer.version.number+" loaded"),wpm.excludeDomainFromTracking()||document.dispatchEvent(new Event("wpmPreLoadPixels"))})).then((()=>{wpm.pageLoaded().then((function(){document.dispatchEvent(new Event("wpmLoad"))}))})),wpm.pageReady().then((function(){wpm.wpmDataLayerExists().then((()=>{wpm.startIntersectionObserverToWatch(),wpm.startProductsMutationObserverToWatch()}))}))}},t={};function a(o){var r=t[o];if(void 0!==r)return r.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,a),n.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.br CHANGED
Binary file
js/public/wpm-public.p1.min.js.gz CHANGED
Binary file
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,KAAM,gBAE1B,QAAZ,EAAAC,oBAAA,mBAAcC,cAAd,mBAAsBC,gBAAtB,UAAgCC,UAAY,UAACH,oBAAD,iBAAC,EAAcC,cAAf,iBAAC,EAAsBC,gBAAvB,OAAC,EAAgCE,QAC5EC,IAAI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WACrB/I,SAASyU,cAAc,IAAIC,MAAM,WACjC,GAFD,IAUFnU,IAAIyhB,YAAYjZ,MAAK,WAMpBxI,IAAImhB,qBACF3Y,MAAK,KAELxI,IAAI0d,mCAGJ1d,IAAI8d,sCAAJ,GAEF,G,GC3CG8E,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBjiB,IAAjBkiB,EACH,OAAOA,EAAaC,QAGrB,IAAIC,EAASL,EAAyBE,GAAY,CAGjDE,QAAS,CAAC,GAOX,OAHAE,EAAoBJ,GAAUG,EAAQA,EAAOD,QAASH,GAG/CI,EAAOD,OACf,CClBArb,EAAQ,KAGR3H,IAAIqhB,eAAe7Y,MAAK,WAEvBb,EAAQ,KAERA,EAAQ,IACRA,EAAQ,IACRA,EAAQ,KAuBRA,EAAQ,IACR,G","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\", () => {\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(\"wpmClientSideAddToCart\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToCart\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// InitiateCheckout event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideBeginCheckout\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"InitiateCheckout\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// AddToWishlist event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideAddToWishlist\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToWishlist\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// ViewContent event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideViewItem\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"ViewContent\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n\n// view search event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideSearch\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Search\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// load always event\njQuery(document).on(\"wpmLoadAlways\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.setFbUserData()\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// view order received page event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideOrderReceivedPage\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Purchase\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\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\tlet data = {}\n\n\t\t\t// Add user identifiers to data,\n\t\t\t// and only if fbp was set\n\t\t\tif (wpm.isFbpSet()) {\n\t\t\t\tdata = {...wpm.getUserIdentifiersForFb()}\n\t\t\t}\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\t// https://developers.facebook.com/docs/meta-pixel/advanced/advanced-matching\n\twpm.getUserIdentifiersForFb = () => {\n\n\t\tlet data = {}\n\n\t\t// external ID\n\t\tif (wpmDataLayer?.user?.id) data.external_id = wpmDataLayer.user.id\n\t\tif (wpmDataLayer?.order?.user_id) data.external_id = wpmDataLayer.order.user_id\n\n\t\t// email\n\t\tif (wpmDataLayer?.user?.facebook?.email) data.em = wpmDataLayer.user.facebook.email\n\t\tif (wpmDataLayer?.order?.billing_email_hashed) data.em = wpmDataLayer.order.billing_email_hashed\n\n\t\t// first name\n\t\tif (wpmDataLayer?.user?.facebook?.first_name) data.fn = wpmDataLayer.user.facebook.first_name\n\t\tif (wpmDataLayer?.order?.billing_first_name) data.fn = wpmDataLayer.order.billing_first_name.toLowerCase()\n\n\t\t// last name\n\t\tif (wpmDataLayer?.user?.facebook?.last_name) data.ln = wpmDataLayer.user.facebook.last_name\n\t\tif (wpmDataLayer?.order?.billing_last_name) data.ln = wpmDataLayer.order.billing_last_name.toLowerCase()\n\n\t\t// phone\n\t\tif (wpmDataLayer?.user?.facebook?.phone) data.ph = wpmDataLayer.user.facebook.phone\n\t\tif (wpmDataLayer?.order?.billing_phone) data.ph = wpmDataLayer.order.billing_phone.replace(\"+\", \"\")\n\n\t\t// city\n\t\tif (wpmDataLayer?.user?.facebook?.city) data.ct = wpmDataLayer.user.facebook.city\n\t\tif (wpmDataLayer?.order?.billing_city) data.ct = wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g, \"\")\n\n\t\t// state\n\t\tif (wpmDataLayer?.user?.facebook?.state) data.st = wpmDataLayer.user.facebook.state\n\t\tif (wpmDataLayer?.order?.billing_state) data.st = wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/, \"\")\n\n\t\t// postcode\n\t\tif (wpmDataLayer?.user?.facebook?.postcode) data.zp = wpmDataLayer.user.facebook.postcode\n\t\tif (wpmDataLayer?.order?.billing_postcode) data.zp = wpmDataLayer.order.billing_postcode\n\n\t\t// country\n\t\tif (wpmDataLayer?.user?.facebook?.country) data.country = wpmDataLayer.user.facebook.country\n\t\tif (wpmDataLayer?.order?.billing_country) data.country = wpmDataLayer.order.billing_country.toLowerCase()\n\n\t\treturn data\n\t}\n\n\twpm.getFbRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\twpm.getFbUserData = () => {\n\n\t\t/**\n\t\t * We need to cache the FB user data for InitiateCheckout\n\t\t * where getting the user data from the browser is too slow\n\t\t * using wpm.getCookie().\n\t\t *\n\t\t * And we need the object merge 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.\n\t\t *\n\t\t * 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\t\t * Also, the merge ensures that new data will be added to fbUserData if new\n\t\t * data is being added later, like user ID, or fbc.\n\t\t */\n\n\t\tfbUserData = {...fbUserData, ...wpm.getFbUserDataFromBrowser()}\n\n\t\treturn fbUserData\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\") && wpm.isValidFbp(wpm.getCookie(\"_fbp\"))) {\n\t\t\tdata.fbp = wpm.getCookie(\"_fbp\")\n\t\t}\n\n\t\tif (wpm.getCookie(\"_fbc\") && wpm.isValidFbc(wpm.getCookie(\"_fbc\"))) {\n\t\t\tdata.fbc = 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.isFbpSet = () => {\n\t\treturn !!wpm.getCookie(\"_fbp\")\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbp = fbp => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.\\d{8,20}$/)\n\n\t\treturn re.test(fbp)\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbc = fbc => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.[\\da-zA-Z_-]{8,}/)\n\n\t\treturn re.test(fbc)\n\t}\n\n\t// wpm.fbViewContent = (product = null) => {\n\t//\n\t// \ttry {\n\t// \t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\t//\n\t// \t\tlet eventId = wpm.getFbRandomEventId()\n\t//\n\t// \t\tlet data = {}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tdata.content_type = \"product\"\n\t// \t\t\tdata.content_name = product.name\n\t// \t\t\t// data.content_category = product.category\n\t// \t\t\tdata.content_ids = product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]\n\t// \t\t\tdata.currency = wpmDataLayer.shop.currency\n\t// \t\t\tdata.value = product.price\n\t// \t\t}\n\t//\n\t// \t\tfbq(\"track\", \"ViewContent\", data, {\n\t// \t\t\teventID: eventId,\n\t// \t\t})\n\t//\n\t// \t\tlet capiData = {\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}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\t// \t\t\tcapiData.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t// \t\t}\n\t//\n\t// \t\tjQuery(document).trigger(\"wpmFbCapiEvent\", capiData)\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_name: product.name,\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 : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.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.getFbRandomEventId()\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\twpm.fbGetContentIdsFromCart = () => {\n\n\t\tlet content_ids = []\n\n\t\tfor(const key in wpmDataLayer.cart){\n\t\t\tcontent_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\t\t}\n\t\t\n\t\treturn content_ids\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\", (event, product = null) => {\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 (product) {\n\t\t\tdata.value = (product.quantity ? product.quantity : 1) * product.price\n\t\t\tdata.items = [{\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(wpm.getGoogleAdsConversionIdentifiersWithLabel())) 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\n\twpm.getGoogleAdsConversionIdentifiersWithLabel = function () {\n\n\t\tlet conversionIdentifiers = []\n\n\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds) {\n\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\tif (item) {\n\t\t\t\t\tconversionIdentifiers.push(key + \"/\" + item)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsConversionIdentifiers = function () {\n\n\t\tlet conversionIdentifiers = []\n\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 (wpmDataLayer?.shop?.page_type && \"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer?.order?.google?.ads?.enhanced_conversion_data) {\n\t\t\t\t// window.enhanced_conversion_data = wpmDataLayer.order.google.ads.enhanced_conversion_data\n\n\t\t\t\tgtag(\"set\", \"user_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\tlet parameters = wpmDataLayer.pixels.google.analytics.ga4.parameters\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.debug_mode) {\n\t\t\t\tparameters.debug_mode = true\n\t\t\t}\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.ga4.measurement_id, parameters)\n\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\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.then(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\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\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\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// .then(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\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\t/**\n\t * Initialize and set default values\n\t */\n\n\tlet\n\t\twpmConsentValues = {}\n\twpmConsentValues.categories = {}\n\twpmConsentValues.pixels = []\n\twpmConsentValues.mode = \"category\"\n\twpmConsentValues.visitorHasChosen = false\n\n\t// Return current consent values\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\t// Update the PMW consent values with values coming from a CMP\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\t/**\n\t\t * Setup defaults\n\t\t */\n\n\t\t// consentValues.categories.analytics = true\n\t\t// consentValues.categories.ads = true\n\n\t\twpmConsentValues.categories.analytics = !explicitConsent\n\t\twpmConsentValues.categories.ads = !explicitConsent\n\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\n\t\t\tif (ads) {\n\t\t\t\twpmConsentValues.categories.ads = !!ads\n\t\t\t}\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * PMW Cookie Consent\n\t\t *\n\t\t * Must be before every other CMP for the case that one of the included CMPs\n\t\t * decides to implement the PMW cookie consent API. In that case\n\t\t * the PMW consent cookie must take precedence.\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"pmw_cookie_consent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookiebot\n\t\t * https://wordpress.org/plugins/cookiebot/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieConsent\")) {\n\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Script\n\t\t * https://wordpress.org/plugins/cookie-script-com/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieScriptConsent\")) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Borlabs Cookie\n\t\t * https://borlabs.io/borlabs-cookie/\n\t\t */\n\t\tif (cookie = wpm.getCookie(\"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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Complianz Cookie\n\t\t * https://wordpress.org/plugins/complianz-gdpr/\n\t\t */\n\n\t\tif (cookie = getComplianzCookies()) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (free version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"cookie_notice_accepted\")) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (pro version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"hu-consent\")) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * CookieYes, GDPR Cookie Consent (Cookie Law Info)\n\t\t * https://wordpress.org/plugins/cookie-law-info/\n\t\t */\n\n\t\tif (cookie = getCookieLawInfoCookies()) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * GDPR Cookie Compliance Plugin by Moove Agency\n\t\t * https://wordpress.org/plugins/gdpr-cookie-compliance/\n\t\t *\n\t\t * TODO write documentation on how to set up the plugin in order for this to work properly\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"moove_gdpr_popup\")) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * WP AutoTerms\n\t\t * https://wordpress.org/plugins/auto-terms-of-service-and-privacy-policy/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"wpautoterms-cookies-notice\")) {\n\n\t\t\tif (cookie !== \"1\") return\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Usercentrics\n\t\t *\n\t\t * https://usercentrics.com/\n\t\t * https://docs.usercentrics.com/#/cmp-v2-ui-api\n\t\t * https://docs.usercentrics.com/#/cmp-v2-ui-api?id=getservicesbaseinfo\n\t\t */\n\n\t\tif (window.localStorage && window.localStorage.getItem(\"uc_settings\")) {\n\n\t\t\tconsole.log(\"Usercentrics settings detected\")\n\n\t\t\tif (typeof UC_UI === \"undefined\") {\n\n\t\t\t\t// register event to block unblock after UC_UI library is loaded\n\t\t\t\twindow.addEventListener(\"UC_UI_INITIALIZED\", function (event) {\n\t\t\t\t\twpm.ucUiProcessConsent()\n\t\t\t\t})\n\n\t\t\t\t// Don't continue because in here the UC_UI library is not loaded yet\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (UC_UI.areAllConsentsAccepted()) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\twpm.ucUiProcessConsent()\n\t\t}\n\n\t\t/**\n\t\t * OneTrust\n\t\t *\n\t\t * https://www.onetrust.com/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"OptanonConsent\")) {\n\n\t\t\t// console.log(\"OneTrust settings detected\")\n\n\t\t\tlet params = new URLSearchParams(cookie)\n\t\t\tlet groups = params.get(\"groups\").split(\",\")\n\n\t\t\t// Groups is an array like this ['1:1', '2:0', '3:1', '4:1']. Make it an object with key value pairs\n\t\t\tlet groupsObject = {}\n\t\t\tgroups.forEach((group) => {\n\n\t\t\t\tlet groupArray = group.split(\":\")\n\t\t\t\tgroupsObject[groupArray[0]] = groupArray[1]\n\t\t\t})\n\n\t\t\t// group mapping\n\t\t\t// 1 = necessary\n\t\t\t// 2 = analytics\n\t\t\t// 3 = functional\n\t\t\t// 4 = ads\n\n\t\t\twpmConsentValues.categories.analytics = groubsObject[\"2\"] === \"1\"\n\t\t\twpmConsentValues.categories.ads = groupsObject[\"4\"] === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\t}\n\n\t// Only run after having made sure that the UC_UI library is loaded\n\twpm.ucUiProcessConsent = function () {\n\n\t\tif (typeof UC_UI === \"undefined\") return\n\n\t\tif (UC_UI.areAllConsentsAccepted()) {\n\t\t\tpmw.consentAcceptAll()\n\t\t}\n\n\t\tconst ucStatisticsSlug = UC_UI.getSettingsLabels().categories.filter(data => data.label === \"Statistics\")[0].slug\n\n\t\tpmw.consentAdjustSelectively(\n\t\t\t{\n\t\t\t\tanalytics: !UC_UI.getServicesBaseInfo().filter(data => data.categorySlug === ucStatisticsSlug && data.consent.status === false).length > 0,\n\t\t\t\tads : !UC_UI.getServicesBaseInfo().filter(data => data.categorySlug === \"marketing\" && data.consent.status === false).length > 0,\n\t\t\t},\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. (PMW 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. (PMW 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\t// jQuery(document).on(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\tdocument.addEventListener(\"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\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"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\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\twpm.setConsentValueCategories(analytics, ads)\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.unblockSelectedPixels = () => {\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\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\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/**\n\t * Borlabs Cookie\n\t * If visitor accepts cookies in Borlabs Cookie unblock the scripts\n\t */\n\tdocument.addEventListener(\"borlabs-cookie-consent-saved\", () => {\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/**\n\t * Cookiebot\n\t * \tIf visitor accepts cookies in Cookiebot unblock the scripts\n\t * \thttps://www.cookiebot.com/en/developer/\n\t */\n\tdocument.addEventListener(\"CookiebotOnAccept\", () => {\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\t// jQuery(document).on(\"CookieScriptAccept\", e => {\n\tdocument.addEventListener(\"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\t// jQuery(document).on(\"CookieScriptAcceptAll\", () => {\n\tdocument.addEventListener(\"CookieScriptAcceptAll\", () => {\n\n\t\twpm.setConsentValueCategories(true, true)\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\t// jQuery(document).on(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\t// jQuery(document).on(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplz_status_change\", wpm.cmplzStatusChange)\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\t// jQuery(document).on(\"setCookieNotice\", () => {\n\tdocument.addEventListener(\"setCookieNotice\", () => {\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\t// jQuery(\".hu-cookies-save\").on(\"click\", function () {\n\t\t\t\t\t\t// jQuery(\".hu-cookies-save\") in pure JavaScript\n\t\t\t\t\t\tdocument.querySelector(\".hu-cookies-save\").addEventListener(\"click\", () => {\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\t/**\n\t * Usercentrics Event Listeners\n\t *\n\t * https://docs.usercentrics.com/#/v2-events?id=usage-as-window-event\n\t */\n\n\twindow.addEventListener(\"ucEvent\", function (e) {\n\t\tif (e.detail && e.detail.event == \"consent_status\") {\n\t\t\t// check for consent status of service \"Google Ads Remarketing\"\n\t\t\tif (e.detail[\"Google Ads Remarketing\"] === true) {\n\t\t\t\tconsole.log(\"Google Ads Remarketing has consent\")\n\t\t\t} else {\n\t\t\t\tconsole.log(\"Google Ads Remarketing has no consent\")\n\t\t\t}\n\t\t}\n\t})\n\n\t// https://docs.usercentrics.com/#/v2-events?id=uc_ui_cmp_event\n\twindow.addEventListener(\"UC_UI_CMP_EVENT\", function (event) {\n\n\t\tif (event.detail.type === \"ACCEPT_ALL\") {\n\t\t\t// console.log('accept all');\n\n\t\t\tpmw.consentAcceptAll()\n\t\t}\n\n\t\tif (event.detail.type === \"DENY_ALL\") {\n\t\t\tpmw.consentRevokeAll()\n\t\t}\n\n\t\tif (event.detail.type === \"SAVE\") {\n\t\t\tconsole.log(\"event.detail\", event.detail)\n\t\t}\n\t})\n\n\n\t/**\n\t * OneTrust Event Listeners\n\t *\n\t * CookiePro by OneTrust doesn't emit any events when the user accepts or declines cookies.\n\t */\n\n\t// There are two accept all buttons. One in the first banner and one in the settings window. Both have different identifiers.\n\tjQuery(\"#accept-recommended-btn-handler, #onetrust-accept-btn-handler\").on(\"click\", function () {\n\n\t\t// If OneTrust is not loaded, return\n\t\tif (typeof window.OneTrust === \"undefined\") return\n\n\t\tpmw.consentAcceptAll()\n\t})\n\n\t// There are two revoke all buttons. One in the first banner and one in the settings window. Both have different identifiers.\n\tjQuery(\".ot-pc-refuse-all-handler, #onetrust-reject-all-handler\").on(\"click\", function () {\n\t\tpmw.consentRevokeAll()\n\t})\n\n\t// There is one save button that saves mixed consent. It is in the settings window. We reload the page after saving to reflect the changes.\n\tjQuery(\".save-preference-btn-handler.onetrust-close-btn-handler\").on(\"click\", function () {\n\t\tlocation.reload()\n\n\t\t// OneTrust.OnConsentChanged(function (e) {\n\t\t// \tpmw.consentAdjustSelectively({\n\t\t// \t\tanalytics: e.detail.includes(\"2\"),\n\t\t// \t\tads : e.detail.includes(\"4\"),\n\t\t// \t})\n\t\t// })\n\t})\n\n\n}(window.wpm = window.wpm || {}, jQuery));\n\n\n(function (pmw, $, undefined) {\n\n\t/**\n\t * Pixel Manager Cookie Consent API\n\t */\n\n\t// Accept consent for all cookies\n\tpmw.consentAcceptAll = (settings = {}) => {\n\n\t\tsettings.duration = settings.duration || 365\n\n\t\tpmw.consentSetCookie(true, true, settings.duration)\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t}\n\n\t// Accept consent selectively\n\tpmw.consentAdjustSelectively = (settings) => {\n\n\t\t// If settings.analytics is set, keep it, otherwise set it to wpm.getConsentValues().categories.analytics\n\t\tsettings.analytics = settings.analytics !== undefined ? settings.analytics : wpm.getConsentValues().categories.analytics\n\t\tsettings.ads = settings.ads !== undefined ? settings.ads : wpm.getConsentValues().categories.ads\n\t\tsettings.duration = settings.duration || 365\n\n\t\tpmw.consentSetCookie(settings.analytics, settings.ads, settings.duration)\n\t\twpm.unblockAllScripts(settings.analytics, settings.ads)\n\t\twpm.updateGoogleConsentMode(settings.analytics, settings.ads)\n\t}\n\n\t// Remove consent for all cookies\n\tpmw.consentRevokeAll = (settings = {}) => {\n\n\t\tsettings.duration = settings.duration || 365\n\n\t\twpm.setConsentValueCategories(false, false)\n\t\tpmw.consentSetCookie(false, false, settings.duration)\n\t\twpm.updateGoogleConsentMode(false, false)\n\t}\n\n\t// Set a cookie called pmw_cookie_consent with the value of pmw_cookie_consent\n\t// and set the default expiration date to 1 year from now\n\tpmw.consentSetCookie = (analytics, ads, duration = 365) => {\n\t\twpm.setCookie(\"pmw_cookie_consent\", JSON.stringify({analytics, ads}), duration)\n\t}\n\n\t// Trigger an event once the PMW consent management has been loaded\n\tjQuery(document).trigger(\"pmw_cookie_consent_management_loaded\")\n\n}(window.pmw = window.pmw || {}, 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\", (event) => {\n\n\ttry {\n\n\t\tlet url = new URL(jQuery(event.currentTarget).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\njQuery(document).on(\"click\", \".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button\", (event) => {\n\n\ttry {\n\n\t\tlet quantity = 1,\n\t\t\tproductId\n\n\t\t// Only process on product pages\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(event.currentTarget).attr(\"href\") !== \"undefined\" && jQuery(event.currentTarget).attr(\"href\").includes(\"add-to-cart\")) {\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\")\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t\t// If is simple product\n\t\t\tif (wpmDataLayer.shop.product_type === \"simple\") {\n\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\tproductId = jQuery(event.currentTarget).val()\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t\t// If is variable product or variable-subscription\n\t\t\tif ([\"variable\", \"variable-subscription\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\tproductId = jQuery(\"[name='variation_id']\").val()\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t\t// If is grouped product\n\t\t\tif (wpmDataLayer.shop.product_type === \"grouped\") {\n\n\t\t\t\tjQuery(\".woocommerce-grouped-product-list-item\").each((index, element) => {\n\n\t\t\t\t\tquantity = Number(jQuery(element).find(\".input-text.qty\").val())\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\t\tlet classes = jQuery(element).attr(\"class\")\n\t\t\t\t\tproductId = wpm.getPostIdFromString(classes)\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// If is bundle product\n\t\t\tif (wpmDataLayer.shop.product_type === \"bundle\") {\n\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\tproductId = jQuery(\"input[name=add-to-cart]\").val()\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\")\n\t\t\twpm.addProductToCart(productId, quantity)\n\t\t}\n\n\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)\", (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 GA4 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\", (event) => {\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(event.currentTarget).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\t\".elementor-button--checkout\",\n]\n\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).one(\"click init_checkout\", checkoutButtonClasses.join(\",\"), () => {\n\t// console.log(\"begin_checkout\", new Date().getTime())\n\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\", (event) => {\n\n\tif (wpm.isEmail(jQuery(event.currentTarget).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\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).on(\"wpmLoad\", (event) => {\n\tjQuery(document).on(\"payment_method_selected\", () => {\n\n\t\tif (false === wpm.paymentMethodSelected) {\n\t\t\twpm.fireCheckoutProgress(3)\n\t\t}\n\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t\twpm.paymentMethodSelected = true\n\t})\n})\n\n/**\n * Place order button\n *\n * Track checkout option event: purchase click\n * https://stackoverflow.com/a/34112407/4688612\n * jQuery(document).one(\"click\", \"#place_order\", () => {\n */\njQuery(() => {\n\tjQuery(\"form.checkout\").on(\"checkout_place_order_success\", () => {\n\n\t\tif (false === wpm.emailSelected) {\n\t\t\twpm.fireCheckoutProgress(2)\n\t\t}\n\n\t\tif (false === wpm.paymentMethodSelected) {\n\t\t\twpm.fireCheckoutProgress(3)\n\t\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t\t}\n\n\t\twpm.fireCheckoutProgress(4)\n\n\t\tjQuery(document).trigger(\"wpmPlaceOrder\", {})\n\t})\n})\n\n// update cart event\n// jQuery(\"[name='update_cart']\").on('click', function (e) {\njQuery(document).on(\"click\", \"[name='update_cart']\", (event) => {\n\n\ttry {\n\t\tjQuery(\".cart_item\").each((index, element) => {\n\n\t\t\tlet url = new URL(jQuery(element).find(\".product-remove\").find(\"a\").attr(\"href\"))\n\t\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\n\t\t\tlet quantity = jQuery(element).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(function () {\n\n\tjQuery(\".add_to_wishlist,.wl-add-to\").on(\"click\", event => {\n\n\t\ttry {\n\n\t\t\tlet productId\n\n\t\t\tif (jQuery(event.currentTarget).data(\"productid\")) { // for the WooCommerce wishlist plugin\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"productid\")\n\t\t\t} else if (jQuery(event.currentTarget).data(\"product-id\")) { // for the YITH wishlist plugin\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product-id\")\n\t\t\t}\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\n\t\t\tjQuery(document).trigger(\"wpmAddToWishlist\", product)\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\njQuery(document).on(\"updated_cart_totals\", () => {\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(() => {\n\n\tjQuery(\".single_variation_wrap\").on(\"show_variation\", (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\twpm.triggerViewItemEventPrep(productId)\n\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\n// jQuery(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// \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\t// console.log(\"hmm\")\n// \t\t\twpm.triggerViewItemEventPrep(productId)\n//\n// \t\t} catch (e) {\n// \t\t\tconsole.error(e)\n// \t\t}\n// \t})\n// })\n\n// jQuery(function () {\n//\n// \tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n// \t\tjQuery(document).trigger(\"wpmviewitem\")\n// \t})\n// })\n\n\n/**\n * Set up wpm events\n */\n\n// populate the wpmDataLayer with the cart items\njQuery(document).on(\"wpmLoad\", () => {\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(document).on(\"wpmLoad\", () => {\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(document).on(\"wpmLoad\", () => {\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(document).on(\"wpmLoad\", () => {\n\t// document.addEventListener(\"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 (wpmDataLayer?.shop) {\n\t\t\t\tif (\n\t\t\t\t\t\"product\" === wpmDataLayer.shop.page_type &&\n\t\t\t\t\t\"variable\" !== wpmDataLayer.shop.product_type &&\n\t\t\t\t\twpm.getMainProductIdFromProductPage()\n\t\t\t\t) {\n\t\t\t\t\tlet product = wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage())\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t\t} else if (\"product_category\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmCategory\")\n\t\t\t\t} else if (\"search\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmSearch\")\n\t\t\t\t} else if (\"cart\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewCart\")\n\t\t\t\t} else if (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer.order) {\n\t\t\t\t\tif (!wpm.isOrderIdStored(wpmDataLayer.order.id)) {\n\t\t\t\t\t\tjQuery(document).trigger(\"wpmOrderReceivedPage\")\n\t\t\t\t\t\twpm.writeOrderIdToStorage(wpmDataLayer.order.id)\n\t\t\t\t\t\tif (typeof wpm.acrRemoveCookie === \"function\") wpm.acrRemoveCookie()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\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\njQuery(document).on(\"wpmLoad\", async () => {\n\n\tif (\n\t\twindow.sessionStorage &&\n\t\twindow.sessionStorage.getItem(\"_pmw_endpoint_available\") &&\n\t\t!JSON.parse(window.sessionStorage.getItem(\"_pmw_endpoint_available\"))\n\t) {\n\t\tconsole.error(\"Pixel Manager for WooCommerce: REST endpoint is not available. Using admin-ajax.php instead.\")\n\t}\n})\n\n\n/**\n * Load all pixels\n */\njQuery(document).on(\"wpmPreLoadPixels\", () => {\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\n/**\n * All ecommerce events\n */\n\njQuery(document).on(\"wpmAddToCart\", (event, product) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToCart\",\n\t\tproduct: product,\n\t}\n\n\t// If Facebook pixel is loaded, add Facebook server to server event data to the payload\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToCart\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\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}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToCart\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmBeginCheckout\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"beginCheckout\",\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"InitiateCheckout\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t}\n\n\t\tif (wpmDataLayer?.cart && !jQuery.isEmptyObject(wpmDataLayer.cart)) {\n\t\t\tpayload.facebook.custom_data = {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontent_ids : wpm.fbGetContentIdsFromCart(),\n\t\t\t\tvalue : wpm.getCartValue(),\n\t\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideBeginCheckout\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmAddToWishlist\", (event, product) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToWishlist\",\n\t\tproduct: product,\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToWishlist\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\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}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToWishlist\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"viewItem\",\n\t\tproduct: product,\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"ViewContent\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t}\n\n\t\tif (product) {\n\t\t\tpayload.facebook.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideViewItem\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmSearch\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"search\",\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Search\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\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}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideSearch\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmOrderReceivedPage\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"orderReceived\",\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Purchase\",\n\t\t\tevent_id : wpmDataLayer.order.id,\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\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}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideOrderReceivedPage\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// ! No server-to-server event is sent for this event because it is compiled and sent from the server directly\n})\n\n\n\n\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\tcookiePmwRestEndpointAvailable: \"_pmw_endpoint_available\",\n\t\trestEndpointPost : \"pmw/v1/test/\",\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 = async () => {\n\n\t\tif (window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable)) {\n\t\t\treturn JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable))\n\t\t} else {\n\t\t\treturn await wpm.testEndpoint()\n\t\t}\n\t}\n\n\twpm.isSessionStorageAvailable = () => !!window.sessionStorage\n\n\t// Test the endpoint by sending a POST request\n\twpm.testEndpoint = async (\n\t\turl = wpm.root + wpmRestSettings.restEndpointPost,\n\t\tcookieName = wpmRestSettings.cookiePmwRestEndpointAvailable,\n\t) => {\n\n\t\tlet response = await fetch(url, {\n\t\t\tmethod : \"POST\",\n\t\t\tmode : \"cors\",\n\t\t\tcache : \"no-cache\",\n\t\t\tkeepalive: true,\n\t\t})\n\n\t\tif (response.status === 200) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(true))\n\t\t\treturn true\n\t\t} else if (response.status === 404) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\treturn false\n\t\t} else if (response.status === 0) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isWpmRestEndpointAvailable = (cookieName = wpmRestSettings.cookiePmwRestEndpointAvailable) => !!wpm.getCookie(cookieName)\n\n\twpm.writeOrderIdToStorage = (orderId, source = \"thankyou_page\", 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, source)\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\n\t\t\t/**\n\t\t\t * Can't use a REST API endpoint, as the cart session will not be loaded if the\n\t\t\t * endpoint is called.\n\t\t\t *\n\t\t\t * https://wordpress.org/support/topic/wc-cart-is-null-in-custom-rest-api/#post-11442843\n\t\t\t */\n\n\t\t\t/**\n\t\t\t * Get the cart items from the backend the data object using fetch API\n\t\t\t * and log success or error messages\n\t\t\t * and url encoded data\n\t\t\t */\n\t\t\tfetch(wpm.ajax_url, {\n\t\t\t\tmethod : \"POST\",\n\t\t\t\tcache : \"no-cache\",\n\t\t\t\tbody : new URLSearchParams({action: \"pmw_get_cart_items\"}),\n\t\t\t\tkeepalive: true,\n\t\t\t})\n\t\t\t\t.then(response => {\n\t\t\t\t\tif (response.ok) {\n\t\t\t\t\t\treturn response.json()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\")\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.then(data => {\n\n\t\t\t\t\tif (data.success) {\n\n\t\t\t\t\t\tif (!data.data[\"cart\"]) data.data[\"cart\"] = {}\n\n\t\t\t\t\t\twpm.saveCartObjectToDataLayer(data.data[\"cart\"])\n\n\t\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(data.data[\"cart\"]))\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\")\n\t\t\t\t\t}\n\t\t\t\t})\n\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 = async productIds => {\n\n\t\tif (wpmDataLayer?.products) {\n\t\t\t// reduce productIds by products already in the dataLayer\n\t\t\tproductIds = productIds.filter(item => !wpmDataLayer.products.hasOwnProperty(item))\n\t\t}\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\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/products/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify(productIds),\n\t\t\t\t})\n\t\t\t} else {\n\n\t\t\t\t// Get the product details from the backend the data object using fetch API\n\t\t\t\t// and log success or error messages\n\t\t\t\t// and url encoded data\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_get_product_ids\",\n\t\t\t\t\t\tproductIds: productIds,\n\t\t\t\t\t}),\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (response.ok) {\n\t\t\t\tlet responseData = await response.json()\n\t\t\t\tif (responseData.success) {\n\t\t\t\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, responseData.data)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.error(\"Error getting products from backend\")\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\n\t\treturn true\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.triggerViewItemEventPrep = async productId => {\n\n\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t} else {\n\t\t\tawait wpm.getProductsFromBackend([productId])\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t}\n\t}\n\n\twpm.triggerViewItemEvent = productId => {\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t}\n\n\twpm.triggerViewItemEventNoProduct = () => {\n\t\tjQuery(document).trigger(\"wpmViewItem\")\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\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.deleteCookie = cookieName => {\n\t\twpm.setCookie(cookieName, \"\", -1)\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 = async (orderId, source) => {\n\n\t\ttry {\n\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/pixels-fired/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\torder_id: orderId,\n\t\t\t\t\t\tsource: source\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t\tcache\t: \"no-cache\",\n\t\t\t\t})\n\n\t\t\t} else {\n\t\t\t\t// save the state in the database\n\n\t\t\t\t// Send the data object with ajax request\n\t\t\t\t// and log success or error using fetch API and url encoded\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_purchase_pixels_fired\",\n\t\t\t\t\t\torder_id: orderId,\n\t\t\t\t\t\tsource : source,\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (response.ok) {\n\t\t\t\tconsole.log(\"wpm.storeOrderIdOnServer success\")\n\t\t\t} else {\n\t\t\t\tconsole.error(\"wpm.storeOrderIdOnServer error\")\n\t\t\t}\n\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/**\n\t * https://api.jquery.com/jquery.getscript/\n\t *\n\t * Switched back to jQuery.ajax as the fetch method on some sites returned a type error\n\t * Possible reasons are:\n\t * \t* CORS mismatch\n\t * \t* The user is using an ad blocker\n \t */\n\n\twpm.loadScriptAndCacheIt = url => {\n\n\t\t// Get and load the script using fetch API, if possible from cache, and return it without using eval\n\t\t// return fetch(url, {\n\t\t// \tmethod : \"GET\",\n\t\t// \tcache : \"default\",\n\t\t// \tkeepalive: true,\n\t\t// })\n\t\t// \t.then(response => {\n\t\t// \t\tif (response.ok) {\n\t\t// \t\t\t// console.log(\"response\", response)\n\t\t// \t\t\treturn response.text()\n\t\t// \t\t\t// console.log(\"wpm.loadScriptAndCacheIt success: \" + url)\n\t\t// \t\t} else {\n\t\t// \t\t\tthrow new Error(\"Network response was not ok: \" + url)\n\t\t// \t\t}\n\t\t// \t})\n\t\t// \t.then(script => {\n\t\t// \t\t// Execute the script\n\t\t// \t\t// console.error(\"executing script: \" + script)\n\t\t// \t\teval(script)\n\t\t// \t\t// console.log(\"executed script: \" + script)\n\t\t// \t})\n\t\t// \t.catch(e => {\n\t\t// \t\tconsole.error(e)\n\t\t// \t})\n\n\t\tlet options = {\n\t\t\tdataType: \"script\",\n\t\t\tcache : true,\n\t\t\turl : url,\n\t\t}\n\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\t// https://stackoverflow.com/a/60606893/4688612\n\twpm.hashAsync = (algo, str) => {\n\t\treturn crypto.subtle.digest(algo, new TextEncoder(\"utf-8\").encode(str)).then(buf => {\n\t\t\treturn Array.prototype.map.call(new Uint8Array(buf), x => ((\"00\" + x.toString(16)).slice(-2))).join(\"\")\n\t\t})\n\t}\n\n\twpm.getCartValue = () => {\n\n\t\tlet value = 0\n\n\t\tif (wpmDataLayer?.cart) {\n\n\t\t\tfor (const key in wpmDataLayer.cart) {\n\t\t\t\t// content_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\n\t\t\t\tlet product = wpmDataLayer.cart[key]\n\n\t\t\t\tvalue += product.quantity * product.price\n\t\t\t}\n\t\t}\n\n\t\treturn value\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(() => {\n\t\tconsole.log(\"Pixel Manager for WooCommerce: \" + (wpmDataLayer.version.pro ? \"Pro\" : \"Free\") + \" Version \" + wpmDataLayer.version.number + \" loaded\")\n\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t})\n\t.then(() => {\n\t\twpm.pageLoaded().then(function () {\n\t\t\tdocument.dispatchEvent(new Event(\"wpmLoad\"))\n\t\t})\n\t})\n\n\n/**\n * Run when page is ready\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(() => {\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(\"./wpm/event_listeners_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","payload","fbq","custom_data","eventID","event_id","error","console","setFbUserData","$","undefined","fbUserData","f","window","b","e","n","callMethod","apply","arguments","queue","push","_fbq","version","t","createElement","async","src","s","getElementsByTagName","parentNode","insertBefore","data","isFbpSet","getUserIdentifiersForFb","user","id","external_id","order","user_id","email","em","billing_email_hashed","first_name","fn","billing_first_name","toLowerCase","last_name","ln","billing_last_name","phone","ph","billing_phone","replace","city","ct","billing_city","state","st","billing_state","postcode","zp","billing_postcode","country","billing_country","getFbRandomEventId","Math","random","toString","substring","getFbUserData","getFbUserDataFromBrowser","getCookie","isValidFbp","fbp","isValidFbc","fbc","navigator","userAgent","client_user_agent","RegExp","test","fbGetProductDataForCapiEvent","product","content_type","content_name","name","content_ids","dyn_r_ids","dynamic_remarketing","id_type","value","parseFloat","quantity","price","currency","facebookContentIds","prodIds","key","item","Object","entries","items","general","variationsOutput","variation_id","String","products","trackCustomFacebookEvent","eventName","customData","eventId","trigger","event_name","user_data","event_source_url","location","href","fbGetContentIdsFromCart","cart","require","isEmptyObject","google","ads","conversionIds","status","googleConfigConditionsMet","isVariable","send_events_with_parent_ids","send_to","getGoogleAdsConversionIdentifiers","google_business_vertical","gtagLoaded","then","gtag","value_filtered","getGoogleAdsDynamicRemarketingOrderItems","getGoogleAdsConversionIdentifiersWithLabel","data_basic","data_with_cart","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","shop","list_position","ga4","measurement_id","getGA4OrderItems","item_name","item_category","item_id","item_variant","item_brand","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","debug_mode","isGoogleActive","getGoogleGtagId","loadScriptAndCacheIt","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","JSON","parse","decodeURI","indexOf","action","length","consents","statistics","marketing","thirdparty","advanced","localStorage","getItem","log","UC_UI","addEventListener","ucUiProcessConsent","areAllConsentsAccepted","groups","URLSearchParams","get","split","groupsObject","forEach","group","groupArray","groubsObject","pmw","consentAcceptAll","ucStatisticsSlug","getSettingsLabels","filter","label","slug","consentAdjustSelectively","getServicesBaseInfo","categorySlug","consent","setConsentDefaultValuesToExplicit","pixelName","canIFireMode","scriptTagObserver","MutationObserver","mutations","addedNodes","node","shouldScriptBeActive","unblockScript","blockScript","observe","head","childList","subtree","disconnect","some","element","scriptNode","removeAttach","remove","wpmSrc","attr","appendTo","dispatchEvent","Event","removeAttr","unblockAllScripts","unblockSelectedPixels","explicitConsentStateAlreadySet","Cookiebot","detail","cmplzStatusChange","cmplzConsentData","huObserver","querySelector","hu","documentElement","body","consentRevokeAll","OneTrust","reload","duration","consentSetCookie","setCookie","stringify","url","URL","currentTarget","productId","getProductIdByCartItemKeyUrl","removeProductFromCart","addProductToCart","product_type","Number","val","each","index","find","classes","getPostIdFromString","one","target","closest","matches","match","nextAll","getIdBasedOndVariationsOutputSetting","Error","getProductDetailsFormattedForEvent","isEmail","fireCheckoutProgress","emailSelected","paymentMethodSelected","fireCheckoutOption","getCartItemsFromBackend","variation","triggerViewItemEventPrep","doesWooCommerceCartExist","getCartItems","productIds","getAddToCartLinkProductIds","getProductsFromBackend","referrer","referrerHostname","hostname","host","wpmLoadFired","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","acrRemoveCookie","hasLoginEventFired","setLoginEventFired","sessionStorage","sendEventPayloadToServer","getCartValue","search_string","getSearchTermFromUrl","wpmDeduper","wpmRestSettings","checkCookie","useRestEndpoint","isSessionStorageAvailable","isRestEndpointAvailable","isBelowRestErrorThreshold","testEndpoint","root","cookieName","response","fetch","method","cache","keepalive","setItem","isWpmRestEndpointAvailable","orderId","source","Storage","ids","expiresDate","setDate","getDate","toUTCString","storeOrderIdOnServer","orderDeduplication","quantityToRemove","isVariation","parentId","saveCartObjectToDataLayer","ajax_url","ok","json","success","hasOwnProperty","headers","responseData","assign","cartObject","triggerViewItemEvent","triggerViewItemEventNoProduct","step","checkout_option","string","triggerViewItemList","viewItemListTriggerTestMode","css","append","viewItemListTrigger","opacity","backgroundColor","search","io","ioTimeouts","observerCallback","observer","entry","elementId","next","isIntersecting","testMode","repeat","unobserve","timeout","clearTimeout","allIoElementsToWatch","ioid","getAllElementsToWatch","map","i","elem","parent","hasClass","prev","this","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","deleteCookie","getWpmSessionData","setWpmSessionData","order_id","cartItemKey","cartItemKeys","position","parentId_dyn_r_ids","setReferrerToCookie","getReferrerFromCookie","getClidFromBrowser","clidCookieId","clidId","gclid","dclid","getUserAgent","getViewPort","width","max","clientWidth","innerWidth","height","clientHeight","innerHeight","options","dataType","ajax","getOrderItemPrice","total","total_tax","loginEventFired","wpmDataLayerExists","waitForVar","jQueryExists","waitForjQuery","pageLoaded","readyState","pageReady","isMiniCartActive","parameter","hashAsync","algo","str","crypto","subtle","digest","TextEncoder","encode","buf","Array","prototype","call","Uint8Array","x","slice","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,KAAM,sBAG7B,QAAZ,EAAAC,oBAAY,OAAQ,QAAR,EAAZ,EAAcC,cAAM,OAAU,QAAV,EAApB,EAAsBC,gBAAQ,QAA9B,EAAgCC,UAChB,QAAb,EAACH,oBAAY,OAAQ,QAAR,EAAZ,EAAcC,cAAM,OAAU,QAAV,EAApB,EAAsBC,gBAAQ,OAA9B,EAAgCE,QAChCC,IAAIC,uBAAmC,QAAb,EAACN,oBAAY,OAAQ,QAAR,EAAZ,EAAcC,cAAM,OAAU,QAAV,EAApB,EAAsBC,gBAAQ,WAAlB,EAAZ,EAAgCK,qBAE3DF,IAAIG,SAAS,MAAO,iBAAiBH,IAAII,mBAC9C,IAKDZ,OAAOC,UAAUC,GAAG,0BAA0B,CAACW,EAAOC,KAErD,IAAI,UACH,GAAiB,QAAb,EAACX,oBAAY,OAAQ,QAAR,EAAZ,EAAcC,cAAM,OAAU,QAAV,EAApB,EAAsBC,gBAAQ,QAA9B,EAAgCE,OAAQ,OAE7CQ,IAAI,QAAS,YAAaD,EAAQT,SAASW,YAAa,CACvDC,QAASH,EAAQT,SAASa,UAI5B,CAFE,MAAOC,GACRC,QAAQD,MAAMA,EACf,KAKDnB,OAAOC,UAAUC,GAAG,8BAA8B,CAACW,EAAOC,KAEzD,IAAI,UACH,GAAiB,QAAb,EAACX,oBAAY,OAAQ,QAAR,EAAZ,EAAcC,cAAM,OAAU,QAAV,EAApB,EAAsBC,gBAAQ,QAA9B,EAAgCE,OAAQ,OAE7CQ,IAAI,QAAS,mBAAoBD,EAAQT,SAASW,YAAa,CAC9DC,QAASH,EAAQT,SAASa,UAI5B,CAFE,MAAOC,GACR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BACF/Y,MAAK,KACL9H,QAAQuQ,IAAI,mCAAqCxR,aAAaiC,QAAQyhB,IAAM,MAAQ,QAAU,YAAc1jB,aAAaiC,QAAQsH,OAAS,WAEpIlJ,IAAImjB,6BAEV1jB,SAAS2U,cAAc,IAAIC,MAAM,oBAAoB,IAErD3L,MAAK,KACL1I,IAAI6hB,aAAanZ,MAAK,WACrBjJ,SAAS2U,cAAc,IAAIC,MAAM,WAClC,GAAE,IAQJrU,IAAI+hB,YAAYrZ,MAAK,WAMpB1I,IAAIyhB,qBACF/Y,MAAK,KAEL1I,IAAIge,mCAGJhe,IAAIoe,sCAAsC,GAE7C,G,GC7CIkF,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBziB,IAAjB0iB,EACH,OAAOA,EAAaC,QAGrB,IAAIC,EAASL,EAAyBE,GAAY,CAGjDE,QAAS,CAAC,GAOX,OAHAE,EAAoBJ,GAAUG,EAAQA,EAAOD,QAASH,GAG/CI,EAAOD,OACf,CClBA7b,EAAQ,KAGR7H,IAAI2hB,eAAejZ,MAAK,WAEvBb,EAAQ,KAIRA,EAAQ,IACRA,EAAQ,IACRA,EAAQ,KAuBRA,EAAQ,IACT,G","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\", () => {\n\n\tif (\n\t\twpmDataLayer?.pixels?.facebook?.pixel_id\n\t\t&& !wpmDataLayer?.pixels?.facebook?.loaded\n\t\t&& !wpm.doesUrlContainPatterns(wpmDataLayer?.pixels?.facebook?.exclusion_patterns)\n\t) {\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(\"wpmClientSideAddToCart\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToCart\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// InitiateCheckout event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideBeginCheckout\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"InitiateCheckout\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// AddToWishlist event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideAddToWishlist\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToWishlist\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// ViewContent event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideViewItem\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"ViewContent\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n\n// view search event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideSearch\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Search\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// load always event\njQuery(document).on(\"wpmLoadAlways\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.setFbUserData()\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// view order received page event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideOrderReceivedPage\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Purchase\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\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\tlet data = {}\n\n\t\t\t// Add user identifiers to data,\n\t\t\t// and only if fbp was set\n\t\t\tif (wpm.isFbpSet()) {\n\t\t\t\tdata = {...wpm.getUserIdentifiersForFb()}\n\t\t\t}\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\t// https://developers.facebook.com/docs/meta-pixel/advanced/advanced-matching\n\twpm.getUserIdentifiersForFb = () => {\n\n\t\tlet data = {}\n\n\t\t// external ID\n\t\tif (wpmDataLayer?.user?.id) data.external_id = wpmDataLayer.user.id\n\t\tif (wpmDataLayer?.order?.user_id) data.external_id = wpmDataLayer.order.user_id\n\n\t\t// email\n\t\tif (wpmDataLayer?.user?.facebook?.email) data.em = wpmDataLayer.user.facebook.email\n\t\tif (wpmDataLayer?.order?.billing_email_hashed) data.em = wpmDataLayer.order.billing_email_hashed\n\n\t\t// first name\n\t\tif (wpmDataLayer?.user?.facebook?.first_name) data.fn = wpmDataLayer.user.facebook.first_name\n\t\tif (wpmDataLayer?.order?.billing_first_name) data.fn = wpmDataLayer.order.billing_first_name.toLowerCase()\n\n\t\t// last name\n\t\tif (wpmDataLayer?.user?.facebook?.last_name) data.ln = wpmDataLayer.user.facebook.last_name\n\t\tif (wpmDataLayer?.order?.billing_last_name) data.ln = wpmDataLayer.order.billing_last_name.toLowerCase()\n\n\t\t// phone\n\t\tif (wpmDataLayer?.user?.facebook?.phone) data.ph = wpmDataLayer.user.facebook.phone\n\t\tif (wpmDataLayer?.order?.billing_phone) data.ph = wpmDataLayer.order.billing_phone.replace(\"+\", \"\")\n\n\t\t// city\n\t\tif (wpmDataLayer?.user?.facebook?.city) data.ct = wpmDataLayer.user.facebook.city\n\t\tif (wpmDataLayer?.order?.billing_city) data.ct = wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g, \"\")\n\n\t\t// state\n\t\tif (wpmDataLayer?.user?.facebook?.state) data.st = wpmDataLayer.user.facebook.state\n\t\tif (wpmDataLayer?.order?.billing_state) data.st = wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/, \"\")\n\n\t\t// postcode\n\t\tif (wpmDataLayer?.user?.facebook?.postcode) data.zp = wpmDataLayer.user.facebook.postcode\n\t\tif (wpmDataLayer?.order?.billing_postcode) data.zp = wpmDataLayer.order.billing_postcode\n\n\t\t// country\n\t\tif (wpmDataLayer?.user?.facebook?.country) data.country = wpmDataLayer.user.facebook.country\n\t\tif (wpmDataLayer?.order?.billing_country) data.country = wpmDataLayer.order.billing_country.toLowerCase()\n\n\t\treturn data\n\t}\n\n\twpm.getFbRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\twpm.getFbUserData = () => {\n\n\t\t/**\n\t\t * We need to cache the FB user data for InitiateCheckout\n\t\t * where getting the user data from the browser is too slow\n\t\t * using wpm.getCookie().\n\t\t *\n\t\t * And we need the object merge 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.\n\t\t *\n\t\t * 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\t\t * Also, the merge ensures that new data will be added to fbUserData if new\n\t\t * data is being added later, like user ID, or fbc.\n\t\t */\n\n\t\tfbUserData = {...fbUserData, ...wpm.getFbUserDataFromBrowser()}\n\n\t\treturn fbUserData\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\") && wpm.isValidFbp(wpm.getCookie(\"_fbp\"))) {\n\t\t\tdata.fbp = wpm.getCookie(\"_fbp\")\n\t\t}\n\n\t\tif (wpm.getCookie(\"_fbc\") && wpm.isValidFbc(wpm.getCookie(\"_fbc\"))) {\n\t\t\tdata.fbc = 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.isFbpSet = () => {\n\t\treturn !!wpm.getCookie(\"_fbp\")\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbp = fbp => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.\\d{8,20}$/)\n\n\t\treturn re.test(fbp)\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbc = fbc => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.[\\da-zA-Z_-]{8,}/)\n\n\t\treturn re.test(fbc)\n\t}\n\n\t// wpm.fbViewContent = (product = null) => {\n\t//\n\t// \ttry {\n\t// \t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\t//\n\t// \t\tlet eventId = wpm.getFbRandomEventId()\n\t//\n\t// \t\tlet data = {}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tdata.content_type = \"product\"\n\t// \t\t\tdata.content_name = product.name\n\t// \t\t\t// data.content_category = product.category\n\t// \t\t\tdata.content_ids = product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]\n\t// \t\t\tdata.currency = wpmDataLayer.shop.currency\n\t// \t\t\tdata.value = product.price\n\t// \t\t}\n\t//\n\t// \t\tfbq(\"track\", \"ViewContent\", data, {\n\t// \t\t\teventID: eventId,\n\t// \t\t})\n\t//\n\t// \t\tlet capiData = {\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}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\t// \t\t\tcapiData.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t// \t\t}\n\t//\n\t// \t\tjQuery(document).trigger(\"wpmFbCapiEvent\", capiData)\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_name: product.name,\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 : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.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.getFbRandomEventId()\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\twpm.fbGetContentIdsFromCart = () => {\n\n\t\tlet content_ids = []\n\n\t\tfor(const key in wpmDataLayer.cart){\n\t\t\tcontent_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\t\t}\n\t\t\n\t\treturn content_ids\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\", (event, product = null) => {\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 (product) {\n\t\t\tdata.value = (product.quantity ? product.quantity : 1) * product.price\n\t\t\tdata.items = [{\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(wpm.getGoogleAdsConversionIdentifiersWithLabel())) 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\n\twpm.getGoogleAdsConversionIdentifiersWithLabel = function () {\n\n\t\tlet conversionIdentifiers = []\n\n\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds) {\n\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\tif (item) {\n\t\t\t\t\tconversionIdentifiers.push(key + \"/\" + item)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsConversionIdentifiers = function () {\n\n\t\tlet conversionIdentifiers = []\n\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 (wpmDataLayer?.shop?.page_type && \"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer?.order?.google?.ads?.enhanced_conversion_data) {\n\t\t\t\t// window.enhanced_conversion_data = wpmDataLayer.order.google.ads.enhanced_conversion_data\n\n\t\t\t\tgtag(\"set\", \"user_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\tlet parameters = wpmDataLayer.pixels.google.analytics.ga4.parameters\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.debug_mode) {\n\t\t\t\tparameters.debug_mode = true\n\t\t\t}\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.ga4.measurement_id, parameters)\n\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\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.then(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\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\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\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// .then(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\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\t/**\n\t * Initialize and set default values\n\t */\n\n\tlet\n\t\twpmConsentValues = {}\n\twpmConsentValues.categories = {}\n\twpmConsentValues.pixels = []\n\twpmConsentValues.mode = \"category\"\n\twpmConsentValues.visitorHasChosen = false\n\n\t// Return current consent values\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\t// Update the PMW consent values with values coming from a CMP\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\t/**\n\t\t * Setup defaults\n\t\t */\n\n\t\t// consentValues.categories.analytics = true\n\t\t// consentValues.categories.ads = true\n\n\t\twpmConsentValues.categories.analytics = !explicitConsent\n\t\twpmConsentValues.categories.ads = !explicitConsent\n\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\n\t\t\tif (ads) {\n\t\t\t\twpmConsentValues.categories.ads = !!ads\n\t\t\t}\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * PMW Cookie Consent\n\t\t *\n\t\t * Must be before every other CMP for the case that one of the included CMPs\n\t\t * decides to implement the PMW cookie consent API. In that case\n\t\t * the PMW consent cookie must take precedence.\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"pmw_cookie_consent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookiebot\n\t\t * https://wordpress.org/plugins/cookiebot/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieConsent\")) {\n\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Script\n\t\t * https://wordpress.org/plugins/cookie-script-com/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieScriptConsent\")) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Borlabs Cookie\n\t\t * https://borlabs.io/borlabs-cookie/\n\t\t */\n\t\tif (cookie = wpm.getCookie(\"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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Complianz Cookie\n\t\t * https://wordpress.org/plugins/complianz-gdpr/\n\t\t */\n\n\t\tif (cookie = getComplianzCookies()) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (free version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"cookie_notice_accepted\")) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (pro version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"hu-consent\")) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * CookieYes, GDPR Cookie Consent (Cookie Law Info)\n\t\t * https://wordpress.org/plugins/cookie-law-info/\n\t\t */\n\n\t\tif (cookie = getCookieLawInfoCookies()) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * GDPR Cookie Compliance Plugin by Moove Agency\n\t\t * https://wordpress.org/plugins/gdpr-cookie-compliance/\n\t\t *\n\t\t * TODO write documentation on how to set up the plugin in order for this to work properly\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"moove_gdpr_popup\")) {\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * WP AutoTerms\n\t\t * https://wordpress.org/plugins/auto-terms-of-service-and-privacy-policy/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"wpautoterms-cookies-notice\")) {\n\n\t\t\tif (cookie !== \"1\") return\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\treturn\n\t\t}\n\n\t\t/**\n\t\t * Usercentrics\n\t\t *\n\t\t * https://usercentrics.com/\n\t\t * https://docs.usercentrics.com/#/cmp-v2-ui-api\n\t\t * https://docs.usercentrics.com/#/cmp-v2-ui-api?id=getservicesbaseinfo\n\t\t */\n\n\t\tif (window.localStorage && window.localStorage.getItem(\"uc_settings\")) {\n\n\t\t\tconsole.log(\"Usercentrics settings detected\")\n\n\t\t\tif (typeof UC_UI === \"undefined\") {\n\n\t\t\t\t// register event to block unblock after UC_UI library is loaded\n\t\t\t\twindow.addEventListener(\"UC_UI_INITIALIZED\", function (event) {\n\t\t\t\t\twpm.ucUiProcessConsent()\n\t\t\t\t})\n\n\t\t\t\t// Don't continue because in here the UC_UI library is not loaded yet\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (UC_UI.areAllConsentsAccepted()) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\twpm.ucUiProcessConsent()\n\t\t}\n\n\t\t/**\n\t\t * OneTrust\n\t\t *\n\t\t * https://www.onetrust.com/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"OptanonConsent\")) {\n\n\t\t\t// console.log(\"OneTrust settings detected\")\n\n\t\t\tlet params = new URLSearchParams(cookie)\n\t\t\tlet groups = params.get(\"groups\").split(\",\")\n\n\t\t\t// Groups is an array like this ['1:1', '2:0', '3:1', '4:1']. Make it an object with key value pairs\n\t\t\tlet groupsObject = {}\n\t\t\tgroups.forEach((group) => {\n\n\t\t\t\tlet groupArray = group.split(\":\")\n\t\t\t\tgroupsObject[groupArray[0]] = groupArray[1]\n\t\t\t})\n\n\t\t\t// group mapping\n\t\t\t// 1 = necessary\n\t\t\t// 2 = analytics\n\t\t\t// 3 = functional\n\t\t\t// 4 = ads\n\n\t\t\twpmConsentValues.categories.analytics = groubsObject[\"2\"] === \"1\"\n\t\t\twpmConsentValues.categories.ads = groupsObject[\"4\"] === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\t}\n\n\t// Only run after having made sure that the UC_UI library is loaded\n\twpm.ucUiProcessConsent = function () {\n\n\t\tif (typeof UC_UI === \"undefined\") return\n\n\t\tif (UC_UI.areAllConsentsAccepted()) {\n\t\t\tpmw.consentAcceptAll()\n\t\t}\n\n\t\tconst ucStatisticsSlug = UC_UI.getSettingsLabels().categories.filter(data => data.label === \"Statistics\")[0].slug\n\n\t\tpmw.consentAdjustSelectively(\n\t\t\t{\n\t\t\t\tanalytics: !UC_UI.getServicesBaseInfo().filter(data => data.categorySlug === ucStatisticsSlug && data.consent.status === false).length > 0,\n\t\t\t\tads : !UC_UI.getServicesBaseInfo().filter(data => data.categorySlug === \"marketing\" && data.consent.status === false).length > 0,\n\t\t\t},\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. (PMW 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. (PMW 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\t// jQuery(document).on(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\tdocument.addEventListener(\"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\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"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\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\twpm.setConsentValueCategories(analytics, ads)\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.unblockSelectedPixels = () => {\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\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\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/**\n\t * Borlabs Cookie\n\t * If visitor accepts cookies in Borlabs Cookie unblock the scripts\n\t */\n\tdocument.addEventListener(\"borlabs-cookie-consent-saved\", () => {\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/**\n\t * Cookiebot\n\t * \tIf visitor accepts cookies in Cookiebot unblock the scripts\n\t * \thttps://www.cookiebot.com/en/developer/\n\t */\n\tdocument.addEventListener(\"CookiebotOnAccept\", () => {\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\t// jQuery(document).on(\"CookieScriptAccept\", e => {\n\tdocument.addEventListener(\"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\t// jQuery(document).on(\"CookieScriptAcceptAll\", () => {\n\tdocument.addEventListener(\"CookieScriptAcceptAll\", () => {\n\n\t\twpm.setConsentValueCategories(true, true)\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\t// jQuery(document).on(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\t// jQuery(document).on(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplz_status_change\", wpm.cmplzStatusChange)\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\t// jQuery(document).on(\"setCookieNotice\", () => {\n\tdocument.addEventListener(\"setCookieNotice\", () => {\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\t// jQuery(\".hu-cookies-save\").on(\"click\", function () {\n\t\t\t\t\t\t// jQuery(\".hu-cookies-save\") in pure JavaScript\n\t\t\t\t\t\tdocument.querySelector(\".hu-cookies-save\").addEventListener(\"click\", () => {\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\t/**\n\t * Usercentrics Event Listeners\n\t *\n\t * https://docs.usercentrics.com/#/v2-events?id=usage-as-window-event\n\t */\n\n\twindow.addEventListener(\"ucEvent\", function (e) {\n\t\tif (e.detail && e.detail.event == \"consent_status\") {\n\t\t\t// check for consent status of service \"Google Ads Remarketing\"\n\t\t\tif (e.detail[\"Google Ads Remarketing\"] === true) {\n\t\t\t\tconsole.log(\"Google Ads Remarketing has consent\")\n\t\t\t} else {\n\t\t\t\tconsole.log(\"Google Ads Remarketing has no consent\")\n\t\t\t}\n\t\t}\n\t})\n\n\t// https://docs.usercentrics.com/#/v2-events?id=uc_ui_cmp_event\n\twindow.addEventListener(\"UC_UI_CMP_EVENT\", function (event) {\n\n\t\tif (event.detail.type === \"ACCEPT_ALL\") {\n\t\t\t// console.log('accept all');\n\n\t\t\tpmw.consentAcceptAll()\n\t\t}\n\n\t\tif (event.detail.type === \"DENY_ALL\") {\n\t\t\tpmw.consentRevokeAll()\n\t\t}\n\n\t\tif (event.detail.type === \"SAVE\") {\n\t\t\tconsole.log(\"event.detail\", event.detail)\n\t\t}\n\t})\n\n\n\t/**\n\t * OneTrust Event Listeners\n\t *\n\t * CookiePro by OneTrust doesn't emit any events when the user accepts or declines cookies.\n\t */\n\n\t// There are two accept all buttons. One in the first banner and one in the settings window. Both have different identifiers.\n\tjQuery(\"#accept-recommended-btn-handler, #onetrust-accept-btn-handler\").on(\"click\", function () {\n\n\t\t// If OneTrust is not loaded, return\n\t\tif (typeof window.OneTrust === \"undefined\") return\n\n\t\tpmw.consentAcceptAll()\n\t})\n\n\t// There are two revoke all buttons. One in the first banner and one in the settings window. Both have different identifiers.\n\tjQuery(\".ot-pc-refuse-all-handler, #onetrust-reject-all-handler\").on(\"click\", function () {\n\t\tpmw.consentRevokeAll()\n\t})\n\n\t// There is one save button that saves mixed consent. It is in the settings window. We reload the page after saving to reflect the changes.\n\tjQuery(\".save-preference-btn-handler.onetrust-close-btn-handler\").on(\"click\", function () {\n\t\tlocation.reload()\n\n\t\t// OneTrust.OnConsentChanged(function (e) {\n\t\t// \tpmw.consentAdjustSelectively({\n\t\t// \t\tanalytics: e.detail.includes(\"2\"),\n\t\t// \t\tads : e.detail.includes(\"4\"),\n\t\t// \t})\n\t\t// })\n\t})\n\n\n}(window.wpm = window.wpm || {}, jQuery));\n\n\n(function (pmw, $, undefined) {\n\n\t/**\n\t * Pixel Manager Cookie Consent API\n\t */\n\n\t// Accept consent for all cookies\n\tpmw.consentAcceptAll = (settings = {}) => {\n\n\t\tsettings.duration = settings.duration || 365\n\n\t\tpmw.consentSetCookie(true, true, settings.duration)\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t}\n\n\t// Accept consent selectively\n\tpmw.consentAdjustSelectively = (settings) => {\n\n\t\t// If settings.analytics is set, keep it, otherwise set it to wpm.getConsentValues().categories.analytics\n\t\tsettings.analytics = settings.analytics !== undefined ? settings.analytics : wpm.getConsentValues().categories.analytics\n\t\tsettings.ads = settings.ads !== undefined ? settings.ads : wpm.getConsentValues().categories.ads\n\t\tsettings.duration = settings.duration || 365\n\n\t\tpmw.consentSetCookie(settings.analytics, settings.ads, settings.duration)\n\t\twpm.unblockAllScripts(settings.analytics, settings.ads)\n\t\twpm.updateGoogleConsentMode(settings.analytics, settings.ads)\n\t}\n\n\t// Remove consent for all cookies\n\tpmw.consentRevokeAll = (settings = {}) => {\n\n\t\tsettings.duration = settings.duration || 365\n\n\t\twpm.setConsentValueCategories(false, false)\n\t\tpmw.consentSetCookie(false, false, settings.duration)\n\t\twpm.updateGoogleConsentMode(false, false)\n\t}\n\n\t// Set a cookie called pmw_cookie_consent with the value of pmw_cookie_consent\n\t// and set the default expiration date to 1 year from now\n\tpmw.consentSetCookie = (analytics, ads, duration = 365) => {\n\t\twpm.setCookie(\"pmw_cookie_consent\", JSON.stringify({analytics, ads}), duration)\n\t}\n\n\t// Trigger an event once the PMW consent management has been loaded\n\tjQuery(document).trigger(\"pmw_cookie_consent_management_loaded\")\n\n}(window.pmw = window.pmw || {}, 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\", (event) => {\n\n\ttry {\n\n\t\tlet url = new URL(jQuery(event.currentTarget).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\nconst addToCartSelectors = [\n\t\".add_to_cart_button:not(.product_type_variable)\",\n\t\".ajax_add_to_cart\",\n\t\".single_add_to_cart_button\",\n].join(\",\")\n\n\n// add_to_cart event\n// When DOM is ready, register event listeners\njQuery(document).on(\"ready\", () => {\n\n\tjQuery(addToCartSelectors).on(\"click\", (event) => {\n\n\t\ttry {\n\n\t\t\t// console.log(\"add_to_cart event detected\")\n\n\t\t\tlet quantity = 1,\n\t\t\t\tproductId\n\n\t\t\t// Only process on product pages\n\t\t\tif (wpmDataLayer.shop.page_type === \"product\") {\n\n\t\t\t\t// First process related and upsell products\n\t\t\t\tif (typeof jQuery(event.currentTarget).attr(\"href\") !== \"undefined\" && jQuery(event.currentTarget).attr(\"href\").includes(\"add-to-cart\")) {\n\n\t\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\")\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t}\n\n\t\t\t\t// If is simple product\n\t\t\t\tif (wpmDataLayer.shop.product_type === \"simple\") {\n\n\t\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\t\tproductId = jQuery(event.currentTarget).val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t}\n\n\t\t\t\t// If is variable product or variable-subscription\n\t\t\t\tif ([\"variable\", \"variable-subscription\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\n\t\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\t\tproductId = jQuery(\"[name='variation_id']\").val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t}\n\n\t\t\t\t// If is grouped product\n\t\t\t\tif (wpmDataLayer.shop.product_type === \"grouped\") {\n\n\t\t\t\t\tjQuery(\".woocommerce-grouped-product-list-item\").each((index, element) => {\n\n\t\t\t\t\t\tquantity = Number(jQuery(element).find(\".input-text.qty\").val())\n\t\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\t\t\tlet classes = jQuery(element).attr(\"class\")\n\t\t\t\t\t\tproductId = 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}\n\n\t\t\t\t// If is bundle product\n\t\t\t\tif (wpmDataLayer.shop.product_type === \"bundle\") {\n\n\t\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\t\tproductId = jQuery(\"input[name=add-to-cart]\").val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\")\n\t\t\t\twpm.addProductToCart(productId, quantity)\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 * If someone clicks anywhere on a custom /?add-to-cart=123 link\n * trigger the add to cart event\n */\n\njQuery(document).on(\"ready\", () => {\n\tjQuery(\"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\").one(\"click\", function (event) {\n// jQuery(document).one(\"click\", \"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\", (event) => {\n\n\t\ttry {\n\t\t\tif (jQuery(event.target).closest(\"a\").attr(\"href\")) {\n\n\t\t\t\tlet url = new URL(jQuery(event.currentTarget).attr(\"href\"), window.location.origin)\n\n\t\t\t\tif (url.searchParams.has(\"add-to-cart\")) {\n\n\t\t\t\t\tlet productId = url.searchParams.get(\"add-to-cart\")\n\t\t\t\t\twpm.addProductToCart(productId, 1)\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\n// select item event\njQuery(document).on(\"ready\", () => {\n\n\tjQuery(\".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\").on(\"click\", (event) => {\n\n\t\ttry {\n\n\t\t\t/**\n\t\t\t * On some pages the event fires multiple times, and on product pages\n\t\t\t * even on page load. Using e.stopPropagation helps to prevent this,\n\t\t\t * but I don't know why. We don't even have to use this, since only a real\n\t\t\t * product click yields a valid productId. So we filter the invalid click\n\t\t\t * events out later down in the code. I'll keep it that way because this is\n\t\t\t * the most compatible way across shops.\n\t\t\t *\n\t\t\t * e.stopPropagation();\n\t\t\t * */\n\n\t\t\tlet productId = jQuery(event.currentTarget).nextAll(\".wpmProductId:first\").data(\"id\")\n\n\t\t\t/**\n\t\t\t * On product pages, for some reason, the click event is triggered on the main product on page load.\n\t\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\t * related products, which are found below.\n\t\t\t */\n\n\t\t\tif (productId) {\n\n\t\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\t\tjQuery(document).trigger(\"wpmSelectContentGaUa\", product)\n\t\t\t\t\tjQuery(document).trigger(\"wpmSelectItem\", product)\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\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\t\".elementor-button--checkout\",\n].join(\",\")\n\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).one(\"click init_checkout\", checkoutButtonClasses, () => {\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\", (event) => {\n\n\tif (wpm.isEmail(jQuery(event.currentTarget).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\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).on(\"wpmLoad\", (event) => {\n\tjQuery(document).on(\"payment_method_selected\", () => {\n\n\t\tif (false === wpm.paymentMethodSelected) {\n\t\t\twpm.fireCheckoutProgress(3)\n\t\t}\n\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t\twpm.paymentMethodSelected = true\n\t})\n})\n\n/**\n * Place order button\n *\n * Track checkout option event: purchase click\n * https://stackoverflow.com/a/34112407/4688612\n * jQuery(document).one(\"click\", \"#place_order\", () => {\n */\njQuery(document).on(\"ready\", () => {\n\tjQuery(\"form.checkout\").on(\"checkout_place_order_success\", () => {\n\n\t\tif (false === wpm.emailSelected) {\n\t\t\twpm.fireCheckoutProgress(2)\n\t\t}\n\n\t\tif (false === wpm.paymentMethodSelected) {\n\t\t\twpm.fireCheckoutProgress(3)\n\t\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t\t}\n\n\t\twpm.fireCheckoutProgress(4)\n\n\t\tjQuery(document).trigger(\"wpmPlaceOrder\", {})\n\t})\n})\n\n// update cart event\njQuery(document).on(\"ready\", () => {\n\tjQuery(\"[name='update_cart']\").on(\"click\", () => {\n\n\t\ttry {\n\t\t\tjQuery(\".cart_item\").each((index, element) => {\n\n\t\t\t\tlet url = new URL(jQuery(element).find(\".product-remove\").find(\"a\").attr(\"href\"))\n\t\t\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\n\t\t\t\tlet quantity = jQuery(element).find(\".qty\").val()\n\n\t\t\t\tif (quantity === 0) {\n\t\t\t\t\twpm.removeProductFromCart(productId)\n\t\t\t\t} else if (quantity < wpmDataLayer.cart[productId].quantity) {\n\t\t\t\t\twpm.removeProductFromCart(productId, wpmDataLayer.cart[productId].quantity - quantity)\n\t\t\t\t} else if (quantity > wpmDataLayer.cart[productId].quantity) {\n\t\t\t\t\twpm.addProductToCart(productId, quantity - wpmDataLayer.cart[productId].quantity)\n\t\t\t\t}\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t})\n})\n\n// add_to_wishlist\njQuery(document).on(\"ready\", () => {\n\n\tjQuery(\".add_to_wishlist,.wl-add-to\").on(\"click\", event => {\n\n\t\ttry {\n\n\t\t\tlet productId\n\n\t\t\tif (jQuery(event.currentTarget).data(\"productid\")) { // for the WooCommerce wishlist plugin\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"productid\")\n\t\t\t} else if (jQuery(event.currentTarget).data(\"product-id\")) { // for the YITH wishlist plugin\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product-id\")\n\t\t\t}\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\n\t\t\tjQuery(document).trigger(\"wpmAddToWishlist\", product)\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\njQuery(document).on(\"updated_cart_totals\", () => {\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(document).on(\"ready\", () => {\n\n\tjQuery(\".single_variation_wrap\").on(\"show_variation\", (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\twpm.triggerViewItemEventPrep(productId)\n\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\n// jQuery(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// \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\t// console.log(\"hmm\")\n// \t\t\twpm.triggerViewItemEventPrep(productId)\n//\n// \t\t} catch (e) {\n// \t\t\tconsole.error(e)\n// \t\t}\n// \t})\n// })\n\n// jQuery(function () {\n//\n// \tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n// \t\tjQuery(document).trigger(\"wpmviewitem\")\n// \t})\n// })\n\n\n/**\n * Set up wpm events\n */\n\n// populate the wpmDataLayer with the cart items\njQuery(document).on(\"wpmLoad\", () => {\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(document).on(\"wpmLoad\", () => {\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(document).on(\"wpmLoad\", () => {\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(document).on(\"wpmLoad\", () => {\n\t// document.addEventListener(\"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 (wpmDataLayer?.shop) {\n\t\t\t\tif (\n\t\t\t\t\t\"product\" === wpmDataLayer.shop.page_type &&\n\t\t\t\t\t\"variable\" !== wpmDataLayer.shop.product_type &&\n\t\t\t\t\twpm.getMainProductIdFromProductPage()\n\t\t\t\t) {\n\t\t\t\t\tlet product = wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage())\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t\t} else if (\"product_category\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmCategory\")\n\t\t\t\t} else if (\"search\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmSearch\")\n\t\t\t\t} else if (\"cart\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewCart\")\n\t\t\t\t} else if (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer.order) {\n\t\t\t\t\tif (!wpm.isOrderIdStored(wpmDataLayer.order.id)) {\n\t\t\t\t\t\tjQuery(document).trigger(\"wpmOrderReceivedPage\")\n\t\t\t\t\t\twpm.writeOrderIdToStorage(wpmDataLayer.order.id)\n\t\t\t\t\t\tif (typeof wpm.acrRemoveCookie === \"function\") wpm.acrRemoveCookie()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\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\njQuery(document).on(\"wpmLoad\", async () => {\n\n\tif (\n\t\twindow.sessionStorage &&\n\t\twindow.sessionStorage.getItem(\"_pmw_endpoint_available\") &&\n\t\t!JSON.parse(window.sessionStorage.getItem(\"_pmw_endpoint_available\"))\n\t) {\n\t\tconsole.error(\"Pixel Manager for WooCommerce: REST endpoint is not available. Using admin-ajax.php instead.\")\n\t}\n})\n\n\n/**\n * Load all pixels\n */\njQuery(document).on(\"wpmPreLoadPixels\", () => {\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\n/**\n * All ecommerce events\n */\n\njQuery(document).on(\"wpmAddToCart\", (event, product) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToCart\",\n\t\tproduct: product,\n\t}\n\n\t// If Facebook pixel is loaded, add Facebook server to server event data to the payload\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToCart\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\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}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToCart\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmBeginCheckout\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"beginCheckout\",\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"InitiateCheckout\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t}\n\n\t\tif (wpmDataLayer?.cart && !jQuery.isEmptyObject(wpmDataLayer.cart)) {\n\t\t\tpayload.facebook.custom_data = {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontent_ids : wpm.fbGetContentIdsFromCart(),\n\t\t\t\tvalue : wpm.getCartValue(),\n\t\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideBeginCheckout\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmAddToWishlist\", (event, product) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToWishlist\",\n\t\tproduct: product,\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToWishlist\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\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}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToWishlist\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"viewItem\",\n\t\tproduct: product,\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"ViewContent\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t}\n\n\t\tif (product) {\n\t\t\tpayload.facebook.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideViewItem\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmSearch\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"search\",\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Search\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\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}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideSearch\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmOrderReceivedPage\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"orderReceived\",\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Purchase\",\n\t\t\tevent_id : wpmDataLayer.order.id,\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\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}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideOrderReceivedPage\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// ! No server-to-server event is sent for this event because it is compiled and sent from the server directly\n})\n\n\n\n\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\tcookiePmwRestEndpointAvailable: \"_pmw_endpoint_available\",\n\t\trestEndpointPost : \"pmw/v1/test/\",\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 = async () => {\n\n\t\tif (window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable)) {\n\t\t\treturn JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable))\n\t\t} else {\n\t\t\treturn await wpm.testEndpoint()\n\t\t}\n\t}\n\n\twpm.isSessionStorageAvailable = () => !!window.sessionStorage\n\n\t// Test the endpoint by sending a POST request\n\twpm.testEndpoint = async (\n\t\turl = wpm.root + wpmRestSettings.restEndpointPost,\n\t\tcookieName = wpmRestSettings.cookiePmwRestEndpointAvailable,\n\t) => {\n\n\t\tlet response = await fetch(url, {\n\t\t\tmethod : \"POST\",\n\t\t\tmode : \"cors\",\n\t\t\tcache : \"no-cache\",\n\t\t\tkeepalive: true,\n\t\t})\n\n\t\tif (response.status === 200) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(true))\n\t\t\treturn true\n\t\t} else if (response.status === 404) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\treturn false\n\t\t} else if (response.status === 0) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isWpmRestEndpointAvailable = (cookieName = wpmRestSettings.cookiePmwRestEndpointAvailable) => !!wpm.getCookie(cookieName)\n\n\twpm.writeOrderIdToStorage = (orderId, source = \"thankyou_page\", 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, source)\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\n\t\t\t/**\n\t\t\t * Can't use a REST API endpoint, as the cart session will not be loaded if the\n\t\t\t * endpoint is called.\n\t\t\t *\n\t\t\t * https://wordpress.org/support/topic/wc-cart-is-null-in-custom-rest-api/#post-11442843\n\t\t\t */\n\n\t\t\t/**\n\t\t\t * Get the cart items from the backend the data object using fetch API\n\t\t\t * and log success or error messages\n\t\t\t * and url encoded data\n\t\t\t */\n\t\t\tfetch(wpm.ajax_url, {\n\t\t\t\tmethod : \"POST\",\n\t\t\t\tcache : \"no-cache\",\n\t\t\t\tbody : new URLSearchParams({action: \"pmw_get_cart_items\"}),\n\t\t\t\tkeepalive: true,\n\t\t\t})\n\t\t\t\t.then(response => {\n\t\t\t\t\tif (response.ok) {\n\t\t\t\t\t\treturn response.json()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\")\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.then(data => {\n\n\t\t\t\t\tif (data.success) {\n\n\t\t\t\t\t\tif (!data.data[\"cart\"]) data.data[\"cart\"] = {}\n\n\t\t\t\t\t\twpm.saveCartObjectToDataLayer(data.data[\"cart\"])\n\n\t\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(data.data[\"cart\"]))\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\")\n\t\t\t\t\t}\n\t\t\t\t})\n\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 = async productIds => {\n\n\t\tif (wpmDataLayer?.products) {\n\t\t\t// If productIds already exists as key in wpmDataLayer.products, remove it from the array\n\t\t\tproductIds = productIds.filter(productId => !(productId in wpmDataLayer.products))\n\t\t}\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\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/products/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\tpageId : wpmDataLayer.general.pageId,\n\t\t\t\t\t\tproductIds: productIds,\n\t\t\t\t\t}),\n\t\t\t\t})\n\t\t\t} else {\n\n\t\t\t\t// Get the product details from the backend the data object using fetch API\n\t\t\t\t// and log success or error messages\n\t\t\t\t// and url encoded data\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_get_product_ids\",\n\t\t\t\t\t\tproductIds: productIds,\n\t\t\t\t\t}),\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (response.ok) {\n\t\t\t\tlet responseData = await response.json()\n\t\t\t\tif (responseData.success) {\n\t\t\t\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, responseData.data)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.error(\"Error getting products from backend\")\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\n\t\treturn true\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.triggerViewItemEventPrep = async productId => {\n\n\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t} else {\n\t\t\tawait wpm.getProductsFromBackend([productId])\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t}\n\t}\n\n\twpm.triggerViewItemEvent = productId => {\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t}\n\n\twpm.triggerViewItemEventNoProduct = () => {\n\t\tjQuery(document).trigger(\"wpmViewItem\")\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\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.deleteCookie = cookieName => {\n\t\twpm.setCookie(cookieName, \"\", -1)\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 = async (orderId, source) => {\n\n\t\ttry {\n\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/pixels-fired/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\theaders : {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\torder_id: orderId,\n\t\t\t\t\t\tsource : source,\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t})\n\n\t\t\t} else {\n\t\t\t\t// save the state in the database\n\n\t\t\t\t// Send the data object with ajax request\n\t\t\t\t// and log success or error using fetch API and url encoded\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_purchase_pixels_fired\",\n\t\t\t\t\t\torder_id: orderId,\n\t\t\t\t\t\tsource : source,\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (response.ok) {\n\t\t\t\tconsole.log(\"wpm.storeOrderIdOnServer success\")\n\t\t\t} else {\n\t\t\t\tconsole.error(\"wpm.storeOrderIdOnServer error\")\n\t\t\t}\n\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/**\n\t * https://api.jquery.com/jquery.getscript/\n\t *\n\t * Switched back to jQuery.ajax as the fetch method on some sites returned a type error\n\t * Possible reasons are:\n\t * * CORS mismatch\n\t * * The user is using an ad blocker\n\t */\n\n\twpm.loadScriptAndCacheIt = url => {\n\n\t\t// Get and load the script using fetch API, if possible from cache, and return it without using eval\n\t\t// return fetch(url, {\n\t\t// \tmethod : \"GET\",\n\t\t// \tcache : \"default\",\n\t\t// \tkeepalive: true,\n\t\t// })\n\t\t// \t.then(response => {\n\t\t// \t\tif (response.ok) {\n\t\t// \t\t\t// console.log(\"response\", response)\n\t\t// \t\t\treturn response.text()\n\t\t// \t\t\t// console.log(\"wpm.loadScriptAndCacheIt success: \" + url)\n\t\t// \t\t} else {\n\t\t// \t\t\tthrow new Error(\"Network response was not ok: \" + url)\n\t\t// \t\t}\n\t\t// \t})\n\t\t// \t.then(script => {\n\t\t// \t\t// Execute the script\n\t\t// \t\t// console.error(\"executing script: \" + script)\n\t\t// \t\teval(script)\n\t\t// \t\t// console.log(\"executed script: \" + script)\n\t\t// \t})\n\t\t// \t.catch(e => {\n\t\t// \t\tconsole.error(e)\n\t\t// \t})\n\n\t\tlet options = {\n\t\t\tdataType: \"script\",\n\t\t\tcache : true,\n\t\t\turl : url,\n\t\t}\n\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\t// https://stackoverflow.com/a/60606893/4688612\n\twpm.hashAsync = (algo, str) => {\n\t\treturn crypto.subtle.digest(algo, new TextEncoder(\"utf-8\").encode(str)).then(buf => {\n\t\t\treturn Array.prototype.map.call(new Uint8Array(buf), x => ((\"00\" + x.toString(16)).slice(-2))).join(\"\")\n\t\t})\n\t}\n\n\twpm.getCartValue = () => {\n\n\t\tlet value = 0\n\n\t\tif (wpmDataLayer?.cart) {\n\n\t\t\tfor (const key in wpmDataLayer.cart) {\n\t\t\t\t// content_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\n\t\t\t\tlet product = wpmDataLayer.cart[key]\n\n\t\t\t\tvalue += product.quantity * product.price\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n\t/**\n\t * Detect if the current URL contains at least one pattern\n\t *\n\t * @param patterns\n\t * @returns {boolean}\n\t */\n\twpm.doesUrlContainPatterns = patterns => {\n\n\t\tfor (const pattern of patterns) {\n\t\t\tif (new RegExp(pattern).test(window.location.href)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\t/**\n\t * Detect if the current URL contains at least one pattern that is on the tracking exclusion list\n\t *\n\t * https://www.linkedin.com/pulse/how-remove-google-robot-problem-via-gtm-facebook-pixel-hjelpdahl/\n\t * https://www.youtube.com/watch?v=b4I1ePZt8Z0\n\t *\n\t * @returns {boolean}\n\t */\n\twpm.excludeDomainFromTracking = () => {\n\n\t\tconst excludedDomains = [\n\t\t\t\"appspot.com\",\n\t\t\t\"tranlsate.google.com\",\n\t\t]\n\n\t\t// Abort if URL contains excluded domains\n\t\tif (excludedDomains.some(domain => window.location.href.includes(domain))) {\n\t\t\t// console.log(\"Pixel Manager for WooCommerce: Aborted due to excluded domain\")\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\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(() => {\n\t\tconsole.log(\"Pixel Manager for WooCommerce: \" + (wpmDataLayer.version.pro ? \"Pro\" : \"Free\") + \" Version \" + wpmDataLayer.version.number + \" loaded\")\n\n\t if(wpm.excludeDomainFromTracking()) return\n\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t})\n\t.then(() => {\n\t\twpm.pageLoaded().then(function () {\n\t\t\tdocument.dispatchEvent(new Event(\"wpmLoad\"))\n\t\t})\n\t})\n\n\n/**\n * Run when page is ready\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(() => {\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\t// require(\"./wpm/wc_hooks\")\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(\"./wpm/event_listeners_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","doesUrlContainPatterns","exclusion_patterns","canIFire","loadFacebookPixel","event","payload","fbq","custom_data","eventID","event_id","error","console","setFbUserData","$","undefined","fbUserData","f","window","b","e","n","callMethod","apply","arguments","queue","push","_fbq","version","t","createElement","async","src","s","getElementsByTagName","parentNode","insertBefore","data","isFbpSet","getUserIdentifiersForFb","user","id","external_id","order","user_id","email","em","billing_email_hashed","first_name","fn","billing_first_name","toLowerCase","last_name","ln","billing_last_name","phone","ph","billing_phone","replace","city","ct","billing_city","state","st","billing_state","postcode","zp","billing_postcode","country","billing_country","getFbRandomEventId","Math","random","toString","substring","getFbUserData","getFbUserDataFromBrowser","getCookie","isValidFbp","fbp","isValidFbc","fbc","navigator","userAgent","client_user_agent","RegExp","test","fbGetProductDataForCapiEvent","product","content_type","content_name","name","content_ids","dyn_r_ids","dynamic_remarketing","id_type","value","parseFloat","quantity","price","currency","facebookContentIds","prodIds","key","item","Object","entries","items","general","variationsOutput","variation_id","String","products","trackCustomFacebookEvent","eventName","customData","eventId","trigger","event_name","user_data","event_source_url","location","href","fbGetContentIdsFromCart","cart","require","isEmptyObject","google","ads","conversionIds","status","googleConfigConditionsMet","isVariable","send_events_with_parent_ids","send_to","getGoogleAdsConversionIdentifiers","google_business_vertical","gtagLoaded","then","gtag","value_filtered","getGoogleAdsDynamicRemarketingOrderItems","getGoogleAdsConversionIdentifiersWithLabel","data_basic","data_with_cart","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","shop","list_position","ga4","measurement_id","getGA4OrderItems","item_name","item_category","item_id","item_variant","item_brand","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","debug_mode","isGoogleActive","getGoogleGtagId","loadScriptAndCacheIt","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","JSON","parse","decodeURI","indexOf","action","length","consents","statistics","marketing","thirdparty","advanced","localStorage","getItem","log","UC_UI","addEventListener","ucUiProcessConsent","areAllConsentsAccepted","groups","URLSearchParams","get","split","groupsObject","forEach","group","groupArray","groubsObject","pmw","consentAcceptAll","ucStatisticsSlug","getSettingsLabels","filter","label","slug","consentAdjustSelectively","getServicesBaseInfo","categorySlug","consent","setConsentDefaultValuesToExplicit","pixelName","canIFireMode","scriptTagObserver","MutationObserver","mutations","addedNodes","node","shouldScriptBeActive","unblockScript","blockScript","observe","head","childList","subtree","disconnect","some","element","scriptNode","removeAttach","remove","wpmSrc","attr","appendTo","dispatchEvent","Event","removeAttr","unblockAllScripts","unblockSelectedPixels","explicitConsentStateAlreadySet","Cookiebot","detail","cmplzStatusChange","cmplzConsentData","huObserver","querySelector","hu","documentElement","body","consentRevokeAll","OneTrust","reload","duration","consentSetCookie","setCookie","stringify","url","URL","currentTarget","productId","getProductIdByCartItemKeyUrl","removeProductFromCart","addToCartSelectors","addProductToCart","product_type","Number","val","each","index","find","classes","getPostIdFromString","one","target","closest","origin","searchParams","has","nextAll","getIdBasedOndVariationsOutputSetting","Error","getProductDetailsFormattedForEvent","checkoutButtonClasses","isEmail","fireCheckoutProgress","emailSelected","paymentMethodSelected","fireCheckoutOption","getCartItemsFromBackend","variation","triggerViewItemEventPrep","doesWooCommerceCartExist","getCartItems","productIds","getAddToCartLinkProductIds","getProductsFromBackend","referrer","referrerHostname","hostname","host","wpmLoadFired","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","acrRemoveCookie","hasLoginEventFired","setLoginEventFired","sessionStorage","sendEventPayloadToServer","getCartValue","search_string","getSearchTermFromUrl","wpmDeduper","wpmRestSettings","checkCookie","useRestEndpoint","isSessionStorageAvailable","isRestEndpointAvailable","isBelowRestErrorThreshold","testEndpoint","root","cookieName","response","fetch","method","cache","keepalive","setItem","isWpmRestEndpointAvailable","orderId","source","Storage","ids","expiresDate","setDate","getDate","toUTCString","storeOrderIdOnServer","orderDeduplication","quantityToRemove","isVariation","parentId","saveCartObjectToDataLayer","ajax_url","ok","json","success","headers","pageId","responseData","assign","cartObject","triggerViewItemEvent","triggerViewItemEventNoProduct","step","checkout_option","string","match","triggerViewItemList","viewItemListTriggerTestMode","css","append","viewItemListTrigger","opacity","backgroundColor","search","io","ioTimeouts","observerCallback","observer","entry","elementId","next","isIntersecting","testMode","repeat","unobserve","timeout","clearTimeout","allIoElementsToWatch","ioid","getAllElementsToWatch","map","i","elem","parent","hasClass","prev","this","startIntersectionObserverToWatch","urlHasParameter","IntersectionObserver","threshold","startProductsMutationObserverToWatch","productsNode","parents","first","productsMutationObserver","attributes","characterData","mutation","newNodes","hasWpmProductIdElement","siblings","cookieValue","expiryDays","d","setTime","getTime","expires","ca","decodeURIComponent","c","charAt","deleteCookie","getWpmSessionData","setWpmSessionData","order_id","cartItemKey","cartItemKeys","matches","position","parentId_dyn_r_ids","setReferrerToCookie","getReferrerFromCookie","getClidFromBrowser","clidCookieId","clidId","gclid","dclid","getUserAgent","getViewPort","width","max","clientWidth","innerWidth","height","clientHeight","innerHeight","options","dataType","ajax","getOrderItemPrice","total","total_tax","loginEventFired","wpmDataLayerExists","waitForVar","jQueryExists","waitForjQuery","pageLoaded","readyState","pageReady","isMiniCartActive","parameter","hashAsync","algo","str","crypto","subtle","digest","TextEncoder","encode","buf","Array","prototype","call","Uint8Array","x","slice","patterns","pattern","excludeDomainFromTracking","domain","pro","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__"],"sourceRoot":""}
languages/woocommerce-google-adwords-conversion-tracking-tag.pot CHANGED
@@ -2,14 +2,14 @@
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.25.1\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-10-25T02:51:18+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.7.1\n"
15
  "X-Domain: woocommerce-google-adwords-conversion-tracking-tag\n"
@@ -34,808 +34,858 @@ msgstr ""
34
  msgid "https://sweetcode.com"
35
  msgstr ""
36
 
37
- #: classes/admin/class-admin.php:331
38
- #: classes/admin/class-admin.php:332
 
 
 
 
39
  #: wgact.php:292
40
  #: wgact.php:293
41
  msgid "Pixel Manager"
42
  msgstr ""
43
 
44
- #: classes/admin/class-admin.php:372
45
  msgid "Main"
46
  msgstr ""
47
 
48
- #: classes/admin/class-admin.php:393
49
  msgid "Google"
50
  msgstr ""
51
 
52
- #: classes/admin/class-admin.php:416
53
  msgid "Google Ads Conversion ID"
54
  msgstr ""
55
 
56
- #: classes/admin/class-admin.php:428
57
  msgid "Google Ads Purchase Conversion Label"
58
  msgstr ""
59
 
60
- #: classes/admin/class-admin.php:439
61
  msgid "Google Analytics UA"
62
  msgstr ""
63
 
64
- #: classes/admin/class-admin.php:450
65
  msgid "Google Analytics 4"
66
  msgstr ""
67
 
68
- #: classes/admin/class-admin.php:461
69
  msgid "Google Optimize"
70
  msgstr ""
71
 
72
- #: classes/admin/class-admin.php:473
73
  msgid "Meta (Facebook)"
74
  msgstr ""
75
 
76
- #: classes/admin/class-admin.php:496
77
  msgid "Meta (Facebook) pixel ID"
78
  msgstr ""
79
 
80
- #: classes/admin/class-admin.php:508
81
  msgid "more pixels"
82
  msgstr ""
83
 
84
- #: classes/admin/class-admin.php:533
85
  msgid "Microsoft Advertising UET tag ID"
86
  msgstr ""
87
 
88
- #: classes/admin/class-admin.php:545
89
  msgid "Twitter pixel ID"
90
  msgstr ""
91
 
92
- #: classes/admin/class-admin.php:557
93
  msgid "Pinterest pixel ID"
94
  msgstr ""
95
 
96
- #: classes/admin/class-admin.php:569
97
  msgid "Pinterest Enhanced Match"
98
  msgstr ""
99
 
100
- #: classes/admin/class-admin.php:581
101
  msgid "Snapchat pixel ID"
102
  msgstr ""
103
 
104
- #: classes/admin/class-admin.php:593
105
  msgid "TikTok pixel ID"
106
  msgstr ""
107
 
108
- #: classes/admin/class-admin.php:606
109
  msgid "Hotjar site ID"
110
  msgstr ""
111
 
112
- #: classes/admin/class-admin.php:618
113
  msgid "Advanced"
114
  msgstr ""
115
 
116
- #: classes/admin/class-admin.php:669
117
  msgid "Order Total Logic"
118
  msgstr ""
119
 
120
- #: classes/admin/class-admin.php:681
121
  msgid "Order Duplication Prevention"
122
  msgstr ""
123
 
124
- #: classes/admin/class-admin.php:693
125
  msgid "Maximum Compatibility Mode"
126
  msgstr ""
127
 
128
- #: classes/admin/class-admin.php:707
129
  msgid "Disable Tracking for User Roles"
130
  msgstr ""
131
 
132
- #: classes/admin/class-admin.php:719
133
  msgid "ACR"
134
  msgstr ""
135
 
136
- #: classes/admin/class-admin.php:732
137
  msgid "Order List Info"
138
  msgstr ""
139
 
140
- #: classes/admin/class-admin.php:745
141
  msgid "Scroll Tracker"
142
  msgstr ""
143
 
144
- #: classes/admin/class-admin.php:779
145
  msgid "Conversion Cart Data"
146
  msgstr ""
147
 
148
- #: classes/admin/class-admin.php:792
149
  msgid "Enhanced E-Commerce"
150
  msgstr ""
151
 
152
- #: classes/admin/class-admin.php:804
153
  msgid "GA4 API secret"
154
  msgstr ""
155
 
156
- #: classes/admin/class-admin.php:841
 
 
 
 
 
 
 
 
157
  msgid "Enhanced Link Attribution"
158
  msgstr ""
159
 
160
- #: classes/admin/class-admin.php:854
161
  msgid "Google User ID"
162
  msgstr ""
163
 
164
- #: classes/admin/class-admin.php:866
165
  msgid "Google Ads Enhanced Conversions"
166
  msgstr ""
167
 
168
- #: classes/admin/class-admin.php:880
169
  msgid "Google Ads Phone Conversion Number"
170
  msgstr ""
171
 
172
- #: classes/admin/class-admin.php:892
173
  msgid "Google Ads Phone Conversion Label"
174
  msgstr ""
175
 
176
- #: classes/admin/class-admin.php:904
177
  msgid "Google Ads Conversion Adjustments: Conversion Name"
178
  msgstr ""
179
 
180
- #: classes/admin/class-admin.php:916
181
  msgid "Google Ads Conversion Adjustments: Feed"
182
  msgstr ""
183
 
184
- #: classes/admin/class-admin.php:929
185
  msgid "Cookie Consent Management"
186
  msgstr ""
187
 
188
- #: classes/admin/class-admin.php:952
189
  msgid "Google Consent Mode"
190
  msgstr ""
191
 
192
- #: classes/admin/class-admin.php:964
193
  msgid "Google Consent Regions"
194
  msgstr ""
195
 
196
- #: classes/admin/class-admin.php:976
197
  msgid "Explicit Consent Mode"
198
  msgstr ""
199
 
200
- #: classes/admin/class-admin.php:989
201
  msgid "Borlabs Cookie Support"
202
  msgstr ""
203
 
204
- #: classes/admin/class-admin.php:1003
205
  msgid "Cookiebot Support"
206
  msgstr ""
207
 
208
- #: classes/admin/class-admin.php:1017
209
  msgid "Complianz GDPR Support"
210
  msgstr ""
211
 
212
- #: classes/admin/class-admin.php:1031
213
  msgid "Cookie Notice Support"
214
  msgstr ""
215
 
216
- #: classes/admin/class-admin.php:1045
217
  msgid "Cookie Script Support"
218
  msgstr ""
219
 
220
- #: classes/admin/class-admin.php:1059
221
  msgid "GDPR Cookie Compliance Support"
222
  msgstr ""
223
 
224
- #: classes/admin/class-admin.php:1073
225
  msgid "GDPR Cookie Consent Support"
226
  msgstr ""
227
 
228
- #: classes/admin/class-admin.php:1106
229
  msgid "Meta (Facebook) CAPI: token"
230
  msgstr ""
231
 
232
- #: classes/admin/class-admin.php:1118
233
  msgid "Meta (Facebook) CAPI: test event code"
234
  msgstr ""
235
 
236
- #: classes/admin/class-admin.php:1130
237
  msgid "Meta (Facebook) CAPI: process anonymous hits"
238
  msgstr ""
239
 
240
- #: classes/admin/class-admin.php:1142
241
  msgid "Meta (Facebook) CAPI: send additional visitor identifiers"
242
  msgstr ""
243
 
244
- #: classes/admin/class-admin.php:1158
245
  msgid "Meta (Facebook) Microdata Tags for Catalogues"
246
  msgstr ""
247
 
248
- #: classes/admin/class-admin.php:1171
249
- #: classes/admin/class-admin.php:1184
250
- #: classes/admin/class-admin.php:1195
251
  msgid "Dynamic Remarketing"
252
  msgstr ""
253
 
254
- #: classes/admin/class-admin.php:1207
255
  msgid "Product Identifier"
256
  msgstr ""
257
 
258
- #: classes/admin/class-admin.php:1219
259
  msgid "Variations output"
260
  msgstr ""
261
 
262
- #: classes/admin/class-admin.php:1232
263
  msgid "Google Business Vertical"
264
  msgstr ""
265
 
266
- #: classes/admin/class-admin.php:1245
267
- #: classes/admin/class-admin.php:1254
268
  msgid "Diagnostics"
269
  msgstr ""
270
 
271
- #: classes/admin/class-admin.php:1262
272
- #: classes/admin/class-admin.php:1271
273
  msgid "Support"
274
  msgstr ""
275
 
276
- #: classes/admin/class-admin.php:1279
277
- #: classes/admin/class-admin.php:1289
278
  msgid "Author"
279
  msgstr ""
280
 
281
- #: classes/admin/class-admin.php:1336
282
  msgid ""
283
  "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"
284
  " In order for the plugin to work properly you need to disable the script blocker."
285
  msgstr ""
286
 
287
- #: classes/admin/class-admin.php:1343
288
  #: classes/admin/class-notifications.php:96
289
  #: classes/admin/class-notifications.php:146
290
  msgid "Learn more"
291
  msgstr ""
292
 
293
- #: classes/admin/class-admin.php:1387
294
  msgid "Profit Driven Marketing by SweetCode"
295
  msgstr ""
296
 
 
 
 
 
297
  #: classes/admin/class-admin.php:1412
 
 
 
 
298
  msgid "Visit us here:"
299
  msgstr ""
300
 
301
- #: classes/admin/class-admin.php:1458
302
  msgid "Payment Gateway Tracking Accuracy Report"
303
  msgstr ""
304
 
305
- #: classes/admin/class-admin.php:1459
306
- #: classes/admin/class-admin.php:3154
307
- #: classes/admin/class-admin.php:3162
308
  msgid "beta"
309
  msgstr ""
310
 
311
- #: classes/admin/class-admin.php:1463
312
  msgid "What's this? Follow this link to learn more"
313
  msgstr ""
314
 
315
- #: classes/admin/class-admin.php:1471
316
  msgid "Available payment gateways"
317
  msgstr ""
318
 
319
- #: classes/admin/class-admin.php:1478
320
  msgid "id"
321
  msgstr ""
322
 
323
- #: classes/admin/class-admin.php:1479
324
  msgid "method_title"
325
  msgstr ""
326
 
327
- #: classes/admin/class-admin.php:1480
328
  msgid "class"
329
  msgstr ""
330
 
331
- #: classes/admin/class-admin.php:1498
332
  msgid "Purchase confirmation page reached per gateway (active and inactive)"
333
  msgstr ""
334
 
335
- #: classes/admin/class-admin.php:1506
336
- #: classes/admin/class-admin.php:1555
337
- #: classes/admin/class-admin.php:1630
338
  msgid "The analysis is being generated. Please check back in 5 minutes."
339
  msgstr ""
340
 
341
- #: classes/admin/class-admin.php:1547
342
  msgid "Purchase confirmation page reached per gateway (only active), weighted by frequency"
343
  msgstr ""
344
 
345
- #: classes/admin/class-admin.php:1618
346
  msgid "Automatic Conversion Recovery (ACR)"
347
  msgstr ""
348
 
349
  #. translators: The number and percentage of orders that were recovered by the Automatic Conversion Recovery (ACR).
350
- #: classes/admin/class-admin.php:1706
351
  msgid "ACR recovered %1$s (%2$s%%) out of %3$s missing conversions."
352
  msgstr ""
353
 
354
- #: classes/admin/class-admin.php:1724
355
  msgid "This feature is only available in the pro version of the plugin. Follow the link to learn more about it:"
356
  msgstr ""
357
 
358
- #: classes/admin/class-admin.php:1726
359
  msgid "Get the pro version of the Pixel Manager for WooCommerce over here"
360
  msgstr ""
361
 
362
- #: classes/admin/class-admin.php:1728
363
  msgid "Go Pro"
364
  msgstr ""
365
 
366
- #: classes/admin/class-admin.php:1757
367
  msgid "Contacting Support"
368
  msgstr ""
369
 
370
- #: classes/admin/class-admin.php:1779
371
  msgid "Debug Information"
372
  msgstr ""
373
 
374
- #: classes/admin/class-admin.php:1788
375
  msgid "copy to clipboard"
376
  msgstr ""
377
 
378
- #: classes/admin/class-admin.php:1798
379
  msgid "Export settings"
380
  msgstr ""
381
 
382
- #: classes/admin/class-admin.php:1810
383
  msgid "Export to disk"
384
  msgstr ""
385
 
386
- #: classes/admin/class-admin.php:1819
387
  msgid "Import settings"
388
  msgstr ""
389
 
390
- #: classes/admin/class-admin.php:1824
 
391
  msgid "Settings imported successfully!"
392
  msgstr ""
393
 
394
- #: classes/admin/class-admin.php:1827
 
395
  msgid "Reloading...(in 5 seconds)!"
396
  msgstr ""
397
 
398
- #: classes/admin/class-admin.php:1833
 
399
  msgid "There was an error importing that file! Please try again."
400
  msgstr ""
401
 
402
- #: classes/admin/class-admin.php:1850
403
  msgid "Translations"
404
  msgstr ""
405
 
406
- #: classes/admin/class-admin.php:1851
407
  msgid "If you want to participate improving the translations of this plugin into your language, please follow this link:"
408
  msgstr ""
409
 
410
- #: classes/admin/class-admin.php:1869
411
  msgid "Post a support request in the WordPress support forum here: "
412
  msgstr ""
413
 
414
- #: classes/admin/class-admin.php:1872
415
  msgid "Support forum"
416
  msgstr ""
417
 
418
- #: classes/admin/class-admin.php:1876
419
  msgid "(Never post the debug or other sensitive information to the support forum. Instead send us the information by email.)"
420
  msgstr ""
421
 
422
- #: classes/admin/class-admin.php:1879
423
  msgid "Or send us an email to the following address: "
424
  msgstr ""
425
 
426
- #: classes/admin/class-admin.php:1895
427
  msgid "Send us your support request through the WooCommerce.com dashboard: "
428
  msgstr ""
429
 
430
- #: classes/admin/class-admin.php:1909
431
  msgid "More details about the developer of this plugin: "
432
  msgstr ""
433
 
434
- #: classes/admin/class-admin.php:1912
435
  msgid "Developer: SweetCode"
436
  msgstr ""
437
 
438
- #: classes/admin/class-admin.php:1914
439
  msgid "Website: "
440
  msgstr ""
441
 
442
- #: classes/admin/class-admin.php:1937
443
  msgid "The Google Analytics Universal property ID looks like this:"
444
  msgstr ""
445
 
446
- #: classes/admin/class-admin.php:1953
447
  msgid "The Google Analytics 4 measurement ID looks like this:"
448
  msgstr ""
449
 
450
- #: classes/admin/class-admin.php:1969
451
  msgid "The conversion ID looks similar to this:"
452
  msgstr ""
453
 
454
- #: classes/admin/class-admin.php:1985
455
  msgid "The purchase conversion label looks similar to this:"
456
  msgstr ""
457
 
458
- #: classes/admin/class-admin.php:1989
459
- #: classes/admin/class-admin.php:2976
460
  msgid "Requires an active Google Ads Conversion ID"
461
  msgstr ""
462
 
463
- #: classes/admin/class-admin.php:2007
464
  msgid "The Google Optimize container ID looks like this:"
465
  msgstr ""
466
 
467
- #: classes/admin/class-admin.php:2009
468
- #: classes/admin/class-admin.php:2204
469
  msgid "or"
470
  msgstr ""
471
 
472
- #: classes/admin/class-admin.php:2025
473
  msgid "The Meta (Facebook) pixel ID looks similar to this:"
474
  msgstr ""
475
 
476
- #: classes/admin/class-admin.php:2043
477
  msgid "The Microsoft Advertising UET tag ID looks similar to this:"
478
  msgstr ""
479
 
480
- #: classes/admin/class-admin.php:2062
481
  msgid "The Twitter pixel ID looks similar to this:"
482
  msgstr ""
483
 
484
- #: classes/admin/class-admin.php:2081
485
  msgid "The Pinterest pixel ID looks similar to this:"
486
  msgstr ""
487
 
488
- #: classes/admin/class-admin.php:2097
489
  msgid "Enable Pinterest enhanced match"
490
  msgstr ""
491
 
492
- #: classes/admin/class-admin.php:2123
493
  msgid "The Snapchat pixel ID looks similar to this:"
494
  msgstr ""
495
 
496
- #: classes/admin/class-admin.php:2144
497
  msgid "The TikTok pixel ID looks similar to this:"
498
  msgstr ""
499
 
500
- #: classes/admin/class-admin.php:2156
501
  msgid "The Hotjar site ID looks similar to this:"
502
  msgstr ""
503
 
504
- #: classes/admin/class-admin.php:2166
505
  msgid "Order Subtotal: Doesn't include tax and shipping (default)"
506
  msgstr ""
507
 
508
- #: classes/admin/class-admin.php:2174
509
  msgid "Order Total: Includes tax and shipping"
510
  msgstr ""
511
 
512
- #: classes/admin/class-admin.php:2188
513
  msgid "Profit Margin: Only reports the profit margin. Excludes tax, shipping, and where possible, gateway fees."
514
  msgstr ""
515
 
516
- #: classes/admin/class-admin.php:2196
517
  msgid "This is the order total amount reported back to the paid ads pixels (such as Google Ads, Facebook, etc.)"
518
  msgstr ""
519
 
520
- #: classes/admin/class-admin.php:2201
521
  msgid "To use the Profit Margin setting you will need to install one of the following two Cost of Goods plugins:"
522
  msgstr ""
523
 
524
- #: classes/admin/class-admin.php:2228
525
- #: classes/admin/class-admin.php:2238
526
  msgid "open the documentation"
527
  msgstr ""
528
 
529
- #: classes/admin/class-admin.php:2258
530
  msgid "Enable Google consent mode with standard settings"
531
  msgstr ""
532
 
533
- #: classes/admin/class-admin.php:2296
534
  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."
535
  msgstr ""
536
 
537
- #: classes/admin/class-admin.php:2304
538
  msgid "Google Analytics Enhanced E-Commerce is "
539
  msgstr ""
540
 
541
- #: classes/admin/class-admin.php:2327
542
  msgid "Google Analytics 4 activation required"
543
  msgstr ""
544
 
545
- #: classes/admin/class-admin.php:2330
546
  msgid "If enabled, purchase and refund events will be sent to Google through the measurement protocol for increased accuracy."
547
  msgstr ""
548
 
549
- #: classes/admin/class-admin.php:2377
550
- #: classes/admin/class-admin.php:2608
551
- msgid "The Conversion Name must be set."
552
  msgstr ""
553
 
554
- #: classes/admin/class-admin.php:2419
555
- msgid "Enable Google Analytics enhanced link attribution"
 
 
 
 
 
 
 
 
 
 
 
556
  msgstr ""
557
 
558
  #: classes/admin/class-admin.php:2435
559
- #: classes/admin/class-admin.php:2465
 
 
 
 
 
 
 
 
560
  msgid "You need to activate at least Google Analytics UA or Google Analytics 4"
561
  msgstr ""
562
 
563
- #: classes/admin/class-admin.php:2454
564
  msgid "Enable Google user ID"
565
  msgstr ""
566
 
567
- #: classes/admin/class-admin.php:2484
568
  msgid "Enable Google Ads Enhanced Conversions"
569
  msgstr ""
570
 
571
- #: classes/admin/class-admin.php:2495
572
  msgid "You need to activate Google Ads"
573
  msgstr ""
574
 
575
- #: classes/admin/class-admin.php:2515
576
  msgid "The Google Ads phone conversion number must be in the same format as on the website."
577
  msgstr ""
578
 
579
- #: classes/admin/class-admin.php:2551
580
  msgid "The conversion name must match the conversion name in Google Ads exactly."
581
  msgstr ""
582
 
583
- #: classes/admin/class-admin.php:2559
584
  msgid "Requires an active Google Ads Conversion ID and Conversion Label."
585
  msgstr ""
586
 
587
- #: classes/admin/class-admin.php:2616
 
 
 
 
588
  msgid "Borlabs Cookie detected. Automatic support is:"
589
  msgstr ""
590
 
591
- #: classes/admin/class-admin.php:2622
592
  msgid "Cookiebot detected. Automatic support is:"
593
  msgstr ""
594
 
595
- #: classes/admin/class-admin.php:2628
596
  msgid "Complianz GDPR detected. Automatic support is:"
597
  msgstr ""
598
 
599
- #: classes/admin/class-admin.php:2634
600
  msgid "Cookie Notice (by hu-manity.co) detected. Automatic support is:"
601
  msgstr ""
602
 
603
- #: classes/admin/class-admin.php:2640
604
  msgid "Cookie Script (by cookie-script.com) detected. Automatic support is:"
605
  msgstr ""
606
 
607
- #: classes/admin/class-admin.php:2646
608
  msgid "GDPR Cookie Compliance (by Moove Agency) detected. Automatic support is:"
609
  msgstr ""
610
 
611
- #: classes/admin/class-admin.php:2652
612
  msgid "GDPR Cookie Consent (by WebToffee) detected. Automatic support is:"
613
  msgstr ""
614
 
615
- #: classes/admin/class-admin.php:2671
616
  msgid "Enable Explicit Consent Mode"
617
  msgstr ""
618
 
619
- #: classes/admin/class-admin.php:2680
620
  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."
621
  msgstr ""
622
 
623
- #: classes/admin/class-admin.php:2699
624
  #: classes/admin/class-admin.php:2752
625
- #: classes/admin/class-admin.php:2781
626
- #: classes/admin/class-admin.php:2809
 
627
  msgid "You need to activate the Meta (Facebook) pixel"
628
  msgstr ""
629
 
630
- #: classes/admin/class-admin.php:2723
631
  msgid "The test event code automatically rotates frequently within Facebook. If you don't see the server events flowing in, first make sure that you've set the latest test event code."
632
  msgstr ""
633
 
634
- #: classes/admin/class-admin.php:2743
635
  msgid "Send CAPI hits for anonymous visitors who likely have blocked the Meta (Facebook) pixel."
636
  msgstr ""
637
 
638
- #: classes/admin/class-admin.php:2772
639
  msgid "Include additional visitor's identifiers, such as IP address, email and shop ID in the CAPI hit."
640
  msgstr ""
641
 
642
- #: classes/admin/class-admin.php:2800
643
  msgid "Enable Meta (Facebook) product microdata output"
644
  msgstr ""
645
 
646
- #: classes/admin/class-admin.php:2836
647
  msgid "Only disable order duplication prevention for testing. Remember to re-enable the setting once done."
648
  msgstr ""
649
 
650
- #: classes/admin/class-admin.php:2853
651
  msgid "Enable the maximum compatibility mode"
652
  msgstr ""
653
 
654
- #: classes/admin/class-admin.php:2888
655
  msgid "Automatic Conversion Recovery (ACR) is "
656
  msgstr ""
657
 
658
- #: classes/admin/class-admin.php:2906
659
  msgid "Display PMW related information on the order list page"
660
  msgstr ""
661
 
662
- #: classes/admin/class-admin.php:2928
663
  msgid "The Scroll Tracker thresholds. A comma separated list of scroll tracking thresholds in percent where the scroll tracker triggers its events."
664
  msgstr ""
665
 
666
- #: classes/admin/class-admin.php:2935
667
  msgid "Advanced order duplication prevention is "
668
  msgstr ""
669
 
670
- #: classes/admin/class-admin.php:2937
671
  msgid "Basic order duplication prevention is "
672
  msgstr ""
673
 
674
- #: classes/admin/class-admin.php:2961
675
  msgid "Enable dynamic remarketing audience collection"
676
  msgstr ""
677
 
678
- #: classes/admin/class-admin.php:2982
679
  msgid "You need to choose the correct product identifier setting in order to match the product identifiers in the product feeds."
680
  msgstr ""
681
 
682
- #: classes/admin/class-admin.php:3000
683
  msgid "Enable variations output"
684
  msgstr ""
685
 
686
- #: classes/admin/class-admin.php:3011
687
  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."
688
  msgstr ""
689
 
690
- #: classes/admin/class-admin.php:3026
691
  msgid "Retail"
692
  msgstr ""
693
 
694
- #: classes/admin/class-admin.php:3036
695
  msgid "Education"
696
  msgstr ""
697
 
698
- #: classes/admin/class-admin.php:3046
699
  msgid "Hotels and rentals"
700
  msgstr ""
701
 
702
- #: classes/admin/class-admin.php:3056
703
  msgid "Jobs"
704
  msgstr ""
705
 
706
- #: classes/admin/class-admin.php:3066
707
  msgid "Local deals"
708
  msgstr ""
709
 
710
- #: classes/admin/class-admin.php:3076
711
  msgid "Real estate"
712
  msgstr ""
713
 
714
- #: classes/admin/class-admin.php:3086
715
  msgid "Custom"
716
  msgstr ""
717
 
718
- #: classes/admin/class-admin.php:3105
719
  msgid "ID of your Google Merchant Center account. It looks like this: 12345678"
720
  msgstr ""
721
 
722
- #: classes/admin/class-admin.php:3114
723
  msgid "post ID (default)"
724
  msgstr ""
725
 
726
- #: classes/admin/class-admin.php:3120
727
  msgid "SKU"
728
  msgstr ""
729
 
730
- #: classes/admin/class-admin.php:3127
731
  msgid "ID for the WooCommerce Google Product Feed. Outputs the post ID with woocommerce_gpf_ prefix *"
732
  msgstr ""
733
 
734
- #: classes/admin/class-admin.php:3134
735
  msgid "ID for the WooCommerce Google Listings & Ads Plugin. Outputs the post ID with gla_ prefix **"
736
  msgstr ""
737
 
738
- #: classes/admin/class-admin.php:3138
739
  msgid "Choose a product identifier."
740
  msgstr ""
741
 
742
- #: classes/admin/class-admin.php:3141
743
  msgid "* This is for users of the WooCommerce Google Product Feed Plugin"
744
  msgstr ""
745
 
746
- #: classes/admin/class-admin.php:3145
747
  msgid "** This is for users of the WooCommerce Google Listings & Ads Plugin"
748
  msgstr ""
749
 
750
- #: classes/admin/class-admin.php:3168
751
- #: classes/admin/class-admin.php:3173
752
  msgid "active"
753
  msgstr ""
754
 
755
- #: classes/admin/class-admin.php:3178
756
- #: classes/admin/class-admin.php:3183
757
  msgid "inactive"
758
  msgstr ""
759
 
760
- #: classes/admin/class-admin.php:3188
761
- #: classes/admin/class-admin.php:3193
762
  msgid "partially active"
763
  msgstr ""
764
 
765
- #: classes/admin/class-admin.php:3204
766
  msgid "Pro Feature"
767
  msgstr ""
768
 
769
- #: classes/admin/class-admin.php:3236
770
  msgid "You have entered an invalid Google Analytics Universal property ID."
771
  msgstr ""
772
 
773
- #: classes/admin/class-admin.php:3244
774
  msgid "You have entered an invalid Google Analytics 4 measurement ID."
775
  msgstr ""
776
 
777
- #: classes/admin/class-admin.php:3252
778
  msgid "You have entered an invalid Google Analytics 4 API key."
779
  msgstr ""
780
 
781
- #: classes/admin/class-admin.php:3260
 
 
 
 
782
  msgid "You have entered an invalid conversion ID. It only contains 8 to 10 digits."
783
  msgstr ""
784
 
785
- #: classes/admin/class-admin.php:3268
786
- #: classes/admin/class-admin.php:3276
787
  msgid "You have entered an invalid conversion label."
788
  msgstr ""
789
 
790
- #: classes/admin/class-admin.php:3284
791
  msgid "You have entered an invalid merchant ID. It only contains 6 to 12 digits."
792
  msgstr ""
793
 
794
- #: classes/admin/class-admin.php:3292
795
  msgid "You have entered an invalid Google Optimize container ID."
796
  msgstr ""
797
 
798
- #: classes/admin/class-admin.php:3300
799
  msgid "You have entered an invalid Meta (Facebook) pixel ID. It only contains 14 to 16 digits."
800
  msgstr ""
801
 
802
- #: classes/admin/class-admin.php:3308
803
  msgid "You have entered an invalid Meta (Facebook) CAPI token."
804
  msgstr ""
805
 
806
- #: classes/admin/class-admin.php:3316
807
  msgid "You have entered an invalid Meta (Facebook) CAPI test_event_code."
808
  msgstr ""
809
 
810
- #: classes/admin/class-admin.php:3324
811
  msgid "You have entered an invalid Bing Ads UET tag ID. It only contains 7 to 9 digits."
812
  msgstr ""
813
 
814
- #: classes/admin/class-admin.php:3332
815
  msgid "You have entered an invalid Twitter pixel ID. It only contains 5 to 7 lowercase letters and numbers."
816
  msgstr ""
817
 
818
- #: classes/admin/class-admin.php:3340
819
  msgid "You have entered an invalid Pinterest pixel ID. It only contains 13 digits."
820
  msgstr ""
821
 
822
- #: classes/admin/class-admin.php:3348
823
  msgid "You have entered an invalid Snapchat pixel ID."
824
  msgstr ""
825
 
826
- #: classes/admin/class-admin.php:3356
827
  msgid "You have entered an invalid TikTok pixel ID."
828
  msgstr ""
829
 
830
- #: classes/admin/class-admin.php:3364
831
  msgid "You have entered an invalid Hotjar site ID. It only contains 6 to 9 digits."
832
  msgstr ""
833
 
834
- #: classes/admin/class-admin.php:3390
835
  msgid "You have entered the Scroll Tracker thresholds in the wrong format. It must be a list of comma separated percentages, like this \"25,50,75,100\""
836
  msgstr ""
837
 
838
- #: classes/admin/class-admin.php:3409
839
  msgid "You have entered an invalid conversion name. Special characters, quotes and single quotes are not allowed due to security reasons."
840
  msgstr ""
841
 
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.26.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-11-07T05:37:03+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.7.1\n"
15
  "X-Domain: woocommerce-google-adwords-conversion-tracking-tag\n"
34
  msgid "https://sweetcode.com"
35
  msgstr ""
36
 
37
+ #: classes/admin/class-admin.php:81
38
+ msgid "GA4 Attribution"
39
+ msgstr ""
40
+
41
+ #: classes/admin/class-admin.php:337
42
+ #: classes/admin/class-admin.php:338
43
  #: wgact.php:292
44
  #: wgact.php:293
45
  msgid "Pixel Manager"
46
  msgstr ""
47
 
48
+ #: classes/admin/class-admin.php:378
49
  msgid "Main"
50
  msgstr ""
51
 
52
+ #: classes/admin/class-admin.php:399
53
  msgid "Google"
54
  msgstr ""
55
 
56
+ #: classes/admin/class-admin.php:422
57
  msgid "Google Ads Conversion ID"
58
  msgstr ""
59
 
60
+ #: classes/admin/class-admin.php:434
61
  msgid "Google Ads Purchase Conversion Label"
62
  msgstr ""
63
 
64
+ #: classes/admin/class-admin.php:445
65
  msgid "Google Analytics UA"
66
  msgstr ""
67
 
68
+ #: classes/admin/class-admin.php:456
69
  msgid "Google Analytics 4"
70
  msgstr ""
71
 
72
+ #: classes/admin/class-admin.php:467
73
  msgid "Google Optimize"
74
  msgstr ""
75
 
76
+ #: classes/admin/class-admin.php:479
77
  msgid "Meta (Facebook)"
78
  msgstr ""
79
 
80
+ #: classes/admin/class-admin.php:502
81
  msgid "Meta (Facebook) pixel ID"
82
  msgstr ""
83
 
84
+ #: classes/admin/class-admin.php:514
85
  msgid "more pixels"
86
  msgstr ""
87
 
88
+ #: classes/admin/class-admin.php:539
89
  msgid "Microsoft Advertising UET tag ID"
90
  msgstr ""
91
 
92
+ #: classes/admin/class-admin.php:551
93
  msgid "Twitter pixel ID"
94
  msgstr ""
95
 
96
+ #: classes/admin/class-admin.php:563
97
  msgid "Pinterest pixel ID"
98
  msgstr ""
99
 
100
+ #: classes/admin/class-admin.php:575
101
  msgid "Pinterest Enhanced Match"
102
  msgstr ""
103
 
104
+ #: classes/admin/class-admin.php:587
105
  msgid "Snapchat pixel ID"
106
  msgstr ""
107
 
108
+ #: classes/admin/class-admin.php:599
109
  msgid "TikTok pixel ID"
110
  msgstr ""
111
 
112
+ #: classes/admin/class-admin.php:612
113
  msgid "Hotjar site ID"
114
  msgstr ""
115
 
116
+ #: classes/admin/class-admin.php:624
117
  msgid "Advanced"
118
  msgstr ""
119
 
120
+ #: classes/admin/class-admin.php:675
121
  msgid "Order Total Logic"
122
  msgstr ""
123
 
124
+ #: classes/admin/class-admin.php:687
125
  msgid "Order Duplication Prevention"
126
  msgstr ""
127
 
128
+ #: classes/admin/class-admin.php:699
129
  msgid "Maximum Compatibility Mode"
130
  msgstr ""
131
 
132
+ #: classes/admin/class-admin.php:713
133
  msgid "Disable Tracking for User Roles"
134
  msgstr ""
135
 
136
+ #: classes/admin/class-admin.php:725
137
  msgid "ACR"
138
  msgstr ""
139
 
140
+ #: classes/admin/class-admin.php:738
141
  msgid "Order List Info"
142
  msgstr ""
143
 
144
+ #: classes/admin/class-admin.php:751
145
  msgid "Scroll Tracker"
146
  msgstr ""
147
 
148
+ #: classes/admin/class-admin.php:785
149
  msgid "Conversion Cart Data"
150
  msgstr ""
151
 
152
+ #: classes/admin/class-admin.php:798
153
  msgid "Enhanced E-Commerce"
154
  msgstr ""
155
 
156
+ #: classes/admin/class-admin.php:810
157
  msgid "GA4 API secret"
158
  msgstr ""
159
 
160
+ #: classes/admin/class-admin.php:822
161
+ msgid "GA4 Property ID"
162
+ msgstr ""
163
+
164
+ #: classes/admin/class-admin.php:834
165
+ msgid "GA4 Data API Credentials"
166
+ msgstr ""
167
+
168
+ #: classes/admin/class-admin.php:847
169
  msgid "Enhanced Link Attribution"
170
  msgstr ""
171
 
172
+ #: classes/admin/class-admin.php:860
173
  msgid "Google User ID"
174
  msgstr ""
175
 
176
+ #: classes/admin/class-admin.php:872
177
  msgid "Google Ads Enhanced Conversions"
178
  msgstr ""
179
 
180
+ #: classes/admin/class-admin.php:886
181
  msgid "Google Ads Phone Conversion Number"
182
  msgstr ""
183
 
184
+ #: classes/admin/class-admin.php:898
185
  msgid "Google Ads Phone Conversion Label"
186
  msgstr ""
187
 
188
+ #: classes/admin/class-admin.php:910
189
  msgid "Google Ads Conversion Adjustments: Conversion Name"
190
  msgstr ""
191
 
192
+ #: classes/admin/class-admin.php:922
193
  msgid "Google Ads Conversion Adjustments: Feed"
194
  msgstr ""
195
 
196
+ #: classes/admin/class-admin.php:935
197
  msgid "Cookie Consent Management"
198
  msgstr ""
199
 
200
+ #: classes/admin/class-admin.php:958
201
  msgid "Google Consent Mode"
202
  msgstr ""
203
 
204
+ #: classes/admin/class-admin.php:970
205
  msgid "Google Consent Regions"
206
  msgstr ""
207
 
208
+ #: classes/admin/class-admin.php:982
209
  msgid "Explicit Consent Mode"
210
  msgstr ""
211
 
212
+ #: classes/admin/class-admin.php:995
213
  msgid "Borlabs Cookie Support"
214
  msgstr ""
215
 
216
+ #: classes/admin/class-admin.php:1009
217
  msgid "Cookiebot Support"
218
  msgstr ""
219
 
220
+ #: classes/admin/class-admin.php:1023
221
  msgid "Complianz GDPR Support"
222
  msgstr ""
223
 
224
+ #: classes/admin/class-admin.php:1037
225
  msgid "Cookie Notice Support"
226
  msgstr ""
227
 
228
+ #: classes/admin/class-admin.php:1051
229
  msgid "Cookie Script Support"
230
  msgstr ""
231
 
232
+ #: classes/admin/class-admin.php:1065
233
  msgid "GDPR Cookie Compliance Support"
234
  msgstr ""
235
 
236
+ #: classes/admin/class-admin.php:1079
237
  msgid "GDPR Cookie Consent Support"
238
  msgstr ""
239
 
240
+ #: classes/admin/class-admin.php:1112
241
  msgid "Meta (Facebook) CAPI: token"
242
  msgstr ""
243
 
244
+ #: classes/admin/class-admin.php:1124
245
  msgid "Meta (Facebook) CAPI: test event code"
246
  msgstr ""
247
 
248
+ #: classes/admin/class-admin.php:1136
249
  msgid "Meta (Facebook) CAPI: process anonymous hits"
250
  msgstr ""
251
 
252
+ #: classes/admin/class-admin.php:1148
253
  msgid "Meta (Facebook) CAPI: send additional visitor identifiers"
254
  msgstr ""
255
 
256
+ #: classes/admin/class-admin.php:1164
257
  msgid "Meta (Facebook) Microdata Tags for Catalogues"
258
  msgstr ""
259
 
260
+ #: classes/admin/class-admin.php:1177
261
+ #: classes/admin/class-admin.php:1190
262
+ #: classes/admin/class-admin.php:1201
263
  msgid "Dynamic Remarketing"
264
  msgstr ""
265
 
266
+ #: classes/admin/class-admin.php:1213
267
  msgid "Product Identifier"
268
  msgstr ""
269
 
270
+ #: classes/admin/class-admin.php:1225
271
  msgid "Variations output"
272
  msgstr ""
273
 
274
+ #: classes/admin/class-admin.php:1238
275
  msgid "Google Business Vertical"
276
  msgstr ""
277
 
278
+ #: classes/admin/class-admin.php:1251
279
+ #: classes/admin/class-admin.php:1260
280
  msgid "Diagnostics"
281
  msgstr ""
282
 
283
+ #: classes/admin/class-admin.php:1268
284
+ #: classes/admin/class-admin.php:1277
285
  msgid "Support"
286
  msgstr ""
287
 
288
+ #: classes/admin/class-admin.php:1285
289
+ #: classes/admin/class-admin.php:1295
290
  msgid "Author"
291
  msgstr ""
292
 
293
+ #: classes/admin/class-admin.php:1342
294
  msgid ""
295
  "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"
296
  " In order for the plugin to work properly you need to disable the script blocker."
297
  msgstr ""
298
 
299
+ #: classes/admin/class-admin.php:1349
300
  #: classes/admin/class-notifications.php:96
301
  #: classes/admin/class-notifications.php:146
302
  msgid "Learn more"
303
  msgstr ""
304
 
305
+ #: classes/admin/class-admin.php:1392
306
  msgid "Profit Driven Marketing by SweetCode"
307
  msgstr ""
308
 
309
+ #: classes/admin/class-admin.php:1399
310
+ msgid "Show Pro version settings"
311
+ msgstr ""
312
+
313
  #: classes/admin/class-admin.php:1412
314
+ msgid "Enabling this will only show you the pro settings in the user interface. It won't actually enable the pro features. If you want to try out the pro features head over to sweetcode.com and sign up for a trial."
315
+ msgstr ""
316
+
317
+ #: classes/admin/class-admin.php:1418
318
  msgid "Visit us here:"
319
  msgstr ""
320
 
321
+ #: classes/admin/class-admin.php:1464
322
  msgid "Payment Gateway Tracking Accuracy Report"
323
  msgstr ""
324
 
325
+ #: classes/admin/class-admin.php:1465
326
+ #: classes/admin/class-admin.php:3207
327
+ #: classes/admin/class-admin.php:3215
328
  msgid "beta"
329
  msgstr ""
330
 
331
+ #: classes/admin/class-admin.php:1469
332
  msgid "What's this? Follow this link to learn more"
333
  msgstr ""
334
 
335
+ #: classes/admin/class-admin.php:1477
336
  msgid "Available payment gateways"
337
  msgstr ""
338
 
339
+ #: classes/admin/class-admin.php:1484
340
  msgid "id"
341
  msgstr ""
342
 
343
+ #: classes/admin/class-admin.php:1485
344
  msgid "method_title"
345
  msgstr ""
346
 
347
+ #: classes/admin/class-admin.php:1486
348
  msgid "class"
349
  msgstr ""
350
 
351
+ #: classes/admin/class-admin.php:1504
352
  msgid "Purchase confirmation page reached per gateway (active and inactive)"
353
  msgstr ""
354
 
355
+ #: classes/admin/class-admin.php:1512
356
+ #: classes/admin/class-admin.php:1561
357
+ #: classes/admin/class-admin.php:1636
358
  msgid "The analysis is being generated. Please check back in 5 minutes."
359
  msgstr ""
360
 
361
+ #: classes/admin/class-admin.php:1553
362
  msgid "Purchase confirmation page reached per gateway (only active), weighted by frequency"
363
  msgstr ""
364
 
365
+ #: classes/admin/class-admin.php:1624
366
  msgid "Automatic Conversion Recovery (ACR)"
367
  msgstr ""
368
 
369
  #. translators: The number and percentage of orders that were recovered by the Automatic Conversion Recovery (ACR).
370
+ #: classes/admin/class-admin.php:1712
371
  msgid "ACR recovered %1$s (%2$s%%) out of %3$s missing conversions."
372
  msgstr ""
373
 
374
+ #: classes/admin/class-admin.php:1730
375
  msgid "This feature is only available in the pro version of the plugin. Follow the link to learn more about it:"
376
  msgstr ""
377
 
378
+ #: classes/admin/class-admin.php:1732
379
  msgid "Get the pro version of the Pixel Manager for WooCommerce over here"
380
  msgstr ""
381
 
382
+ #: classes/admin/class-admin.php:1734
383
  msgid "Go Pro"
384
  msgstr ""
385
 
386
+ #: classes/admin/class-admin.php:1763
387
  msgid "Contacting Support"
388
  msgstr ""
389
 
390
+ #: classes/admin/class-admin.php:1785
391
  msgid "Debug Information"
392
  msgstr ""
393
 
394
+ #: classes/admin/class-admin.php:1794
395
  msgid "copy to clipboard"
396
  msgstr ""
397
 
398
+ #: classes/admin/class-admin.php:1804
399
  msgid "Export settings"
400
  msgstr ""
401
 
402
+ #: classes/admin/class-admin.php:1816
403
  msgid "Export to disk"
404
  msgstr ""
405
 
406
+ #: classes/admin/class-admin.php:1825
407
  msgid "Import settings"
408
  msgstr ""
409
 
410
+ #: classes/admin/class-admin.php:1830
411
+ #: classes/admin/class-admin.php:2442
412
  msgid "Settings imported successfully!"
413
  msgstr ""
414
 
415
+ #: classes/admin/class-admin.php:1833
416
+ #: classes/admin/class-admin.php:2445
417
  msgid "Reloading...(in 5 seconds)!"
418
  msgstr ""
419
 
420
+ #: classes/admin/class-admin.php:1839
421
+ #: classes/admin/class-admin.php:2451
422
  msgid "There was an error importing that file! Please try again."
423
  msgstr ""
424
 
425
+ #: classes/admin/class-admin.php:1856
426
  msgid "Translations"
427
  msgstr ""
428
 
429
+ #: classes/admin/class-admin.php:1857
430
  msgid "If you want to participate improving the translations of this plugin into your language, please follow this link:"
431
  msgstr ""
432
 
433
+ #: classes/admin/class-admin.php:1875
434
  msgid "Post a support request in the WordPress support forum here: "
435
  msgstr ""
436
 
437
+ #: classes/admin/class-admin.php:1878
438
  msgid "Support forum"
439
  msgstr ""
440
 
441
+ #: classes/admin/class-admin.php:1882
442
  msgid "(Never post the debug or other sensitive information to the support forum. Instead send us the information by email.)"
443
  msgstr ""
444
 
445
+ #: classes/admin/class-admin.php:1885
446
  msgid "Or send us an email to the following address: "
447
  msgstr ""
448
 
449
+ #: classes/admin/class-admin.php:1901
450
  msgid "Send us your support request through the WooCommerce.com dashboard: "
451
  msgstr ""
452
 
453
+ #: classes/admin/class-admin.php:1915
454
  msgid "More details about the developer of this plugin: "
455
  msgstr ""
456
 
457
+ #: classes/admin/class-admin.php:1918
458
  msgid "Developer: SweetCode"
459
  msgstr ""
460
 
461
+ #: classes/admin/class-admin.php:1920
462
  msgid "Website: "
463
  msgstr ""
464
 
465
+ #: classes/admin/class-admin.php:1943
466
  msgid "The Google Analytics Universal property ID looks like this:"
467
  msgstr ""
468
 
469
+ #: classes/admin/class-admin.php:1959
470
  msgid "The Google Analytics 4 measurement ID looks like this:"
471
  msgstr ""
472
 
473
+ #: classes/admin/class-admin.php:1975
474
  msgid "The conversion ID looks similar to this:"
475
  msgstr ""
476
 
477
+ #: classes/admin/class-admin.php:1991
478
  msgid "The purchase conversion label looks similar to this:"
479
  msgstr ""
480
 
481
+ #: classes/admin/class-admin.php:1995
482
+ #: classes/admin/class-admin.php:3029
483
  msgid "Requires an active Google Ads Conversion ID"
484
  msgstr ""
485
 
486
+ #: classes/admin/class-admin.php:2013
487
  msgid "The Google Optimize container ID looks like this:"
488
  msgstr ""
489
 
490
+ #: classes/admin/class-admin.php:2015
491
+ #: classes/admin/class-admin.php:2210
492
  msgid "or"
493
  msgstr ""
494
 
495
+ #: classes/admin/class-admin.php:2031
496
  msgid "The Meta (Facebook) pixel ID looks similar to this:"
497
  msgstr ""
498
 
499
+ #: classes/admin/class-admin.php:2049
500
  msgid "The Microsoft Advertising UET tag ID looks similar to this:"
501
  msgstr ""
502
 
503
+ #: classes/admin/class-admin.php:2068
504
  msgid "The Twitter pixel ID looks similar to this:"
505
  msgstr ""
506
 
507
+ #: classes/admin/class-admin.php:2087
508
  msgid "The Pinterest pixel ID looks similar to this:"
509
  msgstr ""
510
 
511
+ #: classes/admin/class-admin.php:2103
512
  msgid "Enable Pinterest enhanced match"
513
  msgstr ""
514
 
515
+ #: classes/admin/class-admin.php:2129
516
  msgid "The Snapchat pixel ID looks similar to this:"
517
  msgstr ""
518
 
519
+ #: classes/admin/class-admin.php:2150
520
  msgid "The TikTok pixel ID looks similar to this:"
521
  msgstr ""
522
 
523
+ #: classes/admin/class-admin.php:2162
524
  msgid "The Hotjar site ID looks similar to this:"
525
  msgstr ""
526
 
527
+ #: classes/admin/class-admin.php:2172
528
  msgid "Order Subtotal: Doesn't include tax and shipping (default)"
529
  msgstr ""
530
 
531
+ #: classes/admin/class-admin.php:2180
532
  msgid "Order Total: Includes tax and shipping"
533
  msgstr ""
534
 
535
+ #: classes/admin/class-admin.php:2194
536
  msgid "Profit Margin: Only reports the profit margin. Excludes tax, shipping, and where possible, gateway fees."
537
  msgstr ""
538
 
539
+ #: classes/admin/class-admin.php:2202
540
  msgid "This is the order total amount reported back to the paid ads pixels (such as Google Ads, Facebook, etc.)"
541
  msgstr ""
542
 
543
+ #: classes/admin/class-admin.php:2207
544
  msgid "To use the Profit Margin setting you will need to install one of the following two Cost of Goods plugins:"
545
  msgstr ""
546
 
547
+ #: classes/admin/class-admin.php:2234
548
+ #: classes/admin/class-admin.php:2244
549
  msgid "open the documentation"
550
  msgstr ""
551
 
552
+ #: classes/admin/class-admin.php:2264
553
  msgid "Enable Google consent mode with standard settings"
554
  msgstr ""
555
 
556
+ #: classes/admin/class-admin.php:2302
557
  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."
558
  msgstr ""
559
 
560
+ #: classes/admin/class-admin.php:2310
561
  msgid "Google Analytics Enhanced E-Commerce is "
562
  msgstr ""
563
 
564
+ #: classes/admin/class-admin.php:2333
565
  msgid "Google Analytics 4 activation required"
566
  msgstr ""
567
 
568
+ #: classes/admin/class-admin.php:2336
569
  msgid "If enabled, purchase and refund events will be sent to Google through the measurement protocol for increased accuracy."
570
  msgstr ""
571
 
572
+ #: classes/admin/class-admin.php:2386
573
+ #: classes/admin/class-admin.php:2641
574
+ msgid "Copied feed URL to clipboard"
575
  msgstr ""
576
 
577
+ #: classes/admin/class-admin.php:2391
578
+ #: classes/admin/class-admin.php:2399
579
+ #: classes/admin/class-admin.php:2646
580
+ #: classes/admin/class-admin.php:2653
581
+ msgid "Copy to clipboard"
582
+ msgstr ""
583
+
584
+ #: classes/admin/class-admin.php:2413
585
+ msgid "Import credentials"
586
+ msgstr ""
587
+
588
+ #: classes/admin/class-admin.php:2424
589
+ msgid "Delete credentials"
590
  msgstr ""
591
 
592
  #: classes/admin/class-admin.php:2435
593
+ msgid "The GA4 property ID must be set."
594
+ msgstr ""
595
+
596
+ #: classes/admin/class-admin.php:2471
597
+ msgid "Enable Google Analytics enhanced link attribution"
598
+ msgstr ""
599
+
600
+ #: classes/admin/class-admin.php:2487
601
+ #: classes/admin/class-admin.php:2517
602
  msgid "You need to activate at least Google Analytics UA or Google Analytics 4"
603
  msgstr ""
604
 
605
+ #: classes/admin/class-admin.php:2506
606
  msgid "Enable Google user ID"
607
  msgstr ""
608
 
609
+ #: classes/admin/class-admin.php:2536
610
  msgid "Enable Google Ads Enhanced Conversions"
611
  msgstr ""
612
 
613
+ #: classes/admin/class-admin.php:2547
614
  msgid "You need to activate Google Ads"
615
  msgstr ""
616
 
617
+ #: classes/admin/class-admin.php:2567
618
  msgid "The Google Ads phone conversion number must be in the same format as on the website."
619
  msgstr ""
620
 
621
+ #: classes/admin/class-admin.php:2603
622
  msgid "The conversion name must match the conversion name in Google Ads exactly."
623
  msgstr ""
624
 
625
+ #: classes/admin/class-admin.php:2611
626
  msgid "Requires an active Google Ads Conversion ID and Conversion Label."
627
  msgstr ""
628
 
629
+ #: classes/admin/class-admin.php:2661
630
+ msgid "The Conversion Name must be set."
631
+ msgstr ""
632
+
633
+ #: classes/admin/class-admin.php:2669
634
  msgid "Borlabs Cookie detected. Automatic support is:"
635
  msgstr ""
636
 
637
+ #: classes/admin/class-admin.php:2675
638
  msgid "Cookiebot detected. Automatic support is:"
639
  msgstr ""
640
 
641
+ #: classes/admin/class-admin.php:2681
642
  msgid "Complianz GDPR detected. Automatic support is:"
643
  msgstr ""
644
 
645
+ #: classes/admin/class-admin.php:2687
646
  msgid "Cookie Notice (by hu-manity.co) detected. Automatic support is:"
647
  msgstr ""
648
 
649
+ #: classes/admin/class-admin.php:2693
650
  msgid "Cookie Script (by cookie-script.com) detected. Automatic support is:"
651
  msgstr ""
652
 
653
+ #: classes/admin/class-admin.php:2699
654
  msgid "GDPR Cookie Compliance (by Moove Agency) detected. Automatic support is:"
655
  msgstr ""
656
 
657
+ #: classes/admin/class-admin.php:2705
658
  msgid "GDPR Cookie Consent (by WebToffee) detected. Automatic support is:"
659
  msgstr ""
660
 
661
+ #: classes/admin/class-admin.php:2724
662
  msgid "Enable Explicit Consent Mode"
663
  msgstr ""
664
 
665
+ #: classes/admin/class-admin.php:2733
666
  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."
667
  msgstr ""
668
 
 
669
  #: classes/admin/class-admin.php:2752
670
+ #: classes/admin/class-admin.php:2805
671
+ #: classes/admin/class-admin.php:2834
672
+ #: classes/admin/class-admin.php:2862
673
  msgid "You need to activate the Meta (Facebook) pixel"
674
  msgstr ""
675
 
676
+ #: classes/admin/class-admin.php:2776
677
  msgid "The test event code automatically rotates frequently within Facebook. If you don't see the server events flowing in, first make sure that you've set the latest test event code."
678
  msgstr ""
679
 
680
+ #: classes/admin/class-admin.php:2796
681
  msgid "Send CAPI hits for anonymous visitors who likely have blocked the Meta (Facebook) pixel."
682
  msgstr ""
683
 
684
+ #: classes/admin/class-admin.php:2825
685
  msgid "Include additional visitor's identifiers, such as IP address, email and shop ID in the CAPI hit."
686
  msgstr ""
687
 
688
+ #: classes/admin/class-admin.php:2853
689
  msgid "Enable Meta (Facebook) product microdata output"
690
  msgstr ""
691
 
692
+ #: classes/admin/class-admin.php:2889
693
  msgid "Only disable order duplication prevention for testing. Remember to re-enable the setting once done."
694
  msgstr ""
695
 
696
+ #: classes/admin/class-admin.php:2906
697
  msgid "Enable the maximum compatibility mode"
698
  msgstr ""
699
 
700
+ #: classes/admin/class-admin.php:2941
701
  msgid "Automatic Conversion Recovery (ACR) is "
702
  msgstr ""
703
 
704
+ #: classes/admin/class-admin.php:2959
705
  msgid "Display PMW related information on the order list page"
706
  msgstr ""
707
 
708
+ #: classes/admin/class-admin.php:2981
709
  msgid "The Scroll Tracker thresholds. A comma separated list of scroll tracking thresholds in percent where the scroll tracker triggers its events."
710
  msgstr ""
711
 
712
+ #: classes/admin/class-admin.php:2988
713
  msgid "Advanced order duplication prevention is "
714
  msgstr ""
715
 
716
+ #: classes/admin/class-admin.php:2990
717
  msgid "Basic order duplication prevention is "
718
  msgstr ""
719
 
720
+ #: classes/admin/class-admin.php:3014
721
  msgid "Enable dynamic remarketing audience collection"
722
  msgstr ""
723
 
724
+ #: classes/admin/class-admin.php:3035
725
  msgid "You need to choose the correct product identifier setting in order to match the product identifiers in the product feeds."
726
  msgstr ""
727
 
728
+ #: classes/admin/class-admin.php:3053
729
  msgid "Enable variations output"
730
  msgstr ""
731
 
732
+ #: classes/admin/class-admin.php:3064
733
  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."
734
  msgstr ""
735
 
736
+ #: classes/admin/class-admin.php:3079
737
  msgid "Retail"
738
  msgstr ""
739
 
740
+ #: classes/admin/class-admin.php:3089
741
  msgid "Education"
742
  msgstr ""
743
 
744
+ #: classes/admin/class-admin.php:3099
745
  msgid "Hotels and rentals"
746
  msgstr ""
747
 
748
+ #: classes/admin/class-admin.php:3109
749
  msgid "Jobs"
750
  msgstr ""
751
 
752
+ #: classes/admin/class-admin.php:3119
753
  msgid "Local deals"
754
  msgstr ""
755
 
756
+ #: classes/admin/class-admin.php:3129
757
  msgid "Real estate"
758
  msgstr ""
759
 
760
+ #: classes/admin/class-admin.php:3139
761
  msgid "Custom"
762
  msgstr ""
763
 
764
+ #: classes/admin/class-admin.php:3158
765
  msgid "ID of your Google Merchant Center account. It looks like this: 12345678"
766
  msgstr ""
767
 
768
+ #: classes/admin/class-admin.php:3167
769
  msgid "post ID (default)"
770
  msgstr ""
771
 
772
+ #: classes/admin/class-admin.php:3173
773
  msgid "SKU"
774
  msgstr ""
775
 
776
+ #: classes/admin/class-admin.php:3180
777
  msgid "ID for the WooCommerce Google Product Feed. Outputs the post ID with woocommerce_gpf_ prefix *"
778
  msgstr ""
779
 
780
+ #: classes/admin/class-admin.php:3187
781
  msgid "ID for the WooCommerce Google Listings & Ads Plugin. Outputs the post ID with gla_ prefix **"
782
  msgstr ""
783
 
784
+ #: classes/admin/class-admin.php:3191
785
  msgid "Choose a product identifier."
786
  msgstr ""
787
 
788
+ #: classes/admin/class-admin.php:3194
789
  msgid "* This is for users of the WooCommerce Google Product Feed Plugin"
790
  msgstr ""
791
 
792
+ #: classes/admin/class-admin.php:3198
793
  msgid "** This is for users of the WooCommerce Google Listings & Ads Plugin"
794
  msgstr ""
795
 
796
+ #: classes/admin/class-admin.php:3221
797
+ #: classes/admin/class-admin.php:3226
798
  msgid "active"
799
  msgstr ""
800
 
801
+ #: classes/admin/class-admin.php:3231
802
+ #: classes/admin/class-admin.php:3236
803
  msgid "inactive"
804
  msgstr ""
805
 
806
+ #: classes/admin/class-admin.php:3241
807
+ #: classes/admin/class-admin.php:3246
808
  msgid "partially active"
809
  msgstr ""
810
 
811
+ #: classes/admin/class-admin.php:3257
812
  msgid "Pro Feature"
813
  msgstr ""
814
 
815
+ #: classes/admin/class-admin.php:3289
816
  msgid "You have entered an invalid Google Analytics Universal property ID."
817
  msgstr ""
818
 
819
+ #: classes/admin/class-admin.php:3297
820
  msgid "You have entered an invalid Google Analytics 4 measurement ID."
821
  msgstr ""
822
 
823
+ #: classes/admin/class-admin.php:3305
824
  msgid "You have entered an invalid Google Analytics 4 API key."
825
  msgstr ""
826
 
827
+ #: classes/admin/class-admin.php:3313
828
+ msgid "You have entered an invalid Google Analytics 4 property ID."
829
+ msgstr ""
830
+
831
+ #: classes/admin/class-admin.php:3321
832
  msgid "You have entered an invalid conversion ID. It only contains 8 to 10 digits."
833
  msgstr ""
834
 
835
+ #: classes/admin/class-admin.php:3329
836
+ #: classes/admin/class-admin.php:3337
837
  msgid "You have entered an invalid conversion label."
838
  msgstr ""
839
 
840
+ #: classes/admin/class-admin.php:3345
841
  msgid "You have entered an invalid merchant ID. It only contains 6 to 12 digits."
842
  msgstr ""
843
 
844
+ #: classes/admin/class-admin.php:3353
845
  msgid "You have entered an invalid Google Optimize container ID."
846
  msgstr ""
847
 
848
+ #: classes/admin/class-admin.php:3361
849
  msgid "You have entered an invalid Meta (Facebook) pixel ID. It only contains 14 to 16 digits."
850
  msgstr ""
851
 
852
+ #: classes/admin/class-admin.php:3369
853
  msgid "You have entered an invalid Meta (Facebook) CAPI token."
854
  msgstr ""
855
 
856
+ #: classes/admin/class-admin.php:3377
857
  msgid "You have entered an invalid Meta (Facebook) CAPI test_event_code."
858
  msgstr ""
859
 
860
+ #: classes/admin/class-admin.php:3385
861
  msgid "You have entered an invalid Bing Ads UET tag ID. It only contains 7 to 9 digits."
862
  msgstr ""
863
 
864
+ #: classes/admin/class-admin.php:3393
865
  msgid "You have entered an invalid Twitter pixel ID. It only contains 5 to 7 lowercase letters and numbers."
866
  msgstr ""
867
 
868
+ #: classes/admin/class-admin.php:3401
869
  msgid "You have entered an invalid Pinterest pixel ID. It only contains 13 digits."
870
  msgstr ""
871
 
872
+ #: classes/admin/class-admin.php:3409
873
  msgid "You have entered an invalid Snapchat pixel ID."
874
  msgstr ""
875
 
876
+ #: classes/admin/class-admin.php:3417
877
  msgid "You have entered an invalid TikTok pixel ID."
878
  msgstr ""
879
 
880
+ #: classes/admin/class-admin.php:3425
881
  msgid "You have entered an invalid Hotjar site ID. It only contains 6 to 9 digits."
882
  msgstr ""
883
 
884
+ #: classes/admin/class-admin.php:3451
885
  msgid "You have entered the Scroll Tracker thresholds in the wrong format. It must be a list of comma separated percentages, like this \"25,50,75,100\""
886
  msgstr ""
887
 
888
+ #: classes/admin/class-admin.php:3470
889
  msgid "You have entered an invalid conversion name. Special characters, quotes and single quotes are not allowed due to security reasons."
890
  msgstr ""
891
 
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: alekv, wolfbaer
3
  Tags: woocommerce, google analytics, google ads, facebook, conversion tracking, retargeting, remarketing, meta, capi, tiktok, microsoft ads, bing
4
  Requires at least: 3.7
5
- Tested up to: 6.0
6
  Requires PHP: 7.3
7
- Stable tag: 1.25.1
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -110,7 +110,7 @@ Are you interested in buying the [Pro version](https://sweetcode.com)? Come and
110
 
111
  The Pixel Manager is ready for the new WooCommerce [High Performance Orders Storage (HPOS)](https://developer.woocommerce.com/2022/09/14/high-performance-order-storage-progress-report/) feature.
112
 
113
- It is also compatible the following third-party plugins:
114
 
115
  * CartFlows
116
  * Cost of Goods for WooCommerce (WPFactory)
@@ -220,6 +220,20 @@ You can send the link to the front page of your shop too if you think it would b
220
 
221
  == Changelog ==
222
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
223
  = 1.25.1 = 25.10.2022
224
 
225
 
2
  Contributors: alekv, wolfbaer
3
  Tags: woocommerce, google analytics, google ads, facebook, conversion tracking, retargeting, remarketing, meta, capi, tiktok, microsoft ads, bing
4
  Requires at least: 3.7
5
+ Tested up to: 6.1
6
  Requires PHP: 7.3
7
+ Stable tag: 1.26.0
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
110
 
111
  The Pixel Manager is ready for the new WooCommerce [High Performance Orders Storage (HPOS)](https://developer.woocommerce.com/2022/09/14/high-performance-order-storage-progress-report/) feature.
112
 
113
+ It is also compatible with the following third-party plugins:
114
 
115
  * CartFlows
116
  * Cost of Goods for WooCommerce (WPFactory)
220
 
221
  == Changelog ==
222
 
223
+ = 1.26.0 = 07.11.2022
224
+
225
+
226
+
227
+ * Tweak: Added tracking exclusion patterns for Facebook.
228
+ * Tweak: Added filter that enables shop managers to add more tracking exclusion patterns for Facebook.
229
+ * Tweak: Added exclusion for tracking over gtm-msr.appspot.com
230
+ * Tweak: Added new text for pro features demo, so that is clear no pro features are enabled with this.
231
+ * Tweak: Added a filter to decode HTML entities in the product names before output into the data layer.
232
+ * Tweak: Implemented transient caching for volatile products.
233
+ * Tweak: Use a different approach to attach event listeners to events like add-to-cart to increase compatibility with themes that prevent event propagation.
234
+
235
+ * Fix: Fixed a bug which would overwrite the data layer if products are added to it above the pmw main script.
236
+
237
  = 1.25.1 = 25.10.2022
238
 
239
 
vendor/freemius/wordpress-sdk/assets/img/woocommerce-google-adwords-conversion-tracking-tag.png ADDED
Binary file
wgact.php CHANGED
@@ -10,16 +10,16 @@
10
  * Developer URI: https://sweetcode.com
11
  * Text Domain: woocommerce-google-adwords-conversion-tracking-tag
12
  * Domain path: /languages
13
- * * Version: 1.25.1
14
  *
15
  * WC requires at least: 3.7
16
- * WC tested up to: 6.9
17
  *
18
  * License: GNU General Public License v3.0
19
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
20
  *
21
  **/
22
- const WPM_CURRENT_VERSION = '1.25.1' ;
23
  // TODO add option checkbox on uninstall and ask if user wants to delete options from db
24
 
25
  if ( !defined( 'ABSPATH' ) ) {
10
  * Developer URI: https://sweetcode.com
11
  * Text Domain: woocommerce-google-adwords-conversion-tracking-tag
12
  * Domain path: /languages
13
+ * * Version: 1.26.0
14
  *
15
  * WC requires at least: 3.7
16
+ * WC tested up to: 7.1
17
  *
18
  * License: GNU General Public License v3.0
19
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
20
  *
21
  **/
22
+ const WPM_CURRENT_VERSION = '1.26.0' ;
23
  // TODO add option checkbox on uninstall and ask if user wants to delete options from db
24
 
25
  if ( !defined( 'ABSPATH' ) ) {