I would like to replicate what happens when you click the "Coupon Code" button on this website - https://couponfollow.com/. What I see that happens is that the tab that I am on it's been redirected to a new URL (of the store) while a new tab opens with a pop-up modal. I can do either one or the other, but I am not sure how I can accomplish both actions. Do you have any recommendations for this?
document.addEventListener('click', function(){
window.location = 'https://google.com'; // current tab
window.open('https://google.de', '_blank').focus(); // new tab
});