Using Autologin With ActiveCampaign
Overview​
The ActiveMember360 Autologin module allows validated contacts to autologin to the WordPress ActiveMember360 site using an autologin URL either as a link within an email sent from, or as a form "Thank you page URL" in ActiveCampaign.
Usage​
The URL used for autologin is constructed using your site URL and parameters.
A sample of the URL structure required is as follows:
site_url/?mbr_autologin=my_security_code&id=%SUBCRIBERID%
The ActiveCampaign contact must already exist within WordPress as a user for the autologin URL to function. Otherwise the contact will not be logged in.
Site URL & Parameters​
Site URL | Description |
---|---|
site_url | The WordPress site URL where the user is to be automatically logged in. This can be found in WordPress, Settings, General, Site URL. It must be specified exactly as shown there. Default: none. Required: yes. |
Parameters | Description |
---|---|
mbr_autologin | Set to the security code used to validate an autologin. The security code used must be defined as detailed in ActiveMember360, Settings, Security, Security Codes. Default: none. Required: yes. |
The ActiveCampaign contact email address of the contact to be logged in. Permitted value: %EMAIL% Default: none. Required: dependent upon use case, see Examples. | |
id | The ActiveCampaign contact ID of the contact to be logged in. Permitted value: %SUBSCRIBERID% Default: none Required: dependent upon use case, see Examples. |
add_tags | One or more tag ID's defined within ActiveCampaign to add to this contact during the auto-login process. If more than one is entered, please separate with commas. Tag ID's can be determined as explained in Determine ActiveCampaign Tag IDs. Default: none. Required: no. |
remove_tags | One or more tag ID's defined within ActiveCampaign to remove from this contact during the auto-login process. If more than one is entered, please separate with commas. Remove tags are processed before add tags. Tag ID's can be determined as explained in Determine ActiveCampaign Tag IDs. Default: none. Required: no. |
assign_automations | One or more automation ID's defined within ActiveCampaign to which the contact should be added during the auto-login process. To assign to multiple automations, separate them with commas. Automation ID's can be determined as explained in Determine ActiveCampaign Automation IDs. Default: none. Required: no. |
remove_automations | One or more automations ID's defined within ActiveCampaign from which the contact should be removed during the auto-login process. To remove from multiple automations, separate them with commas. Remove automations are processed before assign automations. Automation ID's can be determined as explained in Determine ActiveCampaign Automation IDs. Default: none. Required: no. |
subscribe_lists | One or more list ID's defined within ActiveCampaign to which the contact should be subscribed during the auto-login process. To subscribe to multiple lists, separate them with commas. List ID's can be determined as explained in Determine ActiveCampaign List IDs. Default: none. Required: no. |
unsubscribe_lists | One or more list ID's defined within ActiveCampaign from which the contact should be unsubscribed during the auto-login process. To unsubscribe from multiple lists, separate them with commas. Unsubscribes are processed before subscribes. List ID's can be determined as explained in Determine ActiveCampaign List IDs. Default: none. Required: no. |
default_pass | A default password to be set for all users who do not yet have a password in their ActiveCampaign contact record. Default: none. Required: no. |
redir | Sends the user to the URL of your choice after a successful login. To use URL parameters with the redirect URL please refer to Using URL parameters with the Autologin module redir parameter. Default: none. Required: no. |
nofirstlogin | Ignore First login redirect specified in ActiveMember360, Settings, Login, Page redirect on first login. Permitted values: Any value will ignore first login Default: none. Required: no. |
Important
When using the email parameter an email address can only contain the plus character + if it is URL encoded i.e. replaced by %2B.
Otherwise it will be decoded by the PHP $_GET into a space and break the autologin URL.
For this reason we recommend that the id parameter is used rather than email parameter.
The adding/removing of tags, assigning/removing of automations and subscribing/unsubscribing to lists will be processed irrespective of whether the autologin is successful.
Examples​
Important
In all examples my_security_code must be replaced by a security code defined in ActiveMember360, Settings, Security, Security Codes
- Example 1
- Example 2
- Example 3
This URL can be used within an ActiveCampaign email or as a form “Thank You Page URL” to autologin the contact. Upon a successful login they will either be redirected to the home page, or to the appropriate page defined in ActiveMember360, Settings, Memberships, Redirect on login or if it’s their first login to the page selected in ActiveMember360, Settings, Login, Page redirect on first login:
https://yoursite.com/?mbr_autologin=my_security_code&id=%SUBSCRIBERID%
This URL can be used within an ActiveCampaign email or as a form “Thank You Page URL” to autologin the contact. Upon a successful login they will either be redirected to the page with the slug dashboard, or if it’s their first login to the page selected in ActiveMember360, Settings, Login, Page redirect on first login :
https://yoursite.com/?mbr_autologin=my_security_code&id=%SUBSCRIBERID%&redir=https://yoursite.com/dashboard
This URL can be used within an ActiveCampaign email or as a form “Thank You Page URL” to autologin the contact. Upon a successful login they will be redirected to the page with the slug dashboard:
https://yoursite.com/?mbr_autologin=my_security_code&id=%SUBSCRIBERID%&nofirstlogin=yes&redir=https://yoursite.com/dashboard