Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
alexvgp
New Member

Problem with GA4 2.0 connection

 
Some time ago I connected to GA4 using the Google Analytics 2.0 connector, however, in December it started to present the problem below, and no changes were made to it during the period. What makes it seem even stranger is that in the automatic update, some days it updates, and other days it presents the same problem without making any type of adjustment. Please, can anyone help?

 

Problem presented:
DataFormat.Error: We found an unexpected character in the JSON input.DetailsReason = DataFormat.Error
Value = \31
Position = 0

 

In the advanced editor it looks like this:

 

let
    Fonte = GoogleAnalytics.Accounts([Implementation = "2.0"]),
    #"navegation1" = Fonte{[Id="accounts/9999999"]}[Data],
    #"navegation2" = #"navegation1"{[Id="properties/9999999"]}[Data],
    #"navegation3" = #"navegation2"{[Id="properties/9999999"]}[Data],
    #"Itens Adicionados" = Cube.Transform(#"navegation3",
        {
            {Cube.AddAndExpandDimensionColumn, "transactionId", {"transactionId"}, {"transactionId"}},
            {Cube.AddAndExpandDimensionColumn, "date", {"date"}, {"date"}},
            {Cube.AddAndExpandDimensionColumn, "campaignName", {"campaignName"}, {"campaignName"}},
            {Cube.AddAndExpandDimensionColumn, "medium", {"medium"}, {"medium"}},
            {Cube.AddAndExpandDimensionColumn, "source", {"source"}, {"source"}},
            {Cube.AddMeasureColumn, "totalRevenue", "totalRevenue"}
        })
in
    #"Itens Adicionados"

 

* The IDs have been changed to "9999999". I'm warning you so it doesn't look like it's a mistake.

3 REPLIES 3
QueryWhiz
Helper V
Helper V

Hi @alexvgp As other comment mentioned, using a different connector could work in this case. It seems like the 2.0 beta connector is still presenting some issues. I currently use windsor.ai's GA4 connector and I haven't had any issue or problem so far with my connection or data accuracy. In case you wonder, to make the connection first search for the GA4 connector in the data sources list:

 

GA4-1.png

 

After that, just grant access to your GA4 account using your credentials, then on preview and destination page you will see a preview of your GA4 fields:

 

GA4-2.png

 

There just select the fields you need. Finally, just select PBI as your data destination and finally just copy and paste the url on PBI --> Get Data --> Web --> Paste the url. 

 

SELECT_DESTINATION_NEW.png

hands-dw
Regular Visitor

We have the same issue wich started to appear on Feb. 12th.
We reported to PowerBI support und hope to get a solution for this.
It's an issue of the dataflow. In PowerBI Desktop we don't get this error.

v-tangjie-msft
Community Support
Community Support

Hi @alexvgp ,

 

You might want to try the following:
- Make sure that both Power BI Desktop and the Google Analytics connector are updated to the latest version.
- Try reducing the amount of data being processed by heavily filtering the data.
- Try using a different connector or tool to connect to GA4, such as Google BigQuery .

 

You can refer to the similar posts that may be helpful to you:

 "We found an unexpected character in the JSON ... - Power Platform Community (microsoft.com)

powerbi - Issues with connecting Google Analytics to Power BI - Stack Overflow

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.