Passing back variables to Survey Gizmo

AI-generated summary

In the Marketplace category, Nicholas_Tolstoshev initiated a discussion about passing user IDs and emails from Discourse to Survey Gizmo to correlate data. After being advised to explore webhooks gdpelican, the original poster investigated the process. While Survey Gizmo supports webhooks, Nicholas encountered a technical hurdle: the Discourse /session/current.json endpoint returns JSON data, whereas Survey Gizmo requires a URL query string format [4].

Further attempts to resolve this led to Cross-Origin Resource Sharing (CORS) errors when trying to fetch session data from an external domain [5]. Despite reviewing existing discussions on retrieving current user information [5], the setup remains unresolved. The thread was recently bumped by nickmorin to seek a solution for these integration issues.

I’m using Survey Gizmo for our survey platform, and I’m looking to pass back the userid and/or the email address from Discourse to Survey Gizmo, so that I can correlate data across our userbase. Survey Gizmo can take a variable at the end of the URL using the format ?variable=foo - has anyone gotten a plugin or code working to do such a pass back?

Edit: moved this to marketplace in case there’s any devs that would be interested in doing some contract work for this.

1 me gusta

Have you tried out using a webhook for this?

2 Me gusta

I haven’t and I’m not familiar with webhooks but I’ll do some reading and see if that would be a good solution. Thanks for advice!

Ok so SurveyGizmo has the ability to use webhooks:

and I’m able to get the current session info using:
/session/current.json

The last problem is that SurveyGizmo will only take a query string but what the /session/current.json returns is in json format. Is there a way to get that info in a format that SurveyGizmo will accept?

I got the query string stuff sorted out but am running into issues getting /session/current.json run from another domain using CORS. I’ve poured over this discussion:
https://meta.discourse.org/t/how-to-get-current-user/12249
but don’t know what I’m doing wrong on the setup to be able to call current.json from another site.

1 me gusta

bump to see if anyone has a solution!

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