Help Center

Getting Started

1
  • Getting Started with cmercury

Dashboard

1
  • Dashboard

Campaigns

3
  • Campaign Overview
  • Campaign Creation
  • Custom HTML Upload Requirements

Audience

7
  • Overview
  • List
  • Segments
  • Fields
  • Audience Insights
  • Deep Segments
  • List Upload File Guide

Verify

1
  • Verify

Asset Library

1
  • Asset Library

Account Settings

6
  • Account Settings
  • Profile
  • Domains
  • API Key
  • Payment History
  • Deep Segments

Summary

1
  • Account Summary

cmercury API

8
  • cmercury API
  • API Key Management
  • Integrations Made Easy
  • Understanding the API Structure
  • Where to Find Required IDs
  • Using cmercury API with Postman
  • Sample API Response
  • Building Smarter Journeys with Webhooks

Email Automation

3
  • Welcome Mailer
  • Transactional Mailer
  • Dynamic Content Mailer

FAQs

14
  • General FAQs
  • FAQs – cmercury Dashboard
  • FAQs – Campaigns
  • FAQs – Campaign Creation
  • FAQs – Audience Selection
  • FAQs – List Management
  • FAQ – Audience Segmentation
  • FAQ – Fields Management
  • FAQ – Audience Insights
  • FAQ – Deep Segments
  • FAQ – cmercury Verify
  • FAQ – cmercury Asset Library
  • FAQ –Account Settings
  • FAQ – cmercury API
View Categories

Deep Segments

Overview

The Deep Segments module in cmercury enables you to track key user interactions on your website—such as “Add to Cart,” “Sign Up,” and “View Product”—and build behavioral segments based on those actions. This allows you to create highly targeted email campaigns, analyze user engagement over specific timeframes (e.g., 7-day or 30-day activity), and gain deeper insights into user journeys and buying intent.

By capturing real-time website behavior like page views, product interactions, and custom events, Deep Segments empowers marketers to personalize experiences, enhance segmentation accuracy, and drive better campaign performance.

Prerequisites

  • Availability: Deep Segments is available only on paid plans.
  • Activation: The feature must be manually enabled.

Setting Up Deep Segments

Step 1: How to Enable Deep Segments

  • Go to Account Settings.
  • Select the Deep Segments tab.
  • Toggle the Status to “Enabled”.

Once enabled, you can begin tracking user behavior through script integration and event definitions.

Step 2: Add the Tracking Script to Your Website

