Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pivot reports to fetch audiences metrics. #8870

Merged
merged 27 commits into from
Jul 1, 2024

Conversation

ankitrox
Copy link
Collaborator

@ankitrox ankitrox commented Jun 13, 2024

Summary

Addresses issue:

Relevant technical choices

PR Author Checklist

  • My code is tested and passes existing unit tests.
  • My code has an appropriate set of unit tests which all pass.
  • My code is backward-compatible with WordPress 5.2 and PHP 7.4.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.
  • I have added a QA Brief on the issue linked above.
  • I have signed the Contributor License Agreement (see https://cla.developers.google.com/).

Do not alter or remove anything below. The following sections will be managed by moderators only.

Code Reviewer Checklist

  • Run the code.
  • Ensure the acceptance criteria are satisfied.
  • Reassess the implementation with the IB.
  • Ensure no unrelated changes are included.
  • Ensure CI checks pass.
  • Check Storybook where applicable.
  • Ensure there is a QA Brief.

Merge Reviewer Checklist

  • Ensure the PR has the correct target branch.
  • Double-check that the PR is okay to be merged.
  • Ensure the corresponding issue has a ZenHub release assigned.
  • Add a changelog message to the issue.

@ankitrox ankitrox marked this pull request as ready for review June 18, 2024 08:32
Base automatically changed from enhancement/8484-pivot-reports to develop June 20, 2024 00:35
Copy link

github-actions bot commented Jun 20, 2024

Build files for e9b2a6a are ready:

Copy link

github-actions bot commented Jun 20, 2024

Size Change: +178 B (+0.01%)

Total Size: 1.55 MB

Filename Size Change
./dist/assets/css/googlesitekit-admin-css-********************.min.css 55.1 kB +90 B (+0.16%)
./dist/assets/js/34-********************.js 3.12 kB +1 B (+0.03%)
./dist/assets/js/googlesitekit-activation-********************.js 24 kB -37 B (-0.15%)
./dist/assets/js/googlesitekit-ad-blocking-recovery-********************.js 59.4 kB -257 B (-0.43%)
./dist/assets/js/googlesitekit-adminbar-********************.js 34.8 kB -4 B (-0.01%)
./dist/assets/js/googlesitekit-api-********************.js 10.2 kB +7 B (+0.07%)
./dist/assets/js/googlesitekit-components-gm2-********************.js 5.88 kB -2 B (-0.03%)
./dist/assets/js/googlesitekit-components-gm3-********************.js 10.1 kB -4 B (-0.04%)
./dist/assets/js/googlesitekit-data-********************.js 2.36 kB +185 B (+8.51%) 🔍
./dist/assets/js/googlesitekit-datastore-forms-********************.js 9.14 kB -5 B (-0.05%)
./dist/assets/js/googlesitekit-datastore-location-********************.js 2.08 kB -1 B (-0.05%)
./dist/assets/js/googlesitekit-datastore-site-********************.js 20 kB -49 B (-0.24%)
./dist/assets/js/googlesitekit-datastore-ui-********************.js 10.1 kB -2 B (-0.02%)
./dist/assets/js/googlesitekit-datastore-user-********************.js 25.2 kB -101 B (-0.4%)
./dist/assets/js/googlesitekit-entity-dashboard-********************.js 74 kB -134 B (-0.18%)
./dist/assets/js/googlesitekit-main-dashboard-********************.js 123 kB +144 B (+0.12%)
./dist/assets/js/googlesitekit-modules-********************.js 22.2 kB -50 B (-0.22%)
./dist/assets/js/googlesitekit-modules-ads-********************.js 29.5 kB -39 B (-0.13%)
./dist/assets/js/googlesitekit-modules-adsense-********************.js 113 kB -343 B (-0.3%)
./dist/assets/js/googlesitekit-modules-analytics-4-********************.js 143 kB +310 B (+0.22%)
./dist/assets/js/googlesitekit-modules-pagespeed-insights-********************.js 22.6 kB +12 B (+0.05%)
./dist/assets/js/googlesitekit-modules-search-console-********************.js 59.1 kB +335 B (+0.57%)
./dist/assets/js/googlesitekit-modules-tagmanager-********************.js 32.1 kB -111 B (-0.34%)
./dist/assets/js/googlesitekit-settings-********************.js 61.6 kB -283 B (-0.46%)
./dist/assets/js/googlesitekit-splash-********************.js 73 kB +353 B (+0.49%)
./dist/assets/js/googlesitekit-user-input-********************.js 48.1 kB -246 B (-0.51%)
./dist/assets/js/googlesitekit-vendor-********************.js 317 kB -76 B (-0.02%)
./dist/assets/js/googlesitekit-widgets-********************.js 60.9 kB +678 B (+1.13%)
./dist/assets/js/googlesitekit-wp-dashboard-********************.js 61.6 kB -192 B (-0.31%)
./dist/assets/js/runtime-********************.js 1.3 kB -1 B (-0.08%)
ℹ️ View Unchanged
Filename Size
./dist/assets/css/googlesitekit-adminbar-css-********************.min.css 11.2 kB
./dist/assets/css/googlesitekit-authorize-application-css-********************.min.css 770 B
./dist/assets/css/googlesitekit-wp-dashboard-css-********************.min.css 7.47 kB
./dist/assets/js/29-********************.js 2.76 kB
./dist/assets/js/30-********************.js 2.25 kB
./dist/assets/js/31-********************.js 3.64 kB
./dist/assets/js/32-********************.js 935 B
./dist/assets/js/33-********************.js 892 B
./dist/assets/js/analytics-advanced-tracking-********************.js 776 B
./dist/assets/js/contact-form-7-********************.js 645 B
./dist/assets/js/easy-digital-downloads-********************.js 615 B
./dist/assets/js/googlesitekit-i18n-********************.js 3.92 kB
./dist/assets/js/googlesitekit-polyfills-********************.js 377 B
./dist/assets/js/mailchimp-********************.js 629 B
./dist/assets/js/ninja-forms-********************.js 727 B
./dist/assets/js/optin-monster-********************.js 673 B
./dist/assets/js/popup-maker-********************.js 634 B
./dist/assets/js/woocommerce-********************.js 652 B
./dist/assets/js/wpforms-********************.js 632 B

compressed-size-action

Copy link
Collaborator

@techanvil techanvil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ankitrox, good work so far. I've left a number of comments to address, please take a look.

Copy link
Collaborator

@techanvil techanvil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ankitrox, thanks for the update. This does need another update, though - I've noticed the output for the mock data is not quite as expected, and there are a couple of other points to address. Please take a look.

// TODO: as part of #8484 the report props should be updated to expect
// the full report rows for the current tile to reduce data manipulation
// in AudienceTiles.
function getDataFromRows( {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our convention is to extract utility functions like these to a separate file.

Please can you extract getDataFromRows() and collectAudienceRows() to a new utils.js file in the same folder, and add JSDoc?

See DashboardAllTrafficWidgetGA4/utils.js by way of example.

Comment on lines 737 to 741
* },
* {
* fieldNames: [ 'pagePath', 'pageTitle' ], // having 3 rows
* limit: 3,
* },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation is slightly off here. Also, did you mean to duplicate the field names?

Suggested change
* },
* {
* fieldNames: [ 'pagePath', 'pageTitle' ], // having 3 rows
* limit: 3,
* },
* },
* {
* fieldNames: [ 'totalUsers' ], // having 3 rows
* limit: 3,
* },

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The long test posts have been lost in the various stories - these were there to demonstrate the ellipses. Please can you restore them?

