Skip to main content

Using URL parameters with the Autologin redir parameter

Overview

There may be occasions where it is desirable to add URL parameters to an autologin redirect parameter URL.

Example uses for URL parameters
  • Enable tracking with utm parameters or similar.
  • Pass additional data to the redirect URL using GET parameters.

A problem arises with the characters ? and & that are used to indicate URL parameters. When a URL string contains two URLs there is nothing to indicate which URL the parameters belong to when PHP deciphers the URL string.

In certain cases this issue can be avoided by converting the & character to the URL encoded value of %26.

Example

As an example to use as an autologin redir parameter the URL:

https://yoursite.com/download/?utm_source=activecampaign&utm_medium=email&utm_campaign=Lead-Magnet&utm_content=Your-Guide-Is-Here

You would specify the URL for the redir parameter as:

https://yoursite.com/download/?utm_source=activecampaign%26utm_medium=email%26utm_campaign=Lead-Magnet%26utm_content=Your-Guide-Is-Here