Documentation
APICreate a Ticket
  • 📔Documentation Guide
  • 📨Data & Engagement Platform
    • Data Model
      • Customer Data
      • Product Catalogue
      • Events
        • Onsite Events
        • Outbound Events
        • Transactions
    • App User Management
      • User Roles
      • App Users
    • Data Management
      • Data Management with API
      • Data Management with Data Feeds
        • Users
          • Import Users
          • Update or Delete a User Trait via File Upload
          • List of Standard User Traits/Attributes
        • Products
        • Events
          • Import Orders
          • Import Events
          • List of Events and Properties
      • Data Export
    • Web Tracking
      • Web Tracking v1 (Legacy)
        • Setup
        • Set up business Units
        • Tracking User Behavior
          • Identify Method
          • Page Method
          • Track Method
          • Opt-Out from Tracking
        • Testing & Debugging
      • Web Tracking v2
        • Setup using Google Tag Manager
        • Setup without a Tag Manager
        • Configuration & Config Commands
        • Tracking User Behavior
          • Identify Method
          • Update Method
          • Page Method
          • Track Method
          • Opt-Out from Tracking
        • Testing & Debugging
      • Migrate Tracking SDK v1 -> v2
      • Mobile Web Tracking
    • User Segmentation
      • Creating a Segment
      • Conditions
      • Combining Segments
    • Messages
      • Frequency Capping
      • Templates
        • Template Builder
      • Integrations
        • Channels
          • SMS
            • Twilio
              • Set up a Twilio Account
              • Set up Twilio Integration
              • Create a Campaign Message
            • Link Mobility
              • Set Up Link Mobility Account
              • Set up Link Mobility Integration
              • Create a Campaign Message
          • SFTP
            • Set up SFTP Integration
            • Create a Campaign Message
          • Direct Mail
            • Optilyz
              • Set up Optilyz Integration
              • Create a Campaign Message
          • Webhooks
            • Single Webhook
              • Set up Webhook Integration
              • Create a Campaign Message
              • Response Data and Custom Events
            • Batch Webhook
              • Set up Batch Webhook Integration
              • Create a Campaign Message
            • Zenloop via CrossEngage Webhook
              • Set up Zenloop Integration (via CrossEngage Webhook)
              • Set up Zenloop Survey
              • Create a Campaign Message
              • Set up Zenloop Survey via ESP
              • Obtain Response Data
            • Google Analytics via Webhook
          • Segment Transfer
            • Facebook
              • Set up Facebook Developer Account
            • Optimizely
              • Set up Optimizely Account
            • Google Analytics
              • Set up Google Analytics Integration
              • Create a Campaign with Google Analytics
              • Using the Google Analytics Integration
            • Airship
              • Set up an Airship Account
              • Set up an Airship Integration
              • Create a Campaign Message with Airship
          • Onsite Display
            • Trbo
              • Set up Trbo Integration
              • Create a Campaign Message in CrossEngage
              • Configure Campaign Message in Trbo
              • Obtain Response Data
          • Email
            • Mailjet
              • Set up Mailjet Integration
              • Obtain Response Data via Webhook
              • Create a Campaign Message
              • Personalize Preview Texts in Mailjet
            • Mandrill (by MailChimp)
              • Set up Mandrill Integration
              • Obtain Response Data via Webhook
              • Create a Campaign Messege
            • Inxmail
              • Set up Inxmail Integration
              • Create a Campaign Message
            • Sendgrid (by Twilio)
              • Set up SendGrid Integration
              • Obtain Response Data via Webhook
              • Create a Campaign Message
            • Mailgun
              • Set up Mailgun Integration
              • Obtain Response Data via Webhooks
              • Create a Campaign Message with Mailgun
            • Episerver (Optimizely)
              • Set up Episerver Integration
              • Create a Campaign Message with Episerver
          • Push Notifications
            • Airship
              • Set up an Airship Account
              • Set up an Airship Integration
              • Create a Campaign Message with Airship
        • Attachments
        • Delete an Integration
      • Personalization
        • Import Data
          • User Profile Data
          • Campaign Data
          • Cart Data
        • Formatting Functions
          • Date Formatting
          • Number Formatting
          • String Formatting
          • Hash Functions
        • General Helper Functions
          • Conditional Functions
          • Filtering Arrays
        • Product Helper Functions
          • Fetch from Product Feed
          • Fetch from Tracking Event
          • Fetch from User Journey
        • Misc. Helper Functions
          • Voucher Helper Function
            • Vouchers: Use Case
          • Event Helper Functions
          • Opt Out Helper Functions
        • Operators
      • Vouchers
        • Creating Vouchers
        • Using Vouchers
    • Campaign Management
      • Campaigns
        • Create an Audience Campaign
        • Create a Real-Time Campaign
        • Control Group
      • Stories
        • Building a Story
        • Use Case: Welcome Story
      • Segment Transfer
        • Create a Segment Transfer Campaign
    • Consent Management
      • Subscription/Consent Management
      • System Opt-Out/Opt-In
      • System Blacklist/Whitelist
    • Prediction Models
      • Create a new Model
      • Feature Engineering
      • SQL Filter
    • System Monitoring
      • Dashboard
        • Segment Tracker
      • Events Overview
      • Activity Log
      • Slack Notifications
        • Setting up Slack Notifications
    • Help & Support
      • System Status
      • Reach out to Customer Support
      • Suggest an Improvement
      • Privacy Policy
    • Glossary - Data & Engagement
  • 📈Predictions Platform
    • Data Model
      • Customer Data
      • Transactions
      • Activities
    • Overview
      • Data Tab
        • Data Tables in the Predictions Platform
      • Insights Tab
      • Model Builder Tab
        • Feature Engineering
        • Custom SQL Filter
        • Model Report
      • Prediction Tab
      • Selections Tab
    • Tutorials
      • Prepare and Validate Data
      • Analyze RFM Customers
      • Create a new Model
      • Predict Campaign Profit
    • Glossary - Predictions
