Sql Server Replication - Modify Statement Delivery Stored Procedures before the replication starts
From docs:


  Default and custom stored procedures 
  
  The three procedures that
  replication creates by default for each table article are:
  
  sp_MSins_&lt; tablename >, which handles inserts.
  
  sp_MSupd_&lt; tablename >, which handles updates.
  
  sp_MSdel_&lt; tablename >, which handles deletes.
  
  The  used in the procedure depends on how the article was
  added to the publication and whether the subscription database
  contains a table of the same name with a different owner.
  
  Any of these procedures can be replaced with a custom procedure that
  you specify when adding an article to a publication. Custom procedures
  are used if an application requires custom logic, such as inserting
  data into an audit table when a row is updated at a Subscriber. For
  more information about specifying custom stored procedures, see the
  how to topics listed above.


Default and custom stored procedures

So you create the custom stored procedures in the subscriber database and configure the article to use them in sp_addarticle.