For the complete documentation index, see llms.txt. This page is also available as Markdown.

Edge

Enable browser-side segment computation for near real-time on-site targeting.

Your goal

Enable Edge so that segments are computed in the user's browser as they navigate, and can be acted on during the same visit.

Expected outcome

Your sites run the latest tag, the properties Edge needs are flagged in your schema, your ad server is wired up, and Edge segments enter and exit in near real time as users browse.

What Edge is

Edge is a segmentation feature that runs client-side, in the user's browser, rather than relying on server-side segmentation. Each user's own browser evaluates whether they belong to a segment, based on their interactions with your site - which makes the segmentation close to real time.

The contrast with the default behaviour is the point of the feature:

Edge segments

Segmentation is executed by the end user's browser, so it is computed in near real time. A user enters a segment while browsing, as soon as the criteria match.

Server-side segments

mediarithmics processes segmentation on its servers, typically overnight, comparing user attributes against the segment's query. The audience is updated and activated on a daily basis.

Only users who browsed your site with Edge active are in an Edge segment.

How it works

Step by step:

  1. The user visits the site and the mediarithmics tag runs. The user's visit timeline is stored in local storage.

  2. The browser fetches the Edge segment definitions from mediarithmics and downloads them all - they are JavaScript-based segment queries.

  3. The browser evaluates those definitions against the visit timeline.

  4. The segments the user belongs to are stored in local storage, and synchronised with mediarithmics for analytics. Segment statistics are computed periodically by counting users flagged as belonging to the segment; updates can take up to 24 hours.

  5. Edge segments are activated on Google using key-value targeting through the Google Publisher Tag.

When an event is pushed by the tag it is sent both to the activity processing pipeline and saved locally, which is what lets the browser evaluate criteria without a round trip.

Set it up

1

Check the prerequisites

  • Snippet version. Your site must run the latest version of the mediarithmics snippet. See Web tracking.

  • Feature activation. Edge is not available by default. Contact your Account Manager to enable it on the channels concerned.

2

Flag the schema properties Edge can use

Identify the properties needed for Edge-based segmentation and mark them with the @EdgeAvailability directive in your schema. See Schema definition.

Requirements you must meet:

Requirement
Detail

Supported objects

Only properties of UserDeviceTechnicalId, DeviceInfo, UserSegment, and UserEvent - including all its sub-object properties.

Data integrity

Properties must exist in the schema and be stored exactly as pushed by the tag. No transformation can be applied - no event rules, no visit analyzers.

Directives

A property using @PropertyPath is only compatible if the path name and the property name are identical in both the schema and the data layer.

Validate your schema changes with the mediarithmics technical team before deploying them.

3

Connect your delivery platform

  • Google Ad Manager. The JavaScript snippet pushes segment IDs as key-values on the ad call automatically, but the key-values themselves must be created manually in the Google Ad Manager interface.

  • Other platforms. There is no native integration yet, but segment IDs are stored and available in local storage, so an integration can be implemented on your side.

During setup you can agree a custom targeting key - a namespace - with your Account Manager. It is automatically prefixed with mics_: a namespace of dogfooding produces the Google Ad Manager targeting key mics_dogfooding.

4

Add server-side activation if you need it

An Edge segment can also carry a regular server-side feed, so the same audience can be activated on other platforms.

Edge follows the same consent-management requirements as the rest of the platform. See Manage consent & Processing activities.

What is stored in the browser

Item
Storage
Persistence

Visit timeline

Up to 200 events per domain and user. Beyond that, each new event replaces the oldest. Stored under the local-storage key <namespace>_mics_up.

No time limit - no automatic cleaning or expiration.

Segments

No limit on how many are stored. Stored under the local-storage key mics_sgmts.

No time limit - no automatic cleaning or expiration.

Choosing between Edge and server-side

Edge is particularly useful for instant on-site personalisation and targeting, and it trades that speed against limitations on data retention, cross-site behaviour, and attribute availability.

For high-volume, precision-driven segmentation that needs cross-site tracking and broader data aggregation, server-side segmentation remains the recommended approach.

Verify

  • The latest snippet is deployed on the channels where Edge is enabled.

  • Every property your Edge segment queries uses is flagged @EdgeAvailability and is stored untransformed.

  • Segment IDs appear in local storage under mics_sgmts while browsing.

  • The corresponding key-values exist in Google Ad Manager, and appear on the ad call.

  • Segment statistics appear in the platform - allowing up to 24 hours.

Last updated

Was this helpful?