#Making custom widgets global

68 messages · Page 1 of 1 (latest)

rain venture
#

Hello I am building a WhatsApp floating button, but the thing is it's not global so it's not appearing on all site pages. And it's being movable on editor but when published it stays in it's position. Some help on how to make the button global and making it not movable in the editor without dashboard or make it not appear in editor at all.

I am using wix blocks to create this app.

digital atlas
#

Hi,

You should use an Embedded Script for this type of functionality and not Wix Blocks.

https://dev.wix.com/docs/build-apps/develop-your-app/extensions/site-extensions/embedded-scripts/about-embedded-scripts

rain venture
digital atlas
rain venture
#

I have also noticed all other apps automatically navigate to dashboard on install.

#

But even when i have configured to navigate to dashboard on install on my custom apps it doesnt navigate.

digital atlas
#

It depends on the extensions, so if you still have a block extension that needs to be added in the editor it may try going to the editor.

Try using the template and see the code it contains and how it's built and if it fits what you are looking for.

We also have a self hosted option if you don't want to use Wix CLI and hosting, but we don't have a template for it.

rain venture
#

but this is an another app not related to this thread

#

its a that uses youtube links to show video on the gallery

#

i am having another issue where when i click configure it shows this

rain venture
digital atlas
rain venture
digital atlas
#

You add an embedded script extension and add your externally hosted script there.

You can see the article about it here:
https://dev.wix.com/docs/build-apps/develop-your-app/extensions/site-extensions/embedded-scripts/about-embedded-scripts

#
  id="my-script"
  src="https://cdn.example.com/pixel.js?id={{KeyName123}}"
  async="true"
></script>;```
rain venture
rain venture
#

@digital atlas I have looked in to the embeded script using the doucmentation and videos by the wix wiz.

#

He has also developed an app but even he isnt able to make the application appear in all site pages without placing the application created in the header or footer.

#

There is a feature of embeding on all site using custom code in wix premium site but in application i havent seen the option to make it appear on all site even when using the embedded script.

digital atlas
#

Hi @rain venture,

I am not sure which video you watched but Embedded Scripts do not appear at all in the Wix Editor, only on the live website.

When you configure them you can and should in this case set them to appear in the <head> tag and to appear on all pages.

If you look at the Wix App Market and search for similar WhatsApp button apps you will see this is how they work.

rain venture
# digital atlas Hi <@534410356987002920>, I am not sure which video you watched but Embedded Sc...

#Wix #Preloader #WebPerformance #WixVelo #WixWebsite

Get it as an app: https://www.wix.com/app-market/web-solution/d1fccefa-cbdd-48af-8d48-655daaf50d51?utm_source=youtube&utm_medium=video_description

🎥 What’s in This Video
In this video, I’ll walk you through how to add a fully custom preloader to your Wix website — one that dynamic...

â–¶ Play video
#

this is the video i watched

#

he used custom element in the video

#

do you mean this script that doesnt appear on all site pages?

digital atlas
#

Custom Element is different, in your second image you can see two options. The second being Embedded Script.

rain venture
digital atlas
#

Correct

rain venture
# digital atlas Correct

So using that will make sure the element that i have built is embeded on to all the site pages?

digital atlas
#

Yes that

rain venture
digital atlas
rain venture
#

But i want to make an application so it can be used on multiple sites.

#

Instead of hardcoding it on the website, i want to create an application that does that.

digital atlas
#

That's fine just note it requires a lot more setup, such as doing OAuth and API calls to inject it.

https://dev.wix.com/docs/build-apps/develop-your-app/extensions/site-extensions/embedded-scripts/about-embedded-scripts

rain venture
#

Is there a built in api that does that

#

in wix

digital atlas
#

It's all detailed in the link I sent

rain venture
#

Sure thanks, i will look into it.

rain venture
#

@digital atlas Hello, I have successfully injected the code in my site using blocks.

#

But i was wondering if i can listen to the app install event from within the blocks instead of the webhooks.

#

If i cant listen to the app install event from within the blocks and have to use webhooks i have to host the backend code and the script code both?

digital atlas
#

Hi,

Yes you will have to host it yourself unless you use Wix CLI and then we do the hosting for you.

rain venture
#

So if I use wix cli, you guys would host both the backend and the script?

digital atlas
#
#

I'd personally make a new app instead of trying to hook it into your existing one

rain venture
#

So wix cli hosts the script itself and the backend code

#

if thats the case

#

i am going to try the wix cli

#

Thanks for the help!

digital atlas
#

Also not sure if you use AI or not, but if you do - be sure to hook in the Wix MCP for best results.

https://dev.wix.com/docs/api-reference/articles/wix-mcp/about-the-wix-mcp

rain venture
#

I also saw that MCP can be configured later if needed. So, i think i shouldnt have issue in future if i wanted to integrate the ai part.

rain venture
#

@digital atlas I can see that the wix hosts the embedded script but i cant seem to find the event of the app being installled on wix cli.

#

Is that something that cant be handled from within the app and i have to use the webhook and host the backend by myself?

digital atlas
#

I suggest opening a new thread for this topic 🙂

rain venture
digital atlas
#

Yes because I am on vacation, I will not be answering here so it will not be seen.

rain venture
#

@digital atlas