Page Viewed Event
The Page Viewed event is automatically fired every time a page is loaded or reloaded on your website.
This event provides comprehensive page-level tracking and is essential for understanding user navigation patterns and content performance.
Page view tracking is enabled by default in the SDK. No additional configuration is required—it works out of the box.
The autoPageView configuration option controls automatic page view tracking:
| Option | Type | Default | Description |
|---|---|---|---|
autoPageView |
boolean | true |
Enable/disable automatic page views |
To disable automatic page view tracking, set autoPageView to false in your SDK configuration:
<script type="text/javascript">
!(function (s) {
let o = s.createElement('script'),
u = s.getElementsByTagName('script')[0];
o.src = 'https://cdn.aggle.net/oir/oir.min.js';
o.async = !0;
o.setAttribute('oirtyp', 'YOUR_INTEGRATION_TYPE');
o.setAttribute('oirid', 'YOUR_INTEGRATION_ID');
o.onload = function () {
if (typeof window._oirtrk === 'function' && typeof window._oirtrk.cfg === 'function') {
window._oirtrk.cfg({
autoPageView: false, // Disable automatic page view tracking
});
} else {
window._oirtrk = window._oirtrk || [];
window._oirtrk.push([
'cfg',
{
autoPageView: false, // Disable automatic page view tracking
},
]);
}
};
u.parentNode.insertBefore(o, u);
})(document);
</script>
When disabled, you are responsible for implementing your own page view tracking using Custom Events.
Page view events align with the traffic filter configured in your dashboard. This allows you to:
- Filter page views by specific URL patterns
- Include or exclude certain pages from tracking
- Apply custom rules based on your business requirements
Configure traffic filters in your dashboard to control which page views are captured and processed.
- Automatic Triggering: Fires on every page load/reload without manual implementation
- Real-time Tracking: Captures page views as they happen
- Navigation Insights: Tracks user journey through your website
- Content Performance: Measures which pages are most viewed
- Page Analytics: Track which pages are most popular and engaging
- User Journey Mapping: Understand how users navigate through your site
- Content Performance: Measure the effectiveness of different pages
- Bounce Rate Analysis: Identify pages with high exit rates
- A/B Testing: Compare performance of different page versions
- Funnel Analysis: Track progression through conversion funnels
- SEO Insights: Monitor organic traffic to specific pages
- Mobile vs Desktop: Compare page performance across devices
- Complete Coverage: Captures all page views automatically
- No Implementation Overhead: Works out of the box
- Rich Data: Includes page URL, title, referrer, and timing
- Performance Insights: Identify slow-loading or problematic pages
- User Behavior: Understand how users interact with your content
- Conversion Optimization: Find pages that lead to conversions
- Content Strategy: Make data-driven decisions about content
| Property | Type | Req | Description |
|---|---|---|---|
| event | string | ✅ | Must be page_view |
| payload | object | ✅ | Event attributes |
| payload.page_url | string | ✅ | The URL of the page being viewed |
| payload.page_title | string | ❌ | The title of the page being viewed |
| payload.referrer | string | ❌ | The URL of the referring page |
| payload.session_id | string | ❌ | An identifier for the session |
| payload.browser_info | object | ❌ | Information about the user's browser |
| payload.device_info | object | ❌ | Information about the user's device |
| payload.custom_attribute | object | ❌ | Custom attribute for additional data |
_oirtrk.push([
'event',
{
event: 'page_view',
payload: {
page_url: 'https://example.com/page',
page_title: 'Example Page',
referrer: 'https://referrer.com',
session_id: 'abcdef123456',
viewport_size: '1920x1080',
browser_info: {
browser_name: 'Chrome',
browser_version: '90.0.4430.212',
browser_language: 'en-US',
},
device_info: {
device_type: 'Desktop',
device_os: 'Windows 10',
device_model: 'HP Pavilion',
},
custom_attribute: {
custom_attribute1: 'value1',
custom_attribute2: 'value2',
},
},
},
]);
Note: The Page Viewed event is automatically tracked by the SDK. The example above shows how to manually trigger it with custom properties if needed.