Home › Articles › Reading

October 21, 2026

Not Every Visitor Is Human: Designing Smarter Tracking in SitecoreAI

 

Not Every Visitor Is Human: Designing Smarter Tracking in SitecoreAI

A Solution Architect's perspective on bot detection, analytics accuracy, and avoiding unnecessary personalization processing.

The Analytics Numbers Look Higher Than Expected

Imagine we have launched a new SitecoreAI website.

The marketing team is reviewing the first few weeks of analytics data.

Traffic numbers look encouraging.

However, during a deeper review, the team notices an unusual pattern.

A large number of requests appear to originate from automated crawlers rather than actual visitors.

This raises an important question.

Should every request be processed in exactly the same way?

A search engine crawler may need access to the published content so it can discover and index the website.

But it does not necessarily need the same personalization and browser-side analytics processing as a real visitor.

Treating these requests identically can introduce unnecessary work and make analytics harder to interpret.

This is where lightweight tracking becomes useful.

Understanding Lightweight Tracking

SitecoreAI Content SDK supports lightweight tracking in Next.js applications.

The capability is available starting with Content SDK 2.1.0.

It allows the SDK to identify bot traffic and process it differently from ordinary visitor traffic.

Bot detection runs within the Next.js proxy layer.

When a request is identified as coming from a bot, Content SDK can record a single server-side page-view event through the Sitecore Events API.

The request is also marked as bot traffic, allowing downstream functionality to respond appropriately.

This helps prevent unnecessary browser-side tracking and personalization processing.

Why the Proxy Layer Matters

Consider what happens when a visitor requests a page.

Before the application renders the final response, the request may pass through several processing steps.

These can include site resolution, language handling, personalization, and other request-level behavior.

Bot identification is most useful when it happens early.

Content SDK provides BotTrackingProxy for this purpose.

The documentation recommends placing it first in the proxy chain.

That allows subsequent processing stages to recognize that the incoming request belongs to a crawler.

A Practical Configuration

A simplified proxy configuration looks like this:

import {
  defineProxy,
  BotTrackingProxy
} from '@sitecore-content-sdk/nextjs/proxy';

import scConfig from 'sitecore.config';
import sites from '.sitecore/sites.json';

export default function proxy(req, event) {
  const botTracking = new BotTrackingProxy({
    ...scConfig.api.edge,
    sites,
    fetchEvent: event
  });

  return defineProxy(botTracking).exec(req);
}

In a real application, additional proxies may be part of the chain.

The important point is the position of BotTrackingProxy.

It should run before other proxies that need to react to bot classification.

Avoiding Unnecessary Processing

One useful aspect of lightweight tracking is how it interacts with personalization.

By default, PersonalizeProxy skips personalization for requests identified as bot traffic.

This prevents the application from performing visitor-oriented personalization work that is generally unnecessary for crawlers.

The browser-side pageView functionality also avoids generating a duplicate tracking event for a request already handled as a bot.

For real visitors, browser-side page-view tracking continues through the events package.

This creates a clearer distinction between automated traffic and ordinary visitor activity.

What About Request Performance?

Recording a tracking event requires a network request.

If the application waits for that request before continuing, it may introduce additional latency.

Content SDK supports passing the Next.js fetch event through the fetchEvent property.

This allows the tracking request to use the platform's waitUntil mechanism.

The response can continue without waiting synchronously for the event request to complete.

This is useful for keeping bot-tracking work from unnecessarily delaying the response.

However, the behavior still depends on the supported Next.js runtime and correct application configuration.

What Would I Consider as a Solution Architect?

I would review lightweight tracking from three perspectives.

Analytics accuracy

Ensure the organization understands how bot traffic is recorded and how it differs from actual visitor activity.

Application performance

Avoid unnecessary personalization and client-side work when a request is identified as automated traffic.

Operational validation

Verify that bot classification, server-side tracking, and proxy ordering work as intended.

I would also review how bot detection affects search engine crawling and the delivery of public content.

Bot classification should not be treated as an authorization or security mechanism.

It is a request-processing and analytics capability.

Not every request reaching a digital experience platform represents the same type of visitor.

Some requests come from people looking for information.

Others come from automated systems discovering and indexing content.

Both may have legitimate reasons to access the website, but they do not necessarily need the same processing.

SitecoreAI Content SDK's lightweight tracking provides a way to distinguish these scenarios.

For a Solution Architect, the value lies in improving analytics quality while avoiding unnecessary processing.

A well-designed platform should understand the nature of incoming requests and perform only the work needed to deliver the appropriate experience.


No comments:

Post a Comment