Trigger email on click a link in react application | Community
Skip to main content
Level 2
April 13, 2020
Question

Trigger email on click a link in react application

  • April 13, 2020
  • 1 reply
  • 1982 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
April 13, 2020

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: