# Lazy loading script with nextjs

**URL:** <https://community.piwik.pro/t/lazy-loading-script-with-nextjs/3336>\
**Category:** API & integrations\
**Created:** [December 7, 2023, 4:11pm UTC](https://community.piwik.pro/t/lazy-loading-script-with-nextjs/3336 "2023-12-07T16:11:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LTS22](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/lts22/32/2755_2.png) [@LTS22](https://community.piwik.pro/u/LTS22)\
**Post date:** [December 7, 2023, 4:11pm UTC](https://community.piwik.pro/t/lazy-loading-script-with-nextjs/3336/1 "2023-12-07T16:11:50Z")

</div>

Hello,  
I’ve recently implemented Piwik PRO on my nextjs App, its working really well but sometime in google lighthouse, piwik is causing Total Blocking Time to be quite high.  
I was wondering if i could delay the script injection with the nextjs library or if i need to do it manually.  
Thanks in advance,  
Léo

---

<div class="post-metadata">

**Author:** ![Oliwer\_Kaczmarek](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/oliwer_kaczmarek/32/3888_2.png) [@Oliwer\_Kaczmarek](https://community.piwik.pro/u/Oliwer_Kaczmarek)\
**Post date:** [December 11, 2023, 8:14am UTC](https://community.piwik.pro/t/lazy-loading-script-with-nextjs/3336/2 "2023-12-11T08:14:58Z")

</div>

Hi @LTS22,

Welcome to our community!

As of right now manually, but I’ll create a Feature Request for this capability.

Best,  
Oliwer

---

<div class="post-metadata">

**Author:** ![Oliwer\_Kaczmarek](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/oliwer_kaczmarek/32/3888_2.png) [@Oliwer\_Kaczmarek](https://community.piwik.pro/u/Oliwer_Kaczmarek)\
**Post date:** [December 11, 2023, 12:32pm UTC](https://community.piwik.pro/t/lazy-loading-script-with-nextjs/3336/3 "2023-12-11T12:32:52Z")

</div>

@LTS22,

Also you mean delaying JSTC or tag manager itself?

Best,  
Oliwer
