How to Install the Google Reviews Widget on Drupal

Back

Want to display customer reviews from Google on your Drupal website? This guide explains how to add the Widget House Google Reviews Widget to one selected page or display it across your website with a reusable custom block.

Before you begin, make sure you've created your widget and copied the installation code from your Widget House dashboard
Step-by-step guide to getting your Widget House widget code

Choose How You Want to Display the Widget

Add the widget to a single page

    • Step 1: Log In to Drupal and Copy the Widget Code

    • Log in to your Drupal administration panel using a trusted account that can edit content and use a text format that permits the required HTML.

    • Open your Widget House dashboard and copy the complete installation code generated for your Google Reviews Widget.

    • The installation code contains two parts: a loading <script> and a visible <div> container with your unique widget ID.

    • Keep both parts together and in the original order.

    • Version note: This guide follows the current Drupal administrative workflow. Menu labels and editor controls may look slightly different when your website uses a customized administrative theme, additional modules, or Layout Builder.

    • Step 2: Open the Page Where You Want to Add the Widget

    • In the Drupal administration toolbar, go to Manage → Content.

    • Find the page where you want the Google Reviews Widget to appear and click Edit.

    • You can use the available content filters to find the page by title, content type, publication status, or language.

    • This installation method places the widget inside the page's Body or another editable content field.

    • Using Layout Builder? If the page is managed through Layout Builder, open its Layout tab, select the required section, and use Add Block or Create Custom Block. The same text-format and installation-code requirements described below still apply.

    • Step 3: Select a Trusted Text Format and Open Source View

    • Find the page's Body or main content editor.

    • Open the Text format menu below the editor and select Full HTML or another trusted text format configured to permit the required markup.

    • Click Source, Source editing, or the </> button in the editor toolbar to open the HTML source.

    • Important: Selecting a text format named Full HTML does not guarantee that every Drupal website will preserve external <script> tags. The result depends on the filters and editor configuration used by your website.

    • If the required text format or Source Editing button is unavailable, ask a Drupal administrator to review Configuration → Content authoring → Text formats and editors.

    • Access to permissive text formats should be limited to trusted administrators. Do not enable unrestricted script editing for untrusted user roles.

    • Step 4: Choose the Exact Position for the Widget

    • The Google Reviews Widget is static, which means it appears exactly where its installation code is placed in the page content.

    • In Source view, find the exact position where you want visitors to see the reviews.

    • For example, you can place the widget below a service description, above a contact form, before a call-to-action, inside a testimonials section, or near the bottom of the page.

    • Insert the widget between complete HTML elements.

    • Do not paste the installation code inside an opening tag, paragraph, link, image, list, form, existing script, or another element's attribute.

    • A full-width content area is usually the best choice for a Google Reviews carousel, slider, or grid.

    • Step 5: Paste the Google Reviews Widget Code

    • Paste the complete Google Reviews Widget installation code from your Widget House dashboard into the selected position.

    • Keep the loading <script> and the Google Reviews <div> container together and in the original order.

    • Do not remove, split, rename, or change any part of the installation code.

    • Do not wrap the code in additional <pre>, <code>, or <iframe> tags.

    • The code shown in the screenshots is an example. Always use the installation code generated for your own widget so the correct reviews, settings, and design are displayed.

    • Step 6: Save and Check the Widget

    • Click Save to update the Drupal page.

    • Reopen the page in edit mode, return to Source view, and confirm that both the <script> and <div> are still present.

    • Open the live page in a new browser tab and make sure the Google Reviews Widget appears in the selected position.

    • Check the page on desktop, tablet, and mobile devices. Make sure the reviews are fully visible and do not overlap text, images, forms, buttons, or other content.

    • If the installation code appears as visible text, make sure you added it in Source view and selected a text format that permits the required HTML.

    • If Drupal removes the <script> tag, do not disable security filters for untrusted roles. Ask a trusted administrator or developer to load the Widget House script through the active theme or a custom Drupal module. After the loader is connected globally, add only the Google Reviews <div> container to the page.

    • If the complete code remains saved but the widget does not load, check whether a security module or Content Security Policy blocks scripts from cdn.widget-house.com.

    • You may also need to go to Configuration → Development → Performance, click Clear all caches, and refresh the page in a private browser window.

