Is the content_guid of Shiny app published in RStudio Connect available in session?

Hi there,

I need to use the content_guid of a Shiny app published in RStudio Connect server-side. Is there a simple way to do that, preferably from the session object?


Can you give a little background on the actual problem you're trying to solve, please? That will probably help us in providing useful advice.

AFAIK, the content_guid is not available to the session inside the shiny app.

The only programmatic way I know of to extract the content_guid is to use the highly experimental connectapi package.

If you provide more information about what you're actually trying to do, we can give additional pointers.


I want to implement a tracking API for content in RStudio Connect that extends the information provided by the RStudio Connect usage endpoint.
The tracking needs to know which content is to register in the backend...

I could surely use aliases or ask the application developer to provide this information, but it's better if I can get it when the session is initialised.

Is there anything inside session that can act as an unique identifier for different applications?

Many thanks for your reply!

That's super interesting! Thanks for sharing! Do you mind sharing a bit more detail around the types of information you're hoping to extend the Connect content usage with? Is this granular-level developer-implemented usage metrics? Something like Google or Piwik analytics?

I can't think of a unique identifier off-hand, although if there was I would suspect it would be in Environment Variables, the server PID, or some other session data (i.e. every Shiny session gets a unique ID).

This Shiny app may give you a better picture of the types of session info that are available.

Please keep us posted on your progress, though, as this seems like an interesting use case that it may make sense to see if we can provide better support for in the product.

I am not familiar in-depth with the tools that you've mentioned, but it is some sort of granular dev-implemented metrics. The very first example that I have is "clicks on tabs" for large applications with multiple tabs.

I will investigate a bit further the env variables. Thanks!

1 Like

Very interesting! Thanks for sharing! Some other packages that may be interesting to you in your exploration here:

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.