Embedding Digital code on a website

To collect feedback from a website, Digital code must be embedded on the relevant webpages. The embed code is one HTML tag that references the Digital JavaScript code required for a property. Once this tag is embedded on a webpage, you can target Digital surveys on the page, such as intercepting customers or adding an always-on feedback option to the site.

Note: The tag that contains the Digital embed code should be added at the bottom of the webpage, ideally just before the closing BODY tag (</body>). This ensures that the Digital embed code is loaded later than the other page elements, and can access them. Anything loaded after the embed code cannot be accessed by Digital.

Where you embed the Digital code influences URLs used for targeting. The path to the embed code is considered the domain used for relative URLs. See Targeting rules for specific survey typesSpecifying URLs for more information.

The following is an example of the Digital embed code:

Example of embed code.

To retrieve your website's embed code, either contact your Medallia expert or complete the following steps:

  1. In Digital, click the dropdown located in the top right corner of the page, which contains your website name, and select the Digital embed code menu item.

  2. In the dialog box that opens, select the HTML tag specific to your property and copy it to the clipboard to be pasted into the Tag Manager settings later.

    Embed code to copy and paste.

See the following sections in this topic for next steps to follow, depending on your situation:

Embedding Digital code directly

Medallia recommend using a tag manager to embed the Digital code. Alternatively, integrate Digital onto webpages by adding the property's embed code to each page that should include a survey, or by including it in the footer element of the website.

Copy the Medallia for Digital tag from your Medallia for Digital account (see Embedding Digital code on a website for steps). Add the tag with the Medallia for Digital embed to the page you want to integrate with.