Plugin Directory

Changeset 3420533


Ignore:
Timestamp:
12/15/2025 10:32:21 PM (3 months ago)
Author:
google
Message:

Update to version 1.168.0 from GitHub

Location:
google-site-kit
Files:
132 added
84 deleted
38 edited
1 copied

Legend:

Unmodified
Added
Removed
  • google-site-kit/tags/1.168.0/dist/assets/blocks/reader-revenue-manager/contribute-with-google/block.json

    r3407206 r3420533  
    33    "apiVersion": 2,
    44    "name": "google-site-kit/rrm-contribute-with-google",
    5     "version": "1.167.0",
     5    "version": "1.168.0",
    66    "title": "Contribute with Google",
    77    "category": "widgets",
  • google-site-kit/tags/1.168.0/dist/assets/blocks/reader-revenue-manager/contribute-with-google/v3/block.json

    r3397601 r3420533  
    33    "apiVersion": 3,
    44    "name": "google-site-kit/rrm-contribute-with-google",
    5     "version": "1.164.0",
     5    "version": "1.168.0",
    66    "title": "Contribute with Google",
    77    "category": "widgets",
  • google-site-kit/tags/1.168.0/dist/assets/blocks/reader-revenue-manager/subscribe-with-google/block.json

    r3407206 r3420533  
    33    "apiVersion": 2,
    44    "name": "google-site-kit/rrm-subscribe-with-google",
    5     "version": "1.167.0",
     5    "version": "1.168.0",
    66    "title": "Subscribe with Google",
    77    "category": "widgets",
  • google-site-kit/tags/1.168.0/dist/assets/blocks/reader-revenue-manager/subscribe-with-google/v3/block.json

    r3397601 r3420533  
    33    "apiVersion": 3,
    44    "name": "google-site-kit/rrm-subscribe-with-google",
    5     "version": "1.164.0",
     5    "version": "1.168.0",
    66    "title": "Subscribe with Google",
    77    "category": "widgets",
  • google-site-kit/tags/1.168.0/dist/assets/blocks/sign-in-with-google/block.json

    r3407206 r3420533  
    33    "apiVersion": 2,
    44    "name": "google-site-kit/sign-in-with-google",
    5     "version": "1.167.0",
     5    "version": "1.168.0",
    66    "title": "Sign in with Google",
    77    "category": "widgets",
  • google-site-kit/tags/1.168.0/dist/assets/blocks/sign-in-with-google/v3/block.json

    r3397601 r3420533  
    33    "apiVersion": 3,
    44    "name": "google-site-kit/sign-in-with-google",
    5     "version": "1.164.0",
     5    "version": "1.168.0",
    66    "title": "Sign in with Google",
    77    "category": "widgets",
  • google-site-kit/tags/1.168.0/dist/manifest.php

    r3407206 r3420533  
    2828    'sign-in-with-google/index'                                       => array( "sign-in-with-google/index.js", null ),
    2929    'sign-in-with-google/editor-styles'                               => array( "sign-in-with-google/editor-styles.js", null ),
    30     'googlesitekit-admin-css'                                         => array( "googlesitekit-admin-css-b9cab0a20268cc660836.min.css", null ),
     30    'googlesitekit-admin-css'                                         => array( "googlesitekit-admin-css-4b099c3a456cf82130a8.min.css", null ),
    3131    'googlesitekit-adminbar-css'                                      => array( "googlesitekit-adminbar-css-d193e67e2cbecf306061.min.css", null ),
    3232    'googlesitekit-wp-dashboard-css'                                  => array( "googlesitekit-wp-dashboard-css-c4ef81393773b78c53aa.min.css", null ),
    3333    'googlesitekit-authorize-application-css'                         => array( "googlesitekit-authorize-application-css-5b98b536e7f34c6411c1.min.css", null ),
    34     'googlesitekit-api'                                               => array( "googlesitekit-api-15cac6500fd5d984fb95.js", null ),
    35     'googlesitekit-data'                                              => array( "googlesitekit-data-2868d5c75a96f60bd472.js", null ),
    36     'googlesitekit-datastore-site'                                    => array( "googlesitekit-datastore-site-84807d9cf6ef5776b730.js", null ),
    37     'googlesitekit-datastore-user'                                    => array( "googlesitekit-datastore-user-6afcf4831575891d4620.js", null ),
    38     'googlesitekit-datastore-forms'                                   => array( "googlesitekit-datastore-forms-1174d7377bfc9977ef9a.js", null ),
    39     'googlesitekit-datastore-location'                                => array( "googlesitekit-datastore-location-a7fd5d1461e0562c934a.js", null ),
    40     'googlesitekit-datastore-ui'                                      => array( "googlesitekit-datastore-ui-abca0d9c62793c5dec3e.js", null ),
    41     'googlesitekit-modules'                                           => array( "googlesitekit-modules-dce334184f43e93590f0.js", null ),
    42     'googlesitekit-notifications'                                     => array( "googlesitekit-notifications-2367a0e39a4641cf0a86.js", null ),
    43     'googlesitekit-widgets'                                           => array( "googlesitekit-widgets-1de0c76dabc56b27df59.js", null ),
    44     'googlesitekit-modules-ads'                                       => array( "googlesitekit-modules-ads-666c5903affd119a99b5.js", null ),
    45     'googlesitekit-modules-adsense'                                   => array( "googlesitekit-modules-adsense-e7757e9cf619f6e1adae.js", null ),
    46     'googlesitekit-modules-analytics-4'                               => array( "googlesitekit-modules-analytics-4-ebb3b6f75580255a8bba.js", null ),
    47     'googlesitekit-modules-pagespeed-insights'                        => array( "googlesitekit-modules-pagespeed-insights-31bab748fa72671d2060.js", null ),
    48     'googlesitekit-modules-reader-revenue-manager'                    => array( "googlesitekit-modules-reader-revenue-manager-607d96f98f5402c25944.js", null ),
    49     'googlesitekit-modules-search-console'                            => array( "googlesitekit-modules-search-console-27a4f67f2b1a12d2ac83.js", null ),
    50     'googlesitekit-modules-sign-in-with-google'                       => array( "googlesitekit-modules-sign-in-with-google-62652ee70455d9500620.js", null ),
    51     'googlesitekit-modules-tagmanager'                                => array( "googlesitekit-modules-tagmanager-b4d14f8336e2d04a117d.js", null ),
    52     'googlesitekit-user-input'                                        => array( "googlesitekit-user-input-52ccecb53d5ce5ff13d2.js", null ),
    53     'googlesitekit-ad-blocking-recovery'                              => array( "googlesitekit-ad-blocking-recovery-4464ef45f8c34471ee3f.js", null ),
    54     'googlesitekit-block-tracking'                                    => array( "googlesitekit-block-tracking-6efb8ed8e9e4db8da249.js", null ),
    55     'googlesitekit-polyfills'                                         => array( "googlesitekit-polyfills-8b59b9627a8949df6deb.js", null ),
    56     'googlesitekit-components'                                        => array( "googlesitekit-components-75585de31a179a264558.js", null ),
    57     'googlesitekit-metric-selection'                                  => array( "googlesitekit-metric-selection-eac03cd59f5737142e49.js", null ),
    58     'googlesitekit-key-metrics-setup'                                 => array( "googlesitekit-key-metrics-setup-7155d7d87c08d0f347db.js", null ),
    59     'googlesitekit-activation'                                        => array( "googlesitekit-activation-2b581b3c77c6c3601892.js", null ),
    60     'googlesitekit-adminbar'                                          => array( "googlesitekit-adminbar-8d712dcb290a2efa6f0d.js", null ),
    61     'googlesitekit-settings'                                          => array( "googlesitekit-settings-3a2e2212924935e84f6f.js", null ),
    62     'googlesitekit-main-dashboard'                                    => array( "googlesitekit-main-dashboard-e0be854ee45bd990b30d.js", null ),
    63     'googlesitekit-entity-dashboard'                                  => array( "googlesitekit-entity-dashboard-446e6cd4802f6bb746df.js", null ),
    64     'googlesitekit-splash'                                            => array( "googlesitekit-splash-3f8ea39c312610f0b4af.js", null ),
    65     'googlesitekit-wp-dashboard'                                      => array( "googlesitekit-wp-dashboard-a28ad41333bd838dc673.js", null ),
    66     'googlesitekit-runtime'                                           => array( "runtime-4300400569c01237fc9a.js", null ),
    67     'googlesitekit-vendor'                                            => array( "googlesitekit-vendor-ea32d0ade8d976a846d4.js", null ),
     34    'googlesitekit-api'                                               => array( "googlesitekit-api-91329b444d3cda33a04f.js", null ),
     35    'googlesitekit-data'                                              => array( "googlesitekit-data-bf86bea1eb3de720b526.js", null ),
     36    'googlesitekit-datastore-site'                                    => array( "googlesitekit-datastore-site-dbb0e1e32324e64419d2.js", null ),
     37    'googlesitekit-datastore-user'                                    => array( "googlesitekit-datastore-user-4dfa5e8eb79bcebcdb1e.js", null ),
     38    'googlesitekit-datastore-forms'                                   => array( "googlesitekit-datastore-forms-b995363380e48da12ee9.js", null ),
     39    'googlesitekit-datastore-location'                                => array( "googlesitekit-datastore-location-6671f1e766c63f15d64f.js", null ),
     40    'googlesitekit-datastore-ui'                                      => array( "googlesitekit-datastore-ui-00807cf90be5b8e4560b.js", null ),
     41    'googlesitekit-modules'                                           => array( "googlesitekit-modules-e5e4c8b2bdfcff9c687b.js", null ),
     42    'googlesitekit-notifications'                                     => array( "googlesitekit-notifications-dceca5b4abcd4a060f5d.js", null ),
     43    'googlesitekit-widgets'                                           => array( "googlesitekit-widgets-3693b4a62dc6e488346b.js", null ),
     44    'googlesitekit-modules-ads'                                       => array( "googlesitekit-modules-ads-0b38cbe845ee5b029e86.js", null ),
     45    'googlesitekit-modules-adsense'                                   => array( "googlesitekit-modules-adsense-65c6ac52b8af7d8cfa34.js", null ),
     46    'googlesitekit-modules-analytics-4'                               => array( "googlesitekit-modules-analytics-4-645f5cdcc14638370683.js", null ),
     47    'googlesitekit-modules-pagespeed-insights'                        => array( "googlesitekit-modules-pagespeed-insights-d9bbb80dd696052efd4b.js", null ),
     48    'googlesitekit-modules-reader-revenue-manager'                    => array( "googlesitekit-modules-reader-revenue-manager-cb75459590314d1ac0e6.js", null ),
     49    'googlesitekit-modules-search-console'                            => array( "googlesitekit-modules-search-console-cd87038978186e1420c0.js", null ),
     50    'googlesitekit-modules-sign-in-with-google'                       => array( "googlesitekit-modules-sign-in-with-google-512cc5b35b7d913ac6ee.js", null ),
     51    'googlesitekit-modules-tagmanager'                                => array( "googlesitekit-modules-tagmanager-7b4fca30c7d570d2d53f.js", null ),
     52    'googlesitekit-user-input'                                        => array( "googlesitekit-user-input-fe48f06dde410c67bc2f.js", null ),
     53    'googlesitekit-ad-blocking-recovery'                              => array( "googlesitekit-ad-blocking-recovery-8991e209396cfe50c4db.js", null ),
     54    'googlesitekit-block-tracking'                                    => array( "googlesitekit-block-tracking-7ce4f712ec578591af37.js", null ),
     55    'googlesitekit-polyfills'                                         => array( "googlesitekit-polyfills-f2726df5859ebd38706b.js", null ),
     56    'googlesitekit-components'                                        => array( "googlesitekit-components-1288bf8a9eda8d2eaa36.js", null ),
     57    'googlesitekit-metric-selection'                                  => array( "googlesitekit-metric-selection-cc65237da8d7c1288643.js", null ),
     58    'googlesitekit-key-metrics-setup'                                 => array( "googlesitekit-key-metrics-setup-21ea03f36f579f67e37d.js", null ),
     59    'googlesitekit-activation'                                        => array( "googlesitekit-activation-9c0e5dc4cd3bf06d1dbe.js", null ),
     60    'googlesitekit-adminbar'                                          => array( "googlesitekit-adminbar-b5866c66dfe0072e8d82.js", null ),
     61    'googlesitekit-settings'                                          => array( "googlesitekit-settings-875ba2ad41a873b8abdf.js", null ),
     62    'googlesitekit-main-dashboard'                                    => array( "googlesitekit-main-dashboard-56fe49d9c86e755db2b0.js", null ),
     63    'googlesitekit-entity-dashboard'                                  => array( "googlesitekit-entity-dashboard-bb4371d3e16b439929e5.js", null ),
     64    'googlesitekit-splash'                                            => array( "googlesitekit-splash-38ee93f3c34f77942251.js", null ),
     65    'googlesitekit-wp-dashboard'                                      => array( "googlesitekit-wp-dashboard-0f9f9bff730d4af0a32f.js", null ),
     66    'googlesitekit-runtime'                                           => array( "runtime-4b2eb8d81a08b104395a.js", null ),
     67    'googlesitekit-vendor'                                            => array( "googlesitekit-vendor-69366dc76fe8885b5e51.js", null ),
    6868);
  • google-site-kit/tags/1.168.0/google-site-kit.php

    r3407206 r3420533  
    1212 * Plugin URI:        https://sitekit.withgoogle.com
    1313 * Description:       Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
    14  * Version:           1.167.0
     14 * Version:           1.168.0
    1515 * Requires at least: 5.2
    1616 * Requires PHP:      7.4
     
    2727
    2828// Define most essential constants.
    29 define( 'GOOGLESITEKIT_VERSION', '1.167.0' );
     29define( 'GOOGLESITEKIT_VERSION', '1.168.0' );
    3030define( 'GOOGLESITEKIT_PLUGIN_MAIN_FILE', __FILE__ );
    3131define( 'GOOGLESITEKIT_PHP_MINIMUM', '7.4.0' );
  • google-site-kit/tags/1.168.0/includes/Core/Conversion_Tracking/Conversion_Event_Providers/WooCommerce.php

    r3407206 r3420533  
    1515use Google\Site_Kit\Core\Util\Feature_Flags;
    1616use Google\Site_Kit\Core\Tags\Enhanced_Conversions\Enhanced_Conversions;
     17use WC_Countries;
     18use WC_Order;
     19use WC_Order_Item_Product;
     20use WC_Product;
    1721
    1822/**
     
    2832
    2933    /**
    30      * Avaialble products on the page.
    31      *
    32      * @var Array
     34     * Available products on the page.
     35     *
     36     * @var array
    3337     *
    3438     * @since 1.153.0
     
    9296        }
    9397
    94         $settings    = get_option( 'woocommerce_google_analytics_settings' );
    95         $event_names = array();
    96 
    97         // If only product identifier is availabe in the saved settings, it means default options are used.
     98        $settings = get_option( 'woocommerce_google_analytics_settings' );
     99
     100        // If only product identifier is available in the saved settings, it means default options are used.
    98101        // And by default all events are tracked.
    99102        if ( isset( $settings['ga_product_identifier'] ) && count( $settings ) === 1 ) {
     
    194197            'woocommerce_loop_add_to_cart_link',
    195198            function ( $button, $product ) {
     199                // If the product is not a valid WC_Product instance, return
     200                // early.
     201                if ( ! $product instanceof WC_Product ) {
     202                    return $button;
     203                }
     204
    196205                $this->products[] = $this->get_formatted_product( $product );
    197206
     
    205214            'woocommerce_add_to_cart',
    206215            function ( $cart_item_key, $product_id, $quantity, $variation_id, $variation ) {
     216                $product = wc_get_product( $product_id );
     217
     218                if ( ! $product instanceof WC_Product ) {
     219                    return;
     220                }
     221
    207222                $this->add_to_cart = $this->get_formatted_product(
    208                     wc_get_product( $product_id ),
     223                    $product,
    209224                    $variation_id,
    210225                    $variation,
     
    266281     * @return array
    267282     */
    268     public function get_formatted_product( $product, $variation_id = 0, $variation = false, $quantity = false ) {
     283    protected function get_formatted_product( WC_Product $product, $variation_id = 0, $variation = false, $quantity = false ) {
    269284        $product_id = $product->is_type( 'variation' ) ? $product->get_parent_id() : $product->get_id();
    270285        $price      = $product->get_price();
     
    329344     * @since 1.153.0
    330345     *
    331      * @param WC_Abstract_Order $order An instance of the WooCommerce Order object.
     346     * @param WC_Order $order An instance of the WooCommerce Order object.
    332347     *
    333348     * @return array
     
    345360            'items'       => array_map(
    346361                function ( $item ) {
     362                    // If the product is not a valid WC_Product instance, return early.
     363                    if (
     364                        ! $item instanceof WC_Order_Item_Product
     365                        || ! $item->get_product() instanceof WC_Product
     366                    ) {
     367                        return $item;
     368                    }
     369
     370                    $formatted_product = $this->get_formatted_product( $item->get_product() );
     371
    347372                    return array_merge(
    348                         $this->get_formatted_product( $item->get_product() ),
     373                        $formatted_product,
    349374                        array(
    350375                            'quantity'                    => $item->get_quantity(),
     
    357382        );
    358383
    359         if ( Feature_Flags::enabled( 'gtagUserData' ) ) {
     384        if ( Feature_Flags::enabled( 'gtagUserData' ) && $order instanceof WC_Order ) {
    360385            $user_data = $this->extract_user_data_from_order( $order );
    361386            if ( ! empty( $user_data ) ) {
     
    372397     * @since 1.161.0
    373398     *
    374      * @param WC_Abstract_Order $order An instance of the WooCommerce Order object.
     399     * @param WC_Order $order An instance of the WooCommerce Order object.
    375400     *
    376401     * @return array Normalized user data or empty array if no supported fields are available.
    377402     */
    378     protected function extract_user_data_from_order( $order ) {
     403    protected function extract_user_data_from_order( WC_Order $order ) {
    379404        $user_data = array();
    380405
     
    469494        // Try to use WooCommerce's country calling codes for proper E.164 formatting.
    470495        if ( class_exists( 'WC_Countries' ) && ! empty( $country ) ) {
    471             $countries    = new \WC_Countries();
     496            $countries    = new WC_Countries();
    472497            $calling_code = $countries->get_country_calling_code( $country );
    473498
  • google-site-kit/tags/1.168.0/includes/Core/Email_Reporting/Email_Report_Section_Builder.php

    r3407206 r3420533  
    191191        return array( $labels, $values, $trends );
    192192    }
    193 
    194193
    195194    /**
  • google-site-kit/tags/1.168.0/includes/Core/Email_Reporting/Email_Reporting.php

    r3407206 r3420533  
    1212
    1313use Google\Site_Kit\Context;
     14use Google\Site_Kit\Core\Authentication\Authentication;
    1415use Google\Site_Kit\Core\Modules\Modules;
    1516use Google\Site_Kit\Core\Storage\Options;
    1617use Google\Site_Kit\Core\Storage\User_Options;
    1718use Google\Site_Kit\Core\User\Email_Reporting_Settings as User_Email_Reporting_Settings;
     19use Google\Site_Kit\Modules\Analytics_4;
    1820
    1921/**
     
    5153
    5254    /**
     55     * Authentication instance.
     56     *
     57     * @since 1.168.0
     58     * @var Authentication
     59     */
     60    protected $authentication;
     61
     62    /**
    5363     * Email_Reporting_Settings instance.
    5464     *
     
    7585
    7686    /**
     87     * Was_Analytics_4_Connected instance.
     88     *
     89     * @since 1.168.0
     90     * @var Was_Analytics_4_Connected
     91     */
     92    protected $was_analytics_4_connected;
     93
     94    /**
    7795     * REST_Email_Reporting_Controller instance.
    7896     *
     
    131149
    132150    /**
     151     * Fallback task instance.
     152     *
     153     * @since 1.168.0
     154     * @var Fallback_Task
     155     */
     156    protected $fallback_task;
     157
     158    /**
     159     * Email reporting data requests instance.
     160     *
     161     * @since 1.168.0
     162     * @var Email_Reporting_Data_Requests
     163     */
     164    protected $data_requests;
     165
     166    /**
    133167     * Constructor.
    134168     *
    135169     * @since 1.162.0
    136      *
    137      * @param Context           $context      Plugin context.
    138      * @param Modules           $modules      Modules instance.
    139      * @param Options|null      $options      Optional. Options instance. Default is a new instance.
    140      * @param User_Options|null $user_options Optional. User options instance. Default is a new instance.
     170     * @since 1.168.0 Added authentication dependency.
     171     *
     172     * @param Context                       $context       Plugin context.
     173     * @param Modules                       $modules       Modules instance.
     174     * @param Email_Reporting_Data_Requests $data_requests Email reporting data requests.
     175     * @param Authentication                $authentication Authentication instance.
     176     * @param Options|null                  $options       Optional. Options instance. Default is a new instance.
     177     * @param User_Options|null             $user_options  Optional. User options instance. Default is a new instance.
    141178     */
    142179    public function __construct(
    143180        Context $context,
    144181        Modules $modules,
     182        Email_Reporting_Data_Requests $data_requests,
     183        Authentication $authentication,
    145184        ?Options $options = null,
    146185        ?User_Options $user_options = null
    147186    ) {
    148         $this->context       = $context;
    149         $this->modules       = $modules;
    150         $this->options       = $options ?: new Options( $this->context );
    151         $this->user_options  = $user_options ?: new User_Options( $this->context );
    152         $this->settings      = new Email_Reporting_Settings( $this->options );
    153         $this->user_settings = new User_Email_Reporting_Settings( $this->user_options );
     187        $this->context                   = $context;
     188        $this->modules                   = $modules;
     189        $this->data_requests             = $data_requests;
     190        $this->authentication            = $authentication;
     191        $this->options                   = $options ?: new Options( $this->context );
     192        $this->user_options              = $user_options ?: new User_Options( $this->context );
     193        $this->settings                  = new Email_Reporting_Settings( $this->options );
     194        $this->user_settings             = new User_Email_Reporting_Settings( $this->user_options );
     195        $this->was_analytics_4_connected = new Was_Analytics_4_Connected( $this->options );
    154196
    155197        $frequency_planner      = new Frequency_Planner();
     
    158200        $batch_query            = new Email_Log_Batch_Query();
    159201
    160         $this->rest_controller   = new REST_Email_Reporting_Controller( $this->settings );
     202        $this->rest_controller   = new REST_Email_Reporting_Controller( $this->settings, $this->was_analytics_4_connected );
    161203        $this->email_log         = new Email_Log( $this->context );
    162204        $this->scheduler         = new Email_Reporting_Scheduler( $frequency_planner );
    163205        $this->initiator_task    = new Initiator_Task( $this->scheduler, $subscribed_users_query );
    164206        $this->worker_task       = new Worker_Task( $max_execution_limiter, $batch_query, $this->scheduler );
     207        $this->fallback_task     = new Fallback_Task( $batch_query, $this->scheduler, $this->worker_task );
    165208        $this->monitor_task      = new Monitor_Task( $this->scheduler, $this->settings );
    166209        $this->email_log_cleanup = new Email_Log_Cleanup( $this->settings );
     
    181224        $this->scheduler->register();
    182225
    183         if ( $this->settings->is_email_reporting_enabled() ) {
     226        add_action(
     227            'googlesitekit_deactivate_module',
     228            function ( $slug ) {
     229                if ( Analytics_4::MODULE_SLUG === $slug ) {
     230                    $this->was_analytics_4_connected->set( true );
     231                }
     232            }
     233        );
     234
     235        // Schedule events only if authentication is completed and email reporting is enabled.
     236        // Otherwise events are being scheduled as soon as the plugin is activated.
     237        if ( $this->authentication->is_setup_completed() && $this->settings->is_email_reporting_enabled() ) {
    184238            $this->scheduler->schedule_initiator_events();
    185239            $this->scheduler->schedule_monitor();
     
    189243            add_action( Email_Reporting_Scheduler::ACTION_MONITOR, array( $this->monitor_task, 'handle_monitor_action' ) );
    190244            add_action( Email_Reporting_Scheduler::ACTION_WORKER, array( $this->worker_task, 'handle_callback_action' ), 10, 3 );
     245            add_action( Email_Reporting_Scheduler::ACTION_FALLBACK, array( $this->fallback_task, 'handle_fallback_action' ), 10, 3 );
    191246            add_action( Email_Reporting_Scheduler::ACTION_CLEANUP, array( $this->email_log_cleanup, 'handle_cleanup_action' ) );
    192247
  • google-site-kit/tags/1.168.0/includes/Core/Email_Reporting/Email_Reporting_Scheduler.php

    r3407206 r3420533  
    118118
    119119    /**
    120      * Schedules a fallback event for the given frequency if one is not already queued.
     120     * Schedules a fallback event for the given batch if one is not already queued.
    121121     *
    122122     * @since 1.167.0
    123123     *
     124     * @param string $batch_id  Batch identifier.
    124125     * @param string $frequency Frequency slug.
    125126     * @param int    $timestamp Base timestamp for the batch.
    126127     * @param int    $delay     Delay in seconds before fallback runs.
    127128     */
    128     public function schedule_fallback( $frequency, $timestamp, $delay = HOUR_IN_SECONDS ) {
    129         if ( wp_next_scheduled( self::ACTION_FALLBACK, array( $frequency ) ) ) {
     129    public function schedule_fallback( $batch_id, $frequency, $timestamp, $delay = HOUR_IN_SECONDS ) {
     130        $args = array( $batch_id, $frequency, $timestamp );
     131
     132        if ( wp_next_scheduled( self::ACTION_FALLBACK, $args ) ) {
    130133            return;
    131134        }
    132135
    133         wp_schedule_single_event( $timestamp + $delay, self::ACTION_FALLBACK, array( $frequency ) );
     136        wp_schedule_single_event( $timestamp + $delay, self::ACTION_FALLBACK, $args );
    134137    }
    135138
  • google-site-kit/tags/1.168.0/includes/Core/Email_Reporting/Initiator_Task.php

    r3407206 r3420533  
    8686
    8787        $this->scheduler->schedule_worker( $batch_id, $frequency, $timestamp );
    88         $this->scheduler->schedule_fallback( $frequency, $timestamp );
     88        $this->scheduler->schedule_fallback( $batch_id, $frequency, $timestamp );
    8989    }
    9090
  • google-site-kit/tags/1.168.0/includes/Core/Email_Reporting/REST_Email_Reporting_Controller.php

    r3389193 r3420533  
    1414use Google\Site_Kit\Core\REST_API\REST_Route;
    1515use Google\Site_Kit\Core\REST_API\REST_Routes;
     16use Google\Site_Kit\Core\Storage\Options;
    1617use WP_REST_Request;
    1718use WP_REST_Response;
     
    3637
    3738    /**
     39     * Was_Analytics_4_Connected instance.
     40     *
     41     * @since 1.168.0
     42     * @var Was_Analytics_4_Connected
     43     */
     44    private $was_analytics_4_connected;
     45
     46    /**
    3847     * Constructor.
    3948     *
    4049     * @since 1.162.0
    4150     *
    42      * @param Email_Reporting_Settings $settings Email_Reporting_Settings instance.
     51     * @param Email_Reporting_Settings  $settings Email_Reporting_Settings instance.
     52     * @param Was_Analytics_4_Connected $was_analytics_4_connected  Was_Analytics_4_Connected instance.
    4353     */
    44     public function __construct( Email_Reporting_Settings $settings ) {
    45         $this->settings = $settings;
     54    public function __construct( Email_Reporting_Settings $settings, Was_Analytics_4_Connected $was_analytics_4_connected ) {
     55        $this->settings                  = $settings;
     56        $this->was_analytics_4_connected = $was_analytics_4_connected;
    4657    }
    4758
     
    6677                    array(
    6778                        '/' . REST_Routes::REST_ROOT . '/core/site/data/email-reporting',
     79                        '/' . REST_Routes::REST_ROOT . '/core/site/data/was-analytics-4-connected',
    6880                    )
    6981                );
     
    126138                )
    127139            ),
     140            new REST_Route(
     141                'core/site/data/was-analytics-4-connected',
     142                array(
     143                    array(
     144                        'methods'             => WP_REST_Server::READABLE,
     145                        'callback'            => function () {
     146                            return new WP_REST_Response( array( 'wasConnected' => $this->was_analytics_4_connected->get() ) );
     147                        },
     148                        'permission_callback' => $can_access,
     149                    ),
     150                )
     151            ),
    128152        );
    129153    }
  • google-site-kit/tags/1.168.0/includes/Core/Modules/Modules.php

    r3373932 r3420533  
    723723        $this->sharing_settings->unset_module( $slug );
    724724
     725        /**
     726         * Fires when a module is deactivated.
     727         *
     728         * @since 1.168.0
     729         *
     730         * @param string $slug The slug of the deactivated module.
     731         */
     732        do_action( 'googlesitekit_deactivate_module', $slug );
     733
    725734        return true;
    726735    }
  • google-site-kit/tags/1.168.0/includes/Core/Util/Uninstallation.php

    r3407206 r3420533  
    144144            // Only clear scheduled events that are set, important in E2E
    145145            // testing.
    146             if ( (bool) wp_next_scheduled( $event ) ) {
     146            if ( $this->is_event_scheduled( $event ) ) {
    147147                wp_unschedule_hook( $event );
    148148            }
    149149        }
    150150    }
     151
     152    /**
     153     * Determines if an event is scheduled for the given hook, regardless of arguments.
     154     *
     155     * @since 1.168.0
     156     *
     157     * @param string $hook The hook name.
     158     * @return bool True if an event is scheduled for the hook, false otherwise.
     159     */
     160    private function is_event_scheduled( $hook ) {
     161        $crons = _get_cron_array();
     162
     163        if ( ! is_array( $crons ) || empty( $crons ) ) {
     164            return false;
     165        }
     166
     167        foreach ( $crons as $events ) {
     168            if ( isset( $events[ $hook ] ) ) {
     169                return true;
     170            }
     171        }
     172
     173        return false;
     174    }
    151175}
  • google-site-kit/tags/1.168.0/includes/Plugin.php

    r3407206 r3420533  
    228228                ( new Core\Consent_Mode\Consent_Mode( $this->context, $modules, $options ) )->register();
    229229                ( new Core\Tags\GTag( $options ) )->register();
    230                 ( new Core\Conversion_Tracking\Conversion_Tracking( $this->context, $options ) )->register();
     230
     231                $conversion_tracking = new Core\Conversion_Tracking\Conversion_Tracking( $this->context, $options );
     232                $conversion_tracking->register();
     233
    231234                if ( Feature_Flags::enabled( 'proactiveUserEngagement' ) ) {
    232                     ( new Core\Email_Reporting\Email_Reporting( $this->context, $modules, $options, $user_options ) )->register();
    233                 }
     235                    $data_requests = new Core\Email_Reporting\Email_Reporting_Data_Requests(
     236                        $this->context,
     237                        $modules,
     238                        $conversion_tracking,
     239                        $transients,
     240                        $user_options,
     241                    );
     242
     243                    ( new Core\Email_Reporting\Email_Reporting( $this->context, $modules, $data_requests, $authentication, $options, $user_options ) )->register();
     244                }
     245
    234246                if ( Feature_Flags::enabled( 'googleTagGateway' ) ) {
    235247                    ( new Core\Tags\Google_Tag_Gateway\Google_Tag_Gateway( $this->context, $options ) )->register();
  • google-site-kit/tags/1.168.0/includes/vendor/composer/autoload_classmap.php

    r3407206 r3420533  
    8484    'Google\\Site_Kit\\Core\\Dismissals\\Dismissed_Items' => $baseDir . '/Core/Dismissals/Dismissed_Items.php',
    8585    'Google\\Site_Kit\\Core\\Dismissals\\REST_Dismissals_Controller' => $baseDir . '/Core/Dismissals/REST_Dismissals_Controller.php',
     86    'Google\\Site_Kit\\Core\\Email\\Email' => $baseDir . '/Core/Email/Email.php',
    8687    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Log' => $baseDir . '/Core/Email_Reporting/Email_Log.php',
    8788    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Log_Batch_Query' => $baseDir . '/Core/Email_Reporting/Email_Log_Batch_Query.php',
     
    9192    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Report_Section_Builder' => $baseDir . '/Core/Email_Reporting/Email_Report_Section_Builder.php',
    9293    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting' => $baseDir . '/Core/Email_Reporting/Email_Reporting.php',
     94    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting_Data_Requests' => $baseDir . '/Core/Email_Reporting/Email_Reporting_Data_Requests.php',
    9395    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting_Pointer' => $baseDir . '/Core/Email_Reporting/Email_Reporting_Pointer.php',
    9496    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting_Scheduler' => $baseDir . '/Core/Email_Reporting/Email_Reporting_Scheduler.php',
    9597    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting_Settings' => $baseDir . '/Core/Email_Reporting/Email_Reporting_Settings.php',
    9698    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting_Site_Health' => $baseDir . '/Core/Email_Reporting/Email_Reporting_Site_Health.php',
     99    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Template_Renderer' => $baseDir . '/Core/Email_Reporting/Email_Template_Renderer.php',
     100    'Google\\Site_Kit\\Core\\Email_Reporting\\Fallback_Task' => $baseDir . '/Core/Email_Reporting/Fallback_Task.php',
    97101    'Google\\Site_Kit\\Core\\Email_Reporting\\Frequency_Planner' => $baseDir . '/Core/Email_Reporting/Frequency_Planner.php',
    98102    'Google\\Site_Kit\\Core\\Email_Reporting\\Initiator_Task' => $baseDir . '/Core/Email_Reporting/Initiator_Task.php',
     
    101105    'Google\\Site_Kit\\Core\\Email_Reporting\\REST_Email_Reporting_Controller' => $baseDir . '/Core/Email_Reporting/REST_Email_Reporting_Controller.php',
    102106    'Google\\Site_Kit\\Core\\Email_Reporting\\Report_Options\\Report_Options' => $baseDir . '/Core/Email_Reporting/Report_Options/Report_Options.php',
     107    'Google\\Site_Kit\\Core\\Email_Reporting\\Sections_Map' => $baseDir . '/Core/Email_Reporting/Sections_Map.php',
    103108    'Google\\Site_Kit\\Core\\Email_Reporting\\Subscribed_Users_Query' => $baseDir . '/Core/Email_Reporting/Subscribed_Users_Query.php',
     109    'Google\\Site_Kit\\Core\\Email_Reporting\\Was_Analytics_4_Connected' => $baseDir . '/Core/Email_Reporting/Was_Analytics_4_Connected.php',
    104110    'Google\\Site_Kit\\Core\\Email_Reporting\\Worker_Task' => $baseDir . '/Core/Email_Reporting/Worker_Task.php',
    105111    'Google\\Site_Kit\\Core\\Expirables\\Expirable_Items' => $baseDir . '/Core/Expirables/Expirable_Items.php',
  • google-site-kit/tags/1.168.0/readme.txt

    r3407206 r3420533  
    55Tested up to:      6.9
    66Requires PHP:      7.4
    7 Stable tag:        1.167.0
     7Stable tag:        1.168.0
    88License:           Apache License 2.0
    99License URI:       https://www.apache.org/licenses/LICENSE-2.0
     
    110110== Changelog ==
    111111
    112 = 1.167.0 =
     112= 1.168.0 =
    113113
    114114**Enhanced**
    115115
    116 * Update casing of web data stream labels for consistency. See [#11763](https://github.com/google/site-kit-wp/issues/11763).
    117 * Add missing external icon to "Learn more" links in enhanced conversions notifications. See [#11744](https://github.com/google/site-kit-wp/issues/11744).
    118 * Update Enhanced Conversions dashboard notification priority to use `SETUP_CTA_HIGH` for consistency. See [#11741](https://github.com/google/site-kit-wp/issues/11741).
    119 * Add opt-in GA tracking as part of the new setup flow in the splash, Analytics, and Key Metrics setup screens. See [#11721](https://github.com/google/site-kit-wp/issues/11721).
    120 * Pass `show_progress` as a query parameter to the redirect URI rather than as a separate property when creating an Analytics account in the new setup flow. See [#11715](https://github.com/google/site-kit-wp/issues/11715).
    121 * Create email reporting data and section classes. See [#11680](https://github.com/google/site-kit-wp/issues/11680).
    122 * Include the current AMP mode in the request to get enabled features. See [#11643](https://github.com/google/site-kit-wp/issues/11643).
    123 * Implement monitor scheduler for Email Reporting events. See [#11599](https://github.com/google/site-kit-wp/issues/11599).
    124 * Implement email reporting log clear schedulers. See [#11582](https://github.com/google/site-kit-wp/issues/11582).
    125 * AdSense alert links now open in a new tab. See [#11578](https://github.com/google/site-kit-wp/issues/11578).
    126 * Add report options builder classes for Analytics, AdSense, and SC modules. See [#11552](https://github.com/google/site-kit-wp/issues/11552).
    127 * Implement “Worker” scheduled events for Email Reporting. See [#11547](https://github.com/google/site-kit-wp/issues/11547).
    128 * Add infrastructure for scheduled events at various intervals. See [#11546](https://github.com/google/site-kit-wp/issues/11546).
    129 * Extend the Reset utility class to delete remaining error reporting logs. See [#11545](https://github.com/google/site-kit-wp/issues/11545).
    130 * Improve the help link destination in the authentication error screen. See [#11529](https://github.com/google/site-kit-wp/issues/11529).
    131 * Ensure the user is returned to the Analytics or Key Metrics setup screen if the new setup flow is interrupted on one of those screens. See [#11388](https://github.com/google/site-kit-wp/issues/11388).
    132 * Improve error reporting in Site Kit widgets to not report duplicate errors. See [#8970](https://github.com/google/site-kit-wp/issues/8970).
    133 * Improve legend color consistency in the Analytics all traffic widget. See [#7199](https://github.com/google/site-kit-wp/issues/7199).
     116* Add the welcome modal as part of the setup flow refresh. See [#11808](https://github.com/google/site-kit-wp/issues/11808).
     117* Update the uninstall script to unregister all email reporting events when the plugin is unininstalled. See [#11805](https://github.com/google/site-kit-wp/issues/11805).
     118* Add opt-in internal tracking for the new key metrics setup screen. See [#11723](https://github.com/google/site-kit-wp/issues/11723).
     119* Add GA event tracking for user interaction with the Analytics setup screen in the new setup flow. See [#11722](https://github.com/google/site-kit-wp/issues/11722).
     120* Add a class to send emails. See [#11564](https://github.com/google/site-kit-wp/issues/11564).
     121* Add email reporting templates. See [#11550](https://github.com/google/site-kit-wp/issues/11550).
     122* Add a base template for reports sent by Email Reporting. See [#11549](https://github.com/google/site-kit-wp/issues/11549).
     123* Implement “Fallback” scheduled events for Email Reporting. See [#11548](https://github.com/google/site-kit-wp/issues/11548).
     124* Detect if Analytics has previously been connected when displaying certain notices in the Email Reporting notices. See [#11435](https://github.com/google/site-kit-wp/issues/11435).
     125* Add `utm_source=sitekit` query parameter to all external service links for source tracking. See [#11160](https://github.com/google/site-kit-wp/issues/11160).
     126* Update Ads Module Disconnect Messaging for PAX Setup Flow. See [#10607](https://github.com/google/site-kit-wp/issues/10607).
    134127
    135128**Fixed**
    136129
    137 * Fix internal event tracking to include plugin version information. See [#11802](https://github.com/google/site-kit-wp/issues/11802).
    138 * Prevent an unnecessary request to the `enhanced-measurement-settings` endpoint when loading the dashboard. See [#11766](https://github.com/google/site-kit-wp/issues/11766).
    139 * Fix incorrect formatting of WooCommerce enhanced conversions phone numbers. See [#11737](https://github.com/google/site-kit-wp/issues/11737).
    140 * Ensure the "Google Analytics was successfully set up" toast should appears on the Key Metrics setup screen in the new setup flow. See [#11731](https://github.com/google/site-kit-wp/issues/11731).
    141 * Amend styles for Sign in with Google settings editing screen. See [#11314](https://github.com/google/site-kit-wp/issues/11314).
    142 * Fix Audience segmentation toggling issue. See [#9700](https://github.com/google/site-kit-wp/issues/9700).
     130* Fix in-progress spinner not appearing in CTA buttons for banners and notices. See [#11876](https://github.com/google/site-kit-wp/issues/11876).
     131* Fix banner width for Sign in with Google content on very large displays. See [#11800](https://github.com/google/site-kit-wp/issues/11800).
     132* Fix enhanced conversion tracking fatal errors. See [#11049](https://github.com/google/site-kit-wp/issues/11049).
    143133
    144134[See changelog for all versions](https://raw.githubusercontent.com/google/site-kit-wp/main/changelog.txt).
  • google-site-kit/trunk/dist/assets/blocks/reader-revenue-manager/contribute-with-google/block.json

    r3407206 r3420533  
    33    "apiVersion": 2,
    44    "name": "google-site-kit/rrm-contribute-with-google",
    5     "version": "1.167.0",
     5    "version": "1.168.0",
    66    "title": "Contribute with Google",
    77    "category": "widgets",
  • google-site-kit/trunk/dist/assets/blocks/reader-revenue-manager/contribute-with-google/v3/block.json

    r3397601 r3420533  
    33    "apiVersion": 3,
    44    "name": "google-site-kit/rrm-contribute-with-google",
    5     "version": "1.164.0",
     5    "version": "1.168.0",
    66    "title": "Contribute with Google",
    77    "category": "widgets",
  • google-site-kit/trunk/dist/assets/blocks/reader-revenue-manager/subscribe-with-google/block.json

    r3407206 r3420533  
    33    "apiVersion": 2,
    44    "name": "google-site-kit/rrm-subscribe-with-google",
    5     "version": "1.167.0",
     5    "version": "1.168.0",
    66    "title": "Subscribe with Google",
    77    "category": "widgets",
  • google-site-kit/trunk/dist/assets/blocks/reader-revenue-manager/subscribe-with-google/v3/block.json

    r3397601 r3420533  
    33    "apiVersion": 3,
    44    "name": "google-site-kit/rrm-subscribe-with-google",
    5     "version": "1.164.0",
     5    "version": "1.168.0",
    66    "title": "Subscribe with Google",
    77    "category": "widgets",
  • google-site-kit/trunk/dist/assets/blocks/sign-in-with-google/block.json

    r3407206 r3420533  
    33    "apiVersion": 2,
    44    "name": "google-site-kit/sign-in-with-google",
    5     "version": "1.167.0",
     5    "version": "1.168.0",
    66    "title": "Sign in with Google",
    77    "category": "widgets",
  • google-site-kit/trunk/dist/assets/blocks/sign-in-with-google/v3/block.json

    r3397601 r3420533  
    33    "apiVersion": 3,
    44    "name": "google-site-kit/sign-in-with-google",
    5     "version": "1.164.0",
     5    "version": "1.168.0",
    66    "title": "Sign in with Google",
    77    "category": "widgets",
  • google-site-kit/trunk/dist/manifest.php

    r3407206 r3420533  
    2828    'sign-in-with-google/index'                                       => array( "sign-in-with-google/index.js", null ),
    2929    'sign-in-with-google/editor-styles'                               => array( "sign-in-with-google/editor-styles.js", null ),
    30     'googlesitekit-admin-css'                                         => array( "googlesitekit-admin-css-b9cab0a20268cc660836.min.css", null ),
     30    'googlesitekit-admin-css'                                         => array( "googlesitekit-admin-css-4b099c3a456cf82130a8.min.css", null ),
    3131    'googlesitekit-adminbar-css'                                      => array( "googlesitekit-adminbar-css-d193e67e2cbecf306061.min.css", null ),
    3232    'googlesitekit-wp-dashboard-css'                                  => array( "googlesitekit-wp-dashboard-css-c4ef81393773b78c53aa.min.css", null ),
    3333    'googlesitekit-authorize-application-css'                         => array( "googlesitekit-authorize-application-css-5b98b536e7f34c6411c1.min.css", null ),
    34     'googlesitekit-api'                                               => array( "googlesitekit-api-15cac6500fd5d984fb95.js", null ),
    35     'googlesitekit-data'                                              => array( "googlesitekit-data-2868d5c75a96f60bd472.js", null ),
    36     'googlesitekit-datastore-site'                                    => array( "googlesitekit-datastore-site-84807d9cf6ef5776b730.js", null ),
    37     'googlesitekit-datastore-user'                                    => array( "googlesitekit-datastore-user-6afcf4831575891d4620.js", null ),
    38     'googlesitekit-datastore-forms'                                   => array( "googlesitekit-datastore-forms-1174d7377bfc9977ef9a.js", null ),
    39     'googlesitekit-datastore-location'                                => array( "googlesitekit-datastore-location-a7fd5d1461e0562c934a.js", null ),
    40     'googlesitekit-datastore-ui'                                      => array( "googlesitekit-datastore-ui-abca0d9c62793c5dec3e.js", null ),
    41     'googlesitekit-modules'                                           => array( "googlesitekit-modules-dce334184f43e93590f0.js", null ),
    42     'googlesitekit-notifications'                                     => array( "googlesitekit-notifications-2367a0e39a4641cf0a86.js", null ),
    43     'googlesitekit-widgets'                                           => array( "googlesitekit-widgets-1de0c76dabc56b27df59.js", null ),
    44     'googlesitekit-modules-ads'                                       => array( "googlesitekit-modules-ads-666c5903affd119a99b5.js", null ),
    45     'googlesitekit-modules-adsense'                                   => array( "googlesitekit-modules-adsense-e7757e9cf619f6e1adae.js", null ),
    46     'googlesitekit-modules-analytics-4'                               => array( "googlesitekit-modules-analytics-4-ebb3b6f75580255a8bba.js", null ),
    47     'googlesitekit-modules-pagespeed-insights'                        => array( "googlesitekit-modules-pagespeed-insights-31bab748fa72671d2060.js", null ),
    48     'googlesitekit-modules-reader-revenue-manager'                    => array( "googlesitekit-modules-reader-revenue-manager-607d96f98f5402c25944.js", null ),
    49     'googlesitekit-modules-search-console'                            => array( "googlesitekit-modules-search-console-27a4f67f2b1a12d2ac83.js", null ),
    50     'googlesitekit-modules-sign-in-with-google'                       => array( "googlesitekit-modules-sign-in-with-google-62652ee70455d9500620.js", null ),
    51     'googlesitekit-modules-tagmanager'                                => array( "googlesitekit-modules-tagmanager-b4d14f8336e2d04a117d.js", null ),
    52     'googlesitekit-user-input'                                        => array( "googlesitekit-user-input-52ccecb53d5ce5ff13d2.js", null ),
    53     'googlesitekit-ad-blocking-recovery'                              => array( "googlesitekit-ad-blocking-recovery-4464ef45f8c34471ee3f.js", null ),
    54     'googlesitekit-block-tracking'                                    => array( "googlesitekit-block-tracking-6efb8ed8e9e4db8da249.js", null ),
    55     'googlesitekit-polyfills'                                         => array( "googlesitekit-polyfills-8b59b9627a8949df6deb.js", null ),
    56     'googlesitekit-components'                                        => array( "googlesitekit-components-75585de31a179a264558.js", null ),
    57     'googlesitekit-metric-selection'                                  => array( "googlesitekit-metric-selection-eac03cd59f5737142e49.js", null ),
    58     'googlesitekit-key-metrics-setup'                                 => array( "googlesitekit-key-metrics-setup-7155d7d87c08d0f347db.js", null ),
    59     'googlesitekit-activation'                                        => array( "googlesitekit-activation-2b581b3c77c6c3601892.js", null ),
    60     'googlesitekit-adminbar'                                          => array( "googlesitekit-adminbar-8d712dcb290a2efa6f0d.js", null ),
    61     'googlesitekit-settings'                                          => array( "googlesitekit-settings-3a2e2212924935e84f6f.js", null ),
    62     'googlesitekit-main-dashboard'                                    => array( "googlesitekit-main-dashboard-e0be854ee45bd990b30d.js", null ),
    63     'googlesitekit-entity-dashboard'                                  => array( "googlesitekit-entity-dashboard-446e6cd4802f6bb746df.js", null ),
    64     'googlesitekit-splash'                                            => array( "googlesitekit-splash-3f8ea39c312610f0b4af.js", null ),
    65     'googlesitekit-wp-dashboard'                                      => array( "googlesitekit-wp-dashboard-a28ad41333bd838dc673.js", null ),
    66     'googlesitekit-runtime'                                           => array( "runtime-4300400569c01237fc9a.js", null ),
    67     'googlesitekit-vendor'                                            => array( "googlesitekit-vendor-ea32d0ade8d976a846d4.js", null ),
     34    'googlesitekit-api'                                               => array( "googlesitekit-api-91329b444d3cda33a04f.js", null ),
     35    'googlesitekit-data'                                              => array( "googlesitekit-data-bf86bea1eb3de720b526.js", null ),
     36    'googlesitekit-datastore-site'                                    => array( "googlesitekit-datastore-site-dbb0e1e32324e64419d2.js", null ),
     37    'googlesitekit-datastore-user'                                    => array( "googlesitekit-datastore-user-4dfa5e8eb79bcebcdb1e.js", null ),
     38    'googlesitekit-datastore-forms'                                   => array( "googlesitekit-datastore-forms-b995363380e48da12ee9.js", null ),
     39    'googlesitekit-datastore-location'                                => array( "googlesitekit-datastore-location-6671f1e766c63f15d64f.js", null ),
     40    'googlesitekit-datastore-ui'                                      => array( "googlesitekit-datastore-ui-00807cf90be5b8e4560b.js", null ),
     41    'googlesitekit-modules'                                           => array( "googlesitekit-modules-e5e4c8b2bdfcff9c687b.js", null ),
     42    'googlesitekit-notifications'                                     => array( "googlesitekit-notifications-dceca5b4abcd4a060f5d.js", null ),
     43    'googlesitekit-widgets'                                           => array( "googlesitekit-widgets-3693b4a62dc6e488346b.js", null ),
     44    'googlesitekit-modules-ads'                                       => array( "googlesitekit-modules-ads-0b38cbe845ee5b029e86.js", null ),
     45    'googlesitekit-modules-adsense'                                   => array( "googlesitekit-modules-adsense-65c6ac52b8af7d8cfa34.js", null ),
     46    'googlesitekit-modules-analytics-4'                               => array( "googlesitekit-modules-analytics-4-645f5cdcc14638370683.js", null ),
     47    'googlesitekit-modules-pagespeed-insights'                        => array( "googlesitekit-modules-pagespeed-insights-d9bbb80dd696052efd4b.js", null ),
     48    'googlesitekit-modules-reader-revenue-manager'                    => array( "googlesitekit-modules-reader-revenue-manager-cb75459590314d1ac0e6.js", null ),
     49    'googlesitekit-modules-search-console'                            => array( "googlesitekit-modules-search-console-cd87038978186e1420c0.js", null ),
     50    'googlesitekit-modules-sign-in-with-google'                       => array( "googlesitekit-modules-sign-in-with-google-512cc5b35b7d913ac6ee.js", null ),
     51    'googlesitekit-modules-tagmanager'                                => array( "googlesitekit-modules-tagmanager-7b4fca30c7d570d2d53f.js", null ),
     52    'googlesitekit-user-input'                                        => array( "googlesitekit-user-input-fe48f06dde410c67bc2f.js", null ),
     53    'googlesitekit-ad-blocking-recovery'                              => array( "googlesitekit-ad-blocking-recovery-8991e209396cfe50c4db.js", null ),
     54    'googlesitekit-block-tracking'                                    => array( "googlesitekit-block-tracking-7ce4f712ec578591af37.js", null ),
     55    'googlesitekit-polyfills'                                         => array( "googlesitekit-polyfills-f2726df5859ebd38706b.js", null ),
     56    'googlesitekit-components'                                        => array( "googlesitekit-components-1288bf8a9eda8d2eaa36.js", null ),
     57    'googlesitekit-metric-selection'                                  => array( "googlesitekit-metric-selection-cc65237da8d7c1288643.js", null ),
     58    'googlesitekit-key-metrics-setup'                                 => array( "googlesitekit-key-metrics-setup-21ea03f36f579f67e37d.js", null ),
     59    'googlesitekit-activation'                                        => array( "googlesitekit-activation-9c0e5dc4cd3bf06d1dbe.js", null ),
     60    'googlesitekit-adminbar'                                          => array( "googlesitekit-adminbar-b5866c66dfe0072e8d82.js", null ),
     61    'googlesitekit-settings'                                          => array( "googlesitekit-settings-875ba2ad41a873b8abdf.js", null ),
     62    'googlesitekit-main-dashboard'                                    => array( "googlesitekit-main-dashboard-56fe49d9c86e755db2b0.js", null ),
     63    'googlesitekit-entity-dashboard'                                  => array( "googlesitekit-entity-dashboard-bb4371d3e16b439929e5.js", null ),
     64    'googlesitekit-splash'                                            => array( "googlesitekit-splash-38ee93f3c34f77942251.js", null ),
     65    'googlesitekit-wp-dashboard'                                      => array( "googlesitekit-wp-dashboard-0f9f9bff730d4af0a32f.js", null ),
     66    'googlesitekit-runtime'                                           => array( "runtime-4b2eb8d81a08b104395a.js", null ),
     67    'googlesitekit-vendor'                                            => array( "googlesitekit-vendor-69366dc76fe8885b5e51.js", null ),
    6868);
  • google-site-kit/trunk/google-site-kit.php

    r3407206 r3420533  
    1212 * Plugin URI:        https://sitekit.withgoogle.com
    1313 * Description:       Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
    14  * Version:           1.167.0
     14 * Version:           1.168.0
    1515 * Requires at least: 5.2
    1616 * Requires PHP:      7.4
     
    2727
    2828// Define most essential constants.
    29 define( 'GOOGLESITEKIT_VERSION', '1.167.0' );
     29define( 'GOOGLESITEKIT_VERSION', '1.168.0' );
    3030define( 'GOOGLESITEKIT_PLUGIN_MAIN_FILE', __FILE__ );
    3131define( 'GOOGLESITEKIT_PHP_MINIMUM', '7.4.0' );
  • google-site-kit/trunk/includes/Core/Conversion_Tracking/Conversion_Event_Providers/WooCommerce.php

    r3407206 r3420533  
    1515use Google\Site_Kit\Core\Util\Feature_Flags;
    1616use Google\Site_Kit\Core\Tags\Enhanced_Conversions\Enhanced_Conversions;
     17use WC_Countries;
     18use WC_Order;
     19use WC_Order_Item_Product;
     20use WC_Product;
    1721
    1822/**
     
    2832
    2933    /**
    30      * Avaialble products on the page.
    31      *
    32      * @var Array
     34     * Available products on the page.
     35     *
     36     * @var array
    3337     *
    3438     * @since 1.153.0
     
    9296        }
    9397
    94         $settings    = get_option( 'woocommerce_google_analytics_settings' );
    95         $event_names = array();
    96 
    97         // If only product identifier is availabe in the saved settings, it means default options are used.
     98        $settings = get_option( 'woocommerce_google_analytics_settings' );
     99
     100        // If only product identifier is available in the saved settings, it means default options are used.
    98101        // And by default all events are tracked.
    99102        if ( isset( $settings['ga_product_identifier'] ) && count( $settings ) === 1 ) {
     
    194197            'woocommerce_loop_add_to_cart_link',
    195198            function ( $button, $product ) {
     199                // If the product is not a valid WC_Product instance, return
     200                // early.
     201                if ( ! $product instanceof WC_Product ) {
     202                    return $button;
     203                }
     204
    196205                $this->products[] = $this->get_formatted_product( $product );
    197206
     
    205214            'woocommerce_add_to_cart',
    206215            function ( $cart_item_key, $product_id, $quantity, $variation_id, $variation ) {
     216                $product = wc_get_product( $product_id );
     217
     218                if ( ! $product instanceof WC_Product ) {
     219                    return;
     220                }
     221
    207222                $this->add_to_cart = $this->get_formatted_product(
    208                     wc_get_product( $product_id ),
     223                    $product,
    209224                    $variation_id,
    210225                    $variation,
     
    266281     * @return array
    267282     */
    268     public function get_formatted_product( $product, $variation_id = 0, $variation = false, $quantity = false ) {
     283    protected function get_formatted_product( WC_Product $product, $variation_id = 0, $variation = false, $quantity = false ) {
    269284        $product_id = $product->is_type( 'variation' ) ? $product->get_parent_id() : $product->get_id();
    270285        $price      = $product->get_price();
     
    329344     * @since 1.153.0
    330345     *
    331      * @param WC_Abstract_Order $order An instance of the WooCommerce Order object.
     346     * @param WC_Order $order An instance of the WooCommerce Order object.
    332347     *
    333348     * @return array
     
    345360            'items'       => array_map(
    346361                function ( $item ) {
     362                    // If the product is not a valid WC_Product instance, return early.
     363                    if (
     364                        ! $item instanceof WC_Order_Item_Product
     365                        || ! $item->get_product() instanceof WC_Product
     366                    ) {
     367                        return $item;
     368                    }
     369
     370                    $formatted_product = $this->get_formatted_product( $item->get_product() );
     371
    347372                    return array_merge(
    348                         $this->get_formatted_product( $item->get_product() ),
     373                        $formatted_product,
    349374                        array(
    350375                            'quantity'                    => $item->get_quantity(),
     
    357382        );
    358383
    359         if ( Feature_Flags::enabled( 'gtagUserData' ) ) {
     384        if ( Feature_Flags::enabled( 'gtagUserData' ) && $order instanceof WC_Order ) {
    360385            $user_data = $this->extract_user_data_from_order( $order );
    361386            if ( ! empty( $user_data ) ) {
     
    372397     * @since 1.161.0
    373398     *
    374      * @param WC_Abstract_Order $order An instance of the WooCommerce Order object.
     399     * @param WC_Order $order An instance of the WooCommerce Order object.
    375400     *
    376401     * @return array Normalized user data or empty array if no supported fields are available.
    377402     */
    378     protected function extract_user_data_from_order( $order ) {
     403    protected function extract_user_data_from_order( WC_Order $order ) {
    379404        $user_data = array();
    380405
     
    469494        // Try to use WooCommerce's country calling codes for proper E.164 formatting.
    470495        if ( class_exists( 'WC_Countries' ) && ! empty( $country ) ) {
    471             $countries    = new \WC_Countries();
     496            $countries    = new WC_Countries();
    472497            $calling_code = $countries->get_country_calling_code( $country );
    473498
  • google-site-kit/trunk/includes/Core/Email_Reporting/Email_Report_Section_Builder.php

    r3407206 r3420533  
    191191        return array( $labels, $values, $trends );
    192192    }
    193 
    194193
    195194    /**
  • google-site-kit/trunk/includes/Core/Email_Reporting/Email_Reporting.php

    r3407206 r3420533  
    1212
    1313use Google\Site_Kit\Context;
     14use Google\Site_Kit\Core\Authentication\Authentication;
    1415use Google\Site_Kit\Core\Modules\Modules;
    1516use Google\Site_Kit\Core\Storage\Options;
    1617use Google\Site_Kit\Core\Storage\User_Options;
    1718use Google\Site_Kit\Core\User\Email_Reporting_Settings as User_Email_Reporting_Settings;
     19use Google\Site_Kit\Modules\Analytics_4;
    1820
    1921/**
     
    5153
    5254    /**
     55     * Authentication instance.
     56     *
     57     * @since 1.168.0
     58     * @var Authentication
     59     */
     60    protected $authentication;
     61
     62    /**
    5363     * Email_Reporting_Settings instance.
    5464     *
     
    7585
    7686    /**
     87     * Was_Analytics_4_Connected instance.
     88     *
     89     * @since 1.168.0
     90     * @var Was_Analytics_4_Connected
     91     */
     92    protected $was_analytics_4_connected;
     93
     94    /**
    7795     * REST_Email_Reporting_Controller instance.
    7896     *
     
    131149
    132150    /**
     151     * Fallback task instance.
     152     *
     153     * @since 1.168.0
     154     * @var Fallback_Task
     155     */
     156    protected $fallback_task;
     157
     158    /**
     159     * Email reporting data requests instance.
     160     *
     161     * @since 1.168.0
     162     * @var Email_Reporting_Data_Requests
     163     */
     164    protected $data_requests;
     165
     166    /**
    133167     * Constructor.
    134168     *
    135169     * @since 1.162.0
    136      *
    137      * @param Context           $context      Plugin context.
    138      * @param Modules           $modules      Modules instance.
    139      * @param Options|null      $options      Optional. Options instance. Default is a new instance.
    140      * @param User_Options|null $user_options Optional. User options instance. Default is a new instance.
     170     * @since 1.168.0 Added authentication dependency.
     171     *
     172     * @param Context                       $context       Plugin context.
     173     * @param Modules                       $modules       Modules instance.
     174     * @param Email_Reporting_Data_Requests $data_requests Email reporting data requests.
     175     * @param Authentication                $authentication Authentication instance.
     176     * @param Options|null                  $options       Optional. Options instance. Default is a new instance.
     177     * @param User_Options|null             $user_options  Optional. User options instance. Default is a new instance.
    141178     */
    142179    public function __construct(
    143180        Context $context,
    144181        Modules $modules,
     182        Email_Reporting_Data_Requests $data_requests,
     183        Authentication $authentication,
    145184        ?Options $options = null,
    146185        ?User_Options $user_options = null
    147186    ) {
    148         $this->context       = $context;
    149         $this->modules       = $modules;
    150         $this->options       = $options ?: new Options( $this->context );
    151         $this->user_options  = $user_options ?: new User_Options( $this->context );
    152         $this->settings      = new Email_Reporting_Settings( $this->options );
    153         $this->user_settings = new User_Email_Reporting_Settings( $this->user_options );
     187        $this->context                   = $context;
     188        $this->modules                   = $modules;
     189        $this->data_requests             = $data_requests;
     190        $this->authentication            = $authentication;
     191        $this->options                   = $options ?: new Options( $this->context );
     192        $this->user_options              = $user_options ?: new User_Options( $this->context );
     193        $this->settings                  = new Email_Reporting_Settings( $this->options );
     194        $this->user_settings             = new User_Email_Reporting_Settings( $this->user_options );
     195        $this->was_analytics_4_connected = new Was_Analytics_4_Connected( $this->options );
    154196
    155197        $frequency_planner      = new Frequency_Planner();
     
    158200        $batch_query            = new Email_Log_Batch_Query();
    159201
    160         $this->rest_controller   = new REST_Email_Reporting_Controller( $this->settings );
     202        $this->rest_controller   = new REST_Email_Reporting_Controller( $this->settings, $this->was_analytics_4_connected );
    161203        $this->email_log         = new Email_Log( $this->context );
    162204        $this->scheduler         = new Email_Reporting_Scheduler( $frequency_planner );
    163205        $this->initiator_task    = new Initiator_Task( $this->scheduler, $subscribed_users_query );
    164206        $this->worker_task       = new Worker_Task( $max_execution_limiter, $batch_query, $this->scheduler );
     207        $this->fallback_task     = new Fallback_Task( $batch_query, $this->scheduler, $this->worker_task );
    165208        $this->monitor_task      = new Monitor_Task( $this->scheduler, $this->settings );
    166209        $this->email_log_cleanup = new Email_Log_Cleanup( $this->settings );
     
    181224        $this->scheduler->register();
    182225
    183         if ( $this->settings->is_email_reporting_enabled() ) {
     226        add_action(
     227            'googlesitekit_deactivate_module',
     228            function ( $slug ) {
     229                if ( Analytics_4::MODULE_SLUG === $slug ) {
     230                    $this->was_analytics_4_connected->set( true );
     231                }
     232            }
     233        );
     234
     235        // Schedule events only if authentication is completed and email reporting is enabled.
     236        // Otherwise events are being scheduled as soon as the plugin is activated.
     237        if ( $this->authentication->is_setup_completed() && $this->settings->is_email_reporting_enabled() ) {
    184238            $this->scheduler->schedule_initiator_events();
    185239            $this->scheduler->schedule_monitor();
     
    189243            add_action( Email_Reporting_Scheduler::ACTION_MONITOR, array( $this->monitor_task, 'handle_monitor_action' ) );
    190244            add_action( Email_Reporting_Scheduler::ACTION_WORKER, array( $this->worker_task, 'handle_callback_action' ), 10, 3 );
     245            add_action( Email_Reporting_Scheduler::ACTION_FALLBACK, array( $this->fallback_task, 'handle_fallback_action' ), 10, 3 );
    191246            add_action( Email_Reporting_Scheduler::ACTION_CLEANUP, array( $this->email_log_cleanup, 'handle_cleanup_action' ) );
    192247
  • google-site-kit/trunk/includes/Core/Email_Reporting/Email_Reporting_Scheduler.php

    r3407206 r3420533  
    118118
    119119    /**
    120      * Schedules a fallback event for the given frequency if one is not already queued.
     120     * Schedules a fallback event for the given batch if one is not already queued.
    121121     *
    122122     * @since 1.167.0
    123123     *
     124     * @param string $batch_id  Batch identifier.
    124125     * @param string $frequency Frequency slug.
    125126     * @param int    $timestamp Base timestamp for the batch.
    126127     * @param int    $delay     Delay in seconds before fallback runs.
    127128     */
    128     public function schedule_fallback( $frequency, $timestamp, $delay = HOUR_IN_SECONDS ) {
    129         if ( wp_next_scheduled( self::ACTION_FALLBACK, array( $frequency ) ) ) {
     129    public function schedule_fallback( $batch_id, $frequency, $timestamp, $delay = HOUR_IN_SECONDS ) {
     130        $args = array( $batch_id, $frequency, $timestamp );
     131
     132        if ( wp_next_scheduled( self::ACTION_FALLBACK, $args ) ) {
    130133            return;
    131134        }
    132135
    133         wp_schedule_single_event( $timestamp + $delay, self::ACTION_FALLBACK, array( $frequency ) );
     136        wp_schedule_single_event( $timestamp + $delay, self::ACTION_FALLBACK, $args );
    134137    }
    135138
  • google-site-kit/trunk/includes/Core/Email_Reporting/Initiator_Task.php

    r3407206 r3420533  
    8686
    8787        $this->scheduler->schedule_worker( $batch_id, $frequency, $timestamp );
    88         $this->scheduler->schedule_fallback( $frequency, $timestamp );
     88        $this->scheduler->schedule_fallback( $batch_id, $frequency, $timestamp );
    8989    }
    9090
  • google-site-kit/trunk/includes/Core/Email_Reporting/REST_Email_Reporting_Controller.php

    r3389193 r3420533  
    1414use Google\Site_Kit\Core\REST_API\REST_Route;
    1515use Google\Site_Kit\Core\REST_API\REST_Routes;
     16use Google\Site_Kit\Core\Storage\Options;
    1617use WP_REST_Request;
    1718use WP_REST_Response;
     
    3637
    3738    /**
     39     * Was_Analytics_4_Connected instance.
     40     *
     41     * @since 1.168.0
     42     * @var Was_Analytics_4_Connected
     43     */
     44    private $was_analytics_4_connected;
     45
     46    /**
    3847     * Constructor.
    3948     *
    4049     * @since 1.162.0
    4150     *
    42      * @param Email_Reporting_Settings $settings Email_Reporting_Settings instance.
     51     * @param Email_Reporting_Settings  $settings Email_Reporting_Settings instance.
     52     * @param Was_Analytics_4_Connected $was_analytics_4_connected  Was_Analytics_4_Connected instance.
    4353     */
    44     public function __construct( Email_Reporting_Settings $settings ) {
    45         $this->settings = $settings;
     54    public function __construct( Email_Reporting_Settings $settings, Was_Analytics_4_Connected $was_analytics_4_connected ) {
     55        $this->settings                  = $settings;
     56        $this->was_analytics_4_connected = $was_analytics_4_connected;
    4657    }
    4758
     
    6677                    array(
    6778                        '/' . REST_Routes::REST_ROOT . '/core/site/data/email-reporting',
     79                        '/' . REST_Routes::REST_ROOT . '/core/site/data/was-analytics-4-connected',
    6880                    )
    6981                );
     
    126138                )
    127139            ),
     140            new REST_Route(
     141                'core/site/data/was-analytics-4-connected',
     142                array(
     143                    array(
     144                        'methods'             => WP_REST_Server::READABLE,
     145                        'callback'            => function () {
     146                            return new WP_REST_Response( array( 'wasConnected' => $this->was_analytics_4_connected->get() ) );
     147                        },
     148                        'permission_callback' => $can_access,
     149                    ),
     150                )
     151            ),
    128152        );
    129153    }
  • google-site-kit/trunk/includes/Core/Modules/Modules.php

    r3373932 r3420533  
    723723        $this->sharing_settings->unset_module( $slug );
    724724
     725        /**
     726         * Fires when a module is deactivated.
     727         *
     728         * @since 1.168.0
     729         *
     730         * @param string $slug The slug of the deactivated module.
     731         */
     732        do_action( 'googlesitekit_deactivate_module', $slug );
     733
    725734        return true;
    726735    }
  • google-site-kit/trunk/includes/Core/Util/Uninstallation.php

    r3407206 r3420533  
    144144            // Only clear scheduled events that are set, important in E2E
    145145            // testing.
    146             if ( (bool) wp_next_scheduled( $event ) ) {
     146            if ( $this->is_event_scheduled( $event ) ) {
    147147                wp_unschedule_hook( $event );
    148148            }
    149149        }
    150150    }
     151
     152    /**
     153     * Determines if an event is scheduled for the given hook, regardless of arguments.
     154     *
     155     * @since 1.168.0
     156     *
     157     * @param string $hook The hook name.
     158     * @return bool True if an event is scheduled for the hook, false otherwise.
     159     */
     160    private function is_event_scheduled( $hook ) {
     161        $crons = _get_cron_array();
     162
     163        if ( ! is_array( $crons ) || empty( $crons ) ) {
     164            return false;
     165        }
     166
     167        foreach ( $crons as $events ) {
     168            if ( isset( $events[ $hook ] ) ) {
     169                return true;
     170            }
     171        }
     172
     173        return false;
     174    }
    151175}
  • google-site-kit/trunk/includes/Plugin.php

    r3407206 r3420533  
    228228                ( new Core\Consent_Mode\Consent_Mode( $this->context, $modules, $options ) )->register();
    229229                ( new Core\Tags\GTag( $options ) )->register();
    230                 ( new Core\Conversion_Tracking\Conversion_Tracking( $this->context, $options ) )->register();
     230
     231                $conversion_tracking = new Core\Conversion_Tracking\Conversion_Tracking( $this->context, $options );
     232                $conversion_tracking->register();
     233
    231234                if ( Feature_Flags::enabled( 'proactiveUserEngagement' ) ) {
    232                     ( new Core\Email_Reporting\Email_Reporting( $this->context, $modules, $options, $user_options ) )->register();
    233                 }
     235                    $data_requests = new Core\Email_Reporting\Email_Reporting_Data_Requests(
     236                        $this->context,
     237                        $modules,
     238                        $conversion_tracking,
     239                        $transients,
     240                        $user_options,
     241                    );
     242
     243                    ( new Core\Email_Reporting\Email_Reporting( $this->context, $modules, $data_requests, $authentication, $options, $user_options ) )->register();
     244                }
     245
    234246                if ( Feature_Flags::enabled( 'googleTagGateway' ) ) {
    235247                    ( new Core\Tags\Google_Tag_Gateway\Google_Tag_Gateway( $this->context, $options ) )->register();
  • google-site-kit/trunk/includes/vendor/composer/autoload_classmap.php

    r3407206 r3420533  
    8484    'Google\\Site_Kit\\Core\\Dismissals\\Dismissed_Items' => $baseDir . '/Core/Dismissals/Dismissed_Items.php',
    8585    'Google\\Site_Kit\\Core\\Dismissals\\REST_Dismissals_Controller' => $baseDir . '/Core/Dismissals/REST_Dismissals_Controller.php',
     86    'Google\\Site_Kit\\Core\\Email\\Email' => $baseDir . '/Core/Email/Email.php',
    8687    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Log' => $baseDir . '/Core/Email_Reporting/Email_Log.php',
    8788    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Log_Batch_Query' => $baseDir . '/Core/Email_Reporting/Email_Log_Batch_Query.php',
     
    9192    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Report_Section_Builder' => $baseDir . '/Core/Email_Reporting/Email_Report_Section_Builder.php',
    9293    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting' => $baseDir . '/Core/Email_Reporting/Email_Reporting.php',
     94    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting_Data_Requests' => $baseDir . '/Core/Email_Reporting/Email_Reporting_Data_Requests.php',
    9395    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting_Pointer' => $baseDir . '/Core/Email_Reporting/Email_Reporting_Pointer.php',
    9496    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting_Scheduler' => $baseDir . '/Core/Email_Reporting/Email_Reporting_Scheduler.php',
    9597    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting_Settings' => $baseDir . '/Core/Email_Reporting/Email_Reporting_Settings.php',
    9698    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting_Site_Health' => $baseDir . '/Core/Email_Reporting/Email_Reporting_Site_Health.php',
     99    'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Template_Renderer' => $baseDir . '/Core/Email_Reporting/Email_Template_Renderer.php',
     100    'Google\\Site_Kit\\Core\\Email_Reporting\\Fallback_Task' => $baseDir . '/Core/Email_Reporting/Fallback_Task.php',
    97101    'Google\\Site_Kit\\Core\\Email_Reporting\\Frequency_Planner' => $baseDir . '/Core/Email_Reporting/Frequency_Planner.php',
    98102    'Google\\Site_Kit\\Core\\Email_Reporting\\Initiator_Task' => $baseDir . '/Core/Email_Reporting/Initiator_Task.php',
     
    101105    'Google\\Site_Kit\\Core\\Email_Reporting\\REST_Email_Reporting_Controller' => $baseDir . '/Core/Email_Reporting/REST_Email_Reporting_Controller.php',
    102106    'Google\\Site_Kit\\Core\\Email_Reporting\\Report_Options\\Report_Options' => $baseDir . '/Core/Email_Reporting/Report_Options/Report_Options.php',
     107    'Google\\Site_Kit\\Core\\Email_Reporting\\Sections_Map' => $baseDir . '/Core/Email_Reporting/Sections_Map.php',
    103108    'Google\\Site_Kit\\Core\\Email_Reporting\\Subscribed_Users_Query' => $baseDir . '/Core/Email_Reporting/Subscribed_Users_Query.php',
     109    'Google\\Site_Kit\\Core\\Email_Reporting\\Was_Analytics_4_Connected' => $baseDir . '/Core/Email_Reporting/Was_Analytics_4_Connected.php',
    104110    'Google\\Site_Kit\\Core\\Email_Reporting\\Worker_Task' => $baseDir . '/Core/Email_Reporting/Worker_Task.php',
    105111    'Google\\Site_Kit\\Core\\Expirables\\Expirable_Items' => $baseDir . '/Core/Expirables/Expirable_Items.php',
  • google-site-kit/trunk/readme.txt

    r3407206 r3420533  
    55Tested up to:      6.9
    66Requires PHP:      7.4
    7 Stable tag:        1.167.0
     7Stable tag:        1.168.0
    88License:           Apache License 2.0
    99License URI:       https://www.apache.org/licenses/LICENSE-2.0
     
    110110== Changelog ==
    111111
    112 = 1.167.0 =
     112= 1.168.0 =
    113113
    114114**Enhanced**
    115115
    116 * Update casing of web data stream labels for consistency. See [#11763](https://github.com/google/site-kit-wp/issues/11763).
    117 * Add missing external icon to "Learn more" links in enhanced conversions notifications. See [#11744](https://github.com/google/site-kit-wp/issues/11744).
    118 * Update Enhanced Conversions dashboard notification priority to use `SETUP_CTA_HIGH` for consistency. See [#11741](https://github.com/google/site-kit-wp/issues/11741).
    119 * Add opt-in GA tracking as part of the new setup flow in the splash, Analytics, and Key Metrics setup screens. See [#11721](https://github.com/google/site-kit-wp/issues/11721).
    120 * Pass `show_progress` as a query parameter to the redirect URI rather than as a separate property when creating an Analytics account in the new setup flow. See [#11715](https://github.com/google/site-kit-wp/issues/11715).
    121 * Create email reporting data and section classes. See [#11680](https://github.com/google/site-kit-wp/issues/11680).
    122 * Include the current AMP mode in the request to get enabled features. See [#11643](https://github.com/google/site-kit-wp/issues/11643).
    123 * Implement monitor scheduler for Email Reporting events. See [#11599](https://github.com/google/site-kit-wp/issues/11599).
    124 * Implement email reporting log clear schedulers. See [#11582](https://github.com/google/site-kit-wp/issues/11582).
    125 * AdSense alert links now open in a new tab. See [#11578](https://github.com/google/site-kit-wp/issues/11578).
    126 * Add report options builder classes for Analytics, AdSense, and SC modules. See [#11552](https://github.com/google/site-kit-wp/issues/11552).
    127 * Implement “Worker” scheduled events for Email Reporting. See [#11547](https://github.com/google/site-kit-wp/issues/11547).
    128 * Add infrastructure for scheduled events at various intervals. See [#11546](https://github.com/google/site-kit-wp/issues/11546).
    129 * Extend the Reset utility class to delete remaining error reporting logs. See [#11545](https://github.com/google/site-kit-wp/issues/11545).
    130 * Improve the help link destination in the authentication error screen. See [#11529](https://github.com/google/site-kit-wp/issues/11529).
    131 * Ensure the user is returned to the Analytics or Key Metrics setup screen if the new setup flow is interrupted on one of those screens. See [#11388](https://github.com/google/site-kit-wp/issues/11388).
    132 * Improve error reporting in Site Kit widgets to not report duplicate errors. See [#8970](https://github.com/google/site-kit-wp/issues/8970).
    133 * Improve legend color consistency in the Analytics all traffic widget. See [#7199](https://github.com/google/site-kit-wp/issues/7199).
     116* Add the welcome modal as part of the setup flow refresh. See [#11808](https://github.com/google/site-kit-wp/issues/11808).
     117* Update the uninstall script to unregister all email reporting events when the plugin is unininstalled. See [#11805](https://github.com/google/site-kit-wp/issues/11805).
     118* Add opt-in internal tracking for the new key metrics setup screen. See [#11723](https://github.com/google/site-kit-wp/issues/11723).
     119* Add GA event tracking for user interaction with the Analytics setup screen in the new setup flow. See [#11722](https://github.com/google/site-kit-wp/issues/11722).
     120* Add a class to send emails. See [#11564](https://github.com/google/site-kit-wp/issues/11564).
     121* Add email reporting templates. See [#11550](https://github.com/google/site-kit-wp/issues/11550).
     122* Add a base template for reports sent by Email Reporting. See [#11549](https://github.com/google/site-kit-wp/issues/11549).
     123* Implement “Fallback” scheduled events for Email Reporting. See [#11548](https://github.com/google/site-kit-wp/issues/11548).
     124* Detect if Analytics has previously been connected when displaying certain notices in the Email Reporting notices. See [#11435](https://github.com/google/site-kit-wp/issues/11435).
     125* Add `utm_source=sitekit` query parameter to all external service links for source tracking. See [#11160](https://github.com/google/site-kit-wp/issues/11160).
     126* Update Ads Module Disconnect Messaging for PAX Setup Flow. See [#10607](https://github.com/google/site-kit-wp/issues/10607).
    134127
    135128**Fixed**
    136129
    137 * Fix internal event tracking to include plugin version information. See [#11802](https://github.com/google/site-kit-wp/issues/11802).
    138 * Prevent an unnecessary request to the `enhanced-measurement-settings` endpoint when loading the dashboard. See [#11766](https://github.com/google/site-kit-wp/issues/11766).
    139 * Fix incorrect formatting of WooCommerce enhanced conversions phone numbers. See [#11737](https://github.com/google/site-kit-wp/issues/11737).
    140 * Ensure the "Google Analytics was successfully set up" toast should appears on the Key Metrics setup screen in the new setup flow. See [#11731](https://github.com/google/site-kit-wp/issues/11731).
    141 * Amend styles for Sign in with Google settings editing screen. See [#11314](https://github.com/google/site-kit-wp/issues/11314).
    142 * Fix Audience segmentation toggling issue. See [#9700](https://github.com/google/site-kit-wp/issues/9700).
     130* Fix in-progress spinner not appearing in CTA buttons for banners and notices. See [#11876](https://github.com/google/site-kit-wp/issues/11876).
     131* Fix banner width for Sign in with Google content on very large displays. See [#11800](https://github.com/google/site-kit-wp/issues/11800).
     132* Fix enhanced conversion tracking fatal errors. See [#11049](https://github.com/google/site-kit-wp/issues/11049).
    143133
    144134[See changelog for all versions](https://raw.githubusercontent.com/google/site-kit-wp/main/changelog.txt).
Note: See TracChangeset for help on using the changeset viewer.