Trigger email on click of a link in webpage using campaign
Hi Experts,
I have injected munchkins js in my webpage using following code:
<script type="text/javascript">
(function() {
var didInit = false;
function initMunchkin() {
if(didInit === false) {
didInit = true;
Munchkin.init('token-AAA');
}
}
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src='//munchkin.marketo.net/munchkin.js';
s.onreadystatechange = function() {
if (this.readyState == 'complete' || this.readyState == 'loaded') {
initMunchkin();
}
};
s.onload = initMunchkin;
document.getElementsByTagName('head')[0].appendChild(s);
document.onclick = function(event) {
event = event || window.event; // IE specials
var target = event.target;
if(target.nodeName === "A") {
var urlThatWasClicked = 'https://console.someurl.com/dashboard';
Munchkin.munchkinFunction("visitWebPage", {
url : urlThatWasClicked
});
}
};
})();
</script>
On Click of the link, I want to send email using campaign.
I created a campaign and following is the smart list configuration:
and following is the flow configuration:

In the scheduled tab I have activated the campaign.
Now as soon I link on the link in my webpage, email should be sent to the email ID specified in "To Other Emails" but it's not working. Am I missing anything here?
Really appreciate your inputs on this.