'signup_source' parameter in URL

I’ve applied Discourse Connect for single sign-on. Now, I want to segregate users coming from the forum from those who have signed up directly on the original website. How can I add a custom parameter to identify users coming from the forum? Does Discourse offer any ‘signup_source’ parameter in the URL?

Use external_id?

external_id is something that is pushed from the app end to discourse while creating the user (the app is the identity provider in this case)
What we need is a parameter in the url that discourse sends us to when we click on login. Does Discourse offer this?

I’m not quite following the problem you are trying to solve, but you can add a query parameter to the discourse_connect_url site setting on Discourse. For example: http://localhost:1234/sso?site=foo

That query param will be preserved when Discourse redirects users to the SSO auth provider site when users login to Discourse.

For context, I think this is one possible approach for allowing a single DiscourseConnect provider site to authenticate users on multiple Discourse sites. There are more details than that required for the implementation though.

If this doesn’t solve the problem for you, maybe try explaining to us again what you are wanting to accomplish.

1 Like

Hi @simon Thanks for your input.

The short version: Get something equivalent to a UTM parameter to record users signing in from Discourse forum. We have enabled SSO for unifying our product and forum signups. The idea is to understand which visitors are signing up via the forum and segregate them from the ones signing up via our website.

The long version: Visitors signing up from our website receive an email flow. We want to create a separate email flow for our users coming from the forum since the intent is different. For this, we need a tag to identify users coming from the forum in our data management tool.

Wondering if Discourse provides any identification for this?

Hope the problem statement is clear now?

1 Like

Yes, that makes sense.

When a user clicks the “login” button on Discourse, they will be redirected to the URL on your website that you have added to the discourse connect url setting on Discourse. That URL will have sso and sig query parameters.

If the user doesn’t yet have an account on your website, I’m assuming you are taking them through the website’s registration process. It might be possible to update the code on your website to check for those query params and add some metadata to the user record to indicate that the signup was initiated from Discourse if the params are present.

1 Like

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