I am getting error while connecting GA4(Google Analytics 4) to Tableau desktop using cdata connect with cdata connector and GoogleAnalytics by cdata.
If anyone has some suggestion on this or anyone is trying to achieve the same then let me know.
Regards,
Pankaj
Page 1 / 1
@PankajGIC Thank you for reaching out. Just to confirm, are you using the Google Analytics Tableau driver or Connect Server?
In either case, as long as Schema is set to GoogleAnalytics4, you should be able to test a connection to authenticate the driver to Google Analytics. Once this has been done, GA4 data should successfully get pulled. Instructions on this are also provided below.
If the issue continues to persist, could you please explain more about the error that you are seeing? Are you unable to authenticate the driver, is it not pulling any data, or is there a different issue? Screenshots of the error message would be helpful as well.
Thanks @Elizabeth G for your prompt response.
There are 2 connectors available in cdata for GA4 connection namely:
CData Connect by CData &
Google Analytics by CData
I have tried both the connector in my Tableau desktop(2022.1) by using connection builder.
CData Connect by CData : it is pullig data from GA4 but not allowing to show filter on the worksheet in Tableau like I want to keep region as an drop down filter within the workbook so it is not working and throwing error As :An error occurred while communicating with the CData Connect by CData data source 'Acquisitions (GoogleAnalytics4)' Bad Connection: Tableau could not connect to the data source.Error Code: B19090E0The query failed with the following error:o500] Could not execute the specified command: At least one metric must be specified in the query.<Query ID: 91538d43-3b30-4544-9d7a-6285b415f9fc>Connector Class: cdata_connect, Version: 21.8102.0SELECT "Acquisitions"."Region" AS "Region" FROM "GoogleAnalytics4"."Acquisitions" "Acquisitions"GROUP BY "Acquisitions"."Region"
Google Analytics by CData : Here I am able to connect with GA4 data but while dragging any dimension or measures it is throwing error as:
Not able to sign-In.
Regards,
PankajGIC
@PankajGIC Thank you for the explanation. Regarding the first issue, Google Analytics has two types of fields, Dimensions and Metrics, and the documentation below shows which fields are which type. It is a requirement of the Google Analytics API that at least one metric be specified in a query, and since you are only selecting Region (which is a dimension), this error is being thrown. To resolve this, you will first need to select one of the fields that is marked as a metric, such as UserEngagementDuration.
Regarding the second issue, 'jdbc:googleanalytics:' is not able to authenticate to Google Analytics because it is not a valid connection string for a Tableau driver, as this is the first part of a JDBC driver's connection string. There are two ways to resolve this. The first would be to run the cdata.tableau.googleanalytics.jar connection string builder, set the properties as described below, and press Test Connection to generate a connection string. The connection string should look similar to: Schema=GoogleAnalytics4;AuthScheme=OAuth;InitiateOAuth=GETANDREFRESH;
The second would be to leave the Connection String property blank, as this is optional, and just set the properties as described in the link above directly on the 'Google Analytics by CData' interface.
@Elizabeth G Thank you for the explanations.
For GoogleAnalytics by CData, the connection string is coming as prepopulated as jdbc:
And which one you suggest for GA4 between CData connect with CData and GoogleAnalytics by CData.
Regards,
PankajGIC
@PankajGIC Regarding the connection string, that is indeed odd, as the field defaults to being blank in my tests. It is possible that this information was entered into the field at some point and the connection was saved, but otherwise, I have been unable to reproduce this issue. Removing the ‘jdbc:’ should resolve it, however.
If it is coming pre-populated as ‘jdbc:’ in the connection string builder, however, then it is likely that the JDBC connection string builder is being used rather than the Tableau connection string builder. In this case, please ensure that you are using the cdata.tableau.googleanalytics.jar rather than cdata.jdbc.googleanalytics.jar to generate the connection string.
Regarding the difference between CData Connect (Connect Server) and Google Analytics by CData (the Tableau connector), the Tableau connector is best if your use case is only to connect Google Analytics to Tableau. Connect Server, on the other hand, can also connect to a variety or other sources and destinations, so if you plan to use the data in other tools, it would be a better option. If any further clarification is needed, could you please explain more about your use case so I can assist with this further?
@Elizabeth G Yes, I am using CData connector because in near future we will also target some other datasources as well.
Thankyou for your guidance and suggestion so far.
I am having one more query and that is:
When I am pulling the metric and dimension on Workbook of Tableau then it is showing data but if I drag the same measure or Dimension as “show filter” then it is not.
As here we are planning to show drop down filters for default Channel grouping , region, Continent and many more.
So do you have any insight on this?
Regards,
PankajGIC
@PankajGIC As this issue appears to have become more technical in nature and logging may be needed, please reach out to our support team at [email protected] to create a ticket so that we can assist with investigating this further. When you reach out, please explain how the filter is being applied, which would show more about the context of the issue.