HTML Action

The HTML action inserts HTML content on the page relative to a defined element selector. It also appends included CSS styles in the <head> of the page.

Required Components


Monetate inserts any content added in the HTML editor on the page relative to the specified selector. This content is wrapped in a container <div> with a unique identifier attribute (ID) that you can use for styling and targeting purposes.

Relative Element Selector and Insert Function

Enter the element selector into Relative Element Selector. This selector determines where Monetate inserts the HTML content. For more information on selectors, refer to Element Selectors.

You can adjust where you want the HTML to appear in relation to the selected element using an option from Insert Function:

  • After the selected element
  • Before the selected element
  • Replace the selected element
  • First child of the selected element
  • Last child of the selected element
  • Take over the contents of the selected element

Optional Components

Container Style

Monetate appends anything you add in the Banner Div Inline Style code editor as an inline style attribute of this action's container <div>.

CSS Style

Monetate appends anything you add in the CSS editor to a stylesheet in the <head> portion of your site within a <style> block. These styles are available on this page for use with any page element.

Select All Elements

The Select All Elements toggle allows you to apply the action to the first occurrence of the relative element selector or all occurrences of the selector, if multiple exist.

Selecting NO applies the action to the first occurrence. Selecting YES applies the action to all occurrences.

Re-Check for Elements

Use the Re-check for Elements toggle to enable or disable polling. If you enable polling, Monetate continues to check for the selected element even if it does not initially appear on the page. This option is good if you have certain elements that don't fire right when the page loads.

If you disable polling, Monetate only checks for the element once when your page loads.