Website Integration and Snippet Setup in Zoho PageSense

Website Settings

The Website section contains settings that help you connect your website with PageSense, configure website-level tracking and scripts, organize webpages, and control how visitor activity is collected.

The Website settings typically include the following sections :

  • Tracking Code: Connect your website with PageSense and enable visitor tracking for analytics, recordings, heatmaps, and experiments.
  • Web Push Notification: Configure web push notifications to engage visitors with timely messages, updates, offers, and reminders.
  • Project JS: Add custom JavaScript to your PageSense project for advanced tracking, targeting, and website-level customizations.
  • Page Groups: Group webpages based on URL rules to easily use them for targeting, analysis, and experimentation.
  • Cross domain tracking: Track visitor activity across multiple domains and maintain a consistent view of their journey.
  • Exclude Bots: Exclude bot traffic from your PageSense data to keep your reports and experiment results focused on genuine visitors.

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

Tracking Code

The Tracking Code section provides the PageSense code required to connect your website with your PageSense project. Once installed on your website, the Tracking Code enables PageSense to collect visitor activity and power features such as analytics, session recordings, heatmaps, and experiments. You can copy the Tracking Code from this section and add it to your website using your preferred installation method. After installation, you can verify whether PageSense is receiving data from your website.
Install the Tracking Code
To connect your website with PageSense:


  1. Copy the Tracking Code provided for your project.
  2. Add the code to your website as instructed.
  3. Save and publish the changes on your website.
  4. Return to PageSense and verify the installation.
Once the Tracking Code is successfully installed, PageSense can start collecting visitor data based on the features enabled for your project.

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.



 Web Push Notification

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.
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.

    Project JS

    The Project JS section allows you to add custom JavaScript code that runs across all pages of your website where the PageSense snippet is installed. Any script added in this section will automatically execute as soon as the PageSense script loads on the page. This allows you to apply custom functionality globally across your website without modifying the source code of each individual page.
    Script
    This feature is particularly useful for implementing site-wide changes, custom behaviors, or additional tracking logic that should apply across all pages in the project.


    For example, you may use Project JS to:
    • Display promotional banners or announcements across all pages
    • Trigger custom UI changes required for experiments
    • Add custom tracking scripts or event listeners
    • Implement small front-end adjustments for testing or personalization
    Once the required JavaScript code is added, click Save to apply the script. PageSense will then execute this code automatically on all pages where the PageSense tracking snippet is present.
    Using Project JS helps centralize global scripts and simplifies the process of applying custom functionality across your website.

    Page Groups

    The Page Groups feature allows you to organize and group multiple web pages together so they can be tracked or targeted collectively.
    Instead of configuring individual URLs every time you create an experiment or analyze reports, page groups help you define a logical set of pages that belong to a specific section of your website.
    For example, you may create groups such as:
    • Homepage Pages
    • Product Pages
    • Pricing Pages
    • Campaign Landing Pages
    Once a page group is created, it can be used when setting up experiments, personalization campaigns, or analytics tracking within PageSense. When creating a page group, you can define the following:



    Name
    Pages to Track
    Pages not to track
    Name
    Provide a descriptive name for the group so it can be easily identified. For example, Homepage Group or Pricing Pages.

    Pages to Track
    Specify the pages that should be included in the page group. PageSense provides eight URL match types to help you precisely define which pages should be tracked.
    1. Domain – Tracks all pages under a specific domain.
    2. Simple URL Match – Tracks pages that match the given URL in a simple format.
    3. Exact Match – Tracks only when the URL exactly matches the specified address.
    4. URL Pattern Matches With – Tracks pages that follow a defined URL pattern.
    5. URL Regex Matches With – Tracks pages that match a specified regular expression patte
    6. URL Contains – Tracks pages whose URL contains a specific word or path.
    7. URL Starts With – Tracks pages where the URL begins with the specified value.
    8. URL Ends With – Tracks pages where the URL ends with a specific string.

    Pages not to track
    You can also define pages that should be excluded from the group, even if they match the main criteria. This helps prevent certain pages from being included unintentionally.For example, you may want to track all pages under a domain but exclude pages such as trial signup, testing environments, or internal pages.
    Page Groups simplify targeting and help ensure experiments and analytics reports focus on the correct set of pages.

    Cross Domain Tracking

    The Cross Domain Tracking feature allows you to track visitor activity across multiple domains that belong to the same organization. Many websites operate across different domains, such as a marketing website, product platform, or checkout domain. Without cross-domain tracking, PageSense may treat visitors moving between these domains as separate users, which can interrupt the visitor journey in analytics reports.


    Allow Cross-Domain Tracking

    When this option is enabled, PageSense can identify a visitor as the same user across different domains, allowing you to track their behavior continuously even when they navigate between multiple websites.

    This helps you:
    • Understand the complete visitor journey across domains
    • Maintain consistent visitor sessions across websites
    • Improve the accuracy of funnel analysis and conversion tracking
    • Measure user interactions across marketing, product, and checkout pages
    Cross-domain tracking is especially useful for businesses that operate across multiple related domains and want a unified view of user behavior.

     Exclude Bots

    The Exclude Bots option helps prevent automated traffic from affecting your analytics reports and experiment results.

    Search engines, monitoring tools, and other automated systems often crawl websites using bots. These visits are not from real users, but if they are tracked as normal traffic, they can artificially inflate visitor numbers and distort experiment data.

    Bot exclusion
    When this option is enabled, PageSense automatically detects and filters out known bot traffic and automated visitors from your tracking data.


    By excluding bots, you can ensure that:
    • Analytics reports reflect real user behavior
    • Experiment results remain accurate and reliable
    • Artificial traffic spikes are avoided
    • Conversion metrics are not affected by automated visits
    Enabling bot exclusion is recommended for maintaining clean, accurate, and trustworthy data across all PageSense experiments and reports.

     



     


    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!