Why a logged-in scenario?
In order to accelerate page load time, most Magento integrators set up caching systems. However, the logged in navigation uses individual information, i.e. according to the visitor’s profile.
Often, this leads to lesser benefits of the caching systems and the logged in navigation becomes slower.
The Procedure for creating a logged scenario is identical to that of creating a Default Scenario. The only difference is that there is an additional step ( “Login by default), during which we send the authentication parameters to the server.
The retrieval of these authentication parameters is performed outside the tool but it is not difficult .
How to Create it on Quanta?
Go to the settings, on then webscenarios settings section. Click then on "create a logged-in scenario.
Then on the right of the login step, go to the advanced section.
Then you will have to fill the different fields : URL, Post Data, Expected String.
Here’s how to proceed using Google Chrome to find the information to fill in:
Go to the login page on your site and click on the tab “Network” on developer tools:e.g. the Chrome console.
Log in to your website with the account you wish to use for QUANTA monitoring. On the Chrome console, look for the “loginPost” to get the url request you need to get back in order to complete the settings.
Click on the 1st line (“loginPost/” in general) and you should see all the HTTP headers of the query:
The connection settings to be taken: Copy the link of the “URL Request” and insert it in the “URL” field in the “Login” step
- Further below, In the sub-section “Form-Data”, click on “view source”, and copy the entire link to the field ‘Post’,
- Save your settings by clicking on the disc shape button on the top right
Remember that it is strongly recommended to set up the “Expected string” for each step to ensure that the retrieved content is correct. To learn how to do this, refer to the second strep of the page.
- Remember to save your changes
- Any error (unexpected HTTP code, absent expected string, connectivity problem…) is indicated by red bars on your charts. This means that scenarios of the following steps will not work either. The scenario continues to run every minute, so once the problem is resolved, the performance will resume its course.
- When a queried URL redirects (i.e. 302) to another page, the return code and the expected string are verified on the final page and not on the page that does the 302. The same goes for the data reported by the Quanta Profiler Magento module. e.g. to choose the expected string after the login step in a logged in scenario, you must use part of the text that is on the page on which you are redirected after logging in. Like in the image above, we are redirected to the following page and we can take the words “Hello, Quanta Computing!” to place on the field ‘expected string’.
- To choose the words: we recommend to choose texts that are very unique to the page ( that cannot be found on other pages and are unlikely to change)