Re: Trigger email on click a link in react application

saurabhmehta13
Level 2

Trigger email on click a link in react application

Hi Experts, 
I have react application where my requirement is to trigger emails from marketo when user clicks on a particular link on a particular webpage in my app.
I have integrated munchkins js in my webapp but I am not getting details on how can I trigger marketo email when user clicks on a link in my app. 
Appreciate your inputs.

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Trigger email on click a link in react application

Attach a Munchkin synthetic Visit Web Page to the link.

 

someLink.addEventListener("click", function(e){
  Munchkin.munchkinFunction("visitWebPage", {
    url : "https://example.com/path/to/app/function",
    params : "?fnparams=areoptional"
  });
});

 

You use visitWebPage instead of the literal clickLink because the latter is blocking.

 

You should also read these posts: