Guest User

Untitled

a guest
Oct 23rd, 2019
91
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script runat="server">
  2. Platform.Load("Core","1.1.1");
  3.  
  4. var subkey = Attribute.GetValue("_subscriberkey");
  5. var jid = Attribute.GetValue("jobid");
  6. var lid = Attribute.GetValue("listid");
  7. var bid = Attribute.GetValue("_JobSubscriberBatchID");
  8. var prox = new Script.Util.WSProxy();
  9.  
  10. var props = [
  11. { Name: "SubscriberKey", Value: subkey },
  12. { Name: "JobID", Value: jid },
  13. { Name: "ListID", Value: lid },
  14. { Name: "BatchID", Value: bid },
  15. { Name: "Reason", Value: "WSProxy one click unsubscribe" }
  16. ];
  17.  
  18. try{
  19. var data = prox.execute(props, "LogUnsubEvent");
  20. Write(Stringify(data));
  21. }catch(e){
  22. Write(Stringify(e));
  23. }
  24. </script>
RAW Paste Data