Add Google Analytics to an Android SDK (not to an Android app)

I'm a founder at Gamezop. We are a mobile gaming company, with a focus on HTML5 games.

We have an Android SDK that we provide to our partners. It allows them to run our games within their app and provides a couple of other features around offline access.

We want to add an Analytics SDK to our SDK, so we can understand user behavior across all apps that run our SDK. Google Analytics set-up asks for a package name. In our case, we dont have any single package name since ours is an SDK and not an app. How do we go about setting up GA for our SDK?

Add Google Analytics to an Android SDK (not to an Android app)

Thanks Phillip. Tag Manager (on Android) needs Firebase to work. Firebase, in turn, while setting up asks for an app package name. Ours is a library that goes into various apps. Hence, we cant provide a single package name., i.e. can't set up Firebase for our library.

Add Google Analytics to an Android SDK (not to an Android app)

GTM does not need Firebase to work - you can still use the legacy SDKs.

You could go VERY rudimentary and use the Google Analytics Measurement Protocol - of course, anyone using your library will still need to know its there and disclose its use in their own privacy disclosure.

Of course, any free GA solution has a limit of 10 million hits per month per property -- above that, you need to move to $$ GA 360.

Have you considered hosting a non-Google solution - for example, the open-source Piwik? While you still have the disclosure requirement, you would be your data without the risk of bumping up against data collection limits.