Powered by GitBook
On this page
  • Overview
  • Implementation
  • Gathered data
  • Use cases
  • Segment users that have visited the women shoes category of your shop
  • Segment users that have visited the FAQ section of your site
  1. Data & Engagement Platform
  2. Web Tracking
  3. Web Tracking v2
  4. Tracking User Behavior

Page Method

PreviousUpdate MethodNextTrack Method

Last updated 2 years ago

Overview

The page method is used to track page views, creating Viewed Page events for users the function is called for. You should only trigger this method upon successful page loads or route changes in the case of single page applications. This method automatically sends gathers and sends information regarding the page, browser session and operating system configuration of tracked users to CrossEngage.

The page method has the following structure:

ce('track', 'Viewed Page')

Implementation

This page method is not needed on each page - only on those for which a specific use case might arise, e.g. sales-, special offer-, voucher-pages. You can leave out the page method on the product detail pages as the can be used instead.

  1. Copy the page method snippet.

  2. Create a custom HTML tag on your tag manager and paste the snippet between HTML tags.

  3. Set up a trigger which fires the tag upon every page load.

Call the method each time you consider a new page is loaded.

If you are setting up the page method for a single page application, ensure that you set up the trigger based on routing changes rather than page loads.

Gathered data

The information the page method transmits is stored in a context object, which has a syntax similar to the example below:

{     
language: "en-US",     
languages: ["en-US", "en", "de"],     
location: "https://www.crossengage.io/TPS-Report/cover/",     
page: {         
    path: "/TPS-Report/cover/",         
    referrer: "https://www.crossengage.io/TPS-Report/",         
    search: "TPS",         
    title: "TPS Report",         
    url: "https://www.crossengage.io/TPS-Report/cover/"     
    },     
platform: "MacIntel",     
siteId: "www.initech.com",     
userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1)" 
}

Use cases

Segment users that have visited the women shoes category of your shop

The below block is an example of a context object from a Viewed Page event which we will be targeting for this example:

{     
language: "en-US",     
languages: ["en-US", "en", "de"],     
location: "https://www.crossengage.io/TPS-Report/cover/",     
page: {         
    path: "/women/shoes/",         
    referrer: "",         
    search: "shoes",         
    title: "Women shoes",        
    url: "https://www.crossengage.io/women/shoes/"     
    }, 
platform: "MacIntel",     
referrer: "",     
siteId: "www.crossengage.io",     
userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1)" 
}

To segment all users that have visited the women shoes category of your shop, create a segment condition filtering Viewed Page events with the property context.page.path using the contains operator with the value women/shoes.

Segment users that have visited the FAQ section of your site

The below block is an example of a context object from a Viewed Page event which we will be targeting for this example:

{     
language: "en-US",     
languages: ["en-US", "en", "de"],     
location: "https://www.crossengage.io/faq/",     
page: {         
    path: "/faq/",         
    referrer: "",         
    search: "frequently asked questions",         
    title: "FAQ",         
    url: "https://www.crossengage.io/faq/"     
    },     
platform: "MacIntel",     
referrer: "",     
siteId: "www.crossengage.io",     
userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1)" 
}

To segment all users that have visited the FAQ section of your site, create a segment condition filtering Viewed Page events with the property context.page.title using the contains operator with the value FAQ.

Depending on the use case you would like to satisfy, you may use any of the properties sent in the context of the Viewed Page event or even a combination of them. For example, you may want to segment all users which have visited your FAQ page, redirected from google. To segment these users, create a segment condition filtering Viewed Page events with the property context.page.referrer using the contains operator with the value google and the property context.page.title using the contains operator with the value faq.

📨
track method