Skip to content

Commit

Permalink
Merge pull request #817 from google/fix/816-analytics-new-profile-setup
Browse files Browse the repository at this point in the history
Fix Analytics setup with new profile
  • Loading branch information
felixarntz authored Nov 7, 2019
2 parents 230bc6e + b01d4fd commit 7683bdc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion assets/js/components/data-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const getDataTableFromData = ( data, headers, options ) => {
<table
className={ `
googlesitekit-table__wrapper
googlesitekit-table__wrapper--${ data[ 0 ].length }-col
googlesitekit-table__wrapper--${ data && data[ 0 ] ? data[ 0 ].length : 1 }-col
` }
>
<thead className="googlesitekit-table__head">
Expand Down
7 changes: 4 additions & 3 deletions includes/Modules/Analytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ function ( $order_def ) {
return function() use ( $data ) {
$property_id = null;
$internal_web_property_id = null;
$property_name = '';

if ( '0' === $data['propertyID'] ) {
$is_new_property = true;
$client = $this->get_client();
Expand All @@ -915,8 +915,9 @@ function ( $order_def ) {
return new WP_Error( $e->getCode(), $e->getMessage() );
}
$client->setDefer( $orig_defer );
$property_id = $property->id;
$internal_web_property_id = $property->internalWebPropertyID; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
/* @var Google_Service_Analytics_Webproperty $property Property instance. */
$property_id = $property->getId();
$internal_web_property_id = $property->getInternalWebPropertyId();
} else {
$is_new_property = false;
$property_id = $data['propertyID'];
Expand Down

0 comments on commit 7683bdc

Please sign in to comment.