> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding Widgets

> Add MoEngage widgets like images, custom scripts, and product grids to your website pages using the Personalize editor's Add widget feature.

The **Add widget** feature enables you to add MoEngage widgets like Images, custom scripts, and Product grids to your application.

<img src="https://mintcdn.com/moengage/0iWkm50wROjmHH3Z/images/moengage_d1b988.png?fit=max&auto=format&n=0iWkm50wROjmHH3Z&q=85&s=32b8fd577fbbb5f93a27057b3f6b2034" alt="add widget.png" width="638" height="530" data-path="images/moengage_d1b988.png" />

<Tabs>
  <Tab title="Image">
    Follow the steps below to insert an image:

    1. Click the Image tab. <img src="https://mintcdn.com/moengage/M3SzEdkQVgGAjJCt/images/moengage_76f8b3.png?fit=max&auto=format&n=M3SzEdkQVgGAjJCt&q=85&s=f18e5d5c37ee4fcb3f089741a54391ec" alt="widget image.png" width="820" height="312" data-path="images/moengage_76f8b3.png" />
    2. You are prompted to select a location to define whether the grid should be added before or after the selected element. <img src="https://mintcdn.com/moengage/B1ZqBU-ISgaoSx_O/images/moengage_548837.png?s=595bac2d665997842620b91e04ed1e1f" alt="before after dropdown.gif" width="825" height="330" data-path="images/moengage_548837.png" />
    3. Customize the inserted image in the following three sections:

    * **Appearance**
      * Embed an image **URL** or **Upload** an image from your local storage.
      * **Dimensions** - Customize the Height, Width, and Border radius of the image in pixels or percentages.
      * **Margin** - Customize the Top, Bottom, Left, and Right margins for the image in pixels or percentages.
      * **Padding** - Customize the Top, Bottom, Left, and Right padding to generate space around the image, and inside the borders of the selected element\ <img src="https://mintcdn.com/moengage/60BzFdXTJDO5dnCb/images/moengage_344469.png?fit=max&auto=format&n=60BzFdXTJDO5dnCb&q=85&s=537ee64043aba7196b040de41aac13ee" alt="image settings.png" width="840" height="1034" data-path="images/moengage_344469.png" />

    <Accordion title="Add image for another Device resolution(Optional)">
      You can upload the same image and define it's width or pixel density that fits the resolution of another device. <img src="https://mintcdn.com/moengage/geRh9DNA2GhPhrjA/images/moengage_f425c2.png?s=16a10fb9139eb983d8cfe871214cfc2c" alt="image widget another resolution.gif" width="848" height="532" data-path="images/moengage_f425c2.png" />

      <Info>
        The valid input format for an image is 1024(width) or 2(pixels).
      </Info>
    </Accordion>

    * **Redirection**
      * **Enter webpage URL** - Enter a URL that redirects the users to the relevant page when they click the image. <img src="https://mintcdn.com/moengage/cVruC-B7I1TnIZ0h/images/moengage_d8e08a.png?fit=max&auto=format&n=cVruC-B7I1TnIZ0h&q=85&s=cb7d2320d1650c9896d98ca89f7c39a3" alt="imahge redirection.png" width="826" height="302" data-path="images/moengage_d8e08a.png" />
    * **Advanced**
      * You can also use custom scripts to customize the inserted image.
        * **CSS Classes** - Enter the class name to apply the custom styles to the image.
        * **Z index** - Enter the Z index value to change how the image is displayed when it overlaps with other elements. <img src="https://mintcdn.com/moengage/S2vOz7ciYYqlhjCf/images/moengage_6cb8a0.png?fit=max&auto=format&n=S2vOz7ciYYqlhjCf&q=85&s=2ceddb47721684933213a46f2ef617b3" alt="image advanced.png" width="828" height="450" data-path="images/moengage_6cb8a0.png" />

    4. Click **Save**.
  </Tab>

  <Tab title="HTML/JavaScript">
    Follow the steps below to insert HTML/Javascript code:

    1. Click the Insert HTML/Javascript tab. <img src="https://mintcdn.com/moengage/SBG7um9Fqotw1CFo/images/moengage_b618f9.png?fit=max&auto=format&n=SBG7um9Fqotw1CFo&q=85&s=d47d2a22eabe67ce90534076c73e3f70" alt="widget html.png" width="820" height="312" data-path="images/moengage_b618f9.png" />
    2. You are prompted to select a location to define whether the grid should be added before or after the selected element. <img src="https://mintcdn.com/moengage/B1ZqBU-ISgaoSx_O/images/moengage_548837.png?s=595bac2d665997842620b91e04ed1e1f" alt="before after dropdown.gif" width="825" height="330" data-path="images/moengage_548837.png" />
    3. Select the **Element Type** and then click **Next**. <img src="https://mintcdn.com/moengage/wjYnJKL0xml-g3HM/images/moengage_3969c0.png?fit=max&auto=format&n=wjYnJKL0xml-g3HM&q=85&s=340c2da77a10da21049bfce1b8067993" alt="element type.png" width="408" height="136" data-path="images/moengage_3969c0.png" />
    4. Enter the relevant code in the editor and then click **Save**. <img src="https://mintcdn.com/moengage/_eUNBDpGCEXI_sgZ/images/moengage_a6d67e.png?fit=max&auto=format&n=_eUNBDpGCEXI_sgZ&q=85&s=02c122e8690bf0ab168f036271385850" alt="enter html.png" width="1402" height="286" data-path="images/moengage_a6d67e.png" />
  </Tab>

  <Tab title="Product grid">
    Follow the steps below to insert MoEngage's Product grid:

    1. Click the Product grid tab, which will have the recommended items. <img src="https://mintcdn.com/moengage/CaPmX0z_ys8cr0ms/images/moengage_0718f6.png?fit=max&auto=format&n=CaPmX0z_ys8cr0ms&q=85&s=ec6fbc567fe089995d6d91d4d2771e0a" alt="widget product grid.png" width="820" height="312" data-path="images/moengage_0718f6.png" />
    2. You are prompted to select a location to define whether the grid should be added before or after the selected element. <img src="https://mintcdn.com/moengage/B1ZqBU-ISgaoSx_O/images/moengage_548837.png?s=595bac2d665997842620b91e04ed1e1f" alt="before after dropdown.gif" width="825" height="330" data-path="images/moengage_548837.png" />
    3. Click **Next**.\
       The Edit Item Grid pop-up window is displayed where you can define the following:

    * How the grid should appear (in terms of the design elements, position, layout).
    * All the placeholders to be shown in the grid.
    * Mapping information to the concerned placeholders. <img src="https://mintcdn.com/moengage/OQ0V9ibjQLpsyCSD/images/moengage_0e371a.png?fit=max&auto=format&n=OQ0V9ibjQLpsyCSD&q=85&s=e1d709093d818c90b3da8f56304f8f8f" alt="grid appearance.png" width="1646" height="1030" data-path="images/moengage_0e371a.png" />

    4. In the **Grid Appearance** step, select the cards layout in the grid and define the title, sub-title, and CTAs on the Grid by customizing the concerned dropdown options. <img src="https://mintcdn.com/moengage/7H2dU4CG2W0DQCPI/images/moengage_710a56.png?s=880508a52e460d8ed02d5a3d05896dff" alt="widget appearance.gif" width="1620" height="696" data-path="images/moengage_710a56.png" />
    5. In the **Edit card** step, define how each card in the grid will look like by customizing the following:

    * **Title** - The header or name of the card.
    * **Sub title** - A brief description on the card.
    * **Image** - The image of the product displayed on the card.
    * **Label** - A maximum of two labels can be added on a card that gives users essential details such as promotions, instructions, warnings, and branding elements. You can customize the look and feel of the labels either manually or by using custom scripts.
    * **Price** -  You can specify two price values and a discount value for the selected product.
    * **Rating** - You can add the selected product's rating, which specifies its quality and customize it's look and feel either manually or by using custom scripts.
    * **Review** - You can add the review details that reflect the reviewer's experience with the product or service.
    * **CTA** - You can add a maximum of two CTA buttons on a card and customize their look and feel either manually or by using custom scripts. <img src="https://mintcdn.com/moengage/eF2J43N9Ckga5Apm/images/moengage_2e8e0c.png?s=10902f8268c8ef33136e2340e2c938a2" alt="edit card in grid.gif" width="1636" height="916" data-path="images/moengage_2e8e0c.png" />

    6. In the **Choose Recommendation** step, enter the following details:
       * Edit your grid name/title if necessary.\
         Grid Name is displayed on the Experience Analytics page of the MoEngage dashboard to show user interaction statistics.\
         Grid Title is visible on your website to all eligible visitors.
       * Select your Recommendation from the dropdown.\
         Ensure to create Recommendations beforehand to include them in the grid. To learn more, see [Create User Action Recommendations](/user-guide/content/recommendations/basic-recommendations/user-actions-model).
       * Enter all the necessary card details for the options that you enabled in the **Edit card** step. <img src="https://mintcdn.com/moengage/cVruC-B7I1TnIZ0h/images/moengage_db0d90.png?fit=max&auto=format&n=cVruC-B7I1TnIZ0h&q=85&s=a2364e40e3c3b5bf0519fb96bafd38c6" alt="choose recommendation.png" width="1584" height="1407" data-path="images/moengage_db0d90.png" />
    7. Click **Save**.\
       **Use Case**:

    * [How to Recommend Personalized Products using Product Grids](/user-guide/use-cases/personalize/recommend-personalized-products-using-product-grids)
  </Tab>

  <Tab title="Countdown Timer">
    Follow the steps below to insert a Countdown Timer:

    1. Select the **Timer** widget from the list of Standard Widgets <img src="https://mintcdn.com/moengage/S2vOz7ciYYqlhjCf/images/moengage_6c0253.png?fit=max&auto=format&n=S2vOz7ciYYqlhjCf&q=85&s=21c7cfb57492440d95cd1f04c971fd90" alt="Personalize countdown timer.png" width="1018" height="586" data-path="images/moengage_6c0253.png" />
    2. You are prompted to select a **location** to define whether the grid should be added before or after the selected element. <img src="https://mintcdn.com/moengage/B1ZqBU-ISgaoSx_O/images/moengage_548837.png?s=595bac2d665997842620b91e04ed1e1f" alt="before after dropdown.gif" width="825" height="330" data-path="images/moengage_548837.png" />
    3. Click **Next**.\
       The Timer settings are displayed where you can:

    * Choose the timer layout (in terms of the design elements, position, and layout).
    * Customize the timer appearance & content.
    * Set the end date for the timer. <img src="https://mintcdn.com/moengage/cFTwc93vQdTanvKi/images/moengage_bd502c.png?fit=max&auto=format&n=cFTwc93vQdTanvKi&q=85&s=d4de3260327a1771e5b67f611731303b" alt="COuntdown timer - Step 1.png" width="934" height="897" data-path="images/moengage_bd502c.png" />

    4. Select the layout, define the title, sub-title, and background image/color on the timer by customizing the concerned options. <img src="https://mintcdn.com/moengage/ME-DtlELD2N8TrcF/images/moengage_c1795b.png?s=ea8287316aab0f9f090ac3b0d5fee1ac" alt="Countdown Timer - 1.gif" width="1280" height="665" data-path="images/moengage_c1795b.png" />
    5. Under Settings, you can set the following:
       1. **Expiry** - Set the expiry date and time for the timer. Once expired, the timer won't be shown on the webpage
          * You can choose a different timezone in case you are personalizing the experience for users who are in a different geographical location
       2. **Separator** - Choose among different separator options to be displayed between the countdown timer.
       3. **Redirection URL -** Optionally, you can choose to redirect users to a specific webpage if they choose to click on the timer. <img alt="Countdown timer settings.png" src="https://mintcdn.com/moengage/431DqtwGIOyvyx6H/images/moengage_8c62d6.png?fit=max&auto=format&n=431DqtwGIOyvyx6H&q=85&s=e35b5122663cd809f16970104da61d37" width="994" height="1566" data-path="images/moengage_8c62d6.png" />
    6. Click **Save**.
  </Tab>

  <Tab title="Carousel">
    Perform the following steps to insert a Carousel:

    1. In the **Standard Widgets** tab, select **Carousel.** <img src="https://mintcdn.com/moengage/37Js42lPMANg-cwG/images/moengage_fef821.png?fit=max&auto=format&n=37Js42lPMANg-cwG&q=85&s=24249cb7a75e8f5899b4a28ad56f8fcd" alt="Screenshot 2025-02-12 at 12.23.04 PM.png" width="814" height="630" data-path="images/moengage_fef821.png" />
    2. Choose whether you want to add the Carousel **Before** or **After** the selected element. <img src="https://mintcdn.com/moengage/B1ZqBU-ISgaoSx_O/images/moengage_548837.png?s=595bac2d665997842620b91e04ed1e1f" alt="before after dropdown.gif" width="825" height="330" data-path="images/moengage_548837.png" />
    3. Click **Next.**
    4. In the **Add Carousel** page, you can view the following tabs: <img src="https://mintcdn.com/moengage/7H2dU4CG2W0DQCPI/images/moengage_720e9f.png?fit=max&auto=format&n=7H2dU4CG2W0DQCPI&q=85&s=40385b3bf7ff90bdc03378824da4d9c4" width="846" height="144" data-path="images/moengage_720e9f.png" />
    5. **Upload:** This option allows you to upload images for your carousel.

    * Select the number of slides you want for the carousel in the **Number of Slides** field. Note that you can add up to 10 slides in a carousel. The slides are listed based on the number of slides you selected.
    * Click on any slide to add inputs, as explained below.
    * **Input type:** Select the input type for the images to be added to the carousel. The default input type is **Images**.
    * **Input** **Source**: Select the input source for your image. You can use the URL or Upload from your device option to insert the image.
    * Click **+ Add an image for another Device Resolution** to configure the **Input source** image and **Device** **Resolution** of images to be added for other devices. You can repeat the same process to add resolution for multiple devices.
    * Enter the **Redirect URL** to add the URL to which you want your users to be redirected when they click the respective image in the carousel.
    * Perform the preceding steps for each slide added.\\

          <img src="https://mintcdn.com/moengage/UX7SFw6G5JwoHWFq/images/moengage_5f3b61.png?fit=max&auto=format&n=UX7SFw6G5JwoHWFq&q=85&s=e6702c48d377000ba6b5d7dc885df92a" alt="" width="846" height="1434" data-path="images/moengage_5f3b61.png" />

    2. **Appearance:** This option allows you to configure the appearance of your carousel.

    * **Carousel Settings:** This option allows you to configure the dimensions, border, padding, and margin of your carousel. You can choose to edit manually, use CSS, or both by selecting the provided option.
      * **Dimension**: Customize the **Height, Width,** and **Border** of the image in pixels or percentages.
      * **Border:** Customize the **Style**, **Width** and **Colour** of the border.
      * **Margin:** Customize the **Top, Bottom, Left,** and **Right** margins for the image in pixels or percentages.
      * **Padding:** Customize the **Top, Bottom, Left,** and **Right** padding to generate space around the image and inside the borders of the selected element. <img alt="Screenshot 2025-02-12 at 1.32.02 PM.png" src="https://mintcdn.com/moengage/-uVFLyK4XoHTd5WE/images/moengage_1110ea.png?fit=max&auto=format&n=-uVFLyK4XoHTd5WE&q=85&s=85a214e0c79cfeea85c9a64796358234" width="846" height="1254" data-path="images/moengage_1110ea.png" />
    * **Image Settings:** This option allows you to configure **Image Layouts** such as **Image type, Border and Padding** for your carousel Image.  <img src="https://mintcdn.com/moengage/VqQHPleQ9qk_ZsLR/images/moengage_53f381.png?fit=max&auto=format&n=VqQHPleQ9qk_ZsLR&q=85&s=a6633bc1c796e84829bb54754f780e23" width="846" height="1016" data-path="images/moengage_53f381.png" />
    * **Carousel Dots:** Turn the **Carousel Dots** toggle on to enable carousel dots and configure the **Dimensions, Padding and Colour** of your Carousel dots.   <img src="https://mintcdn.com/moengage/-uVFLyK4XoHTd5WE/images/moengage_1282e2.png?fit=max&auto=format&n=-uVFLyK4XoHTd5WE&q=85&s=37319fddedce3d741073cb760bde914a" width="846" height="884" data-path="images/moengage_1282e2.png" />
    * **Carousel Arrows:** Turn the **Enable Carousal Arrows** toggle on to add arrows to navigate your carousel and configure their **Dimensions, Padding, Colour, and Icon Style** for the arrows. <img src="https://mintcdn.com/moengage/o0kXRAcOq2mxzDnY/images/moengage_ee00ff.png?fit=max&auto=format&n=o0kXRAcOq2mxzDnY&q=85&s=98db09784e048f5543d82eb11af00121" width="846" height="976" data-path="images/moengage_ee00ff.png" />

    3. **Advanced:** This option allows you to configure advanced settings for your carousels, such as **Autoscroll, Time on slide, and Autoplay behaviour**.

    * If you want your carousel to scroll automatically, turn on the toggle to enable **Autoscroll.**
    * In the **Time on each slide** field, you can set the duration(in seconds) of the carousel for each slide.
    * If you want your carousel to play automatically, You can configure the **Autoplay behaviour** for your carousel by selecting one of the following options:
      * **Restart from slide 1**: This option allows you to restart the auto-play from the first slide.
      * **Stop at the last slide:** This option allows you to stop the auto-play at the last slide.
      * Select the **Add to widget library** checkbox to reuse this widget later from the widget library. For more information, refer [here](/user-guide/personalize/client-side-personalization/personalize-editor-widgets/widget-library).  <img src="https://mintcdn.com/moengage/QRy8rcYszbTJNwGr/images/moengage_b42bb6.png?fit=max&auto=format&n=QRy8rcYszbTJNwGr&q=85&s=90a99032103f0d217dde6167324d095f" width="846" height="112" data-path="images/moengage_b42bb6.png" />
  </Tab>

  <Tab title="Tabbed recommendations">
    Perform the following steps to insert a Tabbed Recommendation:

    1. On the **Standard Widgets** tab, select the **Tabbed Recommendations** widget.  <img alt="Screenshot 2025-03-10 at 10.51.42 AM.png" src="https://mintcdn.com/moengage/UX7SFw6G5JwoHWFq/images/moengage_5f3601.png?fit=max&auto=format&n=UX7SFw6G5JwoHWFq&q=85&s=d496ae17474571770d34869aea90e31c" width="840" height="677" data-path="images/moengage_5f3601.png" />
    2. In the **Location** list, select whether the tabbed recommendation widget should be placed **Before** or **After** the selected element. <img src="https://mintcdn.com/moengage/B1ZqBU-ISgaoSx_O/images/moengage_548837.png?s=595bac2d665997842620b91e04ed1e1f" alt="before after dropdown.gif" width="825" height="330" data-path="images/moengage_548837.png" />
    3. Click **Next**.
    4. On the **Edit Item Grid** dialogue box, you can:
       1. Configure the grid appearance (design elements, position, and layout).
       2. Edit the card.
       3. Choose recommendations.
    5. In the **Grid Appearance** step, configure the following components:
       * **Grid Layout**: Customize the appearance of the grid layout with the provided tools.
       * **Grid Title**: Enter the title for your grid and configure it with the provided tools.
       * **Grid Sub Title**: Enter the grid subtitle if required and configure its appearance.
       * **Tab Settings**: From the tab settings, click + Add tabs to add multiple tabs. You can showcase different products in a grid under each tab based on user interest. You can configure the appearance of each tab in different states from the following settings:
       * **Default state font settings**: In this setting, you can configure the font and appearance of the tab name to be displayed by default.
       * **Hover state font settings**: In this setting, you can configure the font and appearance of the tab name to be displayed when a user hovers over the name.
       * **Selected state font settings**: In this setting, you can configure the font and appearance of the tab name to be displayed when a user selects a tab.
           <Info>
             - You can add a maximum of five tabs in a grid.
             - You can have only one tabbed recommendation in a variation.
                     <Frame>
                       <img src="https://mintcdn.com/moengage/TKMWGNv2zSN0av3O/images/tabbed-recommendation.gif?s=adcb9866e76d6ea015027a7465930e81" alt="Tabbed Recommendation" width="1178" height="728" data-path="images/tabbed-recommendation.gif" />
                     </Frame>
           </Info>
       * Click **Next**.
    6. In the **Edit card** step, define the appearance of the card by customizing the following:
       * **Title**:  Enter the header or name of the card.
       * **Subtitle**: Enter a brief description of the card.
       * **Image**: Add the product image to be displayed on the card.
       * **Label**: You can add up to two labels to a card. These labels provide essential details such as promotions, instructions, warnings, and branding elements. You can customize the labels' appearance manually or using custom scripts.
       * **Price**:  You can specify two Price values and a discount value for a selected product.
       * **Rating**: You can add the selected product's rating, which specifies its quality, and customize its appearance manually or using custom scripts.
       * **Review**: You can add the review details that reflect the reviewer's experience with the product or service.
       * **CTA**: You can add a maximum of two CTA buttons on a card and customize their appearance manually or using custom scripts. <img src="https://mintcdn.com/moengage/eF2J43N9Ckga5Apm/images/moengage_2e8e0c.png?s=10902f8268c8ef33136e2340e2c938a2" alt="edit card in grid.gif" width="1636" height="916" data-path="images/moengage_2e8e0c.png" />
       * Click **Next.**
    7. In the **Choose Recommendation** step, perform the following steps:
       * Edit the name of your grid if required.
       * Select each tab you created and add a name. This title is visible on your website to all eligible visitors. Users can select different tabs you created to view different products that are recommended in their interest.
       * **Choose your recommendation** from the dropdown. You must create recommendations beforehand to include them in the grid. For more information, refer [here](/user-guide/content/recommendations/basic-recommendations/user-actions-model).
       * Enter all the necessary card details for the options you enabled in the **Edit card** step. <img src="https://mintcdn.com/moengage/QRy8rcYszbTJNwGr/images/moengage_b427a4.png?s=041e7d9b90278b42874713cfc4dc8de3" alt="3333.gif" width="1690" height="1240" data-path="images/moengage_b427a4.png" />
    8. Select the **Add to widget library** checkbox to reuse this widget. For more information, refer [here](/user-guide/personalize/client-side-personalization/personalize-editor-widgets/widget-library).
    9. Click **Save**.
  </Tab>
</Tabs>
