Widget Setup
Google Tag Manager
If your site uses Google Tag Manager (GTM), you can install the FAQSIR widget without touching your website's source code. This guide walks through creating a Custom HTML tag, configuring the snippet, and scoping the trigger so the widget only loads on your press release and news pages.
Alternative installation
If you prefer to add the widget directly to your HTML templates, see the Getting Started guide for the standard installation method.
Prerequisites
Before you begin, make sure you have:
- A Google Tag Manager container installed on your website
- A FAQSIR account with an active subscription (see Plans & Pricing)
- Your FAQSIR API key and Site UUID (available from the Installation Guide page in your FAQSIR dashboard)
Step-by-step Setup
1. Create a New Tag
In Google Tag Manager, open your container and navigate to Tags, then click New.
Give the tag a descriptive name such as "FAQSIR Widget" so it is easy to identify later.
2. Configure the Tag
Click Tag Configuration and select Custom HTML as the tag type.
Paste the following snippet into the HTML field:
<script type="module" src="https://widget.faqsir.com/index.js"></script>
<script>
window.faqsir = window.faqsir || {
api_key: 'YOUR_API_KEY',
site_id: 'YOUR_SITE_UUID',
options: {
sticky_cta: {
enabled: true,
position: 'bottom-center',
},
},
};
</script>
<faqsir-panel></faqsir-panel>
Replace YOUR_API_KEY and YOUR_SITE_UUID with the values from your FAQSIR dashboard. You can copy a ready-made snippet with your credentials already filled in from the Installation Guide page in the dashboard — select the Google Tag Manager tab.
3. Set Up the Trigger
Under Triggering, create a new trigger:
- Choose trigger type Page View.
- Set This trigger fires on to Some Page Views (not "All Page Views").
- Add a condition: Page Path — matches RegEx — then enter a pattern that matches your press release or news URLs.
For example, if your articles live under /press-releases/, /news/, or /announcements/, you would use:
press-releases|news|announcements
Adjust the pattern to match your site's URL structure. Some other common patterns:
| URL Structure | RegEx Pattern |
|---|---|
example.com/press-releases/... |
press-releases |
example.com/news/2026/... |
news |
example.com/press/article-slug |
/press/ |
| Multiple sections | press-releases|news|announcements |
Scope your trigger carefully
Do not fire this tag on every page. The FAQSIR widget is designed for press release and news article content. Firing on every page will process content that is not relevant and will not produce useful results. Every site's URL structure is different — use your judgement when choosing the pattern.
4. Save, Submit, and Publish
Once the tag and trigger are configured:
- Click Save on the tag.
- Click Submit in the top-right corner of the GTM workspace.
- Review your changes and click Publish to push the tag live.
The FAQSIR widget will now appear on every page that matches your trigger pattern.
Why Sticky CTA Mode?
You may notice the GTM snippet enables sticky_cta mode with a bottom-center position. This is intentional.
When you install the widget via direct HTML, you choose exactly where the <faqsir-panel> element sits in the page — the launcher button renders inline at that position. With Google Tag Manager, however, the tag's HTML is injected at a position determined by GTM, not by your page layout. This means the <faqsir-panel> element would appear wherever GTM places its container snippet, which is typically not where you want a visible button.
Sticky CTA mode solves this by rendering the launcher as a fixed-position floating button that appears at the bottom-centre of the viewport, regardless of where GTM injects the markup. This provides a consistent, predictable user experience across all pages where the tag fires.
You can change the position to any of the supported values (such as bottom-right or bottom-left) by editing the position option in the snippet. See Configuration — Sticky CTA for all available positions.
Verifying the Installation
After publishing, verify the widget is working:
- Open a page on your site that matches the trigger pattern.
- Open your browser's developer tools (F12) and check the Network tab — you should see a request to
widget.faqsir.com/index.js. - The FAQSIR launcher button should appear at the bottom-centre of the page.
- Click it to open the panel and confirm that AI-generated content loads.
You can also use GTM's Preview mode before publishing to test the tag fires correctly on the right pages.
First-time content generation
The first time the widget loads on a new page URL, it triggers content generation. This may take a moment. Subsequent visits to the same page will load the cached content instantly. You can also pre-generate content via the API to avoid the initial delay.
Customising the Snippet
The GTM snippet supports all the same configuration options as the standard installation. You can customise the launcher button label, FAQ accordion behaviour, and more by adding options to the window.faqsir object. See Configuration for the full list of available options.
For example, to change the launcher button text and position:
<script type="module" src="https://widget.faqsir.com/index.js"></script>
<script>
window.faqsir = window.faqsir || {
api_key: 'YOUR_API_KEY',
site_id: 'YOUR_SITE_UUID',
options: {
panel_launcher_label: 'Insights',
exclusive: true,
sticky_cta: {
enabled: true,
position: 'bottom-right',
},
},
};
</script>
<faqsir-panel></faqsir-panel>
Troubleshooting
Widget does not appear on the page — Check that the trigger's regex pattern matches the current page URL. Use GTM's Preview mode to verify the tag fires. Also confirm the API key and Site UUID are correct.
Widget appears on pages where it should not — Tighten your trigger's regex pattern. Make sure you selected "Some Page Views" rather than "All Page Views".
Content shows a loading state but never completes — Confirm your FAQSIR subscription is active. Check the browser console for 401 or 402 errors, which indicate authentication or billing issues. See Authentication and Billing for troubleshooting steps.
Multiple widgets appearing on the same page — Ensure you only have one FAQSIR tag in your GTM container. If you also have the widget installed directly in your HTML, remove one of the two installations to avoid conflicts.
Next Steps
Getting Started
Standard HTML installation method for adding the widget directly to your site.
Configuration
Full reference for all widget configuration options.
Sources & Content
Learn how sources are created and content is generated.
Features
Explore all the features available in the widget.