Forum Discussion
Google Analytics GA4 Connector
I'm using the Google Analytics connector in a Dataflow Gen2 with GIT/CI/CD enabled. Everything works as expected when I sign in, select dimensions/metrics, and save the dataflow. I'm able to preview my data and make additional transformations without issues.
I've added optional parameters and run the dataflow via a Fabric pipeline, passing parameters at runtime. It sometimes succeeds, but more often fails with the following message:
We found an unexpected character in the JSON input.
Details:
Reason = DataFormat.Error
Value = \31
Position = 0
I found this related known issue:
Known issue - Credential update in Google Analytics connections fails with JSON error
I tried the recommended workaround — deleting the existing connection and creating a new one with "Skip Test Connection" enabled — but it fails with the following error: DMTS_InvalidDatasourceTypeForSkipTestConnectionError
The only way to save the connection is by unchecking “Skip Test Connection,” which puts me back at square one.
Does anyone know how to get around this issue or have a working solution? I'd appreciate any help — this is blocking my ability to reliably use GA in production pipelines.
Thanks!
Hi hmilam , Thank you for reaching out to the Microsoft Community Forum.
The problem lies not in your pipeline setup but in a fundamental limitation of how the GA connector handles parameter injection during runtime. There is no reliable way to work around this within the Dataflow + GA connector path today. Your best bet is either to stage the GA data separately using a non-parameterized dataflow or switch to direct API ingestion into your Lakehouse or Warehouse. Both options are stable under CI/CD, work well in production, and avoid the brittle connector behaviour you're currently facing.
If this helped solve the issue, please consider marking it “Accept as Solution” so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.
5 Replies
- v-hashadapu
Community Support
Hi hmilam , Thank you for reaching out to the Microsoft Community Forum.
The problem lies not in your pipeline setup but in a fundamental limitation of how the GA connector handles parameter injection during runtime. There is no reliable way to work around this within the Dataflow + GA connector path today. Your best bet is either to stage the GA data separately using a non-parameterized dataflow or switch to direct API ingestion into your Lakehouse or Warehouse. Both options are stable under CI/CD, work well in production, and avoid the brittle connector behaviour you're currently facing.
If this helped solve the issue, please consider marking it “Accept as Solution” so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you. - burakkaragoz
Super User
Hi hmilam ,
I’ve seen this issue pop up with the Google Analytics GA4 connector, especially when using Dataflow Gen2 and Fabric pipelines. The “unexpected character in the JSON input” (with DataFormat.Error and Value = \31) is something I’ve hit before too, and it’s def a pain.From what you described, it looks like the root problem is with the way credentials get handled in the connector, and it’s actually a known bug (as you found). Sometimes the pipeline tries to pass parameters in a way the connector doesn’t expect, so it fails on the JSON parse step.
The workaround that’s usually shared (deleting and recreating the connection, using “Skip Test Connection”) hasn’t really worked for everyone. The DMTS_InvalidDatasourceTypeForSkipTestConnectionError is a sign that the connector isn’t letting you skip the test for that specific datasource type – it’s a bit annoying because not all connectors support the skip test option, even though the UI allows you to try.
Right now, unfortunately, there isn’t a perfect fix for this. What sometimes helps:
- Double check if all the parameters being passed at runtime are exactly in the expected format (sometimes a sneaky empty value or special char causes the parse error).
- If possible, try to create the connection manually (not through CI/CD) and then reference that connection in your pipeline – it’s not ideal, but can sometimes get you unstuck.
- Keep an eye on the official updates for the connector. Microsoft is aware of this and working on a patch, but it’s not out yet.
If this is blocking a production workflow, you might want to log a support ticket directly with Microsoft just to get more visibility on your case.
Hope that helps at least a bit. Sorry I can’t give a magic fix here – just wanted to let you know you’re not the only one seeing this.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
- v-hashadapu
Community Support
Hi hmilam , I wanted to check with you and see if the provided information was useful. If any of it helped resolve your question, consider marking it as "Accept as Solution" to make it easier for others to find. Let me know if there's anything else I can assist with!
- v-hashadapu
Community Support
Hi hmilam , I hope you're doing well! Just checking in to see if you had a chance to review the details shared earlier. If any of the information addressed your needs, feel free to mark it as "Accept as Solution" to help others in the community. Please let me know if you have any further questions!
- v-hashadapu
Community Support
Hello hmilam , Just getting back to see if the shared details answered your question. If so, marking it as "Accept as Solution" would be greatly appreciated to guide others in the community. Feel free to reach out with any additional questions!