Developer
User guidesDeveloper websiteHelp centerLog in
  • Welcome!
  • Organisations structure
    • Datamart
    • Users and roles
  • User points
    • User identifiers
      • Networks IDs
        • Device-based Network IDs
          • Custom Device ID integration
          • ID5
          • First ID
        • User-based Network IDs
          • Custom User ID integration
          • UTIQ martechpass
      • Accounts
      • Emails
      • Device identifiers
    • User activities and events
    • Compartments
    • User profiles
    • User segments
    • Hyper point & Quarantine
  • Data model
    • Defining your schema
    • Computed fields
      • Concepts
      • Quickstart
      • Examples
  • Data ingestion
    • Real time user tracking
      • Website tracking
      • Mobile apps tracking
      • Ads exposure tracking
      • AMP tracking
      • Conversions tracking
      • Email views and clicks
      • Tracking API
      • Event rules
      • Activity analyzers
    • Bulk processing
      • Imports
        • User activities import
        • User profiles import
        • User choices import
        • Segments import
      • Deletions
        • User identifiers deletion
        • Device points deletion
        • User points deletion
      • User identifiers association
      • Integration batch
    • Activities analytics
    • Data warehouse
      • Preliminary setup
        • BigQuery
      • Create data warehouse
  • Querying your data
    • OTQL queries
    • OTQL examples
    • GraphQL queries
    • UserPoint API
    • User activities
    • Activities analytics queries
      • API Quickstart
      • Dimensions and metrics
      • Use cases
    • Funnel API
  • Alerting
    • Alert configurations
  • Data visualisation
    • Quickstart
    • Dashboards
    • Sections and cards
    • Charts
    • Datasets and data sources
      • Using a data file data source
    • Transformations
    • Filters
    • Cookbook
    • Reference
  • Advanced usages
    • Audience segmentation
      • Audience features
      • Segment builders
      • Audience segment metrics
      • Audience segment feed
        • Building new feeds
        • Monitoring a feed
        • Curated Audiences (SDA)
      • Edge segments
      • Cohort-based Lookalike
    • Contextual targeting
      • Setup
      • Activation
        • Google Ad Manager
        • Xandr (through prebid.js)
      • API documentation
    • Exporting your data
      • Query Exports
      • Datamart replication
    • Data privacy compliance
      • User choices
      • Cleaning rules
      • Exercise of user rights
      • Cookies
    • Campaigns
    • Automations
      • Email routers
      • Email renderers
      • Opt-in provider
      • Custom action plugins
      • Usage limits for automations
    • Plugins
      • Concepts
      • Creation & Deployment
      • Coding your plugin
      • Manage existing plugins
      • Layouts
      • Presets
      • Monitoring
      • Throttling
      • Batching (for external feeds)
    • Platform monitoring
      • Resources usage
        • Dimensions and metrics
      • Collection volumes
        • Dimensions and metrics
      • Events ingestion monitoring
        • Dimensions and metrics
    • Data Clean Room
      • Bunker
      • Clean room
  • Resources
    • Tutorial: Data Ingestion
      • Your first events
        • Add the mediarithmics tag
          • Getting the tag
          • Adding the tag
        • Send events using the tag
          • Adding event properties
          • Finding the UserEvent type in your schema
          • Matching your schema
          • Standard events
      • Your first bulk imports
        • API basics
          • Authentication
          • Your first API call
        • Send documents using the API
          • Requirements
          • Sending documents
    • Using our API
      • Authentication
    • Tools & libraries
      • mics CLI
      • JS Tag
      • Plugin SDK
    • Data cubes
      • Creating a report
      • Reference
Powered by GitBook
On this page
  • Create a batching configuration
  • Create a Plugin Version Batching Configuration
  • Implement the batching feature in your external feed plugin
  • Design
  • Implementation

Was this helpful?

Export as PDF
  1. Advanced usages
  2. Plugins

Batching (for external feeds)

Platform-side batching for plugins

As of now, batching is only available for plugins of type AUDIENCE_SEGMENT_EXTERNAL_FEED

You may need to integrate with external partners that require batched data as input. However mediarithmics platform only provides unit updates to your external feed plugin, one user point at a time (via /user_segment_update route).

This documentation explains you how to use the batching feature provided by the platform.

Create a batching configuration

  1. Go to the Computing Console > Plugins

  2. Find your plugin, select the version and go to the Batching configuration tab

  3. Create the batching configuration

Batching configurations can also be defined using the following API.

Create a Plugin Version Batching Configuration

POST https://api.mediarithmics.com/v1/plugins/:plugin_id/versions/:version_id/batching_configurations

Request Body

Name
Type
Description

plugin_version_id*

String

The id of the Plugin Version that will be batched.

enable_batching*

Boolean

enable or disable the batching

batch_flush_max_size*

Integer

Set the maximum size of batches in number of lines.

Implement the batching feature in your external feed plugin

Design

You need to split your plugin logics in two parts :

  1. Data formatting / gathering phase (/user_segment_update route implementation)

  2. Batch delivery phase (/batch_update route implementation).

The platform will take care of aggregating the data returned by the /user_segment_update route into batches and then call back your plugin route /batch_update with the batches.

It's important to understand that the output of the call on /user_segment_update will be an element of /batch_update input.

Implementation

You need to use version 0.14+ of the plugin-nodejs-sdk

Rewrite your plugin to extend type BatchedAudienceFeedConnectorBasePlugin<T> (where T is the type of one batched line) provided by the SDK.

It will force your plugin to implement /batch_update route and force /segment_update response type to be BatchedUserSegmentUpdatePluginResponse<T>.

You can use the grouping_key field of the response if your data specifically need to be regrouped by a specific criteria.

For exemple, you may have an external partner that requires having only one identifier type per payload. To do so, you should use the identifier type as grouping_key.

mediarithmics platform won't interpret grouping_key, and will use it as an exact matching.

PreviousThrottlingNextPlatform monitoring

Last updated 1 year ago

Was this helpful?