Next.js Discord

Discord Forum
In the documentation it only says to add src=\"Api/apiV2.js\" but, talking to the director I got this: The widget is formatted to work on the subdomain that you created, possibly hero.jipivibes.comIt won't appear on the staging environment.I tried pnpm start insteaf of dev but nothing. The thing is, the iframe rectangle shows up on the page [https://jpv-landing-mchdoo-mchdoos-projects.vercel.app/tours/k-gari-experience-tour-illumina-private-single] but nothing more than a gray border is visible. The console does sometimes display a 404 for the src of the API sometimes. Maybe I could solve this with server actions? Help. And Thank you.","dateCreated":"2025-01-06T17:20:38.985Z","answerCount":0,"author":{"@type":"Person","name":"Dusky-capped Flycatcher"}}}

Getting 3rd Party Script to Work on the Server

Unanswered
Dusky-capped Flycatcher posted this in #help-forum
Open in Discord
Dusky-capped FlycatcherOP
Hey all. I'm currently working on a website for tour booking, working together with Hero Travel. They've provided a widget (wich they've charged 1k for. So I pretty much need this to work) that handles all the booking and payment functionality on their side.
In their documentations, they say I have to add a <script> to the <head> of my HTML to get the iframe to work. So, in my root layout i added this.
<Script src="https://hero.jipivibes.com/Api/apiV2.js" strategy="beforeInteractive"></Script>

In the documentation it only says to add src="Api/apiV2.js" but, talking to the director I got this:

The widget is formatted to work on the subdomain that you created, possibly hero.jipivibes.com

It won't appear on the staging environment.

I tried pnpm start insteaf of dev but nothing.

The thing is, the iframe rectangle shows up on the page [https://jpv-landing-mchdoo-mchdoos-projects.vercel.app/tours/k-gari-experience-tour-illumina-private-single] but nothing more than a gray border is visible.

The console does sometimes display a 404 for the src of the API sometimes.

Maybe I could solve this with server actions?

Help.

And Thank you.

0 Replies