Edge segments

You can compute segments browser-side using our Edge technology and share them to Google Ad Manager.

The Google Ad Manager then delegates the computing to the mediarithmics JS tag. The tag:

  1. Collects and stores navigation data in the local storage. When an event is pushed by the tag, it will not only be pushed to the activity processing pipeline, but also to the local storage.

  2. Computes segments' enter and leave events, browser-side, and sends them to the server through a pixel. This replaces the normal process of computing the segment regularly server-side.

  3. Triggers integration with Google Ad Manager when a user enters or leaves a segment, and on-page load.

This gives you the ability to react instantly to user navigation and trigger campaigns as the user is browsing your site.

Edge segments still exist server-side.

  • Segment statistics are calculated periodically by running a query counting the users marked as in the segment.

  • User points are added or removed from a segment only when the JS Tag triggers the action through the pixel. Only users who navigated your site with the Edge feature activated will be in the segment.

Edge segments are only integrated with Google Ad Manager at the moment. App Nexus integration is possible.

How it works

You declare a new Edge segment by going to the mediarithmics navigator > Audience > Segments > New Segment and selecting the Edge type. This segment will be associated with a query.

From this point, the mediarithmics, JS Tag will handle additional operations during web tracking.

It will leverage the local storage of the user's browser. Three fields are created:

  • {customname}_mics_up contains a browser-side user point with the timeline of events the user is triggering.

  • mics_sgmts contains the IDs of the segments the user is in. It allows targeting with Google Ad Manager.

  • _mediarithmics contains the user's latest visit date.

The mediarithmics JS Tag will also add two important files:

  • segment.js grabs the queries corresponding to the different Edge segments set up in the platform

  • evaluator.min.js evaluates the local storage against segment queries to decide if a user enters or leaves a segment

When the tag pushes an event, the evaluator checks if the user should enter or leave an Edge segment. It then sends a pixel to the server and triggers integration to Google Ad Manager accordingly.


  1. The feature should be activated on channels by your Account manager. They will enable analytics to ensure a cookie is deposited, and configure a key that will be used by Google Ad Manager for your channel.

  2. Real-time web apps tracking should be set up on your site, and events should be triggered.

  3. Your schema should be defined by leveraging the @EdgeAvailability directive to make fields available in queries when building Edge segments.

Fields marked with the @EdgeAvailability directive should have the same value in the browser and in the server to avoid consistency issues between Edge segments and any server-side computation.

As best practice, you should not have any transformation during the processing pipeline (for example, through activity analyzers) for those fields. Note that such transformations will not be made on the browser side and you will finally have different values in the browser and in the server.

👍 don't hesitate to validate your schema with our team

Last updated