Plugin Directory

Changeset 3173125


Ignore:
Timestamp:
10/21/2024 06:19:19 PM (14 months ago)
Author:
google
Message:

Update to version 1.138.0 from GitHub

Location:
google-site-kit
Files:
86 added
78 deleted
20 edited
1 copied

Legend:

Unmodified
Added
Removed
  • google-site-kit/tags/1.138.0/dist/manifest.php

    r3164469 r3173125  
    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-ecdb19890f6da751e3e2.min.css", null ),
     21    'googlesitekit-admin-css'                              => array( "googlesitekit-admin-css-0cf0cf71d3ac64918b65.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-c5417a27cb905717f9fc.min.css", null ),
    25     'googlesitekit-vendor'                                 => array( "googlesitekit-vendor-58d25b5c1490a13d5aed.js", null ),
    26     'googlesitekit-runtime'                                => array( "runtime-b2bdec44d5cfb65a61ac.js", null ),
    27     'googlesitekit-activation'                             => array( "googlesitekit-activation-b0ab28b0f4027e2c5aaf.js", null ),
    28     'googlesitekit-ad-blocking-recovery'                   => array( "googlesitekit-ad-blocking-recovery-c51108b1a8017bed7f01.js", null ),
    29     'googlesitekit-adminbar'                               => array( "googlesitekit-adminbar-85dd363a0ad0e332b31e.js", null ),
    30     'googlesitekit-api'                                    => array( "googlesitekit-api-81eec639102e319fbfee.js", null ),
    31     'googlesitekit-components'                             => array( array( "googlesitekit-components-gm2-d31c815a1b32c9cab16f.js", null ), array( "googlesitekit-components-gm3-5cc8456ddb267d905569.js", null ) ),
    32     'googlesitekit-data'                                   => array( "googlesitekit-data-ea953bd1380898d08b23.js", null ),
    33     'googlesitekit-datastore-forms'                        => array( "googlesitekit-datastore-forms-20734e4da44ffcd47c56.js", null ),
    34     'googlesitekit-datastore-location'                     => array( "googlesitekit-datastore-location-b643e0fba77570b02ae8.js", null ),
    35     'googlesitekit-datastore-site'                         => array( "googlesitekit-datastore-site-bed0db502b7d10191fc4.js", null ),
    36     'googlesitekit-datastore-ui'                           => array( "googlesitekit-datastore-ui-5e6535b3d8c92712cd43.js", null ),
    37     'googlesitekit-datastore-user'                         => array( "googlesitekit-datastore-user-40ab48be1150c48248fb.js", null ),
    38     'googlesitekit-entity-dashboard'                       => array( "googlesitekit-entity-dashboard-7a1ecad7a0371a82012d.js", null ),
    39     'googlesitekit-main-dashboard'                         => array( "googlesitekit-main-dashboard-c90e82e1eec2e505ecfb.js", null ),
    40     'googlesitekit-modules'                                => array( "googlesitekit-modules-b58d66bc1cd68b9199a1.js", null ),
    41     'googlesitekit-modules-ads'                            => array( "googlesitekit-modules-ads-fb8e909086875d214a23.js", null ),
    42     'googlesitekit-modules-adsense'                        => array( "googlesitekit-modules-adsense-13e90dde175fcbe4e55e.js", null ),
    43     'googlesitekit-modules-analytics-4'                    => array( "googlesitekit-modules-analytics-4-c6663cd10c061967c0dd.js", null ),
    44     'googlesitekit-modules-pagespeed-insights'             => array( "googlesitekit-modules-pagespeed-insights-accee21a596786af1d3a.js", null ),
    45     'googlesitekit-modules-reader-revenue-manager'         => array( "googlesitekit-modules-reader-revenue-manager-5fa7f90f969cda03f9f4.js", null ),
    46     'googlesitekit-modules-search-console'                 => array( "googlesitekit-modules-search-console-c29ecf5cdb1fe8c625c6.js", null ),
    47     'googlesitekit-modules-sign-in-with-google'            => array( "googlesitekit-modules-sign-in-with-google-13f985e1a02790263c0a.js", null ),
    48     'googlesitekit-modules-tagmanager'                     => array( "googlesitekit-modules-tagmanager-ad73d53d77e766680178.js", null ),
    49     'googlesitekit-notifications'                          => array( "googlesitekit-notifications-588f61ff9a1029e6d370.js", null ),
    50     'googlesitekit-polyfills'                              => array( "googlesitekit-polyfills-8a67f3cc1c40300ebf95.js", null ),
    51     'googlesitekit-settings'                               => array( "googlesitekit-settings-12fa5679bb0c9a506006.js", null ),
    52     'googlesitekit-splash'                                 => array( "googlesitekit-splash-50b26b52ea665b3a36db.js", null ),
    53     'googlesitekit-user-input'                             => array( "googlesitekit-user-input-1020a553bbce77cf5726.js", null ),
    54     'googlesitekit-widgets'                                => array( "googlesitekit-widgets-884851c472b6527d7e83.js", null ),
    55     'googlesitekit-wp-dashboard'                           => array( "googlesitekit-wp-dashboard-ecf5e42e2013d0ddc758.js", null ),
     25    'googlesitekit-vendor'                                 => array( "googlesitekit-vendor-cca22bcdeb2e1252b20a.js", null ),
     26    'googlesitekit-runtime'                                => array( "runtime-62d30aa4dfe99a234168.js", null ),
     27    'googlesitekit-activation'                             => array( "googlesitekit-activation-92b68a64f8c49de241af.js", null ),
     28    'googlesitekit-ad-blocking-recovery'                   => array( "googlesitekit-ad-blocking-recovery-07aa92478cfda86230a1.js", null ),
     29    'googlesitekit-adminbar'                               => array( "googlesitekit-adminbar-fcca725e4c9a48e538d5.js", null ),
     30    'googlesitekit-api'                                    => array( "googlesitekit-api-550ec631080ecbe7ce31.js", null ),
     31    'googlesitekit-components'                             => array( array( "googlesitekit-components-gm2-a91f1bfdcda7a0646201.js", null ), array( "googlesitekit-components-gm3-92f85ea47675d14ac5a9.js", null ) ),
     32    'googlesitekit-data'                                   => array( "googlesitekit-data-3b542d543c8681a7a9e3.js", null ),
     33    'googlesitekit-datastore-forms'                        => array( "googlesitekit-datastore-forms-d15515ec8ecd21094314.js", null ),
     34    'googlesitekit-datastore-location'                     => array( "googlesitekit-datastore-location-0ee8a906c521ba57df31.js", null ),
     35    'googlesitekit-datastore-site'                         => array( "googlesitekit-datastore-site-a25b86aff61d95d576a3.js", null ),
     36    'googlesitekit-datastore-ui'                           => array( "googlesitekit-datastore-ui-9a25027ace7928ab86b9.js", null ),
     37    'googlesitekit-datastore-user'                         => array( "googlesitekit-datastore-user-b38448e1fcd4332aa61c.js", null ),
     38    'googlesitekit-entity-dashboard'                       => array( "googlesitekit-entity-dashboard-67d78978f4d8c2fad7c0.js", null ),
     39    'googlesitekit-main-dashboard'                         => array( "googlesitekit-main-dashboard-bbebf70a79bf05241779.js", null ),
     40    'googlesitekit-modules'                                => array( "googlesitekit-modules-e54ee0e6062c26eda49b.js", null ),
     41    'googlesitekit-modules-ads'                            => array( "googlesitekit-modules-ads-75ac41046f9adbce2571.js", null ),
     42    'googlesitekit-modules-adsense'                        => array( "googlesitekit-modules-adsense-0fd44e647615023ac8a3.js", null ),
     43    'googlesitekit-modules-analytics-4'                    => array( "googlesitekit-modules-analytics-4-c82d34b549c6c79ba517.js", null ),
     44    'googlesitekit-modules-pagespeed-insights'             => array( "googlesitekit-modules-pagespeed-insights-fce99a8e14c7bd34f67d.js", null ),
     45    'googlesitekit-modules-reader-revenue-manager'         => array( "googlesitekit-modules-reader-revenue-manager-02102cd465618974bb9a.js", null ),
     46    'googlesitekit-modules-search-console'                 => array( "googlesitekit-modules-search-console-4deafb9b987583dafc26.js", null ),
     47    'googlesitekit-modules-sign-in-with-google'            => array( "googlesitekit-modules-sign-in-with-google-61eee54b7d2d4b48180c.js", null ),
     48    'googlesitekit-modules-tagmanager'                     => array( "googlesitekit-modules-tagmanager-6341f3bb0c704bcf9dea.js", null ),
     49    'googlesitekit-notifications'                          => array( "googlesitekit-notifications-1908f486d9b5a90e3d79.js", null ),
     50    'googlesitekit-polyfills'                              => array( "googlesitekit-polyfills-538dfc56ccc5d6d72b6b.js", null ),
     51    'googlesitekit-settings'                               => array( "googlesitekit-settings-e3abad624d460d009b28.js", null ),
     52    'googlesitekit-splash'                                 => array( "googlesitekit-splash-c4a2084b4a7105a3a920.js", null ),
     53    'googlesitekit-user-input'                             => array( "googlesitekit-user-input-d122cd12eb3e12bfad95.js", null ),
     54    'googlesitekit-widgets'                                => array( "googlesitekit-widgets-7e5164737bb2a867290a.js", null ),
     55    'googlesitekit-wp-dashboard'                           => array( "googlesitekit-wp-dashboard-07f79d1ebe9f6aaea97b.js", null ),
    5656);
  • google-site-kit/tags/1.138.0/google-site-kit.php

    r3164469 r3173125  
    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.137.0
     14 * Version:           1.138.0
    1515 * Requires at least: 5.2
    1616 * Requires PHP:      7.4
     
    2727
    2828// Define most essential constants.
    29 define( 'GOOGLESITEKIT_VERSION', '1.137.0' );
     29define( 'GOOGLESITEKIT_VERSION', '1.138.0' );
    3030define( 'GOOGLESITEKIT_PLUGIN_MAIN_FILE', __FILE__ );
    3131define( 'GOOGLESITEKIT_PHP_MINIMUM', '7.4.0' );
  • google-site-kit/tags/1.138.0/includes/Core/Key_Metrics/Key_Metrics_Settings.php

    r3118692 r3173125  
    4848    protected function get_default() {
    4949        return array(
    50             'widgetSlugs'    => array(),
    51             'isWidgetHidden' => false,
     50            'widgetSlugs'                      => array(),
     51            'isWidgetHidden'                   => false,
     52            'includeConversionTailoredMetrics' => false,
    5253        );
    5354    }
     
    7172
    7273        $allowed_settings = array(
    73             'widgetSlugs'    => true,
    74             'isWidgetHidden' => true,
     74            'widgetSlugs'                      => true,
     75            'isWidgetHidden'                   => true,
     76            'includeConversionTailoredMetrics' => true,
    7577        );
    7678
     
    103105            }
    104106
     107            if ( isset( $settings['includeConversionTailoredMetrics'] ) ) {
     108                $sanitized_settings['includeConversionTailoredMetrics'] = false !== $settings['includeConversionTailoredMetrics'];
     109            }
     110
    105111            return $sanitized_settings;
    106112        };
  • google-site-kit/tags/1.138.0/includes/Core/Key_Metrics/REST_Key_Metrics_Controller.php

    r3118692 r3173125  
    1414use Google\Site_Kit\Core\REST_API\REST_Route;
    1515use Google\Site_Kit\Core\REST_API\REST_Routes;
     16use Google\Site_Kit\Core\Util\Feature_Flags;
    1617use WP_Error;
    1718use WP_REST_Request;
     
    134135                            // which we can solely rely on `maxItems` in the schema validation (see below).
    135136                            // See https://github.com/WordPress/WordPress/blob/965fcddcf68cf4fd122ae24b992e242dfea1d773/wp-includes/rest-api.php#L1922-L1925.
    136                             if ( $num_widgets > 4 ) {
     137                            $max_num_widgets = Feature_Flags::enabled( 'conversionReporting' ) ? 8 : 4;
     138                            if ( $num_widgets > $max_num_widgets ) {
    137139                                return new WP_Error(
    138140                                    'rest_invalid_param',
     
    171173                                            'type'     => 'array',
    172174                                            'required' => false,
    173                                             'maxItems' => 4,
     175                                            'maxItems' => Feature_Flags::enabled( 'conversionReporting' ) ? 8 : 4,
    174176                                            'items'    => array(
    175177                                                'type' => 'string',
  • google-site-kit/tags/1.138.0/includes/Core/User/Audience_Settings.php

    r3156474 r3173125  
    5959     *
    6060     * @since 1.124.0
     61     * @since 1.138.0 Allow setting `null` for `configuredAudiences`.
    6162     *
    6263     * @param array $partial Partial settings array to save.
     
    6768        $partial  = array_filter(
    6869            $partial,
    69             function ( $value ) {
    70                 return null !== $value;
    71             }
     70            function ( $value, $key ) {
     71                // Allow setting `null` for `configuredAudiences`.
     72                return 'configuredAudiences' === $key ? true : null !== $value;
     73            },
     74            ARRAY_FILTER_USE_BOTH
    7275        );
    7376
     
    7578            'configuredAudiences'                => true,
    7679            'isAudienceSegmentationWidgetHidden' => true,
     80            'didSetAudiences'                    => true,
    7781        );
    7882
     
    9498     *
    9599     * @since 1.124.0
     100     * @since 1.138.0 Allow setting `null` for `configuredAudiences`.
    96101     *
    97102     * @return callable Sanitize callback.
     
    105110            $sanitized_settings = array();
    106111
    107             if ( isset( $settings['configuredAudiences'] ) ) {
    108                 $sanitized_settings['configuredAudiences'] = Sanitize::sanitize_string_list( $settings['configuredAudiences'] );
     112            // Allow setting `null` for `configuredAudiences`.
     113            if ( array_key_exists( 'configuredAudiences', $settings ) ) {
     114                $sanitized_settings['configuredAudiences'] = is_null( $settings['configuredAudiences'] )
     115                    ? null
     116                    : Sanitize::sanitize_string_list( $settings['configuredAudiences'] );
    109117            }
    110118
  • google-site-kit/tags/1.138.0/includes/Modules/Ads.php

    r3148853 r3173125  
    207207            'slug'        => 'ads',
    208208            'name'        => _x( 'Ads', 'Service name', 'google-site-kit' ),
    209             'description' => __( 'Track conversions for your existing Google Ads campaigns', 'google-site-kit' ),
     209            'description' => Feature_Flags::enabled( 'adsPax' ) ? __( 'Grow sales, leads or awareness for your business by advertising with Google Ads', 'google-site-kit' ) : __( 'Track conversions for your existing Google Ads campaigns', 'google-site-kit' ),
    210210            'order'       => 1,
    211211            'homepage'    => __( 'https://google.com/ads', 'google-site-kit' ),
  • google-site-kit/tags/1.138.0/includes/Modules/Analytics_4.php

    r3164469 r3173125  
    686686            );
    687687            $datapoints['POST:sync-audiences']                       = array(
    688                 'service' => 'analyticsaudiences',
     688                'service'   => 'analyticsaudiences',
     689                'shareable' => true,
     690            );
     691        }
     692
     693        if ( Feature_Flags::enabled( 'conversionReporting' ) ) {
     694            $datapoints['POST:clear-conversion-reporting-new-events']  = array(
     695                'service' => '',
     696            );
     697            $datapoints['POST:clear-conversion-reporting-lost-events'] = array(
     698                'service' => '',
    689699            );
    690700        }
     
    10491059                return $this->get_service( 'analyticsadmin' )->accounts->listAccounts();
    10501060            case 'GET:account-summaries':
    1051                 return $this->get_service( 'analyticsadmin' )->accountSummaries->listAccountSummaries( array( 'pageSize' => 200 ) );
     1061                return $this->get_service( 'analyticsadmin' )->accountSummaries->listAccountSummaries(
     1062                    array(
     1063                        'pageSize'  => 200,
     1064                        'pageToken' => $data['pageToken'],
     1065                    )
     1066                );
    10521067            case 'GET:ads-links':
    10531068                if ( empty( $data['propertyID'] ) ) {
     
    14421457                    );
    14431458            case 'POST:sync-audiences':
     1459                if ( ! $this->authentication->is_authenticated() ) {
     1460                    return new WP_Error(
     1461                        'forbidden',
     1462                        __( 'User must be authenticated to sync audiences.', 'google-site-kit' ),
     1463                        array( 'status' => 403 )
     1464                    );
     1465                }
     1466
    14441467                $settings = $this->get_settings()->get();
    14451468                if ( empty( $settings['propertyID'] ) ) {
     
    16471670                    return $this->transients->set( 'googlesitekit_inline_tag_id_mismatch', $data['hasMismatchedTag'] );
    16481671                };
     1672            case 'POST:clear-conversion-reporting-new-events':
     1673                return function () {
     1674                    return $this->transients->delete( 'googlesitekit_conversion_reporting_detected_events' );
     1675                };
     1676            case 'POST:clear-conversion-reporting-lost-events':
     1677                return function () {
     1678                    return $this->transients->delete( 'googlesitekit_conversion_reporting_lost_events' );
     1679                };
    16491680        }
    16501681
     
    16661697            case 'GET:accounts':
    16671698                return array_map( array( self::class, 'filter_account_with_ids' ), $response->getAccounts() );
    1668             case 'GET:account-summaries':
    1669                 $account_summaries = array_map(
    1670                     function ( $account ) {
    1671                         $obj                    = self::filter_account_with_ids( $account, 'account' );
    1672                         $obj->propertySummaries = array_map( // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
    1673                             function ( $property ) {
    1674                                 return self::filter_property_with_ids( $property, 'property' );
    1675                             },
    1676                             $account->getPropertySummaries()
    1677                         );
    1678 
    1679                         return $obj;
    1680                     },
    1681                     $response->getAccountSummaries()
    1682                 );
    1683                 return Sort::case_insensitive_list_sort(
    1684                     $account_summaries,
    1685                     'displayName'
    1686                 );
    16871699            case 'GET:ads-links':
    16881700                return (array) $response->getGoogleAdsLinks();
  • google-site-kit/tags/1.138.0/includes/Modules/Analytics_4/Reset_Audiences.php

    r3164469 r3173125  
    6262    const AUDIENCE_SEGMENTATION_DISMISSED_ITEMS = array(
    6363        'audience-segmentation-add-group-notice',
    64         'audience_segmentation_setup_success_notification',
     64        'setup-success-notification-audiences',
    6565        'settings_visitor_groups_setup_success_notification',
    6666        'audience-segmentation-no-audiences-banner',
     
    130130                }
    131131
    132                 // Reset the users audience settings, such as configured audiences.
    133                 $this->audience_settings->delete();
     132                // Reset the user's audience settings.
     133                if ( $this->audience_settings->has() ) {
     134                    $this->audience_settings->merge(
     135                        array(
     136                            'configuredAudiences' => null,
     137                            'didSetAudiences'     => false,
     138                        ),
     139                    );
     140                }
    134141            }
    135142
  • google-site-kit/tags/1.138.0/includes/Modules/Sign_In_With_Google/Settings.php

    r3164469 r3173125  
    1212
    1313use Google\Site_Kit\Core\Modules\Module_Settings;
    14 use Google\Site_Kit\Core\Storage\Setting_With_Owned_Keys_Interface;
    15 use Google\Site_Kit\Core\Storage\Setting_With_Owned_Keys_Trait;
    1614
    1715/**
     
    2220 * @ignore
    2321 */
    24 class Settings extends Module_Settings implements Setting_With_Owned_Keys_Interface {
    25     use Setting_With_Owned_Keys_Trait;
     22class Settings extends Module_Settings {
    2623
    27     const OPTION = 'googlesitekit_siwg_settings';
     24    const OPTION = 'googlesitekit_sign-in-with-google_settings';
    2825
    29     /**
    30      * Registers the setting in WordPress.
    31      *
    32      * @since 1.137.0
    33      */
    34     public function register() {
    35         parent::register();
    36         $this->register_owned_keys();
    37     }
     26    const TEXT_CONTINUE_WITH_GOOGLE = 'Continue with Google';
     27    const TEXT_SIGN_IN              = 'Sign in';
     28    const TEXT_SIGN_IN_WITH_GOOGLE  = 'Sign in with Google';
     29    const TEXT_SIGN_UP_WITH_GOOGLE  = 'Sign up with Google';
     30
     31    const THEME_LIGHT   = 'light';
     32    const THEME_NEUTRAL = 'neutral';
     33    const THEME_DARK    = 'dark';
     34
     35    const SHAPE_RECTANGULAR = 'rectangular';
     36    const SHAPE_PILL        = 'pill';
    3837
    3938    /**
     
    4544     */
    4645    protected function get_default() {
    47         return array();
     46        return array(
     47            'clientID' => '',
     48            'text'     => self::TEXT_SIGN_IN_WITH_GOOGLE,
     49            'theme'    => self::THEME_LIGHT,
     50            'shape'    => self::SHAPE_RECTANGULAR,
     51        );
    4852    }
    4953
    5054    /**
    51      * Returns keys for owned settings.
     55     * Gets the callback for sanitizing the setting's value before saving.
    5256     *
    5357     * @since 1.137.0
    5458     *
    55      * @return array An array of keys for owned settings.
     59     * @return callable|null
    5660     */
    57     public function get_owned_keys() {
    58         return array();
     61    protected function get_sanitize_callback() {
     62        return function ( $option ) {
     63            if ( ! is_array( $option ) ) {
     64                return $option;
     65            }
     66
     67            if ( isset( $option['clientID'] ) ) {
     68                $option['clientID'] = (string) $option['clientID'];
     69            }
     70
     71            if ( isset( $option['text'] ) ) {
     72                $text_options = array(
     73                    self::TEXT_CONTINUE_WITH_GOOGLE,
     74                    self::TEXT_SIGN_IN,
     75                    self::TEXT_SIGN_IN_WITH_GOOGLE,
     76                    self::TEXT_SIGN_UP_WITH_GOOGLE,
     77                );
     78
     79                if ( ! in_array( $option['text'], $text_options, true ) ) {
     80                    $option['text'] = self::TEXT_SIGN_IN_WITH_GOOGLE;
     81                }
     82            }
     83
     84            if ( isset( $option['theme'] ) ) {
     85                $theme_options = array(
     86                    self::THEME_LIGHT,
     87                    self::THEME_NEUTRAL,
     88                    self::THEME_DARK,
     89                );
     90
     91                if ( ! in_array( $option['theme'], $theme_options, true ) ) {
     92                    $option['theme'] = self::THEME_LIGHT;
     93                }
     94            }
     95
     96            if ( isset( $option['shape'] ) ) {
     97                $shape_options = array(
     98                    self::SHAPE_RECTANGULAR,
     99                    self::SHAPE_PILL,
     100                );
     101
     102                if ( ! in_array( $option['shape'], $shape_options, true ) ) {
     103                    $option['shape'] = self::SHAPE_RECTANGULAR;
     104                }
     105            }
     106
     107            return $option;
     108        };
    59109    }
    60110}
  • google-site-kit/tags/1.138.0/readme.txt

    r3164469 r3173125  
    55Tested up to:      6.6
    66Requires PHP:      7.4
    7 Stable tag:        1.137.0
     7Stable tag:        1.138.0
    88License:           Apache License 2.0
    99License URI:       https://www.apache.org/licenses/LICENSE-2.0
     
    110110== Changelog ==
    111111
    112 = 1.137.0 =
     112= 1.138.0 =
    113113
    114114**Added**
    115115
    116 * Add the `signInWithGoogleModule` feature flag for Sign in With Google. See [#9382](https://github.com/google/site-kit-wp/issues/9382).
    117 * Only show Analytics Conversion Reporting items in the dashboard when the feature flag is enabled. See [#9364](https://github.com/google/site-kit-wp/issues/9364).
    118 * Add Sign in with Google module. See [#9332](https://github.com/google/site-kit-wp/issues/9332).
    119 * Add Key Metric Widget for "Top traffic source driving leads". See [#9217](https://github.com/google/site-kit-wp/issues/9217).
    120 * Add the `Top traffic source driving purchases` widget. See [#9164](https://github.com/google/site-kit-wp/issues/9164).
    121 * Added the `Top cities driving purchases` widget. See [#9160](https://github.com/google/site-kit-wp/issues/9160).
    122 * Add the `Top traffic source driving add to cart` widget. See [#9158](https://github.com/google/site-kit-wp/issues/9158).
    123 * Add the `Top cities driving add to cart` widget. See [#9156](https://github.com/google/site-kit-wp/issues/9156).
    124 * Add a Key Metric widget for "Top pages driving leads" when Analytics Conversion Reporting is enabled. See [#9153](https://github.com/google/site-kit-wp/issues/9153).
     116* Add datastore infrastructure for Sign in With Google settings. See [#9480](https://github.com/google/site-kit-wp/issues/9480).
     117* Add Sign in with Google module settings. See [#9333](https://github.com/google/site-kit-wp/issues/9333).
    125118
    126119**Enhanced**
    127120
    128 * Update the Analytics + AdSense linking notification to use the new notifications datastore. See [#9280](https://github.com/google/site-kit-wp/issues/9280).
    129 * Ensure the "Top content" CTA for creating the `googlesitekit_post_type` custom dimension appears in the main dashboard when the corresponding report error indicates the missing custom dimension. See [#9218](https://github.com/google/site-kit-wp/issues/9218).
    130 * Ensure cached audiences are resynced when the No Audiences Banner is shown. See [#9214](https://github.com/google/site-kit-wp/issues/9214).
    131 * Add support for the "Temporary hidden" badge in the audience selection panel. See [#9096](https://github.com/google/site-kit-wp/issues/9096).
    132 * Update the Audience Selection Panel Error Notice buttons to use the new callout button styling. See [#9068](https://github.com/google/site-kit-wp/issues/9068).
    133 * Address formatting inconsistencies in subtle notifications by removing periods from `GA4AdSenseLinkedNotification` and `AudienceSegmentationSetupSuccessSubtleNotification`. See [#8747](https://github.com/google/site-kit-wp/issues/8747).
    134 * Remove legacy Analytics client services from the bundle, as they are no longer necessary following the removal of the UA module. See [#8459](https://github.com/google/site-kit-wp/issues/8459).
    135 * Add handling for audience sync errors in the audiences widget area. See [#8190](https://github.com/google/site-kit-wp/issues/8190).
    136 * Ensure the Audience Segmentation feature is effectively reset when changing the connected Analytics property. See [#8180](https://github.com/google/site-kit-wp/issues/8180).
    137 * Implement the unhappy path for the Settings Section Audience Segmentation setup flow, handling OAuth and API errors by displaying an Error Modal with options to retry, request access, or get help. See [#8179](https://github.com/google/site-kit-wp/issues/8179).
    138 * Ensure the Audience Segmentation Introductory Popup / Banner is only shown to to view-only users and secondary admins once the feature has been setup by the initial admin. See [#8172](https://github.com/google/site-kit-wp/issues/8172).
    139 * Add error handling in the Audience Segmentation selection panel audience creation notice. See [#8166](https://github.com/google/site-kit-wp/issues/8166).
    140 
    141 **Changed**
    142 
    143 * Remove the use of the non-existent `features` prop in stories using the `WithRegistrySetup` component. See [#9115](https://github.com/google/site-kit-wp/issues/9115).
    144 * Rename the `Migration_Conversion_ID` class to `Migration_1_129_0` for consistency with migration naming conventions. See [#8905](https://github.com/google/site-kit-wp/issues/8905).
     121* Update the RRM setup CTA copy to explicitly mention that subscriptions aren't available yet as part of the integration. See [#9524](https://github.com/google/site-kit-wp/issues/9524).
     122* Update the Audience Segmentation support documentation "learn more" link in the tooltip for an Audience Tile. See [#9455](https://github.com/google/site-kit-wp/issues/9455).
     123* Update tailored metrics to also include new ACR metrics. See [#9437](https://github.com/google/site-kit-wp/issues/9437).
     124* Disallow manual Ads Conversion ID entry when using the Partner Ads Experience. See [#9426](https://github.com/google/site-kit-wp/issues/9426).
     125* Update copy text in Google Ads module when Partner Ads Experience is enabled. See [#9425](https://github.com/google/site-kit-wp/issues/9425).
     126* Fix OAuth error handling when attempting to create a custom dimension from the "Top content" metric area in an Audience Tile. See [#9350](https://github.com/google/site-kit-wp/issues/9350).
     127* Update Analytics setup to support any number of accounts. See [#9348](https://github.com/google/site-kit-wp/issues/9348).
     128* Implement the ability to dismiss detected and lost events information in the Analytics module. See [#9343](https://github.com/google/site-kit-wp/issues/9343).
     129* Refactor the setup success subtle notification for Audience Segmentation. See [#9281](https://github.com/google/site-kit-wp/issues/9281).
     130* Increase maximum Key Metric Widget selection count to 8. See [#9135](https://github.com/google/site-kit-wp/issues/9135).
     131* Update the Reader Revenue Manager setup success notification to use the new notifications datastore. See [#8981](https://github.com/google/site-kit-wp/issues/8981).
     132* Update the design of the Key Metrics setup CTA banner. See [#8895](https://github.com/google/site-kit-wp/issues/8895).
     133* Improve UI/UX on AdSense alerts. See [#7642](https://github.com/google/site-kit-wp/issues/7642).
    145134
    146135**Fixed**
    147136
    148 * Enable enhanced conversion tracking by default when connecting GA4 or Ads. See [#9458](https://github.com/google/site-kit-wp/issues/9458).
    149 * Fix UX issues with the "Temporarily hidden" badge in the Audience Selection panel by ensuring the info icon only shows the tooltip without toggling the checkbox and improving tooltip behavior on mobile. See [#9421](https://github.com/google/site-kit-wp/issues/9421).
    150 * Fix conditions for showing the "Enable groups" and "Display visitor groups in dashboard" toggle on the Settings screen. See [#9366](https://github.com/google/site-kit-wp/issues/9366).
     137* Prevent audience settings from being deleted when changing or disconnecting the Analytics property. Reset `configuredAudiences` and `didSetAudiences` to default values while keeping `isAudienceSegmentationWidgetHidden` unchanged. See [#9432](https://github.com/google/site-kit-wp/issues/9432).
     138* Improve the availability of the audience widget for secondary administrators. See [#9411](https://github.com/google/site-kit-wp/issues/9411).
     139* Fix VRT test failures in CI when launching Chromium, ensuring tests run to completion without errors. See [#9406](https://github.com/google/site-kit-wp/issues/9406).
     140* Ensure the error style for the Settings edit screen is cleared when settings are saved successfully. See [#8481](https://github.com/google/site-kit-wp/issues/8481).
    151141
    152142[See changelog for all versions](https://raw.githubusercontent.com/google/site-kit-wp/main/changelog.txt).
  • google-site-kit/trunk/dist/manifest.php

    r3164469 r3173125  
    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-ecdb19890f6da751e3e2.min.css", null ),
     21    'googlesitekit-admin-css'                              => array( "googlesitekit-admin-css-0cf0cf71d3ac64918b65.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-c5417a27cb905717f9fc.min.css", null ),
    25     'googlesitekit-vendor'                                 => array( "googlesitekit-vendor-58d25b5c1490a13d5aed.js", null ),
    26     'googlesitekit-runtime'                                => array( "runtime-b2bdec44d5cfb65a61ac.js", null ),
    27     'googlesitekit-activation'                             => array( "googlesitekit-activation-b0ab28b0f4027e2c5aaf.js", null ),
    28     'googlesitekit-ad-blocking-recovery'                   => array( "googlesitekit-ad-blocking-recovery-c51108b1a8017bed7f01.js", null ),
    29     'googlesitekit-adminbar'                               => array( "googlesitekit-adminbar-85dd363a0ad0e332b31e.js", null ),
    30     'googlesitekit-api'                                    => array( "googlesitekit-api-81eec639102e319fbfee.js", null ),
    31     'googlesitekit-components'                             => array( array( "googlesitekit-components-gm2-d31c815a1b32c9cab16f.js", null ), array( "googlesitekit-components-gm3-5cc8456ddb267d905569.js", null ) ),
    32     'googlesitekit-data'                                   => array( "googlesitekit-data-ea953bd1380898d08b23.js", null ),
    33     'googlesitekit-datastore-forms'                        => array( "googlesitekit-datastore-forms-20734e4da44ffcd47c56.js", null ),
    34     'googlesitekit-datastore-location'                     => array( "googlesitekit-datastore-location-b643e0fba77570b02ae8.js", null ),
    35     'googlesitekit-datastore-site'                         => array( "googlesitekit-datastore-site-bed0db502b7d10191fc4.js", null ),
    36     'googlesitekit-datastore-ui'                           => array( "googlesitekit-datastore-ui-5e6535b3d8c92712cd43.js", null ),
    37     'googlesitekit-datastore-user'                         => array( "googlesitekit-datastore-user-40ab48be1150c48248fb.js", null ),
    38     'googlesitekit-entity-dashboard'                       => array( "googlesitekit-entity-dashboard-7a1ecad7a0371a82012d.js", null ),
    39     'googlesitekit-main-dashboard'                         => array( "googlesitekit-main-dashboard-c90e82e1eec2e505ecfb.js", null ),
    40     'googlesitekit-modules'                                => array( "googlesitekit-modules-b58d66bc1cd68b9199a1.js", null ),
    41     'googlesitekit-modules-ads'                            => array( "googlesitekit-modules-ads-fb8e909086875d214a23.js", null ),
    42     'googlesitekit-modules-adsense'                        => array( "googlesitekit-modules-adsense-13e90dde175fcbe4e55e.js", null ),
    43     'googlesitekit-modules-analytics-4'                    => array( "googlesitekit-modules-analytics-4-c6663cd10c061967c0dd.js", null ),
    44     'googlesitekit-modules-pagespeed-insights'             => array( "googlesitekit-modules-pagespeed-insights-accee21a596786af1d3a.js", null ),
    45     'googlesitekit-modules-reader-revenue-manager'         => array( "googlesitekit-modules-reader-revenue-manager-5fa7f90f969cda03f9f4.js", null ),
    46     'googlesitekit-modules-search-console'                 => array( "googlesitekit-modules-search-console-c29ecf5cdb1fe8c625c6.js", null ),
    47     'googlesitekit-modules-sign-in-with-google'            => array( "googlesitekit-modules-sign-in-with-google-13f985e1a02790263c0a.js", null ),
    48     'googlesitekit-modules-tagmanager'                     => array( "googlesitekit-modules-tagmanager-ad73d53d77e766680178.js", null ),
    49     'googlesitekit-notifications'                          => array( "googlesitekit-notifications-588f61ff9a1029e6d370.js", null ),
    50     'googlesitekit-polyfills'                              => array( "googlesitekit-polyfills-8a67f3cc1c40300ebf95.js", null ),
    51     'googlesitekit-settings'                               => array( "googlesitekit-settings-12fa5679bb0c9a506006.js", null ),
    52     'googlesitekit-splash'                                 => array( "googlesitekit-splash-50b26b52ea665b3a36db.js", null ),
    53     'googlesitekit-user-input'                             => array( "googlesitekit-user-input-1020a553bbce77cf5726.js", null ),
    54     'googlesitekit-widgets'                                => array( "googlesitekit-widgets-884851c472b6527d7e83.js", null ),
    55     'googlesitekit-wp-dashboard'                           => array( "googlesitekit-wp-dashboard-ecf5e42e2013d0ddc758.js", null ),
     25    'googlesitekit-vendor'                                 => array( "googlesitekit-vendor-cca22bcdeb2e1252b20a.js", null ),
     26    'googlesitekit-runtime'                                => array( "runtime-62d30aa4dfe99a234168.js", null ),
     27    'googlesitekit-activation'                             => array( "googlesitekit-activation-92b68a64f8c49de241af.js", null ),
     28    'googlesitekit-ad-blocking-recovery'                   => array( "googlesitekit-ad-blocking-recovery-07aa92478cfda86230a1.js", null ),
     29    'googlesitekit-adminbar'                               => array( "googlesitekit-adminbar-fcca725e4c9a48e538d5.js", null ),
     30    'googlesitekit-api'                                    => array( "googlesitekit-api-550ec631080ecbe7ce31.js", null ),
     31    'googlesitekit-components'                             => array( array( "googlesitekit-components-gm2-a91f1bfdcda7a0646201.js", null ), array( "googlesitekit-components-gm3-92f85ea47675d14ac5a9.js", null ) ),
     32    'googlesitekit-data'                                   => array( "googlesitekit-data-3b542d543c8681a7a9e3.js", null ),
     33    'googlesitekit-datastore-forms'                        => array( "googlesitekit-datastore-forms-d15515ec8ecd21094314.js", null ),
     34    'googlesitekit-datastore-location'                     => array( "googlesitekit-datastore-location-0ee8a906c521ba57df31.js", null ),
     35    'googlesitekit-datastore-site'                         => array( "googlesitekit-datastore-site-a25b86aff61d95d576a3.js", null ),
     36    'googlesitekit-datastore-ui'                           => array( "googlesitekit-datastore-ui-9a25027ace7928ab86b9.js", null ),
     37    'googlesitekit-datastore-user'                         => array( "googlesitekit-datastore-user-b38448e1fcd4332aa61c.js", null ),
     38    'googlesitekit-entity-dashboard'                       => array( "googlesitekit-entity-dashboard-67d78978f4d8c2fad7c0.js", null ),
     39    'googlesitekit-main-dashboard'                         => array( "googlesitekit-main-dashboard-bbebf70a79bf05241779.js", null ),
     40    'googlesitekit-modules'                                => array( "googlesitekit-modules-e54ee0e6062c26eda49b.js", null ),
     41    'googlesitekit-modules-ads'                            => array( "googlesitekit-modules-ads-75ac41046f9adbce2571.js", null ),
     42    'googlesitekit-modules-adsense'                        => array( "googlesitekit-modules-adsense-0fd44e647615023ac8a3.js", null ),
     43    'googlesitekit-modules-analytics-4'                    => array( "googlesitekit-modules-analytics-4-c82d34b549c6c79ba517.js", null ),
     44    'googlesitekit-modules-pagespeed-insights'             => array( "googlesitekit-modules-pagespeed-insights-fce99a8e14c7bd34f67d.js", null ),
     45    'googlesitekit-modules-reader-revenue-manager'         => array( "googlesitekit-modules-reader-revenue-manager-02102cd465618974bb9a.js", null ),
     46    'googlesitekit-modules-search-console'                 => array( "googlesitekit-modules-search-console-4deafb9b987583dafc26.js", null ),
     47    'googlesitekit-modules-sign-in-with-google'            => array( "googlesitekit-modules-sign-in-with-google-61eee54b7d2d4b48180c.js", null ),
     48    'googlesitekit-modules-tagmanager'                     => array( "googlesitekit-modules-tagmanager-6341f3bb0c704bcf9dea.js", null ),
     49    'googlesitekit-notifications'                          => array( "googlesitekit-notifications-1908f486d9b5a90e3d79.js", null ),
     50    'googlesitekit-polyfills'                              => array( "googlesitekit-polyfills-538dfc56ccc5d6d72b6b.js", null ),
     51    'googlesitekit-settings'                               => array( "googlesitekit-settings-e3abad624d460d009b28.js", null ),
     52    'googlesitekit-splash'                                 => array( "googlesitekit-splash-c4a2084b4a7105a3a920.js", null ),
     53    'googlesitekit-user-input'                             => array( "googlesitekit-user-input-d122cd12eb3e12bfad95.js", null ),
     54    'googlesitekit-widgets'                                => array( "googlesitekit-widgets-7e5164737bb2a867290a.js", null ),
     55    'googlesitekit-wp-dashboard'                           => array( "googlesitekit-wp-dashboard-07f79d1ebe9f6aaea97b.js", null ),
    5656);
  • google-site-kit/trunk/google-site-kit.php

    r3164469 r3173125  
    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.137.0
     14 * Version:           1.138.0
    1515 * Requires at least: 5.2
    1616 * Requires PHP:      7.4
     
    2727
    2828// Define most essential constants.
    29 define( 'GOOGLESITEKIT_VERSION', '1.137.0' );
     29define( 'GOOGLESITEKIT_VERSION', '1.138.0' );
    3030define( 'GOOGLESITEKIT_PLUGIN_MAIN_FILE', __FILE__ );
    3131define( 'GOOGLESITEKIT_PHP_MINIMUM', '7.4.0' );
  • google-site-kit/trunk/includes/Core/Key_Metrics/Key_Metrics_Settings.php

    r3118692 r3173125  
    4848    protected function get_default() {
    4949        return array(
    50             'widgetSlugs'    => array(),
    51             'isWidgetHidden' => false,
     50            'widgetSlugs'                      => array(),
     51            'isWidgetHidden'                   => false,
     52            'includeConversionTailoredMetrics' => false,
    5253        );
    5354    }
     
    7172
    7273        $allowed_settings = array(
    73             'widgetSlugs'    => true,
    74             'isWidgetHidden' => true,
     74            'widgetSlugs'                      => true,
     75            'isWidgetHidden'                   => true,
     76            'includeConversionTailoredMetrics' => true,
    7577        );
    7678
     
    103105            }
    104106
     107            if ( isset( $settings['includeConversionTailoredMetrics'] ) ) {
     108                $sanitized_settings['includeConversionTailoredMetrics'] = false !== $settings['includeConversionTailoredMetrics'];
     109            }
     110
    105111            return $sanitized_settings;
    106112        };
  • google-site-kit/trunk/includes/Core/Key_Metrics/REST_Key_Metrics_Controller.php

    r3118692 r3173125  
    1414use Google\Site_Kit\Core\REST_API\REST_Route;
    1515use Google\Site_Kit\Core\REST_API\REST_Routes;
     16use Google\Site_Kit\Core\Util\Feature_Flags;
    1617use WP_Error;
    1718use WP_REST_Request;
     
    134135                            // which we can solely rely on `maxItems` in the schema validation (see below).
    135136                            // See https://github.com/WordPress/WordPress/blob/965fcddcf68cf4fd122ae24b992e242dfea1d773/wp-includes/rest-api.php#L1922-L1925.
    136                             if ( $num_widgets > 4 ) {
     137                            $max_num_widgets = Feature_Flags::enabled( 'conversionReporting' ) ? 8 : 4;
     138                            if ( $num_widgets > $max_num_widgets ) {
    137139                                return new WP_Error(
    138140                                    'rest_invalid_param',
     
    171173                                            'type'     => 'array',
    172174                                            'required' => false,
    173                                             'maxItems' => 4,
     175                                            'maxItems' => Feature_Flags::enabled( 'conversionReporting' ) ? 8 : 4,
    174176                                            'items'    => array(
    175177                                                'type' => 'string',
  • google-site-kit/trunk/includes/Core/User/Audience_Settings.php

    r3156474 r3173125  
    5959     *
    6060     * @since 1.124.0
     61     * @since 1.138.0 Allow setting `null` for `configuredAudiences`.
    6162     *
    6263     * @param array $partial Partial settings array to save.
     
    6768        $partial  = array_filter(
    6869            $partial,
    69             function ( $value ) {
    70                 return null !== $value;
    71             }
     70            function ( $value, $key ) {
     71                // Allow setting `null` for `configuredAudiences`.
     72                return 'configuredAudiences' === $key ? true : null !== $value;
     73            },
     74            ARRAY_FILTER_USE_BOTH
    7275        );
    7376
     
    7578            'configuredAudiences'                => true,
    7679            'isAudienceSegmentationWidgetHidden' => true,
     80            'didSetAudiences'                    => true,
    7781        );
    7882
     
    9498     *
    9599     * @since 1.124.0
     100     * @since 1.138.0 Allow setting `null` for `configuredAudiences`.
    96101     *
    97102     * @return callable Sanitize callback.
     
    105110            $sanitized_settings = array();
    106111
    107             if ( isset( $settings['configuredAudiences'] ) ) {
    108                 $sanitized_settings['configuredAudiences'] = Sanitize::sanitize_string_list( $settings['configuredAudiences'] );
     112            // Allow setting `null` for `configuredAudiences`.
     113            if ( array_key_exists( 'configuredAudiences', $settings ) ) {
     114                $sanitized_settings['configuredAudiences'] = is_null( $settings['configuredAudiences'] )
     115                    ? null
     116                    : Sanitize::sanitize_string_list( $settings['configuredAudiences'] );
    109117            }
    110118
  • google-site-kit/trunk/includes/Modules/Ads.php

    r3148853 r3173125  
    207207            'slug'        => 'ads',
    208208            'name'        => _x( 'Ads', 'Service name', 'google-site-kit' ),
    209             'description' => __( 'Track conversions for your existing Google Ads campaigns', 'google-site-kit' ),
     209            'description' => Feature_Flags::enabled( 'adsPax' ) ? __( 'Grow sales, leads or awareness for your business by advertising with Google Ads', 'google-site-kit' ) : __( 'Track conversions for your existing Google Ads campaigns', 'google-site-kit' ),
    210210            'order'       => 1,
    211211            'homepage'    => __( 'https://google.com/ads', 'google-site-kit' ),
  • google-site-kit/trunk/includes/Modules/Analytics_4.php

    r3164469 r3173125  
    686686            );
    687687            $datapoints['POST:sync-audiences']                       = array(
    688                 'service' => 'analyticsaudiences',
     688                'service'   => 'analyticsaudiences',
     689                'shareable' => true,
     690            );
     691        }
     692
     693        if ( Feature_Flags::enabled( 'conversionReporting' ) ) {
     694            $datapoints['POST:clear-conversion-reporting-new-events']  = array(
     695                'service' => '',
     696            );
     697            $datapoints['POST:clear-conversion-reporting-lost-events'] = array(
     698                'service' => '',
    689699            );
    690700        }
     
    10491059                return $this->get_service( 'analyticsadmin' )->accounts->listAccounts();
    10501060            case 'GET:account-summaries':
    1051                 return $this->get_service( 'analyticsadmin' )->accountSummaries->listAccountSummaries( array( 'pageSize' => 200 ) );
     1061                return $this->get_service( 'analyticsadmin' )->accountSummaries->listAccountSummaries(
     1062                    array(
     1063                        'pageSize'  => 200,
     1064                        'pageToken' => $data['pageToken'],
     1065                    )
     1066                );
    10521067            case 'GET:ads-links':
    10531068                if ( empty( $data['propertyID'] ) ) {
     
    14421457                    );
    14431458            case 'POST:sync-audiences':
     1459                if ( ! $this->authentication->is_authenticated() ) {
     1460                    return new WP_Error(
     1461                        'forbidden',
     1462                        __( 'User must be authenticated to sync audiences.', 'google-site-kit' ),
     1463                        array( 'status' => 403 )
     1464                    );
     1465                }
     1466
    14441467                $settings = $this->get_settings()->get();
    14451468                if ( empty( $settings['propertyID'] ) ) {
     
    16471670                    return $this->transients->set( 'googlesitekit_inline_tag_id_mismatch', $data['hasMismatchedTag'] );
    16481671                };
     1672            case 'POST:clear-conversion-reporting-new-events':
     1673                return function () {
     1674                    return $this->transients->delete( 'googlesitekit_conversion_reporting_detected_events' );
     1675                };
     1676            case 'POST:clear-conversion-reporting-lost-events':
     1677                return function () {
     1678                    return $this->transients->delete( 'googlesitekit_conversion_reporting_lost_events' );
     1679                };
    16491680        }
    16501681
     
    16661697            case 'GET:accounts':
    16671698                return array_map( array( self::class, 'filter_account_with_ids' ), $response->getAccounts() );
    1668             case 'GET:account-summaries':
    1669                 $account_summaries = array_map(
    1670                     function ( $account ) {
    1671                         $obj                    = self::filter_account_with_ids( $account, 'account' );
    1672                         $obj->propertySummaries = array_map( // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
    1673                             function ( $property ) {
    1674                                 return self::filter_property_with_ids( $property, 'property' );
    1675                             },
    1676                             $account->getPropertySummaries()
    1677                         );
    1678 
    1679                         return $obj;
    1680                     },
    1681                     $response->getAccountSummaries()
    1682                 );
    1683                 return Sort::case_insensitive_list_sort(
    1684                     $account_summaries,
    1685                     'displayName'
    1686                 );
    16871699            case 'GET:ads-links':
    16881700                return (array) $response->getGoogleAdsLinks();
  • google-site-kit/trunk/includes/Modules/Analytics_4/Reset_Audiences.php

    r3164469 r3173125  
    6262    const AUDIENCE_SEGMENTATION_DISMISSED_ITEMS = array(
    6363        'audience-segmentation-add-group-notice',
    64         'audience_segmentation_setup_success_notification',
     64        'setup-success-notification-audiences',
    6565        'settings_visitor_groups_setup_success_notification',
    6666        'audience-segmentation-no-audiences-banner',
     
    130130                }
    131131
    132                 // Reset the users audience settings, such as configured audiences.
    133                 $this->audience_settings->delete();
     132                // Reset the user's audience settings.
     133                if ( $this->audience_settings->has() ) {
     134                    $this->audience_settings->merge(
     135                        array(
     136                            'configuredAudiences' => null,
     137                            'didSetAudiences'     => false,
     138                        ),
     139                    );
     140                }
    134141            }
    135142
  • google-site-kit/trunk/includes/Modules/Sign_In_With_Google/Settings.php

    r3164469 r3173125  
    1212
    1313use Google\Site_Kit\Core\Modules\Module_Settings;
    14 use Google\Site_Kit\Core\Storage\Setting_With_Owned_Keys_Interface;
    15 use Google\Site_Kit\Core\Storage\Setting_With_Owned_Keys_Trait;
    1614
    1715/**
     
    2220 * @ignore
    2321 */
    24 class Settings extends Module_Settings implements Setting_With_Owned_Keys_Interface {
    25     use Setting_With_Owned_Keys_Trait;
     22class Settings extends Module_Settings {
    2623
    27     const OPTION = 'googlesitekit_siwg_settings';
     24    const OPTION = 'googlesitekit_sign-in-with-google_settings';
    2825
    29     /**
    30      * Registers the setting in WordPress.
    31      *
    32      * @since 1.137.0
    33      */
    34     public function register() {
    35         parent::register();
    36         $this->register_owned_keys();
    37     }
     26    const TEXT_CONTINUE_WITH_GOOGLE = 'Continue with Google';
     27    const TEXT_SIGN_IN              = 'Sign in';
     28    const TEXT_SIGN_IN_WITH_GOOGLE  = 'Sign in with Google';
     29    const TEXT_SIGN_UP_WITH_GOOGLE  = 'Sign up with Google';
     30
     31    const THEME_LIGHT   = 'light';
     32    const THEME_NEUTRAL = 'neutral';
     33    const THEME_DARK    = 'dark';
     34
     35    const SHAPE_RECTANGULAR = 'rectangular';
     36    const SHAPE_PILL        = 'pill';
    3837
    3938    /**
     
    4544     */
    4645    protected function get_default() {
    47         return array();
     46        return array(
     47            'clientID' => '',
     48            'text'     => self::TEXT_SIGN_IN_WITH_GOOGLE,
     49            'theme'    => self::THEME_LIGHT,
     50            'shape'    => self::SHAPE_RECTANGULAR,
     51        );
    4852    }
    4953
    5054    /**
    51      * Returns keys for owned settings.
     55     * Gets the callback for sanitizing the setting's value before saving.
    5256     *
    5357     * @since 1.137.0
    5458     *
    55      * @return array An array of keys for owned settings.
     59     * @return callable|null
    5660     */
    57     public function get_owned_keys() {
    58         return array();
     61    protected function get_sanitize_callback() {
     62        return function ( $option ) {
     63            if ( ! is_array( $option ) ) {
     64                return $option;
     65            }
     66
     67            if ( isset( $option['clientID'] ) ) {
     68                $option['clientID'] = (string) $option['clientID'];
     69            }
     70
     71            if ( isset( $option['text'] ) ) {
     72                $text_options = array(
     73                    self::TEXT_CONTINUE_WITH_GOOGLE,
     74                    self::TEXT_SIGN_IN,
     75                    self::TEXT_SIGN_IN_WITH_GOOGLE,
     76                    self::TEXT_SIGN_UP_WITH_GOOGLE,
     77                );
     78
     79                if ( ! in_array( $option['text'], $text_options, true ) ) {
     80                    $option['text'] = self::TEXT_SIGN_IN_WITH_GOOGLE;
     81                }
     82            }
     83
     84            if ( isset( $option['theme'] ) ) {
     85                $theme_options = array(
     86                    self::THEME_LIGHT,
     87                    self::THEME_NEUTRAL,
     88                    self::THEME_DARK,
     89                );
     90
     91                if ( ! in_array( $option['theme'], $theme_options, true ) ) {
     92                    $option['theme'] = self::THEME_LIGHT;
     93                }
     94            }
     95
     96            if ( isset( $option['shape'] ) ) {
     97                $shape_options = array(
     98                    self::SHAPE_RECTANGULAR,
     99                    self::SHAPE_PILL,
     100                );
     101
     102                if ( ! in_array( $option['shape'], $shape_options, true ) ) {
     103                    $option['shape'] = self::SHAPE_RECTANGULAR;
     104                }
     105            }
     106
     107            return $option;
     108        };
    59109    }
    60110}
  • google-site-kit/trunk/readme.txt

    r3164469 r3173125  
    55Tested up to:      6.6
    66Requires PHP:      7.4
    7 Stable tag:        1.137.0
     7Stable tag:        1.138.0
    88License:           Apache License 2.0
    99License URI:       https://www.apache.org/licenses/LICENSE-2.0
     
    110110== Changelog ==
    111111
    112 = 1.137.0 =
     112= 1.138.0 =
    113113
    114114**Added**
    115115
    116 * Add the `signInWithGoogleModule` feature flag for Sign in With Google. See [#9382](https://github.com/google/site-kit-wp/issues/9382).
    117 * Only show Analytics Conversion Reporting items in the dashboard when the feature flag is enabled. See [#9364](https://github.com/google/site-kit-wp/issues/9364).
    118 * Add Sign in with Google module. See [#9332](https://github.com/google/site-kit-wp/issues/9332).
    119 * Add Key Metric Widget for "Top traffic source driving leads". See [#9217](https://github.com/google/site-kit-wp/issues/9217).
    120 * Add the `Top traffic source driving purchases` widget. See [#9164](https://github.com/google/site-kit-wp/issues/9164).
    121 * Added the `Top cities driving purchases` widget. See [#9160](https://github.com/google/site-kit-wp/issues/9160).
    122 * Add the `Top traffic source driving add to cart` widget. See [#9158](https://github.com/google/site-kit-wp/issues/9158).
    123 * Add the `Top cities driving add to cart` widget. See [#9156](https://github.com/google/site-kit-wp/issues/9156).
    124 * Add a Key Metric widget for "Top pages driving leads" when Analytics Conversion Reporting is enabled. See [#9153](https://github.com/google/site-kit-wp/issues/9153).
     116* Add datastore infrastructure for Sign in With Google settings. See [#9480](https://github.com/google/site-kit-wp/issues/9480).
     117* Add Sign in with Google module settings. See [#9333](https://github.com/google/site-kit-wp/issues/9333).
    125118
    126119**Enhanced**
    127120
    128 * Update the Analytics + AdSense linking notification to use the new notifications datastore. See [#9280](https://github.com/google/site-kit-wp/issues/9280).
    129 * Ensure the "Top content" CTA for creating the `googlesitekit_post_type` custom dimension appears in the main dashboard when the corresponding report error indicates the missing custom dimension. See [#9218](https://github.com/google/site-kit-wp/issues/9218).
    130 * Ensure cached audiences are resynced when the No Audiences Banner is shown. See [#9214](https://github.com/google/site-kit-wp/issues/9214).
    131 * Add support for the "Temporary hidden" badge in the audience selection panel. See [#9096](https://github.com/google/site-kit-wp/issues/9096).
    132 * Update the Audience Selection Panel Error Notice buttons to use the new callout button styling. See [#9068](https://github.com/google/site-kit-wp/issues/9068).
    133 * Address formatting inconsistencies in subtle notifications by removing periods from `GA4AdSenseLinkedNotification` and `AudienceSegmentationSetupSuccessSubtleNotification`. See [#8747](https://github.com/google/site-kit-wp/issues/8747).
    134 * Remove legacy Analytics client services from the bundle, as they are no longer necessary following the removal of the UA module. See [#8459](https://github.com/google/site-kit-wp/issues/8459).
    135 * Add handling for audience sync errors in the audiences widget area. See [#8190](https://github.com/google/site-kit-wp/issues/8190).
    136 * Ensure the Audience Segmentation feature is effectively reset when changing the connected Analytics property. See [#8180](https://github.com/google/site-kit-wp/issues/8180).
    137 * Implement the unhappy path for the Settings Section Audience Segmentation setup flow, handling OAuth and API errors by displaying an Error Modal with options to retry, request access, or get help. See [#8179](https://github.com/google/site-kit-wp/issues/8179).
    138 * Ensure the Audience Segmentation Introductory Popup / Banner is only shown to to view-only users and secondary admins once the feature has been setup by the initial admin. See [#8172](https://github.com/google/site-kit-wp/issues/8172).
    139 * Add error handling in the Audience Segmentation selection panel audience creation notice. See [#8166](https://github.com/google/site-kit-wp/issues/8166).
    140 
    141 **Changed**
    142 
    143 * Remove the use of the non-existent `features` prop in stories using the `WithRegistrySetup` component. See [#9115](https://github.com/google/site-kit-wp/issues/9115).
    144 * Rename the `Migration_Conversion_ID` class to `Migration_1_129_0` for consistency with migration naming conventions. See [#8905](https://github.com/google/site-kit-wp/issues/8905).
     121* Update the RRM setup CTA copy to explicitly mention that subscriptions aren't available yet as part of the integration. See [#9524](https://github.com/google/site-kit-wp/issues/9524).
     122* Update the Audience Segmentation support documentation "learn more" link in the tooltip for an Audience Tile. See [#9455](https://github.com/google/site-kit-wp/issues/9455).
     123* Update tailored metrics to also include new ACR metrics. See [#9437](https://github.com/google/site-kit-wp/issues/9437).
     124* Disallow manual Ads Conversion ID entry when using the Partner Ads Experience. See [#9426](https://github.com/google/site-kit-wp/issues/9426).
     125* Update copy text in Google Ads module when Partner Ads Experience is enabled. See [#9425](https://github.com/google/site-kit-wp/issues/9425).
     126* Fix OAuth error handling when attempting to create a custom dimension from the "Top content" metric area in an Audience Tile. See [#9350](https://github.com/google/site-kit-wp/issues/9350).
     127* Update Analytics setup to support any number of accounts. See [#9348](https://github.com/google/site-kit-wp/issues/9348).
     128* Implement the ability to dismiss detected and lost events information in the Analytics module. See [#9343](https://github.com/google/site-kit-wp/issues/9343).
     129* Refactor the setup success subtle notification for Audience Segmentation. See [#9281](https://github.com/google/site-kit-wp/issues/9281).
     130* Increase maximum Key Metric Widget selection count to 8. See [#9135](https://github.com/google/site-kit-wp/issues/9135).
     131* Update the Reader Revenue Manager setup success notification to use the new notifications datastore. See [#8981](https://github.com/google/site-kit-wp/issues/8981).
     132* Update the design of the Key Metrics setup CTA banner. See [#8895](https://github.com/google/site-kit-wp/issues/8895).
     133* Improve UI/UX on AdSense alerts. See [#7642](https://github.com/google/site-kit-wp/issues/7642).
    145134
    146135**Fixed**
    147136
    148 * Enable enhanced conversion tracking by default when connecting GA4 or Ads. See [#9458](https://github.com/google/site-kit-wp/issues/9458).
    149 * Fix UX issues with the "Temporarily hidden" badge in the Audience Selection panel by ensuring the info icon only shows the tooltip without toggling the checkbox and improving tooltip behavior on mobile. See [#9421](https://github.com/google/site-kit-wp/issues/9421).
    150 * Fix conditions for showing the "Enable groups" and "Display visitor groups in dashboard" toggle on the Settings screen. See [#9366](https://github.com/google/site-kit-wp/issues/9366).
     137* Prevent audience settings from being deleted when changing or disconnecting the Analytics property. Reset `configuredAudiences` and `didSetAudiences` to default values while keeping `isAudienceSegmentationWidgetHidden` unchanged. See [#9432](https://github.com/google/site-kit-wp/issues/9432).
     138* Improve the availability of the audience widget for secondary administrators. See [#9411](https://github.com/google/site-kit-wp/issues/9411).
     139* Fix VRT test failures in CI when launching Chromium, ensuring tests run to completion without errors. See [#9406](https://github.com/google/site-kit-wp/issues/9406).
     140* Ensure the error style for the Settings edit screen is cleared when settings are saved successfully. See [#8481](https://github.com/google/site-kit-wp/issues/8481).
    151141
    152142[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.