How to pre-fill parameters when using a Page Load trigger

If you want to launch Upflowy after an Auth0 signup and ensure that any onboarding data from Upflowy is assigned to the right customer, here's how we recommend proceeding:

  • 1. Your customer authenticates using auth0
  • 2. Auth0 will send a response for this authentication including an unique ID for your customer
  • 3. Extract the user_id field from this response and pass it to Upflowy

Lets go through this step by step.

1. Find your unique Upflowy SDK code

You'll first want to add in the Upflowy SDK to the <head> tag of your webpage. 

To find the SDK code, click on "Integrate" in the left-hand toolbox: 

Then, you'll see the below step containing your unique config ID. Copy the code to a clipboard.

2. Alter the code to look out for a response from Auth0

Add in a &defer=true to the end of your code:

<script type="text/javascript" src="https://sdk.upflowy.com/upflowy.client.js?configId=[your-config-ID]&defer=true"></script>

Note: By adding defer=true, we will defer the launch of the SDK in order to pass parameters, and therefore this might therefore add some loading time to the flow.

Now, with a bit of extra code you'll be able to pass on specific parameters to your flow. Based on what parameters are you adding in, add them using "'u-[variable-name]' = [parameter-name]"  . See an example of this below:

<script>

window.Upflowy.launch({ origin:   window.location.origin, 
'u-email': email,
'u-userID': user_id,
'u-name': name
})</script>