Before you can track user engagement events and create Deep Segments, you need to integrate the email tracking script into your website. This enables cmercury’s email analytics system to collect user data for segmentation and reporting.

  1. Navigate to Deep Segments > Add New Website.
  2. Enter your website URL (e.g., https://yourwebsite.com).
  3. Select the Mailing List to associate visitor data.
  4. Choose the Website Type: Ecommerce or Others.
  5. Click Add Website.
  6. Once added, click Get Script to copy your site-specific tracking code.

Note: Each script is domain-specific. Add separate entries for development or staging domains if needed.

Installing the Script

Paste the copied script into the <head> section of every page on your website. Once installed, page view tracking will be enabled by default.

Step 3: Define Events

Once the tracking script is active, you can define the specific events you want to track. These events represent key user actions on your website.

Tracking Pre-defined and Custom Events

Beyond page views, you can manually trigger specific user actions using the cwtag() JavaScript function. This enables advanced segmentation based on user behavior.

cwtag('event', 'event_tag', {
   // event-specific parameters
});

Commonly Used Predefined Events

These events are typically used in ecommerce platforms. When using these predefined tags (such as add_to_cart, view_product, etc.), ensure that the format and keys in your event payload exactly match the examples provided below. This is essential for the events to be recognized and processed correctly by our system.

1. New User Sign-Up

Tag: sign_up
Tracks when a new user signs up on your website. The attribute keys (2,3,521 etc) are the attribute IDs from the audience list selected during the initial setup. Replace them with that of your audience list.

cwtag('event', 'sign_up', {
    user_email: 'newwebsiteuser@website.com',
    attributes: [{
        2: 'FirstName',
        3: 'LastName',
        521: '9999999999'
    }],
    attributesMap: [{
        2: 'First Name',
        3: 'Last Name',
        521: 'Phone Number'
    }],
    attributesType: [{
        2: 'String',
        3: 'String',
        521: 'Numeric'
    }]
});

2. Product Category Page Visit

Tag: product_listing
Captures visits to a category or listing page.

cwtag('event', 'product_listing', {
    page_type: "WebsitePageType",
    product_category_name: "Mobile"
});

3. Product Page View

Tag: view_product

Tracks views of individual product pages.

cwtag('event', 'view_product', {
    product_id: "sku123",
    product_name: "Mango 16 Pro Max mobile",
    product_image_url: "https://website.com/img/dafsa.jpg",
    product_price: 100000,
    product_category_id: 29,
    product_category_name: "Mobile"
});

4. Add to Wishlist

Tag: wishlist

Tracks wishlist additions.

cwtag('event', 'wishlist', {
    product_id: "sku123",
    product_name: "Hysong S25 mobile",
    product_image_url: "https://cmercury.com/img/4232.jpg",
    product_price: 75559,
    product_category_id: 29,
    product_category_name: "Mobile"
});

5. Add to Cart

Tag: add_to_cart

Captures when users add a product to their cart.

cwtag('event', 'add_to_cart', {
    product_id: "sku123",
    product_name: "Nokia 2310 mobile",
    product_image_url: "https://cmercury.com/img/4222.jpg",
    product_price: 2668,
    product_category_id: 29,
    product_category_name: "Mobile"
});

6. Remove from Cart

Tag: remove_from_cart

Tracks cart removals.

cwtag('event', 'remove_from_cart', {
    product_id: "sku123"
});

7. Conversion (Purchase Completed)

Tag: conversion

Records successful transactions.

Single Product:

cwtag('event', 'conversion', {
    product_id: "sku1237"
});

Multiple Products:

cwtag('event', 'conversion', {
    product_id: "sku123,sku1237"
});

8. Custom Events

For advanced tracking, you can send custom events tailored to your specific use case. These are ideal for recording interactions that aren’t covered by the predefined ecommerce tags.

⚠️ Important: When sending custom events, you must use the custom_event keyword instead of event in the cwtag() function.

Tag: custom_event
Use this for unique site-specific interactions.

Tag: custom_event
Use this for unique site-specific interactions.
cwtag('custom_event', 'OnlineGame', {
    parameters: [{
        TimeStarted: '10am',
        Game_Name: 'Ludo',
        Completed_Hours: '2'
    }],
    parametersType: [{
        TimeStarted: 'String',
        Game_Name: 'String',
        Completed_Hours: 'Numeric'
    }]
});

You can rename the OnlineGame tag to match your use case—e.g., VideoPlayed, QuizCompleted, or SubscriptionChanged.

Best Practices for Using Deep Segment

  • Define Key Goals: Identify the most important actions (e.g., purchases, sign-ups) to track.
  • Use Meaningful Time Frames: Customize your analysis windows—e.g., 7 days for cart behavior, 30 days for purchases.
  • Combine Events for Better Insights: Analyze patterns across multiple actions (e.g., add to cart → purchase).
  • Use Behavior & Demographics: Refine segmentation by combining event data with user traits (e.g., location, device).

Troubleshooting

  1. No Data in Deep Segments: If your Deep Segments isn’t showing any data, ensure that the tracking script is properly implemented and that the event conditions are set correctly.
  2. Event Not Triggering: Double-check the event setup parameters and confirm that the correct triggers (e.g., button clicks, page views) are defined.

Need Help?

Reach out to support@cmercury.com for assistance with custom setup or troubleshooting.

Conclusion

Deep Segments gives you granular control over behavioral tracking and email segmentation. By leveraging real-time interaction data, you can create smarter campaigns, boost conversions, and drive higher engagement with your audience.

Share This Article :
  • Facebook
  • X
  • LinkedIn
  • Pinterest
Still stuck? How can we help?

How can we help?

Table of Contents
  • Deep Segments
    • Overview
    • Prerequisites
    • Setting Up Deep Segments
      • Step 1: How to Enable Deep Segments
      • Step 2: Add the Tracking Script to Your Website
      • Step 3: Define Events
      • Commonly Used Predefined Events
    • Best Practices for Using Deep Segment
    • Troubleshooting
    • Need Help?
    • Conclusion

© 2025 cmercury. All rights reserved. Privacy | Terms & Conditions