Skip to main content
  • Customer Experience
    Customer Experience
  • Employee Experience
    Employee Experience
  • Brand Experience
    Brand Experience
  • Product Experience
    Product Experience
  • Core XM
    Core XM
  • Design XM
    Design XM

Custom HTML Creative

What's on This Page:

Was this helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The feedback you submit here is used only to help improve this page.

That’s great! Thank you for your feedback!

Thank you for your feedback!

About Custom HTML Creatives

Most of the commonly used creatives will overlay content on your website. The custom HTML creative is unique in that it allows you to create custom content that is displayed as part of your page. This custom content can be anything from an advertisement to an embedded survey.

image of an embedded custom HTML creative used for soliciting feedback on a website after completing an online purchase

In this screenshot, a survey appears embedded in the web page after a visitor completes a payment. The survey is built in the survey platform and embedded on the page using a custom HTML creative.

Custom HTML creatives can also be useful for content management, allowing you to choose which surveys are shown to specific types of website visitors. For example, you could choose to display a discount offer only to those visitors located in areas near physical store locations, and alternate material to everyone else.

Implementing Custom HTML

  1. Generate a custom HTML creative.
  2. Have your web team designate a “container” on your website where your custom HTML will be inserted. This space should include an HTML element with an ID attribute. Identify and copy the HTML ID between the quotation marks.
    image of the inspect element window. the HTML ID of the container where the creative should go is highlighted.
    In many cases, an HTML tag with an ID already exists in the proper location, and no site modifications are necessary.

    Qtip: Use your browser’s “Inspect Element” function to determine the HTML ID of an element. In most browsers, simply right click on the portion of the page you would like to inspect, and select “Inspect” or “Inspect Element.”
  3. Create an intercept.
  4. In the Options menu of your intercept’s action, select Advanced Options.
    Advanced options on an intercept
  5. Paste the HTML ID of your target container into the Creative Insertion Point field.
    image of the Creative Insertion Point field in Advanced Options. The value for the container's HTML ID is entered in the field.
  6. Click Save.
  7. When a visitor comes to this page on your website, Qualtrics will search for the HTML element with the ID you specified, and insert your creative in that div container.
Qtip: In the examples above, we’re embedding a Qualtrics survey right on the page. To achieve a similar effect, when editing your creative, you’d simply add an embedded target in the size and shape you’d like the survey to take up on the page.

Custom HTML Options

In the Options section of your creative, you will find settings specific to custom HTML creatives.

Custom positioning

Sometimes your custom HTML creative may be smaller than the target container where it will be inserted on your website. In this case, you can use Custom Positioning to specify where in relation to the target container your HTML will display.

Custom positioning in the Options section of the creative

For even more control over positioning, you may offset the X or Y position of the creative from its initial position or select Fix to Page so the custom HTML follows the visitor as they scroll.

Replace target container contents

Advanced options in the Options section of the creative

By default, when a custom HTML creative is inserted into a page, it replaces the existing content of the target HTML element. You’ll see this option selected as Replace target container contents.

Append to target container

Rather than replacing the target container contents, you can select Append to target container to place your creative within the target container, but after any existing content.

Insert before target container

This option allows you to insert the custom HTML creative before the target container.

Qtip: This will ignore the options for custom positioning.

Insert after target container

This option allows you to insert the custom HTML creative after the target container.

Qtip: This will ignore the options for custom positioning.

A Note On Z-Index

Z-index is a CSS property that specifies which elements on your web page should be on top when elements overlap. By default, creatives will have a higher z-index than other elements on your page so that they are always on top.

This is usually best, but in some cases this may not be preferable. For example, a dropdown menu might be covered by your custom HTML.

Warning: Be careful! You shouldn’t add the Z-index CSS to an embedded target. However, adding Z-index to other element types is okay.

The Qualtrics logo is overlapping with a dropdown menu

To adjust the z-index of your Custom HTML:

  1. Go to your web page that displays the creative and open the Developer Tools or Inspect Element tool.
    image of the element window when inspecting a page
  2. Identify the div class beginning with “QSI”, and copy what is between the quotation marks. Then, replace the space between “QSIUserDefinedHTML” and the string beginning with “SI_” with a period (.). In the example below, we would copy:
    QSIUserDefinedHTML SI_4PEs8K4EkCbmSdT_UserDefinedHTMLContainer

    and then after replacing the space with a period, we now have:


    image of finding the QSI when inspecting the page

  3. In your Qualtrics account, go the Edit section for your creative.
    Editing the source in a custom HTML creative editor
  4. Double click on any element to modify it or create a new blank one.
    Warning: We recommend against adding the Z-index CSS element to an embedded target because you may have issues with other parts of your page getting accidentally covered. However, adding Z-index to other element types is okay.
  5. Click Source at the top of the rich content editor to enter the HTML view.
  6. Take the code below (including the style tags) and paste it into the source.
    <style="text/css"> .QSIUserDefinedHTML{z-index:1;} </style>
  7. Replace the “QSIUserDefinedHTML” with the ID you retrieved in Step 2 and replace the z-index value with whatever is appropriate for your webpage.
    <style="text/css"> .QSIUserDefinedHTML.SI_4PEs8K4EkCbmSdT_UserDefinedHTMLContainer{z-index:1;} </style>

    HTML has been input in the source view of the custom HTML creative

  8. If the project code is already in your website’s source code, click the Publish button to push your changes to your site.
  9. If the code is not in your website’s source code, you can test the creative on your website using Test Intercept and confirm that everything is layered properly.
  10. If the layering still is not right, you may consider changing the z-index value to a larger number in order to stack your creative higher on the page, or a smaller (even negative) number to stack it lower.