Sign In
Sign In
  1. Home
  2. INTEGRATE
  3. Setting Up your Widget
  4. Install the Widget Using Google Tag Manager
INTEGRATE
28 articles
1. Give ViaSay access to your Page
Agent Channels8
Configure Your Widget4
AI Tools
Ctop Messenger
User Channels3
Setting Up your Widget5
Create a ViaSay Widget
Install the Widget Using Google Tag Manager1
Install the Widget on Your Website
Cookie Acceptance for Widget Display
Embed the Widget Inline (Full-Page Mode)
[NEW] WhatsApp
Facebook Messenger1

Install the Widget Using Google Tag Manager

Deploy the ViaSay widget through Google Tag Manager for URL targeting, device filtering, language routing, and A/B testing.

Updated on September 24, 2026

Why Use GTM?

Google Tag Manager provides advanced deployment control without modifying your website's codebase:

  • URL targeting: Display the widget only on specific pages or sections

  • Device filtering: Deploy different widgets for desktop vs mobile

  • Language routing: Show language-specific widgets based on URL structure

  • A/B testing: Activate different widget configurations for user segments

Prerequisites

ViaSay prerequisites

  • Make sure you have created a ViaSay Widget

👍 Deploy Invisible, Launch When Ready

Set Audience Distribution to 0% during setup. The widget code deploys to production but remains hidden. When ready to launch, adjust the percentage in Integration to control visibility—no code changes required.

Technical prerequisites

  • Google Tag Manager installed on your website

  • GTM container access with edit permissions

  • Basic understanding of GTM concepts (tags, triggers, variables)

Installation Steps

Step 1: Create a Trigger

Triggers define when and where your widget loads.

  1. Navigate to Triggers in the left sidebar

  2. Click New

  3. Click the trigger configuration area

  4. Select Page View as the trigger type

  5. Configure the trigger scope:

Deploy on all pages:

  • Select All Page Views

Deploy on specific URLs:

  • Select Some Page Views

  • Add condition: Page URL contains /your-path/

Example: Display widget only on FAQ pages:

Text to copy
'Display widget only on FAQ pages:'
Page URL contains /faq

'Display widget only on FR pages:'
Page URL contains /fr
  1. Name your trigger clearly (e.g., "Widget - All Pages", "Widget - FAQ Only", "Widget - Desktop FR")

  2. Click Save

Step 2: Create a Tag

Tags contain the actual widget code.

  1. Navigate to Tags in the left sidebar

  2. Click New

  3. Click the tag configuration area

  4. Select Custom HTML as the tag type

  5. Paste your ViaSay widget code (from Build > Integrate > Channels > Integration tab)

  6. Scroll to Triggering section

  7. Click to add a trigger

  8. Select the trigger(s) created in Step 1

  9. Name your tag (e.g., "ViaSay Widget", "ViaSay Widget - Desktop")

  10. Click Save

Step 3: Test and Publish

  1. Click Preview in the top-right corner

  2. Enter your website URL to launch debug mode

  3. Verify the widget loads on intended pages

  4. Check the Tags Fired section confirms your tag executed

  5. Click Submit to publish changes

  6. Add a version name and description

  7. Click Publish

Advanced Configurations

Target Specific Device Types

Create a custom JavaScript variable to detect device type:

  1. Navigate to Variables in the left sidebar

  2. Click New under User-Defined Variables

  3. Select Custom JavaScript as variable type

  4. Add this function:

JavaScript
function() {
  return window.innerWidth <= 768 ? 'mobile' : 'desktop';
}

 
  1. Name it deviceType

  2. Create separate triggers for mobile and desktop:

    • Trigger: deviceType equals mobile

    • Trigger: deviceType equals desktop

Deploy Multiple Widgets

Deploy different widget configurations by URL or context:


Trigger Condition

Widget Use Case

Page URL contains /en/

English widget


Page URL contains /fr/

French widget


Page URL contains /support/

Support-focused greeting


Page URL contains /pricing/

Sales-focused widget


Create separate tags with different widget tokens for each trigger.

Pass Custom Variables to Widget

Enrich conversations with user context using user channel variables. See User Channel Variables documentation →

Troubleshooting


Issue

Solution

Widget not loading

Check GTM preview mode confirms tag fired; verify trigger conditions match current page


Widget loads on wrong pages

Review trigger configuration; ensure URL patterns match intended pages


Multiple widgets appear

Check for duplicate tags or triggers; ensure only one widget tag fires per page


GTM blocked by ad blockers

GTM is commonly blocked (uBlock, AdBlock Plus); ViaSay widget is rarely blocked; consider direct HTML installation for maximum reach


Safari iOS 13+ blocking GTM

Implement Conversion Linker workaround to bypass ITP restrictions


⚠️ Ad blocker impact: GTM is frequently blocked due to Google Analytics associations. If maximum widget visibility is critical, use direct HTML installation instead.

GTM vs Direct HTML Installation

Metho

Method

Best For

GTM

Complex deployments with URL targeting, A/B testing, or device-specific widgets


Direct HTML

Simple site-wide deployment with maximum reach and minimal ad blocker interference


GTM Documentation

  • GTM Trigger Types Reference

  • GTM Variable Types Reference

  • GTM Built-in Variables

Next Steps

  • Configure widget appearance in Format & Design

  • Set up context-specific greetings in Greetings

  • Pass user data with custom variables

  • Monitor performance by URL segment in Monitor

Sub-articles

Install the Widget with Matomo Tag Manager
Display the ViaSay widget on all your site's pages with Matomo Tag Manager, without touching the code.
Updated on October 16, 2026

Was this article helpful?

On this page
  • Why Use GTM?
  • Prerequisites
  • ViaSay prerequisites
  • Technical prerequisites
  • Installation Steps
  • Step 1: Create a Trigger
  • Step 2: Create a Tag
  • Step 3: Test and Publish
  • Advanced Configurations
  • Target Specific Device Types
  • Deploy Multiple Widgets
  • Pass Custom Variables to Widget
  • Troubleshooting
  • GTM vs Direct HTML Installation
  • GTM Documentation
  • Next Steps

Made from France 💙

Categories

  • ANALYTICS
  • BUILD
  • LOUIS AI
  • INTEGRATE

🔗 Useful Links

  • Sign In
  • Website
  • Terms & Conditions

© 2026

MindsayPowered by Mindsay

Search the help center…

Search help center articles