The Edit HTML option in the editor enables you to edit the HTML of a selected element on your page in a code console.
When selecting the element you want to edit, you can refine your selection by using the select parent/select child options.
In the code editor, the HTML content for the selected element is displayed.
You can modify it as desired: add, remove or edit HTML content.
⚡Your webpage may be based on an HTML template that loads dynamic information. Using this option will replace the former HTML with the one you have edited, for each page that matches both the targeting and the selector for your modification.
For example, if you edit the product information (title, sizes, colors and so on) of a product page, the edited HTML will be replaced for every product page that has the same targeting and selector.
As a result, many different products will have the same title, sizes, colors (depending on what you edited) when they shouldn’t.
Moreover, JavaScript events that may have been added to the element(s) you have edited for your product may have disappeared, as the element(s) which they were attached to have been modified, and thus replaced by the new HTML content.
We recommend using the Edit HTML option in the following cases:
- For static pages such as homepages, or static parts of your website such as the navigation or the footer.
- For the smallest HTML parts as you can to avoid side effects (such as overwriting templates or deleting JavaScript events) and any negative impacts on the tag weight.
- For campaigns that target a small part of your traffic, such as one language or one device, to avoid showing your visitors content that isn’t adapted to them.
There are less sensitive options, which can be used in the following use cases:
- To add new HTML to your page.
👉 Use the Add Image, Add Text or Add HTML options in the visual editor. - To remove existing HTML from your page.
👉 Use the Hide Element, Hide the content of the element options in the visual editor. - To edit existing HTML on your page.
👉 Use the Edit Style, Edit Text, Edit Link, Edit Attributes, Replace Image options in the visual editor.
It is preferred to have several editions through other options rather than using the Edit HTML option in terms of performance (regarding tag weight and your website's rendering), to protect your website’s functionalities and guarantee templates with correct content.
⭐ Good to know
In any case, don’t forget to QA your campaign for several pages of your website, on different devices and browsers (especially if your campaign should be displayed cross devices), in different environments (e.g.: logged in/not logged in) to make sure you have covered all possible scenarios.
Comments
0 comments
Please sign in to leave a comment.