I want to set up the Google Analytics on my new web extension the right way as described in @jorgev’s blog post (https://blog.mozilla.org/addons/2016/05/31/using-google-analytics-in-extensions/).
I’m confused about few things:
-
Is the GA_CLIENT_ID same as the client id mentioned here - https://developers.google.com/analytics/devguides/collection/analyticsjs/cookies-user-id#getting_the_client_id_from_the_cookie
-
If so, doesn’t the client_id change every time you relaunch Firefox (or the browser)? From my tests, looks like a new client_id is generated based on the code mentioned in the Google’s documentation above.
-
This is the architecture of my web extension - It’s has a content script that creates an iframe and all the data & UI are displayed inside that iframe. I want to include Google Analytics inside that iframe. If I use ga.js to inject the Google Analytics script inside the iframe - is that an acceptable design or is that incompatible with your review policies?
I worry that if we assign a static client_id (like @jorgev did in his example), it won’t be possible to determine how many number of users are using the extension - since client_id is used to determine unique users.
I just want to know what’s the right way to implement this in a way that respects Firefox policies, respects the users’ privacy & also helps me as a developer determine the usage of my web extension.