Skip to content

Ybug + Google Tag Manager

Installing Ybug with Google Tag Manager

If Google Tag Manager is already installed on your site, you can add the Ybug Feedback Widget with a Custom HTML tag. This is useful when you want to manage third-party scripts without editing your site templates directly.

1. Ybug: copy your code snippet

Go to your Ybug dashboard. Select the project from the dropdown menu in the top-left corner, navigate to the widget configuration tab, and copy your code snippet.

Ybug – Copy your code snippet

2. Google Tag Manager: create a Custom HTML tag

2.1 Open your Google Tag Manager container.

2.2 Go to Tags and click New.

2.3 Click Tag Configuration and select Custom HTML.

2.4 Paste your full Ybug code snippet into the HTML field.

2.5 Name the tag, for example "Ybug Feedback Widget".

3. Google Tag Manager: choose a trigger

3.1 Click Triggering.

3.2 Select All Pages so the Feedback button is available across your site.

3.3 Save the tag.

4. Preview and publish

4.1 Click Preview in Google Tag Manager and open your site in Tag Assistant.

4.2 Confirm that the Ybug tag fires on the pages where you want feedback to be available.

4.3 Submit and publish your GTM container changes.

4.4 Visit your site and refresh the page if needed. You should see the Feedback button.

Single-page apps

If your site changes pages without a full reload, the Ybug widget usually only needs to load once. If you have route-specific targeting or custom setup logic, use GTM's history-change triggers carefully to avoid injecting the widget multiple times.