Passing UTM parameters on signup

Problem statement

Is it possible to send Urchin Tracking Module (UTM) parameters in order to identify where our users are coming from?

Are there some best practices on how to achieve this?

Solution

Custom parameters can be passed as HTTP query string parameters to the /authorize request:

Example: .../authorize?client_id=123&**utm=hello+user**&...

Follow these steps:

  1. Create an Action to access the values of those HTTP query string parameters. Making a call to the ‘event.request.query’ property will return details about the request that initiated the transaction. For more information, refer to Actions Triggers: post-login - Event Object

Example: console.log(event.request.query);

  1. If required, the Action can be coded to store the returned values of the HTTP query string parameters in the user’s app_metadata. The property ‘event.user.app_metadata’ is used for this purpose. For more information, refer to Actions Triggers: post-login - Event Object

Related References