惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
S
SegmentFault 最新的问题
V
V2EX
阮一峰的网络日志
阮一峰的网络日志
C
Cisco Blogs
博客园 - 叶小钗
P
Privacy International News Feed
Jina AI
Jina AI
Apple Machine Learning Research
Apple Machine Learning Research
T
Threatpost
IT之家
IT之家
博客园 - 聂微东
Know Your Adversary
Know Your Adversary
Help Net Security
Help Net Security
罗磊的独立博客
I
Intezer
S
Schneier on Security
博客园_首页
C
CERT Recently Published Vulnerability Notes
雷峰网
雷峰网
Cisco Talos Blog
Cisco Talos Blog
宝玉的分享
宝玉的分享
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Webroot Blog
Webroot Blog
TaoSecurity Blog
TaoSecurity Blog
MyScale Blog
MyScale Blog
P
Privacy & Cybersecurity Law Blog
T
The Exploit Database - CXSecurity.com
PCI Perspectives
PCI Perspectives
Security Latest
Security Latest
H
Heimdal Security Blog
S
Secure Thoughts
Hacker News: Ask HN
Hacker News: Ask HN
Y
Y Combinator Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Microsoft Security Blog
Microsoft Security Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
SecWiki News
SecWiki News
The GitHub Blog
The GitHub Blog
A
Arctic Wolf
A
About on SuperTechFans
aimingoo的专栏
aimingoo的专栏
T
Threat Research - Cisco Blogs
Engineering at Meta
Engineering at Meta
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

Datadog | The Monitor blog

Introducing our open source AI-native SAST Instrument and monitor Boomi integration flows with OpenTelemetry and Datadog Not all index scans are equal: How we cut query latency by over 99% Platform engineering metrics: What to measure and what to ignore Integrate Recorded Future threat intelligence with Datadog Cloud SIEM CI/CD security: threat modeling using a MITRE-style threat matrix CI/CD security: How to secure your GitHub ecosystem Ingress NGINX is EOL: A practical guide for migrating to Kubernetes Gateway API Operating agentic AI with Amazon Bedrock AgentCore and Datadog LLM Observability: Lessons from NTT DATA Introducing the Datadog Code Security MCP Capture and analyze custom heatmaps in Session Replay Understand session replays faster with AI summaries and smart chapters Monitor ClickHouse query performance with Datadog Database Monitoring How we designed empathetic alert sounds for on-call engineers Search and act across Datadog to resolve issues faster with Bits Assistant Measure the business impact of every product change with Datadog Experiments Analyzing round trip query latency Configuring JavaScript caches for better performance Introducing Bits AI Dev Agent for Code Security Datadog achieves ISO 42001 certification for responsible AI Monitor Nutanix clusters, hosts, and VMs with Datadog Monitor Juniper Mist in Datadog A new Host Map for modern infrastructure Annotate traces to improve LLM quality with Datadog LLM Observability What’s new in Cloud SIEM: AI-powered investigations, enhanced threat intelligence, and scalable security operations Explore Kubernetes with native OpenTelemetry data Monitor Oracle Fusion Cloud Applications with Datadog Announcing the Datadog Terraform provider v4.0.0 Scaling Kubernetes workloads on custom metrics How to design cloud environments for AI-powered threat analysis Monitor Aruba Central in Datadog How we centralize and remediate risks with Datadog Case Management Accelerate incident response with Datadog and ServiceNow Monitor your application and network load balancer logs Understanding Karpenter architecture for Kubernetes autoscaling Tools for collecting metrics and logs from Karpenter Monitor Karpenter with Datadog What your product data is actually saying Key metrics for monitoring Karpenter Securing Datadog’s platform in the AI age: The role of observability data Four ways engineering teams use the Datadog MCP Server to power AI agents Approaching your observability migration with the right mindset Meet the new Bits AI SRE: Deeper reasoning, twice as fast Key learnings from the 2026 State of DevSecOps study Use plain English to query your multi-cloud infrastructure in Resource Catalog Simplifying troubleshooting across the user journey with Datadog Synthetic Monitoring Protect your OCI resources with Datadog Cloud Security This Month in Datadog - February 2026 Amazon EC2 security: How misconfigured and public AMIs expand your cloud attack surface Enable end-to-end visibility into your Java apps with a single command Measure and improve mobile app startup performance with Datadog RUM Evaluating our AI Guard application to improve quality and control cost Identify untested code across every level of your codebase Make use of guardrail metrics and stop babysitting your releases Monitor Versa Networks SD-WAN performance in Datadog Improve performance and reliability with APM Recommendations Remediate transitive vulnerabilities faster with Datadog Software Composition Analysis Generate audit-ready vulnerability and compliance reports with Datadog Sheets Monitor Fortinet FortiManager performance in Datadog Improve test coverage across codebases with Datadog Code Coverage Move fast, don’t break things: Consistent testing standards at scale Enrich logs with ServiceNow CMDB context before routing to any SIEM or logging tool Monitor Lustre with Datadog Make faster, better product decisions with Datadog Product Analytics Surface and remediate runtime posture issues with Workload Protection Findings Protect agentic AI applications with Datadog AI Guard How to optimize JavaScript code with CSS Trace Google Pub/Sub workloads in Cloud Run with Datadog Detect human names in logs with ML in Sensitive Data Scanner How we cut our NLQ agent debugging time from hours to minutes with LLM Observability Debug PostgreSQL query latency faster with EXPLAIN ANALYZE in Datadog Database Monitoring Datadog acquires Propolis Unify and correlate frontend and backend data with retention filters Scale compliance across global frameworks with Datadog Cloud Security Monitor Arista VeloCloud SD-WAN performance with Datadog Building reliable dashboard agents with Datadog LLM Observability Simplify log collection and aggregation for MSSPs with Datadog Observability Pipelines Mitigation for Node.js denial-of-service vulnerability affecting Datadog APM Automate flaky test fixes with the Bits AI Dev Agent and Test Optimization How we built an AI SRE agent that investigates like a team of engineers Datadog integrations 2025 recap: Observability for AI, security, and hybrid cloud Design effective executive dashboards with Datadog Implement dbt data quality checks with dbt-expectations Bring faster visibility into AWS Lambda functions with remote instrumentation Troubleshoot faster with the GitLab Source Code integration in Datadog How Cambia Health Solutions saved $30,000 monthly with Cloud Cost Management and the Datadog Resource Catalog Normalize any logs for Cloud SIEM with Datadog's OCSF processor Optimizing Datadog at scale: Cost-efficient observability at Zendesk Detect, diagnose, and resolve network issues easily with CNM Network Health Connect engineering errors to user impact in early-stage products Cilium configuration for Kubernetes operations at scale Designing feedback loops for progressive delivery Ship features faster and safer with Datadog Feature Flags Choosing the right OpenTelemetry Collector distribution Route your monitor alerts with Datadog monitor notification rules Automate Cloud SIEM investigations with Bits AI Security Analyst Cloud threat detection: How to identify risky activity across control and data planes Collecting Kafka performance metrics Monitoring Kafka with Datadog Monitoring Kafka performance metrics
How Grainger optimized RUM costs by removing unwanted bot traffic
2024-10-30 · via Datadog | The Monitor blog
Anand Mattah Chenna Kesavalu