Show the widget on All pages

Show It on All Pages of Your Website

    • Step 1: Create a Custom Content Block

    • In the Drupal administration toolbar, go to Manage → Content → Blocks. Depending on your Drupal version or administrative theme, this section may be labeled Content blocks.

    • Click Add content block.

    • Select Basic block or another custom block type that includes an editable Body field.

    • Enter a clear administrative description, such as Google Reviews Widget. This description is used to identify the block in the Drupal administration interface.

    • If your Block layout interface provides an Add custom block or Create custom block action directly inside the Place block dialog, you can use that path instead.

    • Step 2: Add and Verify the Widget Code

    • In the block's Body field, select Full HTML or another trusted text format configured to permit the required markup.

    • Click Source, Source editing, or the </> button.

    • Paste the complete Google Reviews Widget installation code from your Widget House dashboard.

    • Keep the loading <script> and the Google Reviews <div> container together and in the original order.

    • Do not edit the script URL, container ID, widget ID, or any other part of the installation code.

    • Click Save to create the content block.

    • Reopen the block and confirm that Drupal preserved the complete <script> and <div> in Source view.

    • If the <script> tag is removed, ask a trusted administrator or developer to connect the Widget House loader through the active theme or a custom Drupal module. Then keep only the Google Reviews <div> container inside the content block.

    • Step 3: Open Block Layout and Choose a Theme Region

    • Go to Manage → Structure → Block layout.

    • Block placement is configured separately for each Drupal theme.

    • Select the tab for the active frontend theme used by your public website. Do not place the widget in the administrative theme unless that is intentional.

    • Review the available regions and choose a wide, visible location such as Content Bottom, Footer, Footer First, or another full-width region provided by your theme.

    • The exact names and locations of the regions depend on the active Drupal theme.

    • Click Place block next to the selected region.

    • Step 4: Place and Configure the Block

    • Find Google Reviews Widget in the Place block dialog and click Place block.

    • Disable Display title so Drupal does not show the administrative block description above the reviews.

    • Confirm that the selected Region is the visible location where you want the Google Reviews Widget to appear.

    • To display the widget across the website, leave the page, content type, role, language, and other visibility conditions unrestricted.

    • Do not select individual content types unless you intentionally want to limit the widget to those content types.

    • If you want to exclude specific pages, use the available page visibility condition and enter the relevant Drupal paths.

    • Click Save block.

    • Step 5: Save the Layout and Check the Widget

    • Make sure the Google Reviews block appears in the correct region on the Block layout page.

    • Drag the block to adjust its order within the region if necessary.

    • Scroll to the bottom of the Block layout page and click Save blocks.

    • Open several live pages, such as the home page, a standard content page, a listing page, a contact page, and another internal page.

    • The Google Reviews Widget should appear in the selected theme region on every page that renders that region.

    • Check the widget on desktop, tablet, and mobile devices. Make sure it is fully visible and does not overlap navigation, forms, buttons, or footer content.

    • If the widget is missing from a specific page, that page may use a different theme, layout, or template that does not render the selected region.

    • If the widget appears twice, check whether the installation code was also added directly to a page Body field, Layout Builder section, or another custom block.

    • If your latest changes are not visible, go to Configuration → Development → Performance, click Clear all caches, and refresh the live website.

All set. Your Google Reviews Widget should now be working on your Drupal website.

  • Need a hand with setup?

  • Contact our support team at support@widget-house.com and we will help you get the widget running on your Drupal website.

  • support@widget-house.com