Using the Code Element in Email Builder

What is the Code Element?

The Code Element is a feature in the CRM's Email Builder that allows you to insert custom HTML or CSS directly into your email templates. This tool is designed for users who need to go beyond the standard design options to include specialized content like embedded widgets, tracking pixels, or unique styling elements that aren't available through the visual editor.

Benefits of Using the Code Element

Using the Code Element provides several advantages:

  • Add custom HTML or CSS for unique layouts and designs
  • Embed third-party widgets such as countdown timers or forms
  • Insert tracking pixels or analytics scripts for campaign measurement
  • Fine-tune spacing, colors, and styles beyond standard editor capabilities
  • Experiment with advanced customization in specific email sections

How to Add the Code Element

Follow these steps to insert custom code into your email templates:

  1. Navigate to Marketing → Emails → Templates from your dashboard
  2. Open an existing template or create a new one using the + New button
  3. In the Email Builder, click the Add Elements (+) icon in the left sidebar
  4. Find the Code Element in the Elements section
  5. Drag and drop the Code Element into your desired email section
  6. Click on the placed element to open the Edit tab
  7. Paste or type your custom HTML or CSS code in the editor box
  8. Use HTML for structure and inline CSS for styling
  9. Click Preview to check how your code appears
  10. Test your email in both desktop and mobile views before sending

Important Considerations

Email clients have varying levels of support for custom code. Always test your email thoroughly before sending to ensure proper display across different platforms. JavaScript and iframe content are generally not supported by most email clients for security reasons.

Keep your code self-contained and use inline styles to prevent it from affecting other elements in your email layout. Once you've created a code block you're happy with, you can duplicate or copy it across multiple templates for consistent reuse.