Anand Mattah Chenna Kesavalu

On average, nearly half of all traffic to e-commerce websites come from bots, which significantly impacts performance metrics and inflates monitoring costs. While some bots serve useful purposes, such as search engine indexing or price comparison, many others are detrimentally skewing analytics and inflating RUM session counts. These automated visitors can distort key performance indicators, making it challenging to get an accurate read on customer behavior. Furthermore, the excessive RUM sessions consumed by bots can lead to unnecessary expenses. Understanding and mitigating the influence of bots is critical for maintaining accurate insights and controlling costs in today’s digital landscape. And, of course, grainger.com is no exception to this.

In this post, we will cover the single-user actions to look out for when assessing bot traffic and go over the steps we took to remove bots from our RUM sessions.

Understanding bot vs. real user traffic patterns

Many single-user actions are bots that are programmed to scrape web pages for content or data. These automated scripts mimic real user behavior by visiting the site and loading pages, but they don’t engage in meaningful interactions. Instead, they quickly extract information before leaving, adding little to no value to user experience analysis. Despite their minimal impact on genuine user engagement, these bot activities can inflate traffic metrics and consume valuable RUM sessions, leading to skewed data and increased monitoring costs.

630,000 out of 1.1 million RUM sessions are only one-page hits, signaling heavy bot traffic.
Single-page user traffic activity.
630,000 out of 1.1 million RUM sessions are only one-page hits, signaling heavy bot traffic.

Single-user actions that attract unwanted traffic include:

  • Social media clicks, such as users who click on a link from social media platforms like Facebook, Twitter, or LinkedIn and visit your site briefly.
  • Ad clicks, or users who arrive through paid advertisements, such as Google Ads or display ads, but leave after viewing just one page.
  • Email campaign clicks, such as recipients of marketing emails who click through to the site but don’t engage further.
  • Search Engine results, such as visitors who find your site through a search engine, click on the result, but quickly leave without exploring further.
  • Referral traffic, or users who come from external links on other websites but only view a single page.
  • Event promotion clicks, such as attendees of online events or webinars who click through a promotional link but do not continue exploring.
  • Coupon or offer clicks, such as users attracted by a specific coupon or offer who visit the site to claim it but leave immediately afterward.
  • Bot traffic: Although not true users, some bots may appear as one-time visitors, quickly leaving the site after a single page view.
  • News or article clicks, such as readers who visit your site to view a specific article or news piece but don’t engage further.

Implementing a targeted strategy to filter unwanted traffic from RUM sessions

There are a few strategies you can use to avoid session replays for these types of traffic. The first is to simply avoid injecting the RUM SDK for overt bot traffic. Next, you can choose to ignore all one-page sessions or take a sample of RUM sessions from single-page visits. By allowing only 20 percent of single-page sessions to be sent to Datadog, you can inject the RUM SDK at the start of the session with the configuration option trackingConsent: 'not-granted' to start. This way the SDK can be injected but not collect the session. Then when you confirm if it is not bots or multiple-page sessions, you can call the .setTrackingConsent('granted') method in the RUM SDK to begin recording the session.

window.DD_RUM.onReady(function() {

window.DD_RUM.init({

...,

trackingConsent: 'not-granted'

});

});

// Example of starting the RUM SDK to capture the session acceptCookieBannerButton.addEventListener('click', () {

window.DD_RUM.onReady(function() {

window.DD_RUM.setTrackingConsent('granted');

});

});

All of the roughly 700,000 one-page visits occurred over the last 30 days.
Single-page user traffic over the last 30 days.
All of the roughly 700,000 one-page visits occurred over the last 30 days.

For our approach, we implemented a bot manager from our Content Delivery Network (CDN) provider that set the signal for Human or Bot. We also used browser local storage that tracks the page view counts for the session com.tagmanager.reactor.core.visitorTracking.pagesViewed > 1, along with a referrer domain from grainger.com that cut down on traffic pollution from single-page hits or other subdomains. For all of these methods, we used a tag manager that injected the Datadog RUM SDK based on the following checks: bot signal, referrer domain, and page view count.

Method for not injecting RUM SDK based on bot patterns.

conditions: [{

modulePath: "somepath/datadog_sdk_inject.js",

settings: {

source: function() {

if ("Y" != _satellite.getVar("CDN: Bot Signal") && _satellite.getVar("User Identification: Visitor Behavior: Session Page View Count") > 1 && document.referrer.indexOf("example.com") > -1) 6

return !0

}

}

}],

actions: [{

modulePath: "somepath/datadog_sdk_inject.js",

settings: {

global: !1,

source: "// CDN async script

(function(h, o, u, n, d) {

h = h[d] = h[d] || {

q: [],

onReady: function(c) {

h.q.push(c)

}

}

d = o.createElement(u);

d.async = 1;

d.src = n

n = o.getElementsByTagName(u)[0];

n.parentNode.insertBefore(d, n)

})(window, document, 'script', 'https://www.datadoghq-browser-agent.com/us1/v5/datadog-rum.js', 'DD_RUM') 21 window.DD_RUM.onReady(function() {

window.DD_RUM.init({

clientToken: 'sometoken',

applicationId: 'someid',

site: 'datadoghq.com',

service: 'example.com',

env: 'env',

version: 'some_version',

sessionSampleRate: 100,

sessionReplaySampleRate: 100,

trackUserInteractions: true,

trackResources: true,

trackLongTasks: true,

trackFrustrations: true,

defaultPrivacyLevel: 'mask',

compressIntakeRequests: true,

allowedTracingUrls: [\"https://example.com\" ],

enableExperimentalFeatures: ['clickmap', 'feature_flags'],

});

}) window.DD_RUM.onReady(function() {

// Function to retrieve cookies

function retrieveCookies() {

var cookies = document.cookie;

// console.log(\"cookie:\" + cookies)

// Split the cookies string into individual cookies

var cookieArray = cookies.split('; ');

var cookieObject = {};

// Convert the array of cookie strings into an object

cookieArray.forEach(function(cookie) {

var parts = cookie.split('=');

cookieObject[parts[0]] = parts[1];

});

// Set the cookie object as a context property

window.DD_RUM.setGlobalContextProperty('cookies', cookieObject);

}

// Call the function to retrieve cookies asynchronously after a short delay to ensure that the document is fully loaded

setTimeout(retrieveCookies, 1000); // Adjust the delay as needed

});

",

language: "javascript"

}

},

Eliminating potential bot traffic from recorded sessions.

Overall, we found that RUM session counts were over 1.3 million per day and more than 50 percent of them were bots and single page visits. By removing single-page visitors and bots, the total RUM session counts improved to 500,000 per day. By identifying and excluding one-time visitors, bots, and other low-value traffic sources, we significantly reduced unnecessary data collection and costs. This approach allowed us to focus on meaningful user interactions, enhancing the accuracy of our insights while optimizing resource utilization.

Cut down on your RUM costs with Datadog

By targeting our efforts, we achieved a remarkable 50 percent cost savings on RUM expenses, optimizing our budget while also improving the accuracy of our user behavior analysis. Our strategic approach has been both financially and operationally beneficial, cutting down on distorted key performance indicators, unnecessary expenses, and skewed analytics. This allows us to focus our resources on what truly matters—enhancing the experiences of real users.

To learn more about Datadog RUM and Session Replay, visit the documentation. Or try it out with a 14-day free trial.