Reputation: 63
I have a Workspace Marketplace app published and accessible to my domain only. I am trying to hook up Google Analytics to track how users interact with the app listing as described here: https://developers.google.com/workspace/marketplace/use-analytics
However it is pretty vague and just mentions having a Google Analytics ID. I am unsure how to get this setup correctly, as the current Google Analytics properties (v4) are ID less, unless you use a universal ID, which I did and added it into the workspace marketplace app configuration as seen here:
But this seems to be for website tracking where you can add in some javascript to the html of every page, like:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-XXXXXXXXX-1');
</script>
However the Workspace Marketplace does not allow custom javascript on their pages and the description within the Workspace Marketplace SDK is pretty vague. Also every Google Analytics guide i've found so far describes the same process, getting a Universal ID setup and then adding in the javascript into every page that requires tracking.
At the moment I am pretty lost with how to get the tracking setup using universal IDs without the javascript component, and any help would be appreciated!
Upvotes: 1
Views: 502
Reputation: 63
Apparently the documentation is quite literal and you just need to be able to:
Publish the app to the Workspace Marketplace; which you can do during development if you have it be internal to your domain; though publishing to the public will require a review process from Google.
Have the universal tracking ID in the app configuration so the data can be sent to your Google Analytics account/property.
Upvotes: 1