Hey @ninaJoya
Welcome to the community and congrats on your first post! Happy to help!
It is expected behavior that all links, images and buttons open a new tab in your browser. If the linked images are not opening a new tab it could be because you have an extension installed in the browser that is preventing the new tab from opening or something is the browser settings that is interfering. Please check to verify that there are no extensions or settings that would prevent a new tab from opening. The only work around would be what you’ve already shared, to update the HTML source code and add your href link and include a target="blank"
property.
Hope this helps! Thanks again for being part of the community!
Hi @stephen.trumble thank you for your answer!
There is no extension installed, the problem also occurs on my colleaugues devices.
Also there’s no explanation on why the buttons do open in new tabs, but the links on pictures don’t.
My idea was that maybe there is an option or setting in Klaviyo that manages the links globally.
Hello @ninaJoya
Yes, there is a setting in Klaviyo that allows you to open all links in a new tab. Here's how you can do it:
- Go to the email template that you want to edit.
- Click on the button or image that you want to add the link to.
- In the Link field, enter the URL of the page that you want to link to.
- Click on the "Insert" button to add the link to the button or image.
- Click on the button or image again to edit it.
- In the Link field, add the following code to the end of the URL:
?target=_blank
- Click on the "Save" button to save your changes.
This code tells the browser to open the link in a new tab instead of the same tab. By adding this code to the end of all your links, you can ensure that they all open in a new tab.
If you have already added links to your email template and don't want to go through each one and add the code, you can use a find-and-replace tool to add the code to all the links in your email. Just search for all the links in your email and replace them with the same link plus ?target=_blank
at the end.
I hope this helps! Let me know if you have any more questions.
@Lanresdev Thank you so much!
I wonder why I didn’t think of that
@ninaJoya You’re welcome , If you have any issue you can always reach out , will be glad to help
@stephen.trumble
@ninaJoya
@Lanresdev
Hi,
I have mad a popup for collecting emails and added a custom trigger to that form, whenever user clicks on button popup appears popup has email input and button, I have added a url to my button which is a pdf , and the functionality is working fine but i want the file to be opened on new tab
I tried to add ?target=_blank in the end of my url but it is not working
I have included this in my shopify theme,
<div><button class="klaviyo_form_trigger">DOWNLOAD CATALOGUE</button></div>
<script type="text/javascript">
document.querySelector('.klaviyo_form_trigger').addEventListener('click', function (){
window._klOnsite = window._klOnsite || k];
window._klOnsite.push(O'openForm', 'FORMID']);
});
</script>
Kindly help me with this