Skip to content
Documentation
DropUI homepage
Topics

Add custom HTML, CSS or JavaScript to your campaign

Standard elements are enough for text, images and buttons. Custom HTML is useful when a piece of content needs a different structure, such as a list of guide steps. Start with the short example below; connecting another service requires separate preparation.

Guide example in the builder. Below, you will prepare a simple list of its steps.

Match the method to the task

What you needWhere to start
Change colours, fonts or spacingAppearance settings for standard elements
Open a product, close a popup or move to another screenButton action
Insert a custom piece of contentAn HTML element
Add custom styles or behaviourMore -> CSS or More -> JavaScript, with help from the code’s author

HTML defines content and structure, CSS its appearance, and JavaScript its behaviour. Changing ordinary text or a link does not require custom code.

Add a simple guide

  1. Open the campaign in the editor and choose Add element -> HTML.
  2. Select the new element and open its HTML content field.
  3. Replace that element’s current content with this snippet.
<ol>
  <li>Cleanse your skin.</li>
  <li>Apply serum.</li>
  <li>Finish with cream.</li>
</ol>

You will see a numbered list of three steps. This is a self-contained piece of content: it does not submit a form or connect to another service. Add the guide heading and button as standard campaign elements.

HTML field in the editor. Select the correct block before changing its content.
  1. Save and open Preview. Check the order and readability of the steps on a phone.
  2. If the guide has a button, check its action and URL separately.
  3. After publication, check the store page too.

When to ask a developer

If the snippet needs to fetch data, send events to another system or change page behaviour, give its author the goal and where it should work. Pasting a script into an HTML field is not a complete integration. Use campaign JavaScript events for code that runs after a selected event.

For example:

I want this campaign to show three skincare steps and a link to the full guide. Please prepare a snippet that fits a phone screen. If CSS or JavaScript is needed, tell me where to add it and how to check it works.

For an integration, include the service to connect and the data it needs. Do not put passwords or private API keys in browser code.

Check the rest of the page

Test additional styles and scripts when reopening the campaign and moving between screens. General CSS rules may affect elements beyond the one you are editing. If a change causes a problem, compare it with the previous version and give the author concrete steps to reproduce it.

Have questions after reading this guide?

Get in touch. We’ll answer your questions and help you with setup, free of charge.

Patryk Surmacz

I’ll walk you through the settings, step by step.