I have a 3rd party analytics setup to track confluence user interaction, and I want to enable the tracking based on the user group, for example, only track if users are from group 1 or group 2, if group 3, the analytics will not track. But I am having trouble accessing the user groups in the Custom HTML (where I put my analytics tracking code).
I know that the user macro can access these user attributes, but I am not able to use the macro in the Custom HTML, I tried to use AJS.params, but the list of attributes in the params doesn't contain user information.
Is there a way to get the user group in Custom HTML?
Hello @Jiawenzhong888 !
As I understand, you need to check if specific users are part of a set of groups within your Confluence Site.
As far as I know, this can be achieved by retrieving the group members via group id when using REST API. You can check more details about it here:
You can get your external tool to send a REST call to Confluence and then work with the provided data.
One more thing! Since your solution deals with external development for Confluence, you can find more in-depth knowledge about development in our sister community. I am talking about the Atlassian Developer Community!
Take a look here:
It is a good idea to share your needs there as well!
Hi Atlassian Community, My name is Avni Barman, and I am a Product Manager on the Confluence Cloud team. Based on feedback from you, we are giving admins more power to create templates that a...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events