Website Integration and Snippet Setup in Zoho PageSense

Website Settings

The Website section in Zoho PageSense allows you to configure settings related to how PageSense connects with and interacts with your website. This includes installing the tracking snippet, enabling browser notifications, and managing how visitors can subscribe to updates.

These configurations help ensure that PageSense can track visitor behavior, run experiments, collect insights, and communicate with users directly through notifications.

The Website settings typically include the following sections :

  • Snippet – Install and verify the PageSense tracking code on your website.
  • Web Push Notifications – Allow visitors to subscribe to browser notifications from your website.

Each section plays an important role in enabling PageSense to track visitor activity and improve engagement with your users.

Snippet 

The Snippet section under Website settings in Zoho PageSense allows you to install and manage the PageSense tracking code on your website. Installing this snippet is the first and most important step to begin collecting visitor behavior data and running optimization experiments on your site.

Once the snippet is added to your website, PageSense starts tracking visitor interactions such as clicks, scrolls, page visits, conversions, and other behavioral metrics. This data is used across PageSense features including A/B testing, Split URL testing, Personalization, Heatmaps, Funnels, Form Analytics, and Goals.

Installing the snippet correctly ensures that PageSense can track visitors consistently and provide accurate analytics and experimentation results.

NotesNote: The Settings icon is located in the top-right corner of your PageSense interface. From there, navigate to Website → Snippet to access the code snippet for your project.

Code Snippet

PageSense provides a JavaScript tracking snippet that must be installed on your website to start collecting visitor metrics.
You can choose between three types of snippets depending on how the script should load on your webpage:
  • Synchronous snippet
  • Asynchronous snippet
  • Smart Code snippet
Each option determines how the PageSense script loads and interacts with other scripts on your website.
Synchronous Snippet
A Synchronous snippet loads in sequence along with other scripts on your webpage. This means the browser waits for the PageSense script to load before continuing to process other scripts.
When to use synchronous snippet :
  • Your website requires scripts to execute in a strict order
  • You want PageSense to load before other scripts run
  • You are running advanced custom scripts that depend on PageSense loading first
However, because synchronous scripts block other scripts temporarily while loading, they may slightly affect page performance if used on heavy pages.
For most modern websites, asynchronous or smart code implementations are recommended instead.


Asynchronous Snippet
An Asynchronous snippet loads independently without blocking other scripts on the page. The browser continues loading other elements while the PageSense script loads in the background.

When to use asynchronous snippet :
  • You want better page performance and faster rendering
  • Your website contains multiple third-party scripts
  • You want PageSense to load without affecting other scripts on the page
Because asynchronous scripts do not block page loading, they are generally preferred over synchronous scripts for most websites.


Smart Code Snippet
The Smart Code snippet is the recommended implementation for most websites using PageSense.
Smart Code automatically optimizes how the script loads and interacts with your website. It intelligently manages script execution to reduce flicker during experiments and ensures faster page rendering.


Benefits of Smart Code
  • Optimizes script loading automatically
  • Reduces flicker when running A/B tests or personalization experiments
  • Improves page load performance
  • Ensures experiments run smoothly without affecting the user experience
For websites running A/B testing, Split URL testing, and Personalization campaigns, using Smart Code provides the most reliable and optimized performance.


Once the snippet is installed, PageSense begins tracking visitor interactions using cookies. These cookies help identify returning visitors and maintain session continuity for experiments and analytics.


To ensure transparency and comply with privacy regulations, it is recommended to display a cookie consent banner on your website informing visitors about the use of cookies.

For configuring cookie consent and privacy settingsrefer to the Content and Privacy Settings help document.

Integrating with Google Tag Manager

If your website uses Google Tag Manager (GTM) to manage scripts, you can install the PageSense snippet through GTM instead of adding the code directly to your website.


Refer to the PageSense GTM integration guide for detailed instructions on configuring the snippet through Tag Manager.

Installing the Code Snippet

To install the PageSense snippet manually:

  1. Copy the code snippet from the Snippet section in PageSense.
  2. Paste the snippet inside the <head> tag of your website pages.
  3. Save and publish the changes on your website.
Once installed, PageSense will begin tracking visitor interactions and collecting data for analytics and experiments.

Verify Installation

After installing the snippet, you can confirm that PageSense is properly connected to your website using the Verify Installation option.

Enter your website URL to check if the snippet is successfully detected on the page.

Example : https://zylkerautomation.zohoecommerce.com/

Web Push Notifications

The Web Push Notifications section in Zoho PageSense allows you to enable browser notifications so visitors can subscribe and receive updates directly from your website. These notifications help businesses re-engage visitors by sending alerts about new content, offers, product updates, or announcements—even when the visitor is not actively browsing the website.

