External link in workflow to open new tab

I’ve recently been playing around with buttons and links and I’m really trying to keep the styling but also add in Mixpanel analytics.

As you can’t add analytics to links and only to buttons, is there any way to open the external website from the workflow tab in a new window?

I’ve tried using an HTML block to make it look like a button but it doesn’t allow me to keep the font I need for consistency.

Thanks!

2 Likes

See this

Oh, I see. Thanks.

And I’m guessing there isnt a way to add a workflow to a link either? I’ts a pretty important part of the analytics. Are there any workarounds?

If you search the forum you’ll see some options. if that’s a big issue we can look into adding mixpanel’s functionality on links on a sponsored basis, but it does slow things down, since Mixpanel will force the page to wait 300ms before changing the page or opening a link.

2 Likes

Is there no way to open a new tab when an external link is opened? If I add a path description (Link to Google maps) users have to bounce from my website?

3 Likes

If you’re using a “link” object, you will be fine. “Link” objects can be opened in a new tab, but objects that are not of type “link” don’t have that functionality. The reasoning is in the documentation, here: https://bubble.io/reference#Actions.OpenURL

2 Likes

You can make the link object look a bit like a button, so not have any text and set a background colour.

or you can use “show an icon instead of text” on the link and have a big … icon.

6 Likes

@Nigel thats what I did now. Fake the button :). Thanks a lot!

1 Like

After seeing the post that you have to use the link function, I just put a box link around (I’m using a repeating group with products and each cell is a button to link to external site) the entire cell/inside the cell and as the item on top. So you don’t see it but when you click in the space you’re clicking the link and takes you to where I want.

2 Likes

I’m running into this problem as well. My issue is that I need to trigger the button press to:

  1. Add a row to a database with information from the current page
  2. Send the user to an external site (hopefully in a new tab)

With the “box link” solution, it seems the link can’t also trigger a workflow. Is there a way to make a link element trigger a workflow, or achieve a similar result?

2 Likes

Hi Issac, you can open an external website using the js toolbox plugin, you just run window.open("") in the “run javascript” plugin section, in the workflow, after installing the tooklbox plugin

31 Likes

Thank you Daniel! Amazing solution, worked for me.

1 Like

For me work it:
window.open(“https://yourwebsite.com”)

3 Likes

Can you send data to a page this way as well?

You can include parameters in the url, that’s about the only way I can imagine.

1 Like

I’m having trouble with this solution, where do I put the javascript?

Nm, I got it:

  • Install plugin called “Toolbox”
  • Start your workflow, where you would enter ‘navigate to external website’ as the action
  • instead, go to ‘plugins -> run javascript’ and make that the action, using window.open script
  • bingo
7 Likes

Here’s how I solved it:

My issue: I was trying to link an image (logo) and then have it open to logo’s website in new tab.

  • Uploaded Logo as image
  • Created a link and made the link element a box that sits on top of the logo image

Then in property editor:

  • Appearence: leave this empty
  • Link destination: external
  • Destination url:

https://whateveryourwebsiteis.com

  • Open in new tab: Check

All Set.

1 Like

Would be great if this became a native option for all elements… its a small thing and been talked about alot. I know we have links… but still don’t ask don’t get :slight_smile:

1 Like

Is it SEO friendly to do this? Actual link is empty, so google may not like it?

Thanks, Daniel! This is way better than solutions in other forums I was seeing.