ExplorAds S2S Documentation

Server-to-Server Integration Guide

ExplorAds S2S documentation

Overview

ExplorAds RSoC environment supports several variations of S2S (server-to-server) integrations. In all these integrations, our applications will automatically publish some event data to the customer’s API or Traffic Source Platforms (Facebook, Google Ads, etc).

Important: the same S2S mechanisms run from several ExplorAds environments (RSOC, Gamob, Taboola, and others), and not all event types described in this document are available in every environment. Please ask your account manager which postbacks are available for your specific integration.

Event Types and Parameters

Frontend Events (Sent from Browser)

Event Mapping to Facebook Event Types

Frontend events and their Facebook event type mapping: - article_plViewContent - article_st_loadedViewContent - article_clickoutLead - serp_plSearch - serp_st_loadedSearch - serp_clickoutLead

Article Page Events

Sent from: Article page (article.layout.html)
Event types: article_pl, article_st_loaded, article_clickout
Parameters: - page_url - URL-encoded current page URL - ref - URL-encoded referrer URL (or “none”) - pl_id - Unique page load event ID (UUID) - landing_pl_id - Landing page load ID (from sessionStorage) - cs - Session ID (from URL param or generated UUID) - mon - Channel number from URL parameter - tspid - Traffic source platform ID - page_type - Always "article" - event_type - One of: "article_pl", "article_st_loaded", "article_clickout" - event_id - Same as pl_id (UUID) - style_id - Style identifier (default: 7146518121) - fbc - Facebook click ID from cookie (or empty string) - fbp - Facebook browser ID from cookie (or empty string) - All UTM parameters from URL (e.g., utm_campaign, utm_source, fbclid, gclid, etc.)

SERP Page Events

Sent from: SERP page (serp.layout.html)
Event types: serp_pl, serp_st_loaded, serp_clickout
Parameters: - page_url - URL-encoded current page URL - ref - URL-encoded referrer URL (or “none”) - pl_id - Unique page load event ID (UUID) - landing_pl_id - Landing page load ID (from sessionStorage) - cs - Session ID (from URL param or generated UUID) - mon - Channel number from URL parameter or UTM params - channel - Dynamic channel (async fetched) - tspid - Traffic source platform ID - page_type - Always "serp" - event_type - One of: "serp_pl", "serp_st_loaded", "serp_clickout" - event_id - Same as pl_id (UUID), or new UUID for serp_clickout - external_id - Same as cs (session ID) - style_id - Style identifier (default: 7146518121) - fbc - Facebook click ID from cookie (or empty string) - fbp - Facebook browser ID from cookie (or empty string) - All UTM parameters from URL


Backend S2S Events (Sent to Facebook API)

Event Mapping to Facebook

Backend events sent to Facebook: - article_pl → Facebook: ViewContent - serp_pl → Facebook: Search - serp_clickout → Facebook: Lead - adsense_adclick → Facebook: Lead - conversion → Facebook: Purchase - conversion_static → Facebook: Purchase

Parameters sent to Facebook: - event_name - One of: "ViewContent", "Search", "Lead" - event_time - Unix timestamp (seconds) - event_source_url - Extracted from page_url, page_path, headers.origin, or headers.referrer - action_source - Always "website" - event_id - From frontend event - user_data: - client_ip_address - User IP address - client_user_agent - Browser user agent - fbc - Facebook click ID (from cookie or generated from fbclid) - fbp - Facebook browser ID (from cookie or generated from fbc) - external_id - Session ID (cs) - country - Hashed country (from CloudFront header) - ct - Hashed city (from CloudFront header) - custom_data - Not included for these events

Note: For serp_pl, serp_clickout, and adsense_adclick, if fbc/fbclid is missing, backend attempts to fetch from parent article_pl event in DynamoDB.

Conversion Events (Purchase)

Event types: conversionPurchase, conversion_staticPurchase
Parameters sent to Facebook: - Same structure as base events but: - event_name - Always "Purchase" - custom_data: - value - Commission amount (float) - currency - Currency code (default: "eur") - event_time - Import time timestamp (for conversions)

Keep in mind

HTTPS S2S Postback

This is a generic mechanism that can support sending events to your HTTPS endpoint. We support only HTTPS protocol, unencrypted HTTP is scheduled for deprecation. HTTPS S2S Postback supports both GET and POST methods. In order to enable the postback you have to specify a list of:

Event Type : Method : URL of your API with macros

Supported macros:

Example of a good URL: https://api.your-site.com/callback-purchase?yourId={clid}&query={q}&campaign={utm_campaign}&value={commission}

Keys of the attributes should be the ones supported by your API of course.

Facebook API S2S

We support automatic reporting to your Facebook account Events Manager. In order to enable, your should provide: - Facebook Pixel ID - API key with relevant permissions to push events - Event types to report

Also the fbclid must be configured in your tracking URL.

Automatic mapping of event types:

article_pl        -> ViewContent
serp_pl           -> Search
serp_clickout     -> Lead
adsense_adclick   -> Lead
conversion        -> Purchase
conversion_static -> Purchase

We can also configure custom mapping of event types per TSPID if required.

Keep in mind that if enabled the first three event types will be reported both from the front-end (using Meta Pixel) and our backend via Facebook Graph API. The front-end events will fire only in the countries/regions with no privacy law restrictions like GDPR and CCPA. Facebook is supposed to deduplicate these events automatically by their unique fbclid, fbc, fbp identifiers.