Trigger email on click a link in react application | Community
Skip to main content
Level 2
Apr 13, 2020 4:49 PM UTC
Question

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.

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
Apr 13, 2020 6:39 PM UTC

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:

Translate