Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

214
Views
Async script in React/Next js not running/showing up

I'm trying to add Amazon Native Shopping ads to my website, but the ad never shows up. Their code looks like this:

<div id="amzn-assoc-ad-944106c8-19e7-4323-aa3f-71c0cef0998b"></div>
<script async src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=944106c8-19e7-4323-aa3f-71c0cef0998b"></script>

So far I've tried both adding the script with the Nextjs <Script>, adding the <script> inside the Nextjs <Head>, as well as creating the script in a useEffect hook like this:

  useEffect(() => {
    const script = document.createElement("script");

    script.src =
      "//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=944106c8-19e7-4323-aa3f-71c0cef0998b";
    script.async = true;

    document.body.appendChild(script);
  }, []);

They also offer a synchronous script, but this one always shows at the bottom of the page.

Anyone

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!