Skip to content

[Question] GetAnalyticsInstanceId() stubbed out on Desktop platforms #1226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MAG-Will opened this issue Mar 1, 2023 · 3 comments
Closed

Comments

@MAG-Will
Copy link

MAG-Will commented Mar 1, 2023

[REQUIRED] Please fill in the following fields:

  • Pre-built SDK from the website or open-source from this repo: open-source
  • Firebase C++ SDK version: 10.5.0
  • Main Firebase Components in concern: Analytics
  • Other Firebase Components in use: Auth
  • Platform you are using the C++ SDK on: Mac, Windows
  • Platform you are targeting: iOS, Android, and Desktop (Windows and Mac)

[REQUIRED] Please describe the question here:

I'm looking into implementing GA4 Analytics in a cross platform C++ application that runs on Mobile, Web and Desktop (Windows and Mac).

Everything's fine on Mobile and Web, but on Desktop there doesn't appear to be any way of using GA4 from a C++ application as far as I can tell.

Without Desktop support for Analytics directly in the this library (I note FR #234), it seems as though the GA4 Measurement Protocol REST API could be used instead. But message posts to this API require an application_instance_id, and from the docs...

https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference?client_type=firebase#payload_post_body

"app_instance_id string
Required. Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK."

...but the suggested C++ call to GetAnalyticsInstanceId() only has valid implementations on Mobile and is stubbed out on Desktop platforms, so how can REST API calls be issued without this being available?

Is there another way for GA4 be used from a C++ desktop application without this support in the Firebase C++ SDK?

@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@DellaBitta
Copy link
Contributor

Hi @Will-Cowling-Magnopus,

Yes, unfortunately you've discovered the hard way Firebase C++ SDK does not support Google Analytics on Desktop platforms. The list of supported platforms per product can be found on our Firebase C++ SDK Learn More page.

Google Analytics itself isn't supported on desktop platforms via any SDK, I believe. Sorry!

@DellaBitta
Copy link
Contributor

Also, I recommend upvoting the linked ticket to get more votes for it to be put on a roadmap. Thanks!

@firebase firebase locked and limited conversation to collaborators Apr 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants