Package 

Object MetaPixelCompanion


  • 
    public class MetaPixelCompanion
    
                        

    Meta Pixel companion helper. Mirrors libs/web-sdk aegis.lastEventId(eventName) from web SDK 1.9.0. Used by tenants that also run Meta's App Events SDK / Pixel client-side and need to pass the SAME event_id for client + server dedup.

    Pinned by libs/mobile-sdk/tests/drift/meta-pixel-companion-contract.json.

    _fbp / _fbc cookie equivalents — Phase 4 sets up the in-memory cache; full persistence (SharedPreferences) + fbclid extraction from deep links lands in Phase 4.5.

    • Method Summary

      Modifier and Type Method Description
      final Unit recordEvent(String eventName, String messageId) Record the messageId of the most recent track(eventName) call.
      final String lastEventId(String eventName) Returns the messageId of the most recent track(<eventName>) call, or null if none has been tracked since SDK init.
      final String generateFbp() Generate a stable _fbp cookie value if not already present.
      final Unit reset() Reset — called by Aegis.reset().
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • recordEvent

         final Unit recordEvent(String eventName, String messageId)

        Record the messageId of the most recent track(eventName) call.

      • lastEventId

         final String lastEventId(String eventName)

        Returns the messageId of the most recent track(<eventName>) call, or null if none has been tracked since SDK init.

      • generateFbp

         final String generateFbp()

        Generate a stable _fbp cookie value if not already present. Mirrors libs/web-sdk meta-cookies.ts shape: fb.<subdomain_index>.<creation_ms>.<random>.

        Phase 4 returns the value but does NOT persist; persistence is Phase 4.5 once a SharedPreferences-backed store lands.

      • reset

         final Unit reset()

        Reset — called by Aegis.reset().