Comment on lines 573 to 592
dimensions: [ 'city', 'audienceResourceName', 'country' ],
pivots: [
{
fieldNames: [ 'audienceResourceName' ],
limit: 2,
},
{
fieldNames: [ 'city', 'country' ],
limit: 3,
orderby: [
{
metric: {
metricName: 'totalUsers',
},
desc: true,
},
],
},
{
fieldNames: [ 'country' ],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The resulting output is a bit confusing to read with country specified in two pivots. I'd suggest using an additional dimension:

Suggested change
dimensions: [ 'city', 'audienceResourceName', 'country' ],
pivots: [
{
fieldNames: [ 'audienceResourceName' ],
limit: 2,
},
{
fieldNames: [ 'city', 'country' ],
limit: 3,
orderby: [
{
metric: {
metricName: 'totalUsers',
},
desc: true,
},
],
},
{
fieldNames: [ 'country' ],
dimensions: [
'city',
'audienceResourceName',
'country',
'sessionDefaultChannelGrouping',
],
pivots: [
{
fieldNames: [ 'audienceResourceName' ],
limit: 2,
},
{
fieldNames: [ 'city', 'country' ],
limit: 3,
orderby: [
{
metric: {
metricName: 'totalUsers',
},
desc: true,
},
],
},
{
fieldNames: [ 'sessionDefaultChannelGrouping' ],

Comment on lines 44 to 94
"pivotDimensionHeaders": [
{
"dimensionValues": [
{
"value": "Dublin"
}
]
},
{
"dimensionValues": [
{
"value": "(not set)"
}
]
},
{
"dimensionValues": [
{
"value": "Cork"
}
]
}
],
"rowCount": 3
},
{
"pivotDimensionHeaders": [
{
"dimensionValues": [
{
"value": "United States"
}
]
},
{
"dimensionValues": [
{
"value": "United Kingdom"
}
]
},
{
"dimensionValues": [
{
"value": "India"
}
]
}
],
"rowCount": 3
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you can see from the JSON example I posted in my comment at the top of the file - the expected response for a multi-dimensional pivot is for there to be a single pivotDimensionHeaders object for the pivot, with multiple entries in each dimensionValues array (one entry per field name).

However the current test output seems to have a single pivotDimensionHeaders object per field name, with just one entry in each dimensionValues array.

Expected shape (taken from my example so the values are different)
    {
      "pivotDimensionHeaders": [
        {
          "dimensionValues": [
            {
              "value": "Dublin"
            },
            {
              "value": "Ireland"
            }
          ]
        },
        {
          "dimensionValues": [
            {
              "value": "Cork"
            },
            {
              "value": "Ireland"
            }
          ]
        },
        {
          "dimensionValues": [
            {
              "value": "Sao Paulo"
            },
            {
              "value": "Brazil"
            }
          ]
        }
      ],
      "rowCount": 1123
    },
Current shape
      {
        "pivotDimensionHeaders": [
          {
            "dimensionValues": [
              {
                "value": "Dublin"
              }
            ]
          },
          {
            "dimensionValues": [
              {
                "value": "(not set)"
              }
            ]
          },
          {
            "dimensionValues": [
              {
                "value": "Cork"
              }
            ]
          }
        ],
        "rowCount": 3
      },
      {
        "pivotDimensionHeaders": [
          {
            "dimensionValues": [
              {
                "value": "United States"
              }
            ]
          },
          {
            "dimensionValues": [
              {
                "value": "United Kingdom"
              }
            ]
          },
          {
            "dimensionValues": [
              {
                "value": "India"
              }
            ]
          }
        ],
        "rowCount": 3
      },

"rowCount": 3
}
],
"aggregates": [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The number and shape of the aggregates is also not correct. As you can see, for each pivot, we should have effectively have the number of rows (i.e. limit in our output) x 3 (TOTAL, MINIMUM and MAXIMUM).

So there should be 2x3 + 3x3 + 3x3 = 24 entries in aggregates. As you can see the current output only has 9 entries. Also, the each entry should contain 4 dimension values.

Expected shape (taken from my example)
	"aggregates": [
		{
			"dimensionValues": [
				{
					"value": "new"
				},
				{
					"value": "RESERVED_TOTAL"
				},
				{
					"value": "RESERVED_TOTAL"
				},
				{
					"value": "RESERVED_TOTAL"
				}
			],
			"metricValues": [
				{
					"value": "4892"
				},
				{
					"value": "4892"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "RESERVED_TOTAL"
				},
				{
					"value": "RESERVED_TOTAL"
				},
				{
					"value": "RESERVED_TOTAL"
				},
				{
					"value": "iOS"
				}
			],
			"metricValues": [
				{
					"value": "2104"
				},
				{
					"value": "2104"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "RESERVED_TOTAL"
				},
				{
					"value": "RESERVED_TOTAL"
				},
				{
					"value": "RESERVED_TOTAL"
				},
				{
					"value": "Android"
				}
			],
			"metricValues": [
				{
					"value": "1936"
				},
				{
					"value": "1936"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "RESERVED_TOTAL"
				},
				{
					"value": "Dublin"
				},
				{
					"value": "Ireland"
				},
				{
					"value": "RESERVED_TOTAL"
				}
			],
			"metricValues": [
				{
					"value": "1202"
				},
				{
					"value": "1202"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "RESERVED_TOTAL"
				},
				{
					"value": "RESERVED_TOTAL"
				},
				{
					"value": "RESERVED_TOTAL"
				},
				{
					"value": "Windows"
				}
			],
			"metricValues": [
				{
					"value": "690"
				},
				{
					"value": "690"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "RESERVED_MAX"
				},
				{
					"value": "Dublin"
				},
				{
					"value": "Ireland"
				},
				{
					"value": "RESERVED_MAX"
				}
			],
			"metricValues": [
				{
					"value": "551"
				},
				{
					"value": "551"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "RESERVED_MAX"
				},
				{
					"value": "RESERVED_MAX"
				},
				{
					"value": "RESERVED_MAX"
				},
				{
					"value": "iOS"
				}
			],
			"metricValues": [
				{
					"value": "551"
				},
				{
					"value": "551"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "new"
				},
				{
					"value": "RESERVED_MAX"
				},
				{
					"value": "RESERVED_MAX"
				},
				{
					"value": "RESERVED_MAX"
				}
			],
			"metricValues": [
				{
					"value": "551"
				},
				{
					"value": "551"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "returning"
				},
				{
					"value": "RESERVED_TOTAL"
				},
				{
					"value": "RESERVED_TOTAL"
				},
				{
					"value": "RESERVED_TOTAL"
				}
			],
			"metricValues": [
				{
					"value": "530"
				},
				{
					"value": "530"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "RESERVED_MAX"
				},
				{
					"value": "RESERVED_MAX"
				},
				{
					"value": "RESERVED_MAX"
				},
				{
					"value": "Android"
				}
			],
			"metricValues": [
				{
					"value": "430"
				},
				{
					"value": "430"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "RESERVED_TOTAL"
				},
				{
					"value": "Cork"
				},
				{
					"value": "Ireland"
				},
				{
					"value": "RESERVED_TOTAL"
				}
			],
			"metricValues": [
				{
					"value": "244"
				},
				{
					"value": "244"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "RESERVED_TOTAL"
				},
				{
					"value": "Sao Paulo"
				},
				{
					"value": "Brazil"
				},
				{
					"value": "RESERVED_TOTAL"
				}
			],
			"metricValues": [
				{
					"value": "196"
				},
				{
					"value": "196"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "RESERVED_MAX"
				},
				{
					"value": "Cork"
				},
				{
					"value": "Ireland"
				},
				{
					"value": "RESERVED_MAX"
				}
			],
			"metricValues": [
				{
					"value": "191"
				},
				{
					"value": "191"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "RESERVED_MAX"
				},
				{
					"value": "RESERVED_MAX"
				},
				{
					"value": "RESERVED_MAX"
				},
				{
					"value": "Windows"
				}
			],
			"metricValues": [
				{
					"value": "121"
				},
				{
					"value": "121"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "RESERVED_MAX"
				},
				{
					"value": "Sao Paulo"
				},
				{
					"value": "Brazil"
				},
				{
					"value": "RESERVED_MAX"
				}
			],
			"metricValues": [
				{
					"value": "83"
				},
				{
					"value": "83"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "returning"
				},
				{
					"value": "RESERVED_MAX"
				},
				{
					"value": "RESERVED_MAX"
				},
				{
					"value": "RESERVED_MAX"
				}
			],
			"metricValues": [
				{
					"value": "78"
				},
				{
					"value": "78"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "RESERVED_MIN"
				},
				{
					"value": "Dublin"
				},
				{
					"value": "Ireland"
				},
				{
					"value": "RESERVED_MIN"
				}
			],
			"metricValues": [
				{
					"value": "4"
				},
				{
					"value": "4"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "RESERVED_MIN"
				},
				{
					"value": "Cork"
				},
				{
					"value": "Ireland"
				},
				{
					"value": "RESERVED_MIN"
				}
			],
			"metricValues": [
				{
					"value": "1"
				},
				{
					"value": "1"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "RESERVED_MIN"
				},
				{
					"value": "RESERVED_MIN"
				},
				{
					"value": "RESERVED_MIN"
				},
				{
					"value": "Android"
				}
			],
			"metricValues": [
				{
					"value": "1"
				},
				{
					"value": "1"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "RESERVED_MIN"
				},
				{
					"value": "RESERVED_MIN"
				},
				{
					"value": "RESERVED_MIN"
				},
				{
					"value": "Windows"
				}
			],
			"metricValues": [
				{
					"value": "1"
				},
				{
					"value": "1"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "RESERVED_MIN"
				},
				{
					"value": "RESERVED_MIN"
				},
				{
					"value": "RESERVED_MIN"
				},
				{
					"value": "iOS"
				}
			],
			"metricValues": [
				{
					"value": "1"
				},
				{
					"value": "1"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "RESERVED_MIN"
				},
				{
					"value": "Sao Paulo"
				},
				{
					"value": "Brazil"
				},
				{
					"value": "RESERVED_MIN"
				}
			],
			"metricValues": [
				{
					"value": "1"
				},
				{
					"value": "1"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "new"
				},
				{
					"value": "RESERVED_MIN"
				},
				{
					"value": "RESERVED_MIN"
				},
				{
					"value": "RESERVED_MIN"
				}
			],
			"metricValues": [
				{
					"value": "1"
				},
				{
					"value": "1"
				}
			]
		},
		{
			"dimensionValues": [
				{
					"value": "returning"
				},
				{
					"value": "RESERVED_MIN"
				},
				{
					"value": "RESERVED_MIN"
				},
				{
					"value": "RESERVED_MIN"
				}
			],
			"metricValues": [
				{
					"value": "1"
				},
				{
					"value": "1"
				}
			]
		}
	],
Current output
    "aggregates": [
      {
        "dimensionValues": [
          {
            "value": "RESERVED_MIN"
          },
          {
            "value": "city"
          }
        ],
        "metricValues": [
          {
            "value": "27"
          },
          {
            "value": "91"
          }
        ]
      },
      {
        "dimensionValues": [
          {
            "value": "RESERVED_MIN"
          },
          {
            "value": "audienceResourceName"
          }
        ],
        "metricValues": [
          {
            "value": "86"
          },
          {
            "value": "53"
          }
        ]
      },
      {
        "dimensionValues": [
          {
            "value": "RESERVED_MIN"
          },
          {
            "value": "country"
          }
        ],
        "metricValues": [
          {
            "value": "38"
          },
          {
            "value": "71"
          }
        ]
      },
      {
        "dimensionValues": [
          {
            "value": "RESERVED_MAX"
          },
          {
            "value": "city"
          }
        ],
        "metricValues": [
          {
            "value": "21"
          },
          {
            "value": "74"
          }
        ]
      },
      {
        "dimensionValues": [
          {
            "value": "RESERVED_MAX"
          },
          {
            "value": "audienceResourceName"
          }
        ],
        "metricValues": [
          {
            "value": "66"
          },
          {
            "value": "80"
          }
        ]
      },
      {
        "dimensionValues": [
          {
            "value": "RESERVED_MAX"
          },
          {
            "value": "country"
          }
        ],
        "metricValues": [
          {
            "value": "16"
          },
          {
            "value": "22"
          }
        ]
      },
      {
        "dimensionValues": [
          {
            "value": "RESERVED_TOTAL"
          },
          {
            "value": "city"
          }
        ],
        "metricValues": [
          {
            "value": "45"
          },
          {
            "value": "34"
          }
        ]
      },
      {
        "dimensionValues": [
          {
            "value": "RESERVED_TOTAL"
          },
          {
            "value": "audienceResourceName"
          }
        ],
        "metricValues": [
          {
            "value": "23"
          },
          {
            "value": "91"
          }
        ]
      },
      {
        "dimensionValues": [
          {
            "value": "RESERVED_TOTAL"
          },
          {
            "value": "country"
          }
        ],
        "metricValues": [
          {
            "value": "38"
          },
          {
            "value": "66"
          }
        ]
      }
    ],

]
}
],
"rows": [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lastly, the number of rows is not as expected either.

The number of rows should be the product of multiplying the row count for each pivot together. So with pivots returning 2, 3 and 3 rows, the report row count should be 2x3x3 = 18.

However the current output only has 6 rows, so it evidently doesn't have the right combination of values.

Expected shape (taken from my example)
"rows": [
	{
		"dimensionValues": [
			{
				"value": "new"
			},
			{
				"value": "Dublin"
			},
			{
				"value": "Ireland"
			},
			{
				"value": "iOS"
			}
		],
		"metricValues": [
			{
				"value": "551"
			},
			{
				"value": "551"
			}
		]
	},
	{
		"dimensionValues": [
			{
				"value": "new"
			},
			{
				"value": "Dublin"
			},
			{
				"value": "Ireland"
			},
			{
				"value": "Android"
			}
		],
		"metricValues": [
			{
				"value": "430"
			},
			{
				"value": "430"
			}
		]
	},
	{
		"dimensionValues": [
			{
				"value": "new"
			},
			{
				"value": "Cork"
			},
			{
				"value": "Ireland"
			},
			{
				"value": "iOS"
			}
		],
		"metricValues": [
			{
				"value": "191"
			},
			{
				"value": "191"
			}
		]
	},
	{
		"dimensionValues": [
			{
				"value": "new"
			},
			{
				"value": "Dublin"
			},
			{
				"value": "Ireland"
			},
			{
				"value": "Windows"
			}
		],
		"metricValues": [
			{
				"value": "121"
			},
			{
				"value": "121"
			}
		]
	},
	{
		"dimensionValues": [
			{
				"value": "new"
			},
			{
				"value": "Sao Paulo"
			},
			{
				"value": "Brazil"
			},
			{
				"value": "iOS"
			}
		],
		"metricValues": [
			{
				"value": "83"
			},
			{
				"value": "83"
			}
		]
	},
	{
		"dimensionValues": [
			{
				"value": "returning"
			},
			{
				"value": "Dublin"
			},
			{
				"value": "Ireland"
			},
			{
				"value": "Android"
			}
		],
		"metricValues": [
			{
				"value": "78"
			},
			{
				"value": "78"
			}
		]
	},
	{
		"dimensionValues": [
			{
				"value": "returning"
			},
			{
				"value": "Dublin"
			},
			{
				"value": "Ireland"
			},
			{
				"value": "iOS"
			}
		],
		"metricValues": [
			{
				"value": "70"
			},
			{
				"value": "70"
			}
		]
	},
	{
		"dimensionValues": [
			{
				"value": "new"
			},
			{
				"value": "Sao Paulo"
			},
			{
				"value": "Brazil"
			},
			{
				"value": "Android"
			}
		],
		"metricValues": [
			{
				"value": "64"
			},
			{
				"value": "64"
			}
		]
	},
	{
		"dimensionValues": [
			{
				"value": "new"
			},
			{
				"value": "Sao Paulo"
			},
			{
				"value": "Brazil"
			},
			{
				"value": "Windows"
			}
		],
		"metricValues": [
			{
				"value": "36"
			},
			{
				"value": "36"
			}
		]
	},
	{
		"dimensionValues": [
			{
				"value": "returning"
			},
			{
				"value": "Cork"
			},
			{
				"value": "Ireland"
			},
			{
				"value": "iOS"
			}
		],
		"metricValues": [
			{
				"value": "26"
			},
			{
				"value": "26"
			}
		]
	},
	{
		"dimensionValues": [
			{
				"value": "new"
			},
			{
				"value": "Cork"
			},
			{
				"value": "Ireland"
			},
			{
				"value": "Android"
			}
		],
		"metricValues": [
			{
				"value": "21"
			},
			{
				"value": "21"
			}
		]
	},
	{
		"dimensionValues": [
			{
				"value": "returning"
			},
			{
				"value": "Dublin"
			},
			{
				"value": "Ireland"
			},
			{
				"value": "Windows"
			}
		],
		"metricValues": [
			{
				"value": "14"
			},
			{
				"value": "14"
			}
		]
	},
	{
		"dimensionValues": [
			{
				"value": "returning"
			},
			{
				"value": "Sao Paulo"
			},
			{
				"value": "Brazil"
			},
			{
				"value": "Android"
			}
		],
		"metricValues": [
			{
				"value": "12"
			},
			{
				"value": "12"
			}
		]
	},
	{
		"dimensionValues": [
			{
				"value": "new"
			},
			{
				"value": "Cork"
			},
			{
				"value": "Ireland"
			},
			{
				"value": "Windows"
			}
		],
		"metricValues": [
			{
				"value": "8"
			},
			{
				"value": "8"
			}
		]
	},
	{
		"dimensionValues": [
			{
				"value": "returning"
			},
			{
				"value": "Sao Paulo"
			},
			{
				"value": "Brazil"
			},
			{
				"value": "iOS"
			}
		],
		"metricValues": [
			{
				"value": "7"
			},
			{
				"value": "7"
			}
		]
	},
	{
		"dimensionValues": [
			{
				"value": "returning"
			},
			{
				"value": "Cork"
			},
			{
				"value": "Ireland"
			},
			{
				"value": "Android"
			}
		],
		"metricValues": [
			{
				"value": "4"
			},
			{
				"value": "4"
			}
		]
	},
	{
		"dimensionValues": [
			{
				"value": "returning"
			},
			{
				"value": "Sao Paulo"
			},
			{
				"value": "Brazil"
			},
			{
				"value": "Windows"
			}
		],
		"metricValues": [
			{
				"value": "4"
			},
			{
				"value": "4"
			}
		]
	},
	{
		"dimensionValues": [
			{
				"value": "returning"
			},
			{
				"value": "Cork"
			},
			{
				"value": "Ireland"
			},
			{
				"value": "Windows"
			}
		],
		"metricValues": [
			{
				"value": "1"
			},
			{
				"value": "1"
			}
		]
	}
],
Current output
    "rows": [
      {
        "dimensionValues": [
          {
            "value": "properties/12345/audiences/2"
          },
          {
            "value": "Cork"
          },
          {
            "value": "India"
          },
          {
            "value": "India"
          }
        ],
        "metricValues": [
          {
            "value": "98"
          },
          {
            "value": "7"
          }
        ]
      },
      {
        "dimensionValues": [
          {
            "value": "properties/12345/audiences/2"
          },
          {
            "value": "(not set)"
          },
          {
            "value": "United Kingdom"
          },
          {
            "value": "United Kingdom"
          }
        ],
        "metricValues": [
          {
            "value": "89"
          },
          {
            "value": "62"
          }
        ]
      },
      {
        "dimensionValues": [
          {
            "value": "properties/12345/audiences/1"
          },
          {
            "value": "Dublin"
          },
          {
            "value": "United States"
          },
          {
            "value": "United States"
          }
        ],
        "metricValues": [
          {
            "value": "55"
          },
          {
            "value": "14"
          }
        ]
      },
      {
        "dimensionValues": [
          {
            "value": "properties/12345/audiences/1"
          },
          {
            "value": "Cork"
          },
          {
            "value": "India"
          },
          {
            "value": "India"
          }
        ],
        "metricValues": [
          {
            "value": "17"
          },
          {
            "value": "39"
          }
        ]
      },
      {
        "dimensionValues": [
          {
            "value": "properties/12345/audiences/2"
          },
          {
            "value": "Dublin"
          },
          {
            "value": "United States"
          },
          {
            "value": "United States"
          }
        ],
        "metricValues": [
          {
            "value": "10"
          },
          {
            "value": "73"
          }
        ]
      },
      {
        "dimensionValues": [
          {
            "value": "properties/12345/audiences/1"
          },
          {
            "value": "(not set)"
          },
          {
            "value": "United Kingdom"
          },
          {
            "value": "United Kingdom"
          }
        ],
        "metricValues": [
          {
            "value": "3"
          },
          {
            "value": "13"
          }
        ]
      }
    ],

Copy link
Collaborator

@techanvil techanvil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ankitrox, just a few last comments to address and this should be good to go.

Copy link
Collaborator

@techanvil techanvil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice work @ankitrox!

@techanvil techanvil merged commit 0beeecd into develop Jul 1, 2024
20 of 21 checks passed
@techanvil techanvil deleted the enhancement/8726-pivot-report-audience-tiles branch July 1, 2024 12:11
techanvil added a commit that referenced this pull request Jul 5, 2024
…eport-audience-tiles"

This reverts commit 0beeecd, reversing
changes made to 8240ccf.
@nfmohit nfmohit restored the enhancement/8726-pivot-report-audience-tiles branch July 5, 2024 20:00
@nfmohit nfmohit deleted the enhancement/8726-pivot-report-audience-tiles branch July 5, 2024 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants