If you take a look in
/App_Config/Sitecore/FederatedExperienceManager/Sitecore.FXM.config you can see all of the processors that are called for <tracking.triggerpageevent>
<processor type="Sitecore.FXM.Pipelines.Tracking.TriggerPageEvent.RunInitializeTrackingContextProcessor, Sitecore.FXM" resolve="true" />
<processor type="Sitecore.FXM.Pipelines.Tracking.TriggerPageEvent.ResolveCurrentPageContext, Sitecore.FXM" />
<processor type="Sitecore.FXM.Pipelines.Tracking.TriggerPageEvent.TriggerEventsProcessor, Sitecore.FXM" resolve="true" />
<processor type="Sitecore.FXM.Pipelines.Tracking.AfterEvent.CleanupAnalyticsCookieInResponseProcessor, Sitecore.FXM" resolve="true" />
You could create your own custom processor which extends sitecore's TriggerEventProcessor and overwrite the TriggerPageEvent. Use dotpeek for example to see the existing implementation of Sitecore.FXM.Pipelines.Tracking.TriggerPageEvent.TriggerEventsProcessor. Make sure to also register the custom processor class in the config file by using patching.
A similar approach can be seen for an older sitecore version https://reyrahadian.com/2016/07/26/sitecore-8-how-to-update-contact-through-fxm-api/