Before receiving notifications, visitors must grant permission through a subscription prompt displayed on the website. PageSense provides multiple opt-in methods that allow you to control how and when this subscription prompt appears.
NotesNote: The Settings icon is located in the top-right corner of your PageSense interface. Navigate to Website → Web Push Notifications to configure notification subscription settings.

Allow Users to Subscribe

To start collecting subscribers, you must first enable the option that allows visitors to subscribe to notifications from your website. Once enabled, PageSense will display a subscription prompt asking visitors to grant permission for notifications.

After a visitor subscribes, they can receive browser notifications sent from your PageSense campaigns.

Opt-In Types

PageSense offers multiple opt-in approaches for collecting subscriber permissions. Each method provides a different user experience and can be selected depending on how you want to present the notification request.

One-Step Opt-In

The One-Step Opt-In method displays the browser’s native notification permission prompt directly to visitors. When a user lands on your website, the browser asks whether they want to allow notifications.


This option allows visitors to subscribe quickly using the browser permission dialog.

When to use One-Step Opt-In

This method is suitable when:

  • Your website already has strong visitor trust
  • You want a quick and simple subscription process
  • Your website uses HTTPS

You can configure when the permission prompt appears, such as immediately when a visitor lands on the page or after a short delay.

Service Worker Requirement

To enable push notifications, a service worker file must be present in the root directory of your website.

If the file does not exist, create a file named:

service-worker.js

Place this file in the root directory of your website and ensure that it is publicly accessible. This file enables browsers to deliver notifications even when the user is not actively browsing the site.

Two-Step Opt-In
The Two-Step Opt-In method displays a custom message or opt-in box on your website before showing the browser’s notification permission prompt.
Visitors first see a message explaining why notifications are being requested. When they click the allow button, the browser then displays the official permission request.


Why use Two-Step Opt-In
Two-step opt-in is recommended because it:
  • Improves user trust and transparency
  • Increases subscription rates
  • Works better with modern browser notification policies
You can customize several elements of the opt-in message to match your website branding.

Customizing the Opt-In Message
You can configure the following elements:

  1. Opt-in trigger timing
    Choose when the subscription message appears, such as after a visitor lands on your website or after a few seconds.
  2. Image
    Add a small image or icon to visually support the message. Supported formats include JPG, JPEG, and PNG.
  3. Title
    The heading displayed in the subscription prompt that explains the notification request.
  4. Message
    A short description that tells visitors what type of notifications they will receive.
  5. Button labels
    Customize the text for the Allow and Don't Allow buttons.

Child Window Option

The Child Window setting displays the opt-in prompt inside a secondary window that opens within the browser. This window behaves as an extension of the main page and supports all available buttons and configuration options.


Using a child window can help present the notification request in a more structured and visible format without interrupting the browsing experience.

Preview

After configuring your custom opt-in trigger, PageSense also allows you to preview how the notification subscription prompt will appear to visitors.


You can switch between Web and Mobile preview modes to see how the opt-in button or link behaves across different devices. This helps ensure that the subscription prompt appears correctly and provides a consistent experience for both desktop and mobile users before publishing it on your website.

Custom Opt-In

The Custom Opt-In option allows you to trigger the notification subscription prompt through specific visitor actions rather than automatically displaying it.


This method is useful when you want to request notification permissions only after the visitor has interacted with your website.

Common use cases for custom opt-in
  • Displaying the prompt after a user clicks a Subscribe button

  • Triggering the prompt after completing a form submission

  • Showing the prompt on specific landing pages

  • Requesting notification permission after a visitor spends time on the site

Custom opt-ins give you greater control over when and how the notification request appears.


Triggering Subscription with a Button

You can add a custom button on your website to trigger the notification prompt.

Example:

  1. <button onclick="window.pagesense=window.pagesense||[]; window.pagesense.push(['optInForPushNotification']);">
  2. GET NOTIFICATIONS
  3. </button>

When visitors click this button, the browser subscription prompt will appear.

Triggering Subscription with a Link

You can also trigger the subscription request using a link.

Example:

  1. <a onclick="window.pagesense=window.pagesense||[]; window.pagesense.push(['optInForPushNotification'])">
  2. GET NOTIFICATIONS
  3. </a>

This allows you to integrate notification subscription requests into links, menus, or other interactive elements on your website.



 


We’ve designed this documentation to guide you every step of the way. If you need further assistance or have any questions, don’t hesitate to contact us at support@zohopagesense.com - we’re always here to help!