Plugin Directory

Changeset 3156474


Ignore:
Timestamp:
09/23/2024 05:35:38 PM (15 months ago)
Author:
google
Message:

Update to version 1.136.0 from GitHub

Location:
google-site-kit
Files:
76 added
76 deleted
28 edited
1 copied

Legend:

Unmodified
Added
Removed
  • google-site-kit/tags/1.136.0/dist/config.php

    r3148853 r3156474  
    88
    99return array(
    10     'features' => array( 'adsPax','audienceSegmentation','conversionInfra','conversionReporting','gm3Components','privacySandboxModule','rrmModule' ),
     10    'features' => array( 'adsPax','audienceSegmentation','conversionReporting','gm3Components','privacySandboxModule','rrmModule' ),
    1111);
  • google-site-kit/tags/1.136.0/dist/manifest.php

    r3148853 r3156474  
    1919    'analytics-advanced-tracking'                          => array( "analytics-advanced-tracking-ea84b2c367b69f5c094b.js", null ),
    2020    'googlesitekit-i18n'                                   => array( "googlesitekit-i18n-33cdd2dee5d1d1f4fb34.js", null ),
    21     'googlesitekit-admin-css'                              => array( "googlesitekit-admin-css-aa86cfc6a5f741788a7c.min.css", null ),
     21    'googlesitekit-admin-css'                              => array( "googlesitekit-admin-css-053cc6d10f872e85dfec.min.css", null ),
    2222    'googlesitekit-adminbar-css'                           => array( "googlesitekit-adminbar-css-6db776544b37175be17f.min.css", null ),
    2323    'googlesitekit-authorize-application-css'              => array( "googlesitekit-authorize-application-css-ce25e97404abc5a02921.min.css", null ),
    2424    'googlesitekit-wp-dashboard-css'                       => array( "googlesitekit-wp-dashboard-css-d1180e1ae01fd577a4c5.min.css", null ),
    25     'googlesitekit-vendor'                                 => array( "googlesitekit-vendor-a6981ed288b93492603b.js", null ),
    26     'googlesitekit-runtime'                                => array( "runtime-d557ed4ac02e283c5876.js", null ),
    27     'googlesitekit-activation'                             => array( "googlesitekit-activation-0821f43f9450b2976a7a.js", null ),
    28     'googlesitekit-ad-blocking-recovery'                   => array( "googlesitekit-ad-blocking-recovery-579fd18c5139f49e351c.js", null ),
    29     'googlesitekit-adminbar'                               => array( "googlesitekit-adminbar-71a4c60e10b747d93ca2.js", null ),
    30     'googlesitekit-api'                                    => array( "googlesitekit-api-9b1652004ccc0f0b0b1b.js", null ),
    31     'googlesitekit-components'                             => array( array( "googlesitekit-components-gm2-96b55635c1d0add6b113.js", null ), array( "googlesitekit-components-gm3-3d65e72b5559508c0b55.js", null ) ),
    32     'googlesitekit-data'                                   => array( "googlesitekit-data-e2268525679009e0b686.js", null ),
    33     'googlesitekit-datastore-forms'                        => array( "googlesitekit-datastore-forms-ae8fa4b0fa5631cf15b6.js", null ),
    34     'googlesitekit-datastore-location'                     => array( "googlesitekit-datastore-location-f0882c9e5e34e44de556.js", null ),
    35     'googlesitekit-datastore-site'                         => array( "googlesitekit-datastore-site-12278d2471b9e1b9c7d9.js", null ),
    36     'googlesitekit-datastore-ui'                           => array( "googlesitekit-datastore-ui-fe42b0d32a18a0d8e2a4.js", null ),
    37     'googlesitekit-datastore-user'                         => array( "googlesitekit-datastore-user-6782e64c8e074e04fdb2.js", null ),
    38     'googlesitekit-entity-dashboard'                       => array( "googlesitekit-entity-dashboard-3d8921966120d895eb4e.js", null ),
    39     'googlesitekit-main-dashboard'                         => array( "googlesitekit-main-dashboard-d41471d89b1de6dd037d.js", null ),
    40     'googlesitekit-modules'                                => array( "googlesitekit-modules-c730dded8055345dd88e.js", null ),
    41     'googlesitekit-modules-ads'                            => array( "googlesitekit-modules-ads-bb19ec978323f5d81ee8.js", null ),
    42     'googlesitekit-modules-adsense'                        => array( "googlesitekit-modules-adsense-d7930ab6f8cb50a2cb53.js", null ),
    43     'googlesitekit-modules-analytics-4'                    => array( "googlesitekit-modules-analytics-4-316295cedc05f5eda6be.js", null ),
    44     'googlesitekit-modules-pagespeed-insights'             => array( "googlesitekit-modules-pagespeed-insights-7cc149a0141bab9f57e9.js", null ),
    45     'googlesitekit-modules-reader-revenue-manager'         => array( "googlesitekit-modules-reader-revenue-manager-820deb3366dc2d6a5b97.js", null ),
    46     'googlesitekit-modules-search-console'                 => array( "googlesitekit-modules-search-console-6a559af0c5fecd654e9f.js", null ),
    47     'googlesitekit-modules-tagmanager'                     => array( "googlesitekit-modules-tagmanager-32aba630e6cc73d2740a.js", null ),
    48     'googlesitekit-notifications'                          => array( "googlesitekit-notifications-c2b7efe32e100efb9c07.js", null ),
    49     'googlesitekit-polyfills'                              => array( "googlesitekit-polyfills-2d2cf8e51bb75d3e6910.js", null ),
    50     'googlesitekit-settings'                               => array( "googlesitekit-settings-b9e65db8c7e98031a46c.js", null ),
    51     'googlesitekit-splash'                                 => array( "googlesitekit-splash-08e91c5324381f991fb8.js", null ),
    52     'googlesitekit-user-input'                             => array( "googlesitekit-user-input-d02b9035565ab9445d7c.js", null ),
    53     'googlesitekit-widgets'                                => array( "googlesitekit-widgets-a1e20a8ab18c511f53b0.js", null ),
    54     'googlesitekit-wp-dashboard'                           => array( "googlesitekit-wp-dashboard-a824d9536eb9f6fe8c57.js", null ),
     25    'googlesitekit-vendor'                                 => array( "googlesitekit-vendor-7b07d6a5d1805e66d1ac.js", null ),
     26    'googlesitekit-runtime'                                => array( "runtime-a03dc480bb824e581faf.js", null ),
     27    'googlesitekit-activation'                             => array( "googlesitekit-activation-d995789855c53d9287dc.js", null ),
     28    'googlesitekit-ad-blocking-recovery'                   => array( "googlesitekit-ad-blocking-recovery-b63a4aa00dcc9a1b679d.js", null ),
     29    'googlesitekit-adminbar'                               => array( "googlesitekit-adminbar-ba93f1de6e0f9c668a55.js", null ),
     30    'googlesitekit-api'                                    => array( "googlesitekit-api-0497ee7b8db3bc2847dd.js", null ),
     31    'googlesitekit-components'                             => array( array( "googlesitekit-components-gm2-6b06ec42bd84ae5f94a4.js", null ), array( "googlesitekit-components-gm3-ad198d0a7f2d1cae3e37.js", null ) ),
     32    'googlesitekit-data'                                   => array( "googlesitekit-data-f593a058426722c37f5f.js", null ),
     33    'googlesitekit-datastore-forms'                        => array( "googlesitekit-datastore-forms-4b5d9d42037b3f028dce.js", null ),
     34    'googlesitekit-datastore-location'                     => array( "googlesitekit-datastore-location-14888d5db6759a2be117.js", null ),
     35    'googlesitekit-datastore-site'                         => array( "googlesitekit-datastore-site-ebd856c122a4f4aa14b7.js", null ),
     36    'googlesitekit-datastore-ui'                           => array( "googlesitekit-datastore-ui-15bd5ee51dc539f4c5a2.js", null ),
     37    'googlesitekit-datastore-user'                         => array( "googlesitekit-datastore-user-95aca262931d0ecfb8ec.js", null ),
     38    'googlesitekit-entity-dashboard'                       => array( "googlesitekit-entity-dashboard-f4bc2a97771356f9d9f6.js", null ),
     39    'googlesitekit-main-dashboard'                         => array( "googlesitekit-main-dashboard-14b335d3a7c14a383886.js", null ),
     40    'googlesitekit-modules'                                => array( "googlesitekit-modules-b4b66360c583d678e0cb.js", null ),
     41    'googlesitekit-modules-ads'                            => array( "googlesitekit-modules-ads-16a57085cb47b8b62fac.js", null ),
     42    'googlesitekit-modules-adsense'                        => array( "googlesitekit-modules-adsense-56d449fdb1d6dfa5dede.js", null ),
     43    'googlesitekit-modules-analytics-4'                    => array( "googlesitekit-modules-analytics-4-a753b8f1350e421feab9.js", null ),
     44    'googlesitekit-modules-pagespeed-insights'             => array( "googlesitekit-modules-pagespeed-insights-35a83552326fe8c15d82.js", null ),
     45    'googlesitekit-modules-reader-revenue-manager'         => array( "googlesitekit-modules-reader-revenue-manager-10455c2ab821b77270b3.js", null ),
     46    'googlesitekit-modules-search-console'                 => array( "googlesitekit-modules-search-console-1428a7f85b506c209ae8.js", null ),
     47    'googlesitekit-modules-tagmanager'                     => array( "googlesitekit-modules-tagmanager-8e0e5af7057d20718dc3.js", null ),
     48    'googlesitekit-notifications'                          => array( "googlesitekit-notifications-73bd3e96974c7c2d13a3.js", null ),
     49    'googlesitekit-polyfills'                              => array( "googlesitekit-polyfills-cb3565d333d06cdfbdad.js", null ),
     50    'googlesitekit-settings'                               => array( "googlesitekit-settings-099b0e21ccb3a74bde98.js", null ),
     51    'googlesitekit-splash'                                 => array( "googlesitekit-splash-f1ea329e613f7162b442.js", null ),
     52    'googlesitekit-user-input'                             => array( "googlesitekit-user-input-69696a4d8e9bc34ae299.js", null ),
     53    'googlesitekit-widgets'                                => array( "googlesitekit-widgets-6caf8e5d49a6f38fdb07.js", null ),
     54    'googlesitekit-wp-dashboard'                           => array( "googlesitekit-wp-dashboard-2263707a9bdb864cbddf.js", null ),
    5555);
  • google-site-kit/tags/1.136.0/google-site-kit.php

    r3148853 r3156474  
    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.135.0
     14 * Version:           1.136.0
    1515 * Requires at least: 5.2
    1616 * Requires PHP:      7.4
     
    2727
    2828// Define most essential constants.
    29 define( 'GOOGLESITEKIT_VERSION', '1.135.0' );
     29define( 'GOOGLESITEKIT_VERSION', '1.136.0' );
    3030define( 'GOOGLESITEKIT_PLUGIN_MAIN_FILE', __FILE__ );
    3131define( 'GOOGLESITEKIT_PHP_MINIMUM', '7.4.0' );
  • google-site-kit/tags/1.136.0/includes/Core/Site_Health/Debug_Data.php

    r3118692 r3156474  
    193193        );
    194194
    195         if ( Feature_Flags::enabled( 'conversionInfra' ) ) {
    196             $fields = array_merge( $fields, $this->get_active_conversion_event_provider_fields() );
    197         }
    198 
     195        $fields = array_merge( $fields, $this->get_active_conversion_event_provider_fields() );
    199196        $fields = array_merge( $fields, $this->get_consent_mode_fields() );
    200 
    201197        $fields = array_merge( $fields, $this->get_module_sharing_settings_fields() );
    202198
  • google-site-kit/tags/1.136.0/includes/Core/User/Audience_Settings.php

    r3141863 r3156474  
    4343     *
    4444     * @since 1.124.0
     45     * @since 1.136.0 Added `didSetAudiences` default value.
    4546     *
    4647     * @return array The default value.
     
    5051            'configuredAudiences'                => null,
    5152            'isAudienceSegmentationWidgetHidden' => false,
     53            'didSetAudiences'                    => false,
    5254        );
    5355    }
     
    7779        $updated = array_intersect_key( $partial, $allowed_settings );
    7880
     81        if ( empty( $settings['didSetAudiences'] )
     82            && isset( $updated['configuredAudiences'] )
     83            && is_array( $updated['configuredAudiences'] )
     84            && ! empty( $updated['configuredAudiences'] )
     85        ) {
     86            $updated['didSetAudiences'] = true;
     87        }
     88
    7989        return $this->set( array_merge( $settings, $updated ) );
    8090    }
     
    103113            }
    104114
     115            if ( isset( $settings['didSetAudiences'] ) ) {
     116                $sanitized_settings['didSetAudiences'] = false !== $settings['didSetAudiences'];
     117            }
     118
    105119            return $sanitized_settings;
    106120        };
  • google-site-kit/tags/1.136.0/includes/Core/User/REST_Audience_Settings_Controller.php

    r3141863 r3156474  
    134134                                                'type' => 'boolean',
    135135                                            ),
     136                                            'didSetAudiences'                   => array(
     137                                                'type' => 'boolean',
     138                                            ),
    136139                                        ),
    137140                                    ),
  • google-site-kit/tags/1.136.0/includes/Core/Util/Health_Checks.php

    r3118692 r3156474  
    9696                )
    9797            ),
    98             new REST_Route(
    99                 'core/site/data/connection-check',
    100                 array(
    101                     array(
    102                         'methods'             => WP_REST_Server::READABLE,
    103                         'callback'            => function () {
    104                             return 'true';
    105                         },
    106                         'permission_callback' => function () {
    107                             return current_user_can( Permissions::VIEW_SHARED_DASHBOARD ) || current_user_can( Permissions::SETUP );
    108                         },
    109                     ),
    110                 )
    111             ),
    11298        );
    11399    }
  • google-site-kit/tags/1.136.0/includes/Core/Util/Uninstallation.php

    r3118692 r3156474  
    1616use Google\Site_Kit\Core\Authentication\Credentials;
    1717use Google\Site_Kit\Core\Authentication\Google_Proxy;
    18 use Exception;
     18use Google\Site_Kit\Core\Authentication\Clients\OAuth_Client;
     19use Google\Site_Kit\Core\Remote_Features\Remote_Features_Cron;
     20use Google\Site_Kit\Modules\Analytics_4\Conversion_Reporting\Conversion_Reporting_Cron;
     21use Google\Site_Kit\Modules\Analytics_4\Synchronize_AdSenseLinked;
     22use Google\Site_Kit\Modules\Analytics_4\Synchronize_AdsLinked;
     23use Google\Site_Kit\Modules\Analytics_4\Synchronize_Property;
    1924
    2025/**
     
    4247     */
    4348    private $options;
     49
     50    /**
     51     * List of scheduled events.
     52     *
     53     * @since 1.136.0
     54     * @var array
     55     */
     56    const SCHEDULED_EVENTS = array(
     57        Conversion_Reporting_Cron::CRON_ACTION,
     58        OAuth_Client::CRON_REFRESH_PROFILE_DATA,
     59        Remote_Features_Cron::CRON_ACTION,
     60        Synchronize_AdSenseLinked::CRON_SYNCHRONIZE_ADSENSE_LINKED,
     61        Synchronize_AdsLinked::CRON_SYNCHRONIZE_ADS_LINKED,
     62        Synchronize_Property::CRON_SYNCHRONIZE_PROPERTY,
     63    );
    4464
    4565    /**
     
    7393            function () {
    7494                $this->uninstall();
     95                $this->clear_scheduled_events();
     96            }
     97        );
     98
     99        add_action(
     100            'googlesitekit_deactivation',
     101            function () {
     102                $this->clear_scheduled_events();
     103            }
     104        );
     105
     106        add_action(
     107            'googlesitekit_reset',
     108            function () {
     109                $this->clear_scheduled_events();
    75110            }
    76111        );
     
    91126        }
    92127    }
     128
     129    /**
     130     * Clears all scheduled events.
     131     *
     132     * @since 1.136.0
     133     */
     134    private function clear_scheduled_events() {
     135        foreach ( self::SCHEDULED_EVENTS as $event ) {
     136            wp_clear_scheduled_hook( $event );
     137        }
     138    }
    93139}
  • google-site-kit/tags/1.136.0/includes/Modules/Analytics_4.php

    r3148853 r3156474  
    9090use Google\Site_Kit_Dependencies\Psr\Http\Message\RequestInterface;
    9191use Google\Site_Kit\Core\REST_API\REST_Routes;
    92 use Google\Site_Kit\Core\User\Audience_Settings;
    9392use Google\Site_Kit\Modules\Analytics_4\Conversion_Reporting\Conversion_Reporting_Cron;
    9493use Google\Site_Kit\Modules\Analytics_4\Conversion_Reporting\Conversion_Reporting_Events_Sync;
     
    153152     */
    154153    protected $custom_dimensions_data_available;
    155 
    156     /**
    157      * Audience_Settings instance.
    158      *
    159      * @since 1.124.0
    160      * @var Audience_Settings
    161      */
    162     protected $audience_settings;
    163154
    164155    /**
     
    190181        parent::__construct( $context, $options, $user_options, $authentication, $assets );
    191182        $this->custom_dimensions_data_available = new Custom_Dimensions_Data_Available( $this->transients );
    192         $this->audience_settings                = new Audience_Settings( $this->user_options );
    193183        $this->resource_data_availability_date  = new Resource_Data_Availability_Date( $this->transients, $this->get_settings() );
    194184    }
     
    235225        add_action( 'admin_init', array( $synchronize_property, 'maybe_schedule_synchronize_property' ) );
    236226        add_action( 'admin_init', array( $synchronize_adsense_linked, 'maybe_schedule_synchronize_adsense_linked' ) );
    237         add_action( 'admin_init', array( $synchronize_ads_linked, 'maybe_schedule_synchronize_ads_linked' ) );
     227        add_action( 'load-toplevel_page_googlesitekit-dashboard', array( $synchronize_ads_linked, 'maybe_schedule_synchronize_ads_linked' ) );
    238228        add_action( 'admin_init', $this->get_method_proxy( 'handle_provisioning_callback' ) );
    239229
     
    680670                'service' => '',
    681671            );
    682             $datapoints['POST:sync-audiences']                       = array( 'service' => 'analyticsaudiences' );
     672            $datapoints['POST:sync-audiences']                       = array(
     673                'service' => 'analyticsaudiences',
     674            );
    683675        }
    684676
     
    24042396        usort(
    24052397            $available_audiences,
    2406             function ( $a, $b ) {
    2407                 $a_weight = self::AUDIENCE_TYPE_SORT_ORDER[ $a['audienceType'] ];
    2408                 $b_weight = self::AUDIENCE_TYPE_SORT_ORDER[ $b['audienceType'] ];
    2409 
    2410                 return $a_weight - $b_weight;
     2398            function ( $audience_a, $audience_b ) use ( $available_audiences ) {
     2399                $audience_index_a = array_search( $audience_a, $available_audiences, true );
     2400                $audience_index_b = array_search( $audience_b, $available_audiences, true );
     2401
     2402                if ( false === $audience_index_a || false === $audience_index_b ) {
     2403                    return 0;
     2404                }
     2405
     2406                $audience_a = $available_audiences[ $audience_index_a ];
     2407                $audience_b = $available_audiences[ $audience_index_b ];
     2408
     2409                $audience_type_a = $audience_a['audienceType'];
     2410                $audience_type_b = $audience_b['audienceType'];
     2411
     2412                if ( $audience_type_a === $audience_type_b ) {
     2413                    if ( 'SITE_KIT_AUDIENCE' === $audience_type_b ) {
     2414                        return 'new-visitors' === $audience_a['audienceSlug'] ? -1 : 1;
     2415                    }
     2416
     2417                    return $audience_index_a - $audience_index_b;
     2418                }
     2419
     2420                $weight_a = self::AUDIENCE_TYPE_SORT_ORDER[ $audience_type_a ];
     2421                $weight_b = self::AUDIENCE_TYPE_SORT_ORDER[ $audience_type_b ];
     2422
     2423                if ( $weight_a === $weight_b ) {
     2424                    return $audience_index_a - $audience_index_b;
     2425                }
     2426
     2427                return $weight_a - $weight_b;
    24112428            }
    24122429        );
  • google-site-kit/tags/1.136.0/includes/Modules/Analytics_4/Report/RequestHelpers.php

    r3148853 r3156474  
    269269            'googlesitekit_shareable_analytics_4_dimensions',
    270270            array(
     271                'audienceResourceName',
    271272                'adSourceName',
    272273                'city',
  • google-site-kit/tags/1.136.0/includes/Modules/Analytics_4/Settings.php

    r3148853 r3156474  
    6969     */
    7070    public function get_view_only_keys() {
    71         return array( 'availableCustomDimensions', 'adSenseLinked' );
     71        return array(
     72            'availableCustomDimensions',
     73            'adSenseLinked',
     74            'availableAudiences',
     75            'audienceSegmentationSetupComplete',
     76        );
    7277    }
    7378
     
    8186    protected function get_default() {
    8287        return array(
    83             'ownerID'                          => 0,
    84             'accountID'                        => '',
    85             'adsConversionID'                  => '',
    86             'propertyID'                       => '',
    87             'webDataStreamID'                  => '',
    88             'measurementID'                    => '',
    89             'trackingDisabled'                 => array( 'loggedinUsers' ),
    90             'useSnippet'                       => true,
    91             'googleTagID'                      => '',
    92             'googleTagAccountID'               => '',
    93             'googleTagContainerID'             => '',
    94             'googleTagContainerDestinationIDs' => null,
    95             'googleTagLastSyncedAtMs'          => 0,
    96             'availableCustomDimensions'        => null,
    97             'propertyCreateTime'               => 0,
    98             'adSenseLinked'                    => false,
    99             'adSenseLinkedLastSyncedAt'        => 0,
    100             'adsConversionIDMigratedAtMs'      => 0,
    101             'adsLinked'                        => false,
    102             'adsLinkedLastSyncedAt'            => 0,
    103             'availableAudiences'               => null,
    104             'availableAudiencesLastSyncedAt'   => 0,
    105             'detectedEvents'                   => array(),
     88            'ownerID'                           => 0,
     89            'accountID'                         => '',
     90            'adsConversionID'                   => '',
     91            'propertyID'                        => '',
     92            'webDataStreamID'                   => '',
     93            'measurementID'                     => '',
     94            'trackingDisabled'                  => array( 'loggedinUsers' ),
     95            'useSnippet'                        => true,
     96            'googleTagID'                       => '',
     97            'googleTagAccountID'                => '',
     98            'googleTagContainerID'              => '',
     99            'googleTagContainerDestinationIDs'  => null,
     100            'googleTagLastSyncedAtMs'           => 0,
     101            'availableCustomDimensions'         => null,
     102            'propertyCreateTime'                => 0,
     103            'adSenseLinked'                     => false,
     104            'adSenseLinkedLastSyncedAt'         => 0,
     105            'adsConversionIDMigratedAtMs'       => 0,
     106            'adsLinked'                         => false,
     107            'adsLinkedLastSyncedAt'             => 0,
     108            'availableAudiences'                => null,
     109            'availableAudiencesLastSyncedAt'    => 0,
     110            'audienceSegmentationSetupComplete' => false,
     111            'detectedEvents'                    => array(),
    106112        );
    107113    }
     
    201207                    }
    202208                }
     209
     210                if ( isset( $option['audienceSegmentationSetupComplete'] ) ) {
     211                    $option['audienceSegmentationSetupComplete'] = (bool) $option['audienceSegmentationSetupComplete'];
     212                }
    203213            }
    204214
  • google-site-kit/tags/1.136.0/includes/Modules/Analytics_4/Synchronize_AdsLinked.php

    r3118692 r3156474  
    1313use Google\Site_Kit\Core\Permissions\Permissions;
    1414use Google\Site_Kit\Core\Storage\User_Options;
     15use Google\Site_Kit\Modules\Ads;
    1516use Google\Site_Kit\Modules\Analytics_4;
    1617
     
    7475     */
    7576    protected function synchronize_ads_linked_data() {
     77        $ads_connected = apply_filters( 'googlesitekit_is_module_connected', false, Ads::MODULE_SLUG );
     78
     79        if ( $ads_connected ) {
     80            return;
     81        }
     82
    7683        $owner_id     = $this->analytics_4->get_owner_id();
    7784        $restore_user = $this->user_options->switch_user( $owner_id );
     
    123130        if ( $analytics_4_connected && ! $cron_already_scheduled ) {
    124131            wp_schedule_single_event(
    125                 // Schedule the task to run in 24 hours.
    126                 time() + ( DAY_IN_SECONDS ),
     132                time() + ( WEEK_IN_SECONDS ),
    127133                self::CRON_SYNCHRONIZE_ADS_LINKED
    128134            );
  • google-site-kit/tags/1.136.0/includes/Plugin.php

    r3141863 r3156474  
    226226                ( new Core\Consent_Mode\Consent_Mode( $this->context, $options ) )->register();
    227227                ( new Core\Tags\GTag() )->register();
    228 
    229                 if ( Feature_Flags::enabled( 'conversionInfra' ) ) {
    230                     ( new Core\Conversion_Tracking\Conversion_Tracking( $this->context, $options ) )->register();
    231                 }
     228                ( new Core\Conversion_Tracking\Conversion_Tracking( $this->context, $options ) )->register();
    232229
    233230                // If a login is happening (runs after 'init'), update current user in dependency chain.
  • google-site-kit/tags/1.136.0/readme.txt

    r3148853 r3156474  
    55Tested up to:      6.6
    66Requires PHP:      7.4
    7 Stable tag:        1.135.0
     7Stable tag:        1.136.0
    88License:           Apache License 2.0
    99License URI:       https://www.apache.org/licenses/LICENSE-2.0
     
    110110== Changelog ==
    111111
    112 = 1.135.0 =
     112= 1.136.0 =
    113113
    114114**Added**
    115115
    116 * Add a cron task to fetch Analytics report data for conversion events reporting. See [#9130](https://github.com/google/site-kit-wp/issues/9130).
     116* Add the new `Top cities driving leads` widget. See [#9154](https://github.com/google/site-kit-wp/issues/9154).
     117* Add new WordPress Data controls to `googlesitekit-data`. See [#8992](https://github.com/google/site-kit-wp/issues/8992).
    117118
    118119**Enhanced**
    119120
    120 * Add an "Edit in Reader Revenue Manager" link to the RRM module's settings view screen. See [#9192](https://github.com/google/site-kit-wp/issues/9192).
    121 * Add `conversionReporting` feature flag to plugin. See [#9152](https://github.com/google/site-kit-wp/issues/9152).
    122 * Add support for Analytics Conversion Report Events in data store. See [#9132](https://github.com/google/site-kit-wp/issues/9132).
    123 * Fix the undefined array key "name" warning. See [#9113](https://github.com/google/site-kit-wp/issues/9113).
    124 * Don't show the Audiences Widget Area on the dashboard when the "Display visitor groups in dashboard" switch is toggled off in the Settings section. See [#9065](https://github.com/google/site-kit-wp/issues/9065).
    125 * Refactor PAX notification to use new notification infrastructure. See [#8980](https://github.com/google/site-kit-wp/issues/8980).
    126 * Update Google Tag scope notifications to use new notifications infrastructure. See [#8979](https://github.com/google/site-kit-wp/issues/8979).
    127 * Update banner notification code for the "Unsatisfied Scopes Alert" banner notification. See [#8978](https://github.com/google/site-kit-wp/issues/8978).
    128 * Optimize Audience Segmentation related API calls to be made only when the area is being viewed. See [#8879](https://github.com/google/site-kit-wp/issues/8879).
    129 * Add the `PublicationOnboardingStateNotice` component, rendering a notice based on the onboarding state of the current publication and presented in Storybook. See [#8838](https://github.com/google/site-kit-wp/issues/8838).
    130 * Fix PHP 8.1 deprecation notices. See [#8589](https://github.com/google/site-kit-wp/issues/8589).
    131 * Enhance Audience Segmentation CTAs to not appear on shared dashboard. See [#8174](https://github.com/google/site-kit-wp/issues/8174).
    132 * Show a notice in the Audience Creation Notice when the Analytics edit scope is missing, and proceed directly to the OAuth flow upon clicking a CTA to create an audience. See [#8165](https://github.com/google/site-kit-wp/issues/8165).
    133 * Show an Audience Tile in an error state if an error occurred while retrieving its data; show a combined error state if all audiences have an error. See [#8147](https://github.com/google/site-kit-wp/issues/8147).
     121* Update publication links in the Reader Revenue Manager module to navigate to the RRM product page for the publication. See [#9313](https://github.com/google/site-kit-wp/issues/9313).
     122* Improve instructions for creating a new publication in the Reader Revenue Manager module setup screen. See [#9308](https://github.com/google/site-kit-wp/issues/9308).
     123* Refactor Ads notifications to use new notifications infrastructure. See [#9279](https://github.com/google/site-kit-wp/issues/9279).
     124* Show the "Display visitor groups in dashboard" toggle in the Site Kit Admin settings even when Google Analytics is disconnected. See [#9264](https://github.com/google/site-kit-wp/issues/9264).
     125* When a user clicks the CTA to visit the Publisher Center from one of the onboarding state notifications, resync the onboarding state upon returning to the Site Kit browser tab and update/hide the notification if the state has changed. See [#9262](https://github.com/google/site-kit-wp/issues/9262).
     126* Show the Reader Revenue Manager module's setup banner again two weeks after being dismissed, and show a tooltip to let the user know it can be set up later in Settings. See [#9257](https://github.com/google/site-kit-wp/issues/9257).
     127* Update text colour in Reader Revenue Manager publication creation screen. See [#9256](https://github.com/google/site-kit-wp/issues/9256).
     128* Reduce frequency of AdsLinks checks. See [#9141](https://github.com/google/site-kit-wp/issues/9141).
     129* Improve offline connection check logic/behaviour. See [#9083](https://github.com/google/site-kit-wp/issues/9083).
     130* Scroll to the Audiences Widget Area when clicking the "Show me" CTA on the Setup Success Notice that is shown when the Audience Segmentation feature has been set up. See [#8874](https://github.com/google/site-kit-wp/issues/8874).
     131* Implement the Audience Segmentation "no audiences" banner variants for secondary authenticated and shared dashboard users. See [#8577](https://github.com/google/site-kit-wp/issues/8577).
     132* Remove "New" badges from Analytics widgets in the entity dashboard. See [#8203](https://github.com/google/site-kit-wp/issues/8203).
     133* Add "New" badges to newly created audiences in the Selection Panel, which will be visible for 28 days after the first viewing. See [#8170](https://github.com/google/site-kit-wp/issues/8170).
     134* Redirect to OAuth as needed to grant the scope for creating the required custom dimension from the "Top content" metric section. See [#8154](https://github.com/google/site-kit-wp/issues/8154).
     135* Handle the “new visitors” and “returning visitors” audiences as a special case to avoid the "partial data" state for them on the Audience Tiles. See [#8144](https://github.com/google/site-kit-wp/issues/8144).
     136* Automatically configure the audience selection for additional admins and view-only users once an admin has set up the feature. See [#8130](https://github.com/google/site-kit-wp/issues/8130).
     137* Remove scheduled events upon deactivation, reset or uninstall. See [#6992](https://github.com/google/site-kit-wp/issues/6992).
     138* Improve error notice when no "Retry" button is present. See [#6707](https://github.com/google/site-kit-wp/issues/6707).
     139* Fix a bug that could cause the "Top content" metric not to appear on the view-only dashboard. See [#8175](https://github.com/google/site-kit-wp/issues/8175).
     140
     141**Changed**
     142
     143* Remove `conversionInfra` feature flag. See [#9173](https://github.com/google/site-kit-wp/issues/9173).
    134144
    135145**Fixed**
    136146
    137 * Ensure the list of publications in the Reader Revenue Manager setup and settings screens only shows publications relevant to the current site. See [#9247](https://github.com/google/site-kit-wp/issues/9247).
    138 * Update the PAX library version. See [#9237](https://github.com/google/site-kit-wp/issues/9237).
    139 * Enhance stability of visual regression test runs. See [#9211](https://github.com/google/site-kit-wp/issues/9211).
     147* Update RRM notification event names in Analytics. See [#9368](https://github.com/google/site-kit-wp/issues/9368).
     148* Improve Reader Revenue Manager setup CTA banner so that its graphic does not overflow the container. See [#9271](https://github.com/google/site-kit-wp/issues/9271).
     149* Fix glitches relating to the Audience Segmentation Setup CTA Banner. See [#9231](https://github.com/google/site-kit-wp/issues/9231).
     150* Ensure Zero Data notification always appears in new banner notifications. See [#9227](https://github.com/google/site-kit-wp/issues/9227).
     151* Fix unexpected error in Site Kit WordPress dashboard widget for sites in zero data states. See [#9226](https://github.com/google/site-kit-wp/issues/9226).
     152* Add ability to remove a notification on next page load. See [#9225](https://github.com/google/site-kit-wp/issues/9225).
     153* Fix glitches and errors when changing the audience selection in mobile viewports, ensuring audiences are listed in the correct order, and audience tabs function properly without errors. See [#9168](https://github.com/google/site-kit-wp/issues/9168).
     154* Improve module disconnection confirmation dialog UI. See [#9061](https://github.com/google/site-kit-wp/issues/9061).
    140155
    141156[See changelog for all versions](https://raw.githubusercontent.com/google/site-kit-wp/main/changelog.txt).
  • google-site-kit/trunk/dist/config.php

    r3148853 r3156474  
    88
    99return array(
    10     'features' => array( 'adsPax','audienceSegmentation','conversionInfra','conversionReporting','gm3Components','privacySandboxModule','rrmModule' ),
     10    'features' => array( 'adsPax','audienceSegmentation','conversionReporting','gm3Components','privacySandboxModule','rrmModule' ),
    1111);
  • google-site-kit/trunk/dist/manifest.php

    r3148853 r3156474  
    1919    'analytics-advanced-tracking'                          => array( "analytics-advanced-tracking-ea84b2c367b69f5c094b.js", null ),
    2020    'googlesitekit-i18n'                                   => array( "googlesitekit-i18n-33cdd2dee5d1d1f4fb34.js", null ),
    21     'googlesitekit-admin-css'                              => array( "googlesitekit-admin-css-aa86cfc6a5f741788a7c.min.css", null ),
     21    'googlesitekit-admin-css'                              => array( "googlesitekit-admin-css-053cc6d10f872e85dfec.min.css", null ),
    2222    'googlesitekit-adminbar-css'                           => array( "googlesitekit-adminbar-css-6db776544b37175be17f.min.css", null ),
    2323    'googlesitekit-authorize-application-css'              => array( "googlesitekit-authorize-application-css-ce25e97404abc5a02921.min.css", null ),
    2424    'googlesitekit-wp-dashboard-css'                       => array( "googlesitekit-wp-dashboard-css-d1180e1ae01fd577a4c5.min.css", null ),
    25     'googlesitekit-vendor'                                 => array( "googlesitekit-vendor-a6981ed288b93492603b.js", null ),
    26     'googlesitekit-runtime'                                => array( "runtime-d557ed4ac02e283c5876.js", null ),
    27     'googlesitekit-activation'                             => array( "googlesitekit-activation-0821f43f9450b2976a7a.js", null ),
    28     'googlesitekit-ad-blocking-recovery'                   => array( "googlesitekit-ad-blocking-recovery-579fd18c5139f49e351c.js", null ),
    29     'googlesitekit-adminbar'                               => array( "googlesitekit-adminbar-71a4c60e10b747d93ca2.js", null ),
    30     'googlesitekit-api'                                    => array( "googlesitekit-api-9b1652004ccc0f0b0b1b.js", null ),
    31     'googlesitekit-components'                             => array( array( "googlesitekit-components-gm2-96b55635c1d0add6b113.js", null ), array( "googlesitekit-components-gm3-3d65e72b5559508c0b55.js", null ) ),
    32     'googlesitekit-data'                                   => array( "googlesitekit-data-e2268525679009e0b686.js", null ),
    33     'googlesitekit-datastore-forms'                        => array( "googlesitekit-datastore-forms-ae8fa4b0fa5631cf15b6.js", null ),
    34     'googlesitekit-datastore-location'                     => array( "googlesitekit-datastore-location-f0882c9e5e34e44de556.js", null ),
    35     'googlesitekit-datastore-site'                         => array( "googlesitekit-datastore-site-12278d2471b9e1b9c7d9.js", null ),
    36     'googlesitekit-datastore-ui'                           => array( "googlesitekit-datastore-ui-fe42b0d32a18a0d8e2a4.js", null ),
    37     'googlesitekit-datastore-user'                         => array( "googlesitekit-datastore-user-6782e64c8e074e04fdb2.js", null ),
    38     'googlesitekit-entity-dashboard'                       => array( "googlesitekit-entity-dashboard-3d8921966120d895eb4e.js", null ),
    39     'googlesitekit-main-dashboard'                         => array( "googlesitekit-main-dashboard-d41471d89b1de6dd037d.js", null ),
    40     'googlesitekit-modules'                                => array( "googlesitekit-modules-c730dded8055345dd88e.js", null ),
    41     'googlesitekit-modules-ads'                            => array( "googlesitekit-modules-ads-bb19ec978323f5d81ee8.js", null ),
    42     'googlesitekit-modules-adsense'                        => array( "googlesitekit-modules-adsense-d7930ab6f8cb50a2cb53.js", null ),
    43     'googlesitekit-modules-analytics-4'                    => array( "googlesitekit-modules-analytics-4-316295cedc05f5eda6be.js", null ),
    44     'googlesitekit-modules-pagespeed-insights'             => array( "googlesitekit-modules-pagespeed-insights-7cc149a0141bab9f57e9.js", null ),
    45     'googlesitekit-modules-reader-revenue-manager'         => array( "googlesitekit-modules-reader-revenue-manager-820deb3366dc2d6a5b97.js", null ),
    46     'googlesitekit-modules-search-console'                 => array( "googlesitekit-modules-search-console-6a559af0c5fecd654e9f.js", null ),
    47     'googlesitekit-modules-tagmanager'                     => array( "googlesitekit-modules-tagmanager-32aba630e6cc73d2740a.js", null ),
    48     'googlesitekit-notifications'                          => array( "googlesitekit-notifications-c2b7efe32e100efb9c07.js", null ),
    49     'googlesitekit-polyfills'                              => array( "googlesitekit-polyfills-2d2cf8e51bb75d3e6910.js", null ),
    50     'googlesitekit-settings'                               => array( "googlesitekit-settings-b9e65db8c7e98031a46c.js", null ),
    51     'googlesitekit-splash'                                 => array( "googlesitekit-splash-08e91c5324381f991fb8.js", null ),
    52     'googlesitekit-user-input'                             => array( "googlesitekit-user-input-d02b9035565ab9445d7c.js", null ),
    53     'googlesitekit-widgets'                                => array( "googlesitekit-widgets-a1e20a8ab18c511f53b0.js", null ),
    54     'googlesitekit-wp-dashboard'                           => array( "googlesitekit-wp-dashboard-a824d9536eb9f6fe8c57.js", null ),
     25    'googlesitekit-vendor'                                 => array( "googlesitekit-vendor-7b07d6a5d1805e66d1ac.js", null ),
     26    'googlesitekit-runtime'                                => array( "runtime-a03dc480bb824e581faf.js", null ),
     27    'googlesitekit-activation'                             => array( "googlesitekit-activation-d995789855c53d9287dc.js", null ),
     28    'googlesitekit-ad-blocking-recovery'                   => array( "googlesitekit-ad-blocking-recovery-b63a4aa00dcc9a1b679d.js", null ),
     29    'googlesitekit-adminbar'                               => array( "googlesitekit-adminbar-ba93f1de6e0f9c668a55.js", null ),
     30    'googlesitekit-api'                                    => array( "googlesitekit-api-0497ee7b8db3bc2847dd.js", null ),
     31    'googlesitekit-components'                             => array( array( "googlesitekit-components-gm2-6b06ec42bd84ae5f94a4.js", null ), array( "googlesitekit-components-gm3-ad198d0a7f2d1cae3e37.js", null ) ),
     32    'googlesitekit-data'                                   => array( "googlesitekit-data-f593a058426722c37f5f.js", null ),
     33    'googlesitekit-datastore-forms'                        => array( "googlesitekit-datastore-forms-4b5d9d42037b3f028dce.js", null ),
     34    'googlesitekit-datastore-location'                     => array( "googlesitekit-datastore-location-14888d5db6759a2be117.js", null ),
     35    'googlesitekit-datastore-site'                         => array( "googlesitekit-datastore-site-ebd856c122a4f4aa14b7.js", null ),
     36    'googlesitekit-datastore-ui'                           => array( "googlesitekit-datastore-ui-15bd5ee51dc539f4c5a2.js", null ),
     37    'googlesitekit-datastore-user'                         => array( "googlesitekit-datastore-user-95aca262931d0ecfb8ec.js", null ),
     38    'googlesitekit-entity-dashboard'                       => array( "googlesitekit-entity-dashboard-f4bc2a97771356f9d9f6.js", null ),
     39    'googlesitekit-main-dashboard'                         => array( "googlesitekit-main-dashboard-14b335d3a7c14a383886.js", null ),
     40    'googlesitekit-modules'                                => array( "googlesitekit-modules-b4b66360c583d678e0cb.js", null ),
     41    'googlesitekit-modules-ads'                            => array( "googlesitekit-modules-ads-16a57085cb47b8b62fac.js", null ),
     42    'googlesitekit-modules-adsense'                        => array( "googlesitekit-modules-adsense-56d449fdb1d6dfa5dede.js", null ),
     43    'googlesitekit-modules-analytics-4'                    => array( "googlesitekit-modules-analytics-4-a753b8f1350e421feab9.js", null ),
     44    'googlesitekit-modules-pagespeed-insights'             => array( "googlesitekit-modules-pagespeed-insights-35a83552326fe8c15d82.js", null ),
     45    'googlesitekit-modules-reader-revenue-manager'         => array( "googlesitekit-modules-reader-revenue-manager-10455c2ab821b77270b3.js", null ),
     46    'googlesitekit-modules-search-console'                 => array( "googlesitekit-modules-search-console-1428a7f85b506c209ae8.js", null ),
     47    'googlesitekit-modules-tagmanager'                     => array( "googlesitekit-modules-tagmanager-8e0e5af7057d20718dc3.js", null ),
     48    'googlesitekit-notifications'                          => array( "googlesitekit-notifications-73bd3e96974c7c2d13a3.js", null ),
     49    'googlesitekit-polyfills'                              => array( "googlesitekit-polyfills-cb3565d333d06cdfbdad.js", null ),
     50    'googlesitekit-settings'                               => array( "googlesitekit-settings-099b0e21ccb3a74bde98.js", null ),
     51    'googlesitekit-splash'                                 => array( "googlesitekit-splash-f1ea329e613f7162b442.js", null ),
     52    'googlesitekit-user-input'                             => array( "googlesitekit-user-input-69696a4d8e9bc34ae299.js", null ),
     53    'googlesitekit-widgets'                                => array( "googlesitekit-widgets-6caf8e5d49a6f38fdb07.js", null ),
     54    'googlesitekit-wp-dashboard'                           => array( "googlesitekit-wp-dashboard-2263707a9bdb864cbddf.js", null ),
    5555);
  • google-site-kit/trunk/google-site-kit.php

    r3148853 r3156474  
    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.135.0
     14 * Version:           1.136.0
    1515 * Requires at least: 5.2
    1616 * Requires PHP:      7.4
     
    2727
    2828// Define most essential constants.
    29 define( 'GOOGLESITEKIT_VERSION', '1.135.0' );
     29define( 'GOOGLESITEKIT_VERSION', '1.136.0' );
    3030define( 'GOOGLESITEKIT_PLUGIN_MAIN_FILE', __FILE__ );
    3131define( 'GOOGLESITEKIT_PHP_MINIMUM', '7.4.0' );
  • google-site-kit/trunk/includes/Core/Site_Health/Debug_Data.php

    r3118692 r3156474  
    193193        );
    194194
    195         if ( Feature_Flags::enabled( 'conversionInfra' ) ) {
    196             $fields = array_merge( $fields, $this->get_active_conversion_event_provider_fields() );
    197         }
    198 
     195        $fields = array_merge( $fields, $this->get_active_conversion_event_provider_fields() );
    199196        $fields = array_merge( $fields, $this->get_consent_mode_fields() );
    200 
    201197        $fields = array_merge( $fields, $this->get_module_sharing_settings_fields() );
    202198
  • google-site-kit/trunk/includes/Core/User/Audience_Settings.php

    r3141863 r3156474  
    4343     *
    4444     * @since 1.124.0
     45     * @since 1.136.0 Added `didSetAudiences` default value.
    4546     *
    4647     * @return array The default value.
     
    5051            'configuredAudiences'                => null,
    5152            'isAudienceSegmentationWidgetHidden' => false,
     53            'didSetAudiences'                    => false,
    5254        );
    5355    }
     
    7779        $updated = array_intersect_key( $partial, $allowed_settings );
    7880
     81        if ( empty( $settings['didSetAudiences'] )
     82            && isset( $updated['configuredAudiences'] )
     83            && is_array( $updated['configuredAudiences'] )
     84            && ! empty( $updated['configuredAudiences'] )
     85        ) {
     86            $updated['didSetAudiences'] = true;
     87        }
     88
    7989        return $this->set( array_merge( $settings, $updated ) );
    8090    }
     
    103113            }
    104114
     115            if ( isset( $settings['didSetAudiences'] ) ) {
     116                $sanitized_settings['didSetAudiences'] = false !== $settings['didSetAudiences'];
     117            }
     118
    105119            return $sanitized_settings;
    106120        };
  • google-site-kit/trunk/includes/Core/User/REST_Audience_Settings_Controller.php

    r3141863 r3156474  
    134134                                                'type' => 'boolean',
    135135                                            ),
     136                                            'didSetAudiences'                   => array(
     137                                                'type' => 'boolean',
     138                                            ),
    136139                                        ),
    137140                                    ),
  • google-site-kit/trunk/includes/Core/Util/Health_Checks.php

    r3118692 r3156474  
    9696                )
    9797            ),
    98             new REST_Route(
    99                 'core/site/data/connection-check',
    100                 array(
    101                     array(
    102                         'methods'             => WP_REST_Server::READABLE,
    103                         'callback'            => function () {
    104                             return 'true';
    105                         },
    106                         'permission_callback' => function () {
    107                             return current_user_can( Permissions::VIEW_SHARED_DASHBOARD ) || current_user_can( Permissions::SETUP );
    108                         },
    109                     ),
    110                 )
    111             ),
    11298        );
    11399    }
  • google-site-kit/trunk/includes/Core/Util/Uninstallation.php

    r3118692 r3156474  
    1616use Google\Site_Kit\Core\Authentication\Credentials;
    1717use Google\Site_Kit\Core\Authentication\Google_Proxy;
    18 use Exception;
     18use Google\Site_Kit\Core\Authentication\Clients\OAuth_Client;
     19use Google\Site_Kit\Core\Remote_Features\Remote_Features_Cron;
     20use Google\Site_Kit\Modules\Analytics_4\Conversion_Reporting\Conversion_Reporting_Cron;
     21use Google\Site_Kit\Modules\Analytics_4\Synchronize_AdSenseLinked;
     22use Google\Site_Kit\Modules\Analytics_4\Synchronize_AdsLinked;
     23use Google\Site_Kit\Modules\Analytics_4\Synchronize_Property;
    1924
    2025/**
     
    4247     */
    4348    private $options;
     49
     50    /**
     51     * List of scheduled events.
     52     *
     53     * @since 1.136.0
     54     * @var array
     55     */
     56    const SCHEDULED_EVENTS = array(
     57        Conversion_Reporting_Cron::CRON_ACTION,
     58        OAuth_Client::CRON_REFRESH_PROFILE_DATA,
     59        Remote_Features_Cron::CRON_ACTION,
     60        Synchronize_AdSenseLinked::CRON_SYNCHRONIZE_ADSENSE_LINKED,
     61        Synchronize_AdsLinked::CRON_SYNCHRONIZE_ADS_LINKED,
     62        Synchronize_Property::CRON_SYNCHRONIZE_PROPERTY,
     63    );
    4464
    4565    /**
     
    7393            function () {
    7494                $this->uninstall();
     95                $this->clear_scheduled_events();
     96            }
     97        );
     98
     99        add_action(
     100            'googlesitekit_deactivation',
     101            function () {
     102                $this->clear_scheduled_events();
     103            }
     104        );
     105
     106        add_action(
     107            'googlesitekit_reset',
     108            function () {
     109                $this->clear_scheduled_events();
    75110            }
    76111        );
     
    91126        }
    92127    }
     128
     129    /**
     130     * Clears all scheduled events.
     131     *
     132     * @since 1.136.0
     133     */
     134    private function clear_scheduled_events() {
     135        foreach ( self::SCHEDULED_EVENTS as $event ) {
     136            wp_clear_scheduled_hook( $event );
     137        }
     138    }
    93139}
  • google-site-kit/trunk/includes/Modules/Analytics_4.php

    r3148853 r3156474  
    9090use Google\Site_Kit_Dependencies\Psr\Http\Message\RequestInterface;
    9191use Google\Site_Kit\Core\REST_API\REST_Routes;
    92 use Google\Site_Kit\Core\User\Audience_Settings;
    9392use Google\Site_Kit\Modules\Analytics_4\Conversion_Reporting\Conversion_Reporting_Cron;
    9493use Google\Site_Kit\Modules\Analytics_4\Conversion_Reporting\Conversion_Reporting_Events_Sync;
     
    153152     */
    154153    protected $custom_dimensions_data_available;
    155 
    156     /**
    157      * Audience_Settings instance.
    158      *
    159      * @since 1.124.0
    160      * @var Audience_Settings
    161      */
    162     protected $audience_settings;
    163154
    164155    /**
     
    190181        parent::__construct( $context, $options, $user_options, $authentication, $assets );
    191182        $this->custom_dimensions_data_available = new Custom_Dimensions_Data_Available( $this->transients );
    192         $this->audience_settings                = new Audience_Settings( $this->user_options );
    193183        $this->resource_data_availability_date  = new Resource_Data_Availability_Date( $this->transients, $this->get_settings() );
    194184    }
     
    235225        add_action( 'admin_init', array( $synchronize_property, 'maybe_schedule_synchronize_property' ) );
    236226        add_action( 'admin_init', array( $synchronize_adsense_linked, 'maybe_schedule_synchronize_adsense_linked' ) );
    237         add_action( 'admin_init', array( $synchronize_ads_linked, 'maybe_schedule_synchronize_ads_linked' ) );
     227        add_action( 'load-toplevel_page_googlesitekit-dashboard', array( $synchronize_ads_linked, 'maybe_schedule_synchronize_ads_linked' ) );
    238228        add_action( 'admin_init', $this->get_method_proxy( 'handle_provisioning_callback' ) );
    239229
     
    680670                'service' => '',
    681671            );
    682             $datapoints['POST:sync-audiences']                       = array( 'service' => 'analyticsaudiences' );
     672            $datapoints['POST:sync-audiences']                       = array(
     673                'service' => 'analyticsaudiences',
     674            );
    683675        }
    684676
     
    24042396        usort(
    24052397            $available_audiences,
    2406             function ( $a, $b ) {
    2407                 $a_weight = self::AUDIENCE_TYPE_SORT_ORDER[ $a['audienceType'] ];
    2408                 $b_weight = self::AUDIENCE_TYPE_SORT_ORDER[ $b['audienceType'] ];
    2409 
    2410                 return $a_weight - $b_weight;
     2398            function ( $audience_a, $audience_b ) use ( $available_audiences ) {
     2399                $audience_index_a = array_search( $audience_a, $available_audiences, true );
     2400                $audience_index_b = array_search( $audience_b, $available_audiences, true );
     2401
     2402                if ( false === $audience_index_a || false === $audience_index_b ) {
     2403                    return 0;
     2404                }
     2405
     2406                $audience_a = $available_audiences[ $audience_index_a ];
     2407                $audience_b = $available_audiences[ $audience_index_b ];
     2408
     2409                $audience_type_a = $audience_a['audienceType'];
     2410                $audience_type_b = $audience_b['audienceType'];
     2411
     2412                if ( $audience_type_a === $audience_type_b ) {
     2413                    if ( 'SITE_KIT_AUDIENCE' === $audience_type_b ) {
     2414                        return 'new-visitors' === $audience_a['audienceSlug'] ? -1 : 1;
     2415                    }
     2416
     2417                    return $audience_index_a - $audience_index_b;
     2418                }
     2419
     2420                $weight_a = self::AUDIENCE_TYPE_SORT_ORDER[ $audience_type_a ];
     2421                $weight_b = self::AUDIENCE_TYPE_SORT_ORDER[ $audience_type_b ];
     2422
     2423                if ( $weight_a === $weight_b ) {
     2424                    return $audience_index_a - $audience_index_b;
     2425                }
     2426
     2427                return $weight_a - $weight_b;
    24112428            }
    24122429        );
  • google-site-kit/trunk/includes/Modules/Analytics_4/Report/RequestHelpers.php

    r3148853 r3156474  
    269269            'googlesitekit_shareable_analytics_4_dimensions',
    270270            array(
     271                'audienceResourceName',
    271272                'adSourceName',
    272273                'city',
  • google-site-kit/trunk/includes/Modules/Analytics_4/Settings.php

    r3148853 r3156474  
    6969     */
    7070    public function get_view_only_keys() {
    71         return array( 'availableCustomDimensions', 'adSenseLinked' );
     71        return array(
     72            'availableCustomDimensions',
     73            'adSenseLinked',
     74            'availableAudiences',
     75            'audienceSegmentationSetupComplete',
     76        );
    7277    }
    7378
     
    8186    protected function get_default() {
    8287        return array(
    83             'ownerID'                          => 0,
    84             'accountID'                        => '',
    85             'adsConversionID'                  => '',
    86             'propertyID'                       => '',
    87             'webDataStreamID'                  => '',
    88             'measurementID'                    => '',
    89             'trackingDisabled'                 => array( 'loggedinUsers' ),
    90             'useSnippet'                       => true,
    91             'googleTagID'                      => '',
    92             'googleTagAccountID'               => '',
    93             'googleTagContainerID'             => '',
    94             'googleTagContainerDestinationIDs' => null,
    95             'googleTagLastSyncedAtMs'          => 0,
    96             'availableCustomDimensions'        => null,
    97             'propertyCreateTime'               => 0,
    98             'adSenseLinked'                    => false,
    99             'adSenseLinkedLastSyncedAt'        => 0,
    100             'adsConversionIDMigratedAtMs'      => 0,
    101             'adsLinked'                        => false,
    102             'adsLinkedLastSyncedAt'            => 0,
    103             'availableAudiences'               => null,
    104             'availableAudiencesLastSyncedAt'   => 0,
    105             'detectedEvents'                   => array(),
     88            'ownerID'                           => 0,
     89            'accountID'                         => '',
     90            'adsConversionID'                   => '',
     91            'propertyID'                        => '',
     92            'webDataStreamID'                   => '',
     93            'measurementID'                     => '',
     94            'trackingDisabled'                  => array( 'loggedinUsers' ),
     95            'useSnippet'                        => true,
     96            'googleTagID'                       => '',
     97            'googleTagAccountID'                => '',
     98            'googleTagContainerID'              => '',
     99            'googleTagContainerDestinationIDs'  => null,
     100            'googleTagLastSyncedAtMs'           => 0,
     101            'availableCustomDimensions'         => null,
     102            'propertyCreateTime'                => 0,
     103            'adSenseLinked'                     => false,
     104            'adSenseLinkedLastSyncedAt'         => 0,
     105            'adsConversionIDMigratedAtMs'       => 0,
     106            'adsLinked'                         => false,
     107            'adsLinkedLastSyncedAt'             => 0,
     108            'availableAudiences'                => null,
     109            'availableAudiencesLastSyncedAt'    => 0,
     110            'audienceSegmentationSetupComplete' => false,
     111            'detectedEvents'                    => array(),
    106112        );
    107113    }
     
    201207                    }
    202208                }
     209
     210                if ( isset( $option['audienceSegmentationSetupComplete'] ) ) {
     211                    $option['audienceSegmentationSetupComplete'] = (bool) $option['audienceSegmentationSetupComplete'];
     212                }
    203213            }
    204214
  • google-site-kit/trunk/includes/Modules/Analytics_4/Synchronize_AdsLinked.php

    r3118692 r3156474  
    1313use Google\Site_Kit\Core\Permissions\Permissions;
    1414use Google\Site_Kit\Core\Storage\User_Options;
     15use Google\Site_Kit\Modules\Ads;
    1516use Google\Site_Kit\Modules\Analytics_4;
    1617
     
    7475     */
    7576    protected function synchronize_ads_linked_data() {
     77        $ads_connected = apply_filters( 'googlesitekit_is_module_connected', false, Ads::MODULE_SLUG );
     78
     79        if ( $ads_connected ) {
     80            return;
     81        }
     82
    7683        $owner_id     = $this->analytics_4->get_owner_id();
    7784        $restore_user = $this->user_options->switch_user( $owner_id );
     
    123130        if ( $analytics_4_connected && ! $cron_already_scheduled ) {
    124131            wp_schedule_single_event(
    125                 // Schedule the task to run in 24 hours.
    126                 time() + ( DAY_IN_SECONDS ),
     132                time() + ( WEEK_IN_SECONDS ),
    127133                self::CRON_SYNCHRONIZE_ADS_LINKED
    128134            );
  • google-site-kit/trunk/includes/Plugin.php

    r3141863 r3156474  
    226226                ( new Core\Consent_Mode\Consent_Mode( $this->context, $options ) )->register();
    227227                ( new Core\Tags\GTag() )->register();
    228 
    229                 if ( Feature_Flags::enabled( 'conversionInfra' ) ) {
    230                     ( new Core\Conversion_Tracking\Conversion_Tracking( $this->context, $options ) )->register();
    231                 }
     228                ( new Core\Conversion_Tracking\Conversion_Tracking( $this->context, $options ) )->register();
    232229
    233230                // If a login is happening (runs after 'init'), update current user in dependency chain.
  • google-site-kit/trunk/readme.txt

    r3148853 r3156474  
    55Tested up to:      6.6
    66Requires PHP:      7.4
    7 Stable tag:        1.135.0
     7Stable tag:        1.136.0
    88License:           Apache License 2.0
    99License URI:       https://www.apache.org/licenses/LICENSE-2.0
     
    110110== Changelog ==
    111111
    112 = 1.135.0 =
     112= 1.136.0 =
    113113
    114114**Added**
    115115
    116 * Add a cron task to fetch Analytics report data for conversion events reporting. See [#9130](https://github.com/google/site-kit-wp/issues/9130).
     116* Add the new `Top cities driving leads` widget. See [#9154](https://github.com/google/site-kit-wp/issues/9154).
     117* Add new WordPress Data controls to `googlesitekit-data`. See [#8992](https://github.com/google/site-kit-wp/issues/8992).
    117118
    118119**Enhanced**
    119120
    120 * Add an "Edit in Reader Revenue Manager" link to the RRM module's settings view screen. See [#9192](https://github.com/google/site-kit-wp/issues/9192).
    121 * Add `conversionReporting` feature flag to plugin. See [#9152](https://github.com/google/site-kit-wp/issues/9152).
    122 * Add support for Analytics Conversion Report Events in data store. See [#9132](https://github.com/google/site-kit-wp/issues/9132).
    123 * Fix the undefined array key "name" warning. See [#9113](https://github.com/google/site-kit-wp/issues/9113).
    124 * Don't show the Audiences Widget Area on the dashboard when the "Display visitor groups in dashboard" switch is toggled off in the Settings section. See [#9065](https://github.com/google/site-kit-wp/issues/9065).
    125 * Refactor PAX notification to use new notification infrastructure. See [#8980](https://github.com/google/site-kit-wp/issues/8980).
    126 * Update Google Tag scope notifications to use new notifications infrastructure. See [#8979](https://github.com/google/site-kit-wp/issues/8979).
    127 * Update banner notification code for the "Unsatisfied Scopes Alert" banner notification. See [#8978](https://github.com/google/site-kit-wp/issues/8978).
    128 * Optimize Audience Segmentation related API calls to be made only when the area is being viewed. See [#8879](https://github.com/google/site-kit-wp/issues/8879).
    129 * Add the `PublicationOnboardingStateNotice` component, rendering a notice based on the onboarding state of the current publication and presented in Storybook. See [#8838](https://github.com/google/site-kit-wp/issues/8838).
    130 * Fix PHP 8.1 deprecation notices. See [#8589](https://github.com/google/site-kit-wp/issues/8589).
    131 * Enhance Audience Segmentation CTAs to not appear on shared dashboard. See [#8174](https://github.com/google/site-kit-wp/issues/8174).
    132 * Show a notice in the Audience Creation Notice when the Analytics edit scope is missing, and proceed directly to the OAuth flow upon clicking a CTA to create an audience. See [#8165](https://github.com/google/site-kit-wp/issues/8165).
    133 * Show an Audience Tile in an error state if an error occurred while retrieving its data; show a combined error state if all audiences have an error. See [#8147](https://github.com/google/site-kit-wp/issues/8147).
     121* Update publication links in the Reader Revenue Manager module to navigate to the RRM product page for the publication. See [#9313](https://github.com/google/site-kit-wp/issues/9313).
     122* Improve instructions for creating a new publication in the Reader Revenue Manager module setup screen. See [#9308](https://github.com/google/site-kit-wp/issues/9308).
     123* Refactor Ads notifications to use new notifications infrastructure. See [#9279](https://github.com/google/site-kit-wp/issues/9279).
     124* Show the "Display visitor groups in dashboard" toggle in the Site Kit Admin settings even when Google Analytics is disconnected. See [#9264](https://github.com/google/site-kit-wp/issues/9264).
     125* When a user clicks the CTA to visit the Publisher Center from one of the onboarding state notifications, resync the onboarding state upon returning to the Site Kit browser tab and update/hide the notification if the state has changed. See [#9262](https://github.com/google/site-kit-wp/issues/9262).
     126* Show the Reader Revenue Manager module's setup banner again two weeks after being dismissed, and show a tooltip to let the user know it can be set up later in Settings. See [#9257](https://github.com/google/site-kit-wp/issues/9257).
     127* Update text colour in Reader Revenue Manager publication creation screen. See [#9256](https://github.com/google/site-kit-wp/issues/9256).
     128* Reduce frequency of AdsLinks checks. See [#9141](https://github.com/google/site-kit-wp/issues/9141).
     129* Improve offline connection check logic/behaviour. See [#9083](https://github.com/google/site-kit-wp/issues/9083).
     130* Scroll to the Audiences Widget Area when clicking the "Show me" CTA on the Setup Success Notice that is shown when the Audience Segmentation feature has been set up. See [#8874](https://github.com/google/site-kit-wp/issues/8874).
     131* Implement the Audience Segmentation "no audiences" banner variants for secondary authenticated and shared dashboard users. See [#8577](https://github.com/google/site-kit-wp/issues/8577).
     132* Remove "New" badges from Analytics widgets in the entity dashboard. See [#8203](https://github.com/google/site-kit-wp/issues/8203).
     133* Add "New" badges to newly created audiences in the Selection Panel, which will be visible for 28 days after the first viewing. See [#8170](https://github.com/google/site-kit-wp/issues/8170).
     134* Redirect to OAuth as needed to grant the scope for creating the required custom dimension from the "Top content" metric section. See [#8154](https://github.com/google/site-kit-wp/issues/8154).
     135* Handle the “new visitors” and “returning visitors” audiences as a special case to avoid the "partial data" state for them on the Audience Tiles. See [#8144](https://github.com/google/site-kit-wp/issues/8144).
     136* Automatically configure the audience selection for additional admins and view-only users once an admin has set up the feature. See [#8130](https://github.com/google/site-kit-wp/issues/8130).
     137* Remove scheduled events upon deactivation, reset or uninstall. See [#6992](https://github.com/google/site-kit-wp/issues/6992).
     138* Improve error notice when no "Retry" button is present. See [#6707](https://github.com/google/site-kit-wp/issues/6707).
     139* Fix a bug that could cause the "Top content" metric not to appear on the view-only dashboard. See [#8175](https://github.com/google/site-kit-wp/issues/8175).
     140
     141**Changed**
     142
     143* Remove `conversionInfra` feature flag. See [#9173](https://github.com/google/site-kit-wp/issues/9173).
    134144
    135145**Fixed**
    136146
    137 * Ensure the list of publications in the Reader Revenue Manager setup and settings screens only shows publications relevant to the current site. See [#9247](https://github.com/google/site-kit-wp/issues/9247).
    138 * Update the PAX library version. See [#9237](https://github.com/google/site-kit-wp/issues/9237).
    139 * Enhance stability of visual regression test runs. See [#9211](https://github.com/google/site-kit-wp/issues/9211).
     147* Update RRM notification event names in Analytics. See [#9368](https://github.com/google/site-kit-wp/issues/9368).
     148* Improve Reader Revenue Manager setup CTA banner so that its graphic does not overflow the container. See [#9271](https://github.com/google/site-kit-wp/issues/9271).
     149* Fix glitches relating to the Audience Segmentation Setup CTA Banner. See [#9231](https://github.com/google/site-kit-wp/issues/9231).
     150* Ensure Zero Data notification always appears in new banner notifications. See [#9227](https://github.com/google/site-kit-wp/issues/9227).
     151* Fix unexpected error in Site Kit WordPress dashboard widget for sites in zero data states. See [#9226](https://github.com/google/site-kit-wp/issues/9226).
     152* Add ability to remove a notification on next page load. See [#9225](https://github.com/google/site-kit-wp/issues/9225).
     153* Fix glitches and errors when changing the audience selection in mobile viewports, ensuring audiences are listed in the correct order, and audience tabs function properly without errors. See [#9168](https://github.com/google/site-kit-wp/issues/9168).
     154* Improve module disconnection confirmation dialog UI. See [#9061](https://github.com/google/site-kit-wp/issues/9061).
    140155
    141156[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.