Forum Academy Marketplace Showcase Pricing Features

Integrating an SDK / .php file?

My webapp is having issues with site speed & loading times, and I’ve heard some good things from a couple founders about NitroPack (nitropack.io) working wonders to speed up their sites. However, I have hit a roadblock in trying to connect this with Bubble.

Does anyone know whether or not Bubble can support loading a .PHP file from an SDK? From an email with NitroPack’s CX team: “Since Bubble is a custom platform, the only way to integrate Nitropack would be through our PHP SDK connector. For this to work, Bubble / their server would need to support PHP.”

Here are more details from NitroPack on the integration. If anyone out there has ANY idea how I might be able to connect this .php file to my app, I would be very much obliged!

@alexb
Bubble support html elements for sure.
Try putting your php code in html element and run.

Thanks for the response @tanejachirag19. Appreciate you trying to help.
However, I’m not sure how this would actually work. Mainly because it’s not clear how I would be able to download the NitroPack SDK and “upload it to your site in a directory of your preference” (per the guidelines in the image I included).
Also, I read this post on the Bubble Forum post from @constantingaspar: “What you can do is an API call to your PHP script located somewhere else.”
Do you, or anyone else know how I would be able to either upload an SDK to my webapp, or call and API whenever a user loads a page? (you can see the NitroPack API here)
Truly appreciate any guidance on this.

@alexb
You can call the API on page load.
Go to plugins and install API connector. Setup your API call in this as an action. Initialise this call. Once successfully initialised, you will be able to see it under plugins.
Use this as an action on page load.

@alexb Just curious if you ever got this to work? I’m looking at the same solution to improve the lighthouse scoring on the landing page of a clients site. Any insight would be much appreciated!

@steven5 - I’m still looking for some valid solution to it… have not been able to!
The feedback I got from a development agency was that “Nitropack isn’t going to work because it is developed in another stack entirely and wouldn’t work in Bubble.” Sounds like until Bubble actually supports Nitropack directly, it is not a possible solution.
Deric from @innovetted may be able to provide better insight into the specific technical limitations.
Let me know if you find anything interesting to help with this.