This article explains how to selectively hide the Rep AI Concierge chat widget on specific pages or URLs using Google Tag Manager (GTM). This method gives you precise control over where the widget appears on your website.
Note: If you don't have Google Tag Manager installed, visit the following guide from Shopify for more information and setup instructions: https://help.shopify.com/en/manual/reports-and-analytics/google-analytics/google-tag-manager
Configuration Steps
- Log into your Rep Console at the following link: https://app.hellorep.ai/home
- In the left-hand menu, navigate to Settings > Integrations.
- Select the Catalog tab and click See Details in the Shopify card.
-
Disable the toggle for Auto-inject Rep's script tag to my Shopify theme, then click Save.
- In the left-hand menu, navigate to Settings > Chat Widget.
- On the Design the Look page, select the Settings tab on the right and locate the Headless Websites section. Copy the provided JavaScript snippet and keep this code handy for next steps.
- Log into your Google Tag Manager account at the following link: https://tagmanager.google.com
- Select your website's container.
- Click New Tag to create a new tag.
- Give your tag a descriptive name (e.g., "Rep AI Widget - Conditional")
- Click the pencil icon in the Tag Configuration section.
- Select Custom HTML under the Custom category.
- Paste your Rep script you copied earlier into the HTML box.
- Click the pencil icon in the Triggering section.
- Choose Some Page Views (not All Page Views).
- Configure your exclusion rules using one of these methods:
To exclude specific pages:- Set Page Path > does not equal >
/checkout
- Set Page Path > does not equal >
/cart
- Set Page Path > does not equal >
/account/login
To exclude multiple pages at once:- Set Page Path > does not match RegEx >
^/(checkout|cart|account/login)
To include only specific pages:- Set Page Path > equals >
/
(for homepage only) - Set Page Path > matches RegEx >
^/(products|collections)
(for product and collection pages)
- Set Page Path > does not equal >
-
Advanced options:
You can also exclude by Page Title, URL parameters, or custom variables:- Page Title > does not contain > "Thank You"
-
Page URL > does not contain >
?utm_source=email
-
Custom Variable Name > equals > "hide_widget" (if you have custom GTM variables)
- Click Save to save your tag
- Use GTM's Preview mode to test your configuration by clicking Preview in GTM
- Navigate to your website and verify the widget appears/disappears on the correct pages
- Once confirmed, click Submit to publish your changes
Troubleshooting
Widget not hiding:
- Check that your page path conditions are exact.
- Verify the tag is firing using GTM Preview mode.
- Ensure there are no conflicting tags loading the widget.
Widget appears with a delay:
- This is normal for GTM-loaded widgets.
- Consider using CSS hiding techniques for instant control.
Multiple widget instances:
- Ensure auto-injection is disabled in Rep Console.
- Check for duplicate tags in GTM.
Need Help?
If you encounter issues with this setup:
- Use GTM's Preview and Debug mode to test your conditions.
- Check your browser's developer console for JavaScript errors.
- Reach out to Rep's support team at: support@hellorep.ai