1
Add the Script Tag
Include the Remark JavaScript snippet in your website’s head section.
2
Set Up Tracking
Track customer behavior to give experts context about their journey.
3
Customize & Deploy
Style the widget to match your brand and go live!
Adding the Remark Widget tag
For Remark’s chat interface to appear on your storefront, you’ll add a small JavaScript snippet to your website’s pages. Adding this JavaScript snippet will make sure that:- Expert chat appears correctly on your site
- Customers can continue to chat with their expert as they browse different pages on your site.
- Every sale that is assisted by Expert Chat is correctly tracked from impression to conversion.
We recommend that you add the Remark JavaScript snippet to every page of your website. If a customer navigates to a page that does not include the Remark snippet, they will not be able to continue their conversation with an expert.You may choose to omit the JavaScript snippet from sensitive pages in your checkout journey, however the snippet must be included on the order confirmation / completion page in order to correctly track sales.
How to add the JavaScript Snippet
The snippet itself is the same regardless of how you install it:{{your shop domain}} with your storefront’s root domain. For a store at https://www.example.com/, the snippet would be:
1. Directly in your page template (preferred)
Paste the snippet into the<head> of your site’s main page template. Because the snippet lives in your own HTML, it loads on every page and is not affected by browser extensions or tracking-protection settings.
2. Shopify ScriptTag or the Remark Shopify app
If you run on Shopify, you can install the loader through a ScriptTag or the Remark Shopify app. Both inject the script server-side, so the experience for shoppers is the same as adding it to your template directly. This is a good option if you can’t (or would rather not) edit your theme’s HTML.3. Google Tag Manager (not recommended)
You can also load Remark through Google Tag Manager or another tag manager (Tealium, Adobe Launch, Segment, etc.). This is the easiest path if your team already manages other scripts that way, but it comes with tradeoffs: Many ad and tracker blockers blockgoogletagmanager.com at the network level, and several browsers ship the same protection on by default — including Brave, DuckDuckGo, Arc, Dia, and Firefox in strict tracking-protection mode. When GTM is blocked, every script GTM is responsible for loading is blocked with it, so Remark will not appear for those shoppers.
If you choose this installation method, we suggest measuring how much of your traffic is affected and weighing that against the convenience of managing the tag in GTM.
Controlling where the widgets appear
The loader script registers two custom elements:<remark-chat-widget> for the floating chat, and <remark-qa-activator> for the embedded chat. By default, the loader inserts these elements for you based on your Remark dashboard settings — the floating widget is appended to <body>, and the embedded widget is inserted at the anchor selector configured in the dashboard.
If you want precise control over placement, you can put the custom element directly in your page HTML at the exact spot you want it. The loader will detect the existing element and upgrade it in place instead of inserting a new one. This is most useful for the embedded chat, where the position in your page layout matters:
<remark-chat-widget></remark-chat-widget>), though it’s rarely necessary since the floating widget positions itself.
Pre-placing the embedded element is also how you supply attributes that shape the starter questions shown to your visitors — see Page Context for the full list.
You still need the loader script on the page; the custom element stays inert until the loader registers it.
Set up Remark to track shopper journey
Remark supercharges experts with live information about their customer’s journey. When experts can see what products, categories, and pages a customer is seeing, they can better assist your shoppers.Why Track Customer Events?
Why Track Customer Events?
Tracking customer behavior gives your experts crucial context about what customers are viewing, searching for, and purchasing. This enables them to provide more relevant and helpful assistance.
track feature which is used to track customer actions, page views, and commerce-related events across your website. These events are then ingested and shown to experts as they assist your customer.
Waiting for Remark to initialize
Because the Remark script loads asynchronously,window.remark may not be available yet when your code runs. To safely call window.remark, wait for the remark:session-initialized event:
window.remark is already available and fall back to the event listener:
Track Product Views
The Product View customer event helps give context to an expert when they chat with a shopper. The Product View event should be configured on all Product Detail Pages.The
productId should be sent as a string. It should be the primary identifier for the product in your e-commerce system.