Documentation
Best Practices for Layout & Design Tool
This guide provides instructions on how to effectively use the Layout and Design (L&D) tool to enhance your workflow and maintain a well-organized workspace.
Creating a Personal Account in L&D
When using the L&D tool, it’s crucial to operate under an account linked to your own name and email. If you have a shared login associated with your site than it should not be used for making changes in L&D. Instead, use this account to grant yourself access by creating a new personal user and password.
Importance of Personal Accounts
Having a personal account is essential for accountability. If a change is made that later causes issues or is questioned, it’s important to track who made the change. Using personal accounts allows for this tracking and oversight.
Managing Multiple B-tests with Shared Elements
If your site has many B tests, it can be challenging to organize and manage. In such cases, consider testing components of your site using shared elements. This approach offers several benefits:
- It allows developers to work on different post layouts simultaneously.
- It prevents our servers from loading all B tests at once if you only want to process one B test.
- It ensures our servers do not run shared elements if the conditional is set to false.
- It helps organize Post and Section pages in the L&D tool.
Creating Post and Section Layouts
Each post layout should be placed in its shared element to prevent issues between new B tests and quality assurance updates. Similarly, every Section layout with conditionals should have its shared element.
Naming Shared Elements
When naming your shared elements, ensure they are short and easy to understand. For example, every Post layout should be saved to its own shared element following a “Post + Layout Name” naming convention. Similarly, use a logical naming convention for Section layouts and other Elements.
Organizing JavaScript
To prevent JavaScript from becoming disorganized, use a shared element for each piece of JavaScript. Place general JavaScript at the end of the page, either in the footer or at the end of a Post layout. JavaScript not in a <head> tag should be placed in a JavaScript element at the end of your page for faster HTML rendering.
Placing Ads
All ads should be in a JavaScript Ads element with a provider-based title, like “JavaScript Ads Google”.
Remember, renaming an element or page will not change its L&D URL. If you access the element or page directly via the browser URL, it will retain its original URL. This is important to keep in mind when sharing direct links to specific elements or pages.