User:SPage (WMF)/Return to

Jump to navigation Jump to search


If you provide a link for users to create an account, think about where you want the user to be afterwards; if you don't want your wiki's default behavior, then set the returnto parameter accordingly with something like
[{{fullurl|Special:UserLogin/signup|returnto=Page for newly signed-up user}} Come join our adventure]
The Editor engagement experiments team thinks about and develops tools for this new user "onboarding", please share your experiences with us.

What happens after account creation[edit]

On WMF wikis, after changes to "single user login" and the CentralAuth extension in July 2013, the user is returned to the page she was on before filling out the form.

This "returnto" works because the Login / Create account links at the top right of each page pass a returnto "query string parameter" (returnto=value after the ? in a URL) in the link to the form that specifies the current page. You can see it: hover over the Login / Create account links at the top right, or if you are already logged in, hover over the Log out link. You should see &returnto=User:SPage_(WMF)/Return_to in the URL. (If you're using a phone or tablet, click the link, note the URL, then come back here.)

The welcome landing page is dead[edit]

Several wikis customized the successful signup page by editing the welcomecreation-msg system message, for example French Wikipedia and Polish Wikipedia. Now that new users are returned to the page they were on after account creation, they never see this message.

How GettingStarted changes this[edit]

The Editor Engagement Experiments team works to improve the new user experience, often called "Onboarding", to encourage new users to participate and become active editors. On English Wikipedia our Getting Started extension inserts itself so the user sees a "Welcome to Wikipedia, User name!" page that invites the new user to perform easy editing tasks. The return to is still available as a [← No thanks, return to the page I was reading] link.

How to get users back to your feature/page[edit]

Many pages invite users to create an account: tutorials, promotions, anonymous user templates, special pages for events such as "hackathons", etc. If you providing your own link to create an account (instead of telling the reader to click "Create account" in the top right), then there is no automatic returnto — he or she will just be returned to the default "Main page" for the wiki. So if you provide your own link to create an account, you can and should set the returnto parameter - you might as well send the user somewhere more useful. You should use the {{fullurl}} template and pass this in. Here's a link to create an account that will return the user back to this page. (To avoid you creating lots of dummy accounts when trying these links, all the test URLs go to the Login form rather than Create account.)

Login to this wiki (and come back here)

A customized welcome new user page[edit]

But you don't have to return the newly signed-up user to the page they were on. You can set the returnto parameter to something more interesting, such as the next page — "Now that you've created your account" — in a tutorial, or "Welcome new user, now add your details to this signup page". The returnto can take the user to the next phase.

Here's a link to create an account that will "return" the user to a special welcome page

Login to this wiki and be welcomed

Advanced how-to[edit]

Don't lose the parameter[edit]

There are many synonyms and equivalent pages for creating an account such as Special:CreateAccount. Many of them will lose the returnto parameter (CreateAccount fixed in gerrit:90088 pending review). When testing your link, make sure the user ends up on the create account form with the returnto parameter you provided.

hiding the link icon[edit]

{{fullurl}} creates a URL, so it shows with an hyperlink icon even though it's only linking to a special page on the same wiki. Many wikis have templates that avoid this by setting the class="plainlinks" style on a parent tag.


There is a related parameter, returntoquery. If the user is performing an action such as Edit or View history, or is part-way through a complicated special page with numerous options, in order to return the user to the same state the Login/Create account links pass a &returntoquery parameter to the form that contain the information to return him or her to the same state. Some uses for this are mentioned below.

Using returntoquery is tricky as it is a single query string parameter returntoquery=someValuethat has to store multiple query string parameters name1=value1&name2=value2 (got that?). To do this the link to the Create account form must URL-encode the returntoquery parameters into a single value. For example, to set the Special:Search parameters search=extension&limit=20&offset=20, you must set &returntoquery=search%3Dextension%26limit%3D20%26offset%3D40. Here's a link

Login and then "return" to a search

To get the URL-encoded value you can invoke encodeURIComponent in your browser's JavaScript console, for example encodeURIComponent('search=wikipedia&limit=20&offset=20'); ; or use an online converter.

Also login[edit]

As mentioned and shown in these examples, the returnto and returntoquery parameters also work on login. If you think users with accounts might have need to login and you offer your own link in addition to the top right link, you can provide a returnto for this.

Disabling GettingStarted[edit]

On wikis where the GettingStarted extension is enabled, if you're certain that you don't want the users who follow your link to create an account to see its special onboarding experience, you can stop it from appearing with &returntoquery=showGettingStarted=false

Did your call to create an account work?[edit]

When you invite the user to create an account, it's useful to know if it was successful. The long-term payoff of someone becoming an active editor takes time to establish, but there's a way to know if someone created an account after following your "Call to action" link to do so. Extension:Campaigns logs successful account creation after someone follows a custom link to the create account form. If you think you have a good "flow" that involves users creating an account, contact the E3 team so we can provide the information necessary to track your link to create an account along with other account creation campaigns.

The major problem of this is the raw logging data is not available to you. We may be able to summarize the number of accounts created.

Offering a guided tour[edit]

Editor engagement experiments developed another extension that we use in onboarding, GuidedTour. It can pop up "bite-sized" guides that step users through a process and point to elements on a page. If you take on the effort of designing a tour, you can trigger it on the return to your post-creation page by adding &returntoquery=tour=mytourname (again, this must be URL-encoded).

Here's an example that sends the user to a special welcome page and starts a tour (the "test" tour built into the GuidedTour extension):

Login and get a special welcome with a tour


Designing a successful onboarding flow is challenging!

You don't know most of your audience. You don't know how users will arrive at your page, you don't know what they want to do, you don't know their expectations. You can design the most perfect signup page for, say, second-year return attendees of the North American Dinosaur Society meeting and set the returnto to a special "Now you've created an account, let's collaborate on improving North American fossil pages", and yet most users who arrive on this page will have no idea why they are there or what is going on.

The more information you provide, the less users read. There is a lot to learn to edit wiki pages, if you give it all to users at once they will absorb nothing. Your wiki probably already has a tutorial and an introduction and a help for new users, you may as well point new users to them and collaborate on improving those rather than trying to re-summarize everything.

You can ask users to do something, but it won't be what you expect. If you invite new users to upload a picture of a nearby fossil, they will upload a mobile phone photo of themselves. If you invite new users to say something on their talk page about their archaeology background, they will praise Justin Bieber.

Despite all these caveats, it's still very helpful to think about how you want users to proceed before and after creating an account. Share your experiences!

Summary workflow[edit]

landing page -> user clicks Call to Action to create account (optionally track a campaign) -> successful creation -> "return" to page for newly-registered users (optionally show a guided tour)

See also[edit]