JDBC Driver for Google Analytics GA4 data model

Hi all,

I kindly need help on this one. While checking the documentation CData JDBC Driver for Google Analytics - GoogleAnalytics4 Data Model , I noticed that there are no metrics or dimension related to

TAX, DISCOUNT, SHIPPING ,REFUND. These informations were present in the universal model.

From the documentation say this in the EcommPurchaseItemIdReport (see boxed part of screenshot) , but the Column names and the description do not match. and after querying the data, it proved that they indeed do not match .

Hi ​ @Nelson_christof  ,

Have you tried looking at the CreateCustomSchema Stored procedure? The stored procedure should allow you to set your dimensions and metrics of choice and create a view based on them. That said, querying this newly created view should give you a new report with the results you are looking for.

To run a stored procedure, you can follow the syntax here: CData JDBC Driver for Google Analytics - CreateCustomSchema and specify the right input parameters to create your own custom schema for GA4 queries.

You can learn more about the dimensions and metrics in the GA4 API docs:
API dimensions and metrics  |  Google Analytics  |  Google for Developers 
To understand the correct combinations of dimensions and metrics, you can play around with the GA Dimensions and Metrics Explorer: https://ga-dev-tools.google/ga4/

For your convenience, I am providing an example below:

EXECUTE CreateCustomSchema @TableName='CustomEcommReport',        @Dimensions='date,transactionid,streamid,streamname', @Metrics='refundAmount,taxAmount,shippingAmount,totalRevenue,transactions,keyEvents';

Regarding the incorrect description of the PurchaseToViewRate and ItemPurchased columns in the documentation, we have raised this with the documentation team. Thank you for reporting this!

Should you have any issues or any other questions, please reach out to support@cdata.com with your inquiry.