{"article":{"id":26519250445079,"url":"https://d1support.zendesk.com/api/v2/help_center/en-us/articles/26519250445079.json","html_url":"https://support.duda.co/hc/en-us/articles/26519250445079-Custom-Code","author_id":5281003340439,"comments_disabled":true,"draft":false,"promoted":false,"position":21,"vote_sum":0,"vote_count":0,"section_id":26519207884311,"created_at":"2024-09-20T19:51:09Z","updated_at":"2026-09-26T06:56:42Z","name":"Custom Code","title":"Custom Code","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2026-09-26T05:08:08Z","user_segment_id":null,"permission_group_id":1585774,"content_tag_ids":[],"label_names":["body_end.html","ed_developer_mode","d1_html_css_editor","ed_header_html","d1_html_error_bad_proportion","d1_html_error_element_location"],"body":"<div lang=\"en\" dir=\"ltr\" class=\"section zd-article\" xml:lang=\"en\">\n<div xml:lang=\"en\" lang=\"en\" dir=\"ltr\" class=\"sidebar\">\n<a id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_UUID-1e610fdc-c33e-35cb-e40c-b61c2e7b2be3\"></a>\n<div class=\"titlepage\">\n<p class=\"title\"></p>\n</div>\n<p>Available on <a class=\"link\" href=\"https://www.duda.co/pricing\" target=\"_blank\" rel=\"noopener\">Team plans</a> and higher.</p>\n</div>\n<p>The editor is flexible in that it allows you to both modify existing code or add your own. Doing this allows you to extend the functionality of the platform and provides you with additional features. For example, you can add a custom calendar widget or even a third-party custom contact form for taking payments on your site.</p>\n<div dir=\"ltr\" class=\"warning\" style=\"margin-left: 0.5in; margin-right: 0.5in;\">\n<h3 class=\"title\">Warning</h3>\n<p>Developer mode is not available when you are editing the site in flex mode in the Classic Editor. You must exit flex mode to access Developer Mode.</p>\n</div>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h2 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234390447620043\"></a>How to Add Custom Code</h2>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234390447620043_body\">\n<p>There are several ways you can add custom code: via developer mode or the HTML widget. Following are instructions on how to access both.</p>\n<div dir=\"ltr\" class=\"note\" style=\"margin-left: 0.5in; margin-right: 0.5in;\">\n<h3 class=\"title\">Note</h3>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\" style=\"list-style-type: disc;\">\n<li class=\"listitem\">\n<p>Custom code that is intended to be visible in the site should be added using a HTML widget. Custom code that is not visible should usually be put in the header. In general, it is always best to first follow the directions provided by the code's writer before adding it to your site.</p>\n</li>\n<li class=\"listitem\">\n<p>You cannot upload or run PHP files. Server-side languages, such as PHP, are not supported, as the platform does not provide server-side execution or filesystem access.</p>\n</li>\n</ul>\n</div>\n</div>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h3 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234390463387248\"></a>Developer Mode</h3>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234390463387248_body\">\n<div class=\"panel-inner\">\n<p>Developer Mode gives you access to edit and change your site's HTML and CSS. Adding custom code allows for advanced customization that is not possible with the drag and drop editor, however this should only be performed by advanced users with a solid understanding of web development code.</p>\n<p>To access Developer Mode, click to open the hamburger menu in the editor and select <span class=\"bold\"><strong>Dev Mode</strong></span>.</p>\n<div class=\"mediaobject\"><img src=\"https://support.duda.co/hc/article_attachments/43776829123223\" style=\"\" alt=\"dev-mode.png\"></div>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h3 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234390477879268\"></a>HTML Widget</h3>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234390477879268_body\">\n<div class=\"panel-inner\">\n<p>The HTML widget is the easiest method of adding custom code to your site. Depending on where you place your HTML widget, it will either appear on all pages of your site or just a single page. If you place the HTML widget in either the header or the footer, it will be placed on all pages of the site at the same time. This is because every site shares the header and footer. If you place the HTML widget anywhere else, it will appear only in the body.</p>\n<p>To add an HTML widget:</p>\n<div class=\"orderedlist\">\n<ol class=\"orderedlist\" type=\"1\">\n<li class=\"listitem\">\n<div xml:lang=\"en\" lang=\"en\" dir=\"ltr\" class=\"sidebar\">\n<a id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_UUID-3e18b08a-f95c-216f-11f6-640a894e8f59\"></a>\n<div class=\"titlepage\">\n<p class=\"title\"></p>\n</div>\n<p><span class=\"phrase\">In the side panel, click <span class=\"bold\"><strong>Add</strong></span>, then click <span class=\"bold\"><strong>Elements</strong></span>.</span></p>\n</div>\n</li>\n<li class=\"listitem\">\n<p>Search for <span class=\"bold\"><strong>HTML</strong></span>, then drag and drop the widget into a column or row on your site and then paste in your code.</p>\n</li>\n</ol>\n</div>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h2 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234390481116649\"></a>Custom Code in the Header</h2>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234390481116649_body\">\n<p>You can place code in the site-wide header or the header for an individual page.</p>\n<div dir=\"ltr\" class=\"note\" style=\"margin-left: 0.5in; margin-right: 0.5in;\">\n<h3 class=\"title\">Note</h3>\n<p>Consent management apps are not able to prevent code from running prior to consent when the code is placed in the header HTML. This is because we optimize the structure and order of how content loads, based on performance best practices on the site. We place scripts and CMP banners lower on the page, in order to improve the performance of primary content. Because of this, it is recommended to place code in the body-end when using a consent management app.</p>\n</div>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h3 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234390482042944\"></a>Site-Wide Header</h3>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234390482042944_body\">\n<div class=\"panel-inner\">\n<p>To place the code in the site-wide header:</p>\n<div class=\"procedure\">\n<a id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_procedure-idm234390482402919\"></a>\n<ol class=\"procedure\" type=\"1\">\n<li class=\"step\">\n<div xml:lang=\"en\" lang=\"en\" dir=\"ltr\" class=\"sidebar\">\n<a id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_UUID-5131ebd8-41e3-44d9-5dd4-b6ddec3221b0\"></a>\n<div class=\"titlepage\">\n<p class=\"title\"></p>\n</div>\n<p>In the side panel, click <span class=\"bold\"><strong>More</strong></span>, then click <span class=\"bold\"><strong>Settings</strong></span>.</p>\n</div>\n</li>\n<li class=\"step\">\n<p>Click <span class=\"bold\"><strong>Header HTML</strong></span>.</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\" style=\"list-style-type: disc;\">\n<li class=\"listitem\">\n<p><span class=\"emphasis\"><em>Head HTML</em></span>. Add content to the head section field.</p>\n</li>\n<li class=\"listitem\">\n<p><span class=\"emphasis\"><em>Body End HTML</em></span>. Add custom HTML/Javascript just before the closing tag of the &lt;body&gt; element for each page in the site.</p>\n</li>\n</ul>\n</div>\n</li>\n<li class=\"step\">\n<p>Paste your code, then save.</p>\n</li>\n</ol>\n</div>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h3 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234390485295047\"></a>Single Page Header</h3>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234390485295047_body\">\n<div class=\"panel-inner\">\n<p>To place the code in the header of a single page:</p>\n<div class=\"procedure\">\n<a id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_procedure-idm234390485795594\"></a>\n<ol class=\"procedure\" type=\"1\">\n<li class=\"step\">\n<div xml:lang=\"en\" lang=\"en\" dir=\"ltr\" class=\"sidebar\">\n<a id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_UUID-af77b0ca-bc89-4442-8688-79a4f057daa1\"></a>\n<div class=\"titlepage\">\n<p class=\"title\"></p>\n</div>\n<p>In the side panel, click <span class=\"bold\"><strong>Pages</strong></span>.</p>\n</div>\n</li>\n<li class=\"step\">\n<p>On the page, you want to add it into, click on the <span class=\"bold\"><strong>settings </strong></span>icon (<span class=\"inlinemediaobject\"><img src=\"https://support.duda.co/hc/article_attachments/43776829146903\" style=\"\" alt=\"Gray gear icon named settings icon\"></span>).</p>\n</li>\n<li class=\"step\">\n<p>Click <span class=\"bold\"><strong>SEO</strong></span>.</p>\n</li>\n<li class=\"step\">\n<p>Scroll down to <span class=\"bold\"><strong>Header HTML</strong></span>.</p>\n</li>\n<li class=\"step\">\n<p>Paste in your code here and save.</p>\n</li>\n</ol>\n</div>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h3 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234392222643774\"></a>My Code is Disappearing When I Place it in the Head Section</h3>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234392222643774_body\">\n<div class=\"panel-inner\">\n<p>It is common for pixel tracking codes to disappear when placed in the header. The head section <code class=\"code\">&lt;head&gt;</code> does not accept any code that is <code class=\"code\">&lt;img&gt;</code>, <code class=\"code\">&lt;iframe&gt;</code>, and more. It normally only takes <code class=\"code\">&lt;link&gt;</code>, <code class=\"code\">&lt;script&gt;</code>, and <code class=\"code\">&lt;meta&gt;</code>.</p>\n<p>If you have to paste code that's not being saved in the head section, paste it in the header or in the body-end.html. To do so, follow the steps in the <a class=\"link\" href=\"#UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234390488595821\" title=\"Custom Code After the Opening Body Tag\">Custom Code After the Opening Body Tag</a> section of this article.</p>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h2 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234390488595821\"></a>Custom Code After the Opening Body Tag</h2>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234390488595821_body\">\n<p>We currently do not have a feature to place code directly right after the opening body tag. However, you can paste code directly into the body-end.html file. There are two ways to do this, in developer mode or in settings.</p>\n<p>To paste code directly into the body-end.html file in developer mode:</p>\n<div class=\"procedure\">\n<a id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_procedure-idm234390489321097\"></a>\n<ol class=\"procedure\" type=\"1\">\n<li class=\"step\">\n<p>Click to open the hamburger menu in the editor, then select <span class=\"bold\"><strong>Dev mode</strong></span>.</p>\n</li>\n<li class=\"step\">\n<p>Click<span class=\"bold\"><strong> Site HTML / CSS</strong></span> to expand the selection.</p>\n</li>\n<li class=\"step\">\n<p>Click <span class=\"bold\"><strong>body-end.html</strong></span>.</p>\n</li>\n<li class=\"step\">\n<p>Paste your code into the last line here.</p>\n</li>\n<li class=\"step\">\n<p>Click <span class=\"bold\"><strong>Save</strong></span> and <span class=\"bold\"><strong>Done</strong></span>.</p>\n</li>\n</ol>\n</div>\n<p>To paste code directly into the body-end.html file in settings:</p>\n<div class=\"procedure\">\n<a id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_procedure-idm234390491935197\"></a>\n<ol class=\"procedure\" type=\"1\">\n<li class=\"step\">\n<div xml:lang=\"en\" lang=\"en\" dir=\"ltr\" class=\"sidebar\">\n<a id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_UUID-5131ebd8-41e3-44d9-5dd4-b6ddec3221b0\"></a>\n<div class=\"titlepage\">\n<p class=\"title\"></p>\n</div>\n<p>In the side panel, click <span class=\"bold\"><strong>More</strong></span>, then click <span class=\"bold\"><strong>Settings</strong></span>.</p>\n</div>\n</li>\n<li class=\"step\">\n<p>Click <span class=\"bold\"><strong>Head HTML</strong></span>.</p>\n</li>\n<li class=\"step\">\n<p>Paste your code into the <span class=\"bold\"><strong>Body End HTML </strong></span>field.</p>\n</li>\n<li class=\"step\">\n<p>Click <span class=\"bold\"><strong>Save</strong></span>.</p>\n</li>\n</ol>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h2 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234390493451248\"></a>Custom Code in Elements or Widgets</h2>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234390493451248_body\">\n<p>Many elements, including rows, columns, and widgets offer the ability to access its HTML/CSS.</p>\n<p>If you are in Classic Editor using flex mode or in Editor 2.0:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\" style=\"list-style-type: disc;\">\n<li class=\"listitem\">\n<p>You can edit the CSS of flex containers (section, column, inner column, and advanced grid). <span class=\"phrase\">If you are in Editor 2.0:</span> You can also edit the CSS of headers and footers.</p>\n</li>\n<li class=\"listitem\">\n<p>The design panel might not reflect all custom code changes. This can cause style differences between the design panel and inline elements.</p>\n</li>\n</ul>\n</div>\n<p>To add any code to any element or widget:</p>\n<div class=\"procedure\">\n<a id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_procedure-idm234390494135739\"></a>\n<ol class=\"procedure\" type=\"1\">\n<li class=\"step\">\n<p>In the Classic editor, right-click your widget or element to bring up the context menu.</p>\n</li>\n<li class=\"step\">\n<p><span class=\"phrase\">If you are in flex mode in the Classic editor or Editor 2.0:</span> Click to select the flex container, header, or footer.</p>\n</li>\n<li class=\"step\">\n<p>C<span class=\"phrase\">lick <span class=\"bold\"><strong>Edit HTML/CSS</strong></span>. If you are in flex mode in Classic Editor or Editor 2.0, c</span>lick the three dot icon in the floating menu, then select <span class=\"bold\"><strong>Edit CSS</strong></span>.</p>\n</li>\n<li class=\"step\">\n<p>Edit or add code here, as needed.</p>\n</li>\n<li class=\"step\">\n<p>Click <span class=\"bold\"><strong>Update</strong></span>.</p>\n</li>\n</ol>\n</div>\n<p>The browser may need to be refreshed to see the change.</p>\n<div dir=\"ltr\" class=\"section sub-topic\">\n<div class=\"titlepage\">\n<h3 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234513033275553\"></a>CSS Limitations <span class=\"phrase\">in Editor 2.0 and Flex Mode</span>\n</h3>\n</div>\n<p>The current style update mechanism does not support CSS at rules. If you want to use CSS at rules <span class=\"phrase\">in Flex Mode or Editor 2.0</span>, you need to add them via developer mode, which can be accessed by clicking the developer mode icon in the top navigation bar.</p>\n<p>The following at rules are only supported in developer mode:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\" style=\"list-style-type: disc;\">\n<li class=\"listitem\">\n<p>@import: Used to import external stylesheets.</p>\n</li>\n<li class=\"listitem\">\n<p>@media: Defines style rules for different media types/devices.</p>\n</li>\n<li class=\"listitem\">\n<p>@font-face: Allows custom fonts to be loaded and used.</p>\n</li>\n<li class=\"listitem\">\n<p>@supports: Applies styles based on feature support.</p>\n</li>\n<li class=\"listitem\">\n<p>@keyframes: Defines animations.</p>\n</li>\n<li class=\"listitem\">\n<p>@page: Used in paged media, such as printing.</p>\n</li>\n<li class=\"listitem\">\n<p>@namespace: Declares a namespace for XML documents.</p>\n</li>\n<li class=\"listitem\">\n<p>@charset: Specifies the character encoding.</p>\n</li>\n<li class=\"listitem\">\n<p>@counter-style: Defines custom counter styles.</p>\n</li>\n<li class=\"listitem\">\n<p>@document: (Obsolete) Applied styles to specific URLs.</p>\n</li>\n<li class=\"listitem\">\n<p>@layer: Used in CSS Cascade Layers.</p>\n</li>\n<li class=\"listitem\">\n<p>@property: Defines custom properties with specific types and initial values.</p>\n</li>\n</ul>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h2 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234604637877783\"></a>CSS Classes for Flex Elements <span class=\"phrase\">(Editor 2.0 and Flex Mode)</span>\n</h2>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234604637877783_body\">\n<p><span class=\"phrase\">In Editor 2.0 and flex mode:</span> You can add CSS classes to flex elements (section, column, inner column, and advanced grids). Using CSS classes can save time when styling elements. For example, instead of using the design panel to change a single column padding and size, you can create a CSS class and apply these style changes to any number of columns.</p>\n<p>The same class can be applied to multiple elements on the same page, and multiple classes can be applied to the same element.</p>\n<div dir=\"ltr\" class=\"note\" style=\"margin-left: 0.5in; margin-right: 0.5in;\">\n<h3 class=\"title\">Note</h3>\n<p>You must have access to developer mode to use this feature.</p>\n</div>\n<p>To add or edit a CSS class:</p>\n<div class=\"orderedlist\">\n<ol class=\"orderedlist\" type=\"1\">\n<li class=\"listitem\">\n<p>Select the desired flex element (section, column, inner column, or advanced grid).</p>\n</li>\n<li class=\"listitem\">\n<p>From either the floating menu or context menu, select <span class=\"bold\"><strong>Add CSS Class Name</strong></span>.</p>\n</li>\n<li class=\"listitem\">\n<p>Type a new CSS class name or select an existing class name from the dropdown menu. You can select multiple classes.</p>\n</li>\n<li class=\"listitem\">\n<p>(<span class=\"emphasis\"><em>Optional</em></span>) If you have not already added the CSS class to the code, click <span class=\"bold\"><strong>open Dev mode</strong></span>.</p>\n</li>\n<li class=\"listitem\">\n<p>Click <span class=\"bold\"><strong>Done</strong></span>.</p>\n</li>\n</ol>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h2 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234397297848638\"></a>Add Tracking Code to Contact Form</h2>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234397297848638_body\">\n<p>To add tracking code to a contact form:</p>\n<div class=\"orderedlist\">\n<ol class=\"orderedlist\" type=\"1\">\n<li class=\"listitem\">\n<p>Navigate to the page your contact form is on.</p>\n</li>\n<li class=\"listitem\">\n<p>Click your contact form to open the options.</p>\n</li>\n<li class=\"listitem\">\n<p>Click <span class=\"bold\"><strong>Submission</strong></span>.</p>\n</li>\n<li class=\"listitem\">\n<p>Click <span class=\"bold\"><strong>Tracking</strong></span>.</p>\n</li>\n<li class=\"listitem\">\n<p>Paste your conversion tracking code here.</p>\n</li>\n</ol>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h2 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234392247779798\"></a>Custom Code Recommended Guidelines</h2>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234392247779798_body\">\n<p>Following are recommended guidelines to follow when working with custom code and Developer Mode.</p>\n<div class=\"itemizedlist\">\n<p><span class=\"bold\"><strong>General Guidelines</strong></span></p>\n<ul class=\"itemizedlist\" style=\"list-style-type: disc;\">\n<li class=\"listitem\">\n<p>Always create a backup of your site before adding custom code.</p>\n</li>\n<li class=\"listitem\">\n<p>When working with custom code, always use your editor from this link: http://my.duda.co?nossl</p>\n</li>\n<li class=\"listitem\">\n<p>You can preview code outside of an iframe by changing the editor link from https://my.duda.co/home/ed/site/xxxxx/page to https://my.duda.co/site/xxxxx/page?preview=true</p>\n</li>\n<li class=\"listitem\">\n<p>Before placing code in the header, test on a separate test site first. You can do this by making a duplicate of your site to test custom code on.</p>\n</li>\n<li class=\"listitem\">\n<p>For code that needs to be placed on a page, create a test page and place the code there.</p>\n</li>\n<li class=\"listitem\">\n<p>Preview uses HTTPS, while your live site may not. This will often break custom code.</p>\n</li>\n<li class=\"listitem\">\n<p>Make sure you stay within the columns. Our responsive sites are based on a row-column structure. This means that each row contains columns which ultimately hold the content. When adding or editing your own HTML, make sure it is inside a column.</p>\n</li>\n</ul>\n</div>\n<p><span class=\"bold\"><strong>Developer Mode specific guidelines</strong></span></p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\" style=\"list-style-type: disc;\">\n<li class=\"listitem\">\n<p>Make sure you stay within the columns. Our responsive sites are based on a row-column structure. This means that each row contains columns which ultimately hold the content. When adding or editing your own HTML, make sure it is inside a column.</p>\n</li>\n<li class=\"listitem\">\n<p>Leave the classes in place. The editor relies on the many classes that are added to elements. If you see an existing class (usually starts with dm), leave it in place. If you remove classes, the Site might not look the same when you go to preview it.</p>\n</li>\n<li class=\"listitem\">\n<p>Notice the class sizes. Columns have a size value that is added as a class, such as large-6 or small-12. This determines the size of columns inside that row. You'll want to leave these in place, as they are the core of sizing the row on different devices.</p>\n</li>\n<li class=\"listitem\">\n<p>Avoid editing extensions if possible. In the HTML, you will see placeholders of elements on the page already. If you can, avoid editing these, especially the data-values held within them. Editing these can break the widgets once you head back to the editor.</p>\n</li>\n</ul>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h2 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm23439223108813\"></a>Troubleshoot Custom Code</h2>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm23439223108813_body\">\n<p>If you have added custom code to your site that's impacting its performance or preventing you from editing it, it is most likely due to the code not being formatted correctly or not being HTTPS compliant.</p>\n<div dir=\"ltr\" class=\"caution\" style=\"margin-left: 0.5in; margin-right: 0.5in;\">\n<h3 class=\"title\">Caution</h3>\n<p><span class=\"bold\"><strong>Duda Support cannot troubleshoot custom code.</strong></span></p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\" style=\"list-style-type: disc;\">\n<li class=\"listitem\">\n<p>Custom code is very unpredictable. There are many factors as to why your custom code may not be working with our platform. If you need help getting the custom code working on your site, it might be worth hiring a <a class=\"link\" href=\"https://experts.duda.co/\" target=\"_blank\" rel=\"noopener\">Duda Expert</a> to help you get your code working on your site.</p>\n</li>\n<li class=\"listitem\">\n<p><a class=\"link\" href=\"https://support.duda.co/hc/en-us/articles/26519462812311-Consent-Management-Apps\" target=\"_blank\" rel=\"noopener\">Consent Management Apps</a> are not able to prevent code from running prior to consent when the code is placed in the header HTML. This is because <span class=\"phrase\">Duda</span> optimizes the structure and order of how content loads, based on performance best practices on the site. We place scripts and CMP banners lower on the page, in order to improve the performance of primary content. Because of this, it is recommended to place code in the body-end when using a consent management app.</p>\n</li>\n</ul>\n</div>\n</div>\n<p>Following are troubleshooting solutions for issues you may encounter while working with custom code.</p>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h3 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234392242486532\"></a>Restore a Backup of Your Site</h3>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234392242486532_body\">\n<div class=\"panel-inner\">\n<p>Restore a backup of your site to a point before the custom code was added (even if you haven't created a backup, the editor creates one for you when you publish or enter developer mode).</p>\n<p>To restore a backup:</p>\n<div class=\"procedure\">\n<a id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_procedure-idm234392243954237\"></a>\n<ol class=\"procedure\" type=\"1\">\n<li class=\"step\">\n<div xml:lang=\"en\" lang=\"en\" dir=\"ltr\" class=\"sidebar\">\n<a id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_UUID-5131ebd8-41e3-44d9-5dd4-b6ddec3221b0\"></a>\n<div class=\"titlepage\">\n<p class=\"title\"></p>\n</div>\n<p>In the side panel, click <span class=\"bold\"><strong>More</strong></span>, then click <span class=\"bold\"><strong>Settings</strong></span>.</p>\n</div>\n</li>\n<li class=\"step\">\n<p>Click <span class=\"bold\"><strong>Site Backup</strong></span>.</p>\n</li>\n<li class=\"step\">\n<p>Click the <span class=\"bold\"><strong>Restore</strong></span> link next to the backup you want to restore.</p>\n</li>\n<li class=\"step\">\n<p>Confirm your selection by clicking <span class=\"bold\"><strong>Restore</strong></span>.</p>\n</li>\n</ol>\n</div>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h3 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234397369544517\"></a>Specific Error Messages</h3>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234397369544517_body\">\n<div class=\"panel-inner\">\n<p>Following are specific error messages and what they mean:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\" style=\"list-style-type: disc;\">\n<li class=\"listitem\">\n<p><code class=\"code\">DUPLICATE_ID</code>. Every element must have a unique ID.</p>\n</li>\n<li class=\"listitem\">\n<p><code class=\"code\">INVALID_ELEMENT_LOCATION</code>. All elements must be in a column which must be in a row.</p>\n</li>\n<li class=\"listitem\">\n<p><code class=\"code\">BAD_PROPORTION</code>. Columns in a row must add up to 12.</p>\n</li>\n<li class=\"listitem\">\n<p><code class=\"code\">INVALID_CLASS_FOR_ELEMENT</code>. A <span class=\"phrase\">Duda</span> class has been added to an invalid element.</p>\n</li>\n</ul>\n</div>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h3 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234392245305837\"></a>Code is Not Working</h3>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234392245305837_body\">\n<div class=\"panel-inner\">\n<p>If you have code that's not working on the site, it's most likely due to the code not being formatted correctly or not being HTTPS.</p>\n<p>If you have any links in your code (http:// or //) and your site is using HTTPS or you're in the preview, then you will have to change that so that it's https:// instead. The reason for this is because the non-HTTPS code will not work in an HTTPS loaded connection (site preview, editor, etc).</p>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h3 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234392251526938\"></a>Unable to Open the Editor</h3>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234392251526938_body\">\n<div class=\"panel-inner\">\n<p>If you are unable to access the editor when your site loads initially, try accessing your editor on a new page by entering a different URL in your editor link, such as <span class=\"phrase\">https://my.Duda.co/home/site/XXXXXXX/about</span> . When you get there, you can delete and re-add the page that is causing problems, or access developer mode to fix the issue on the site's code.</p>\n<p>Or, if the editor is broken, try to force open the editor by using the keyboard shortcut for the element inspector. For Mac the shortcut is <span class=\"bold\"><strong>Command</strong></span>+<span class=\"bold\"><strong>Option</strong></span>+<span class=\"bold\"><strong>C</strong></span>. For PC the shortcut is <span class=\"bold\"><strong>Ctrl</strong></span>+<span class=\"bold\"><strong>Alt</strong></span>+<span class=\"bold\"><strong>C</strong></span></p>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h3 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm2343972579642\"></a>Load the Non-Secured Version of the Editor</h3>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm2343972579642_body\">\n<div class=\"panel-inner\">\n<p>Load the non-secured version of the editor to load scripts that were not embedded via a secure connection. To do so, log into <span class=\"phrase\">http://my.Duda.co?nossl</span></p>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n<div dir=\"ltr\" class=\"section accordion sub-topic\">\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<div class=\"titlepage\">\n<h3 class=\"title\">\n<a data-zd-article=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234397333262502\"></a>Page Speed Issue</h3>\n</div>\n</div>\n<div class=\"panel-body collapse\" id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_section-idm234397333262502_body\">\n<div class=\"panel-inner\">\n<p>Page speed optimization affects how certain scripts are run. We run PageSpeed optimization on most pages, which can cause issues with your custom code.</p>\n<p>To determine if your custom code is being affected by a page speed issue:</p>\n<div class=\"procedure\">\n<a id=\"UUID-e1bdc6a0-ad23-d133-708c-364af8fd3a92_procedure-idm23439733428591\"></a>\n<ol class=\"procedure\" type=\"1\">\n<li class=\"step\">\n<p>Duplicate the page with your scripts.</p>\n</li>\n<li class=\"step\">\n<p>Change the URL to \"testing_scripts.\"</p>\n</li>\n<li class=\"step\">\n<p>Publish and then check the page on your live site.</p>\n</li>\n<li class=\"step\">\n<p>If your code works on that page, contact support to turn off page speed optimization for your site.</p>\n</li>\n</ol>\n</div>\n<p>If you are using a script, you can also try making sure your script runs asynchronously—it is not guaranteed, but it sometimes can solve the issue with scripts not executing properly in the browser.</p>\n<p>To enable async on scripts, alter your code using the following:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\" style=\"list-style-type: disc;\">\n<li class=\"listitem\">\n<p>Old code: <code class=\"code\">&lt;script src=\"https://example.com/script.js\"&gt;&lt;/script&gt;</code></p>\n</li>\n<li class=\"listitem\">\n<p>New code: <code class=\"code\">&lt;script src=\"https://example.com/script.js\" async defer&gt;&lt;/script&gt;</code></p>\n</li>\n</ul>\n</div>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n</div>\n<div class=\"glossary-definitions\" style=\"display:none!important;\"></div>\n</div>\n","user_segment_ids":[]}}