airbytehq / airbyte

The leading data integration platform for ETL / ELT data pipelines from APIs, databases & files to data warehouses, data lakes & data lakehouses. Both self-hosted and Cloud-hosted.
https://airbyte.com
Other
16.1k stars 4.12k forks source link

Improve UX of Custom Reports for Google Analytics v4 #26212

Open nataliekwong opened 1 year ago

nataliekwong commented 1 year ago

When adding custom reports for GAv4, users have a difficult time validating the field is correct and how to fix the error. Over the last two months, errors with custom reports accounted for 43% of the errors during connector setup.

Example of some errors people see:

custom_reports is not valid JSON' custom_reports is not of type 'array' custom_reports: invalid dimension(s) custom_reports: invalid metric(s):
custom_reports.1.pivots.0: 'limit' is a required property custom_reports: pages already exist as a default report(s) custom_reports.0: 'dimensions' is a required property custom_reports.0: 'metrics' is a required property custom_reports.0: 'name' is a required property custom_reports.0.dimensions.0: {'name': 'city'} is not of type 'string' custom_reports.0.dimensions.0: {'name': 'date'} is not of type 'string' custom_reports.0.dimensions.0: {'name': 'ga:date'} is not of type 'string'

Observations: Users have to input custom reports into a single-line field.

Suggestions:

It is typically being pasted in from an output generated here: https://ga-dev-tools.google/ga4/query-explorer/. The spec for GAv4 should be updated to accommodate for multiple lines entered in a way that enables the user to make changes without needing scroll back and forth in a small line.

Example of how it's formatted from the query explorer: Screenshot 2023-05-17 at 2 49 27 PM

How we show it in our app: Screenshot 2023-05-17 at 2 48 44 PM

Example Fullstory: https://fsty.io/v/DXZWEsMP

nataliekwong commented 1 year ago

To take it one step further, the experience with Facebook Marketing is even more ideal.

If we can preload the options for people to select, then we can avoid many configuration issues with erroneous typing. Screenshot 2023-05-26 at 11 05 28 AM

nataliekwong commented 1 year ago

@lmossman @flash1293 Just caught up on reading the Slack thread related to prior PR that was trying to address a similar issue for a different connector.

From the Slack thread it sounds like the improvement can be made in Cloud on the FE, but we would leave the spec unchanged. Is that the right conclusion?

lmossman commented 1 year ago

@nataliekwong the conclusion from that related slack thread was that these types of changes which modify the type or format of an existing field in a connector spec will result in a bad experience for the user until we have a holistic system in place for migrating connector configurations from the old format to the new format upon upgrading the connector.

I'm not aware of any advancements we have made on that front, but @evantahler would likely have more information on the priorization around such a project, as I believe that would be in Connector Ops's domain

evantahler commented 1 year ago

While not in the CDK yet, connector developers can make use of AirbyteControlMessage directly to change the connection's config at runtime. You would need to store some value in the connector's config or state to indicate that you have migrated the config, or use some value that's been been removed to key off of.

A guide with some thoughts is here: https://docs.google.com/document/d/1tbMeG_v29zVcza6JNhw7-oY50H7aY1AbVvZr9yzFmVw/edit#

pinkasey commented 1 year ago

Adding my 2 cents - I came to know and use Airbyte for the sole purpose of migrating my UA (Universal Analytics - AKA GAv3) to BigQuery. I recon there are many like me, as Google announced that it will eventually block access to all UA data.

So my issue is with GAv3, not GAv4, but this is the most relevant issue I've found and I think it's close enough.

My problems with the UX here, in descending order:

  1. The (?) points to Airbyte documentation, but the most useful resource would be GA query builder (for GAv3, in my case). That should be a quick fix IMO. BTW that hardest part for me was to figure the API names of the dimensions and metrics I needed - GA documentation don't make it easy to find.
  2. The validation does not validate dimensions and metrics name, so I only find out that I was wrong when running sync. And even then - only by looking at the logs. The only indication that something was wrong was that nothing was saved while there were misconfigurations, so that sent me to look at the logs.
  3. Better UI, as @nataliekwong suggested. Obviously, the FB UX she had a screenshot of is the best option. But even a json editor would be an improvement (there are OSS json-editors available to plug-in), or even a text-area instead of an input. As mentioned - the first two issues are more important, to me at least.