# Installing Hubspot Tracking Code in a Next.js v14 App

**URL:** <https://community.hubspot.com/t/installing-hubspot-tracking-code-in-a-next-js-v14-app/96647>\
**Category:** CMS Development\
**Tags:** html\
**Created:** [December 21, 2023, 9:55pm UTC](https://community.hubspot.com/t/installing-hubspot-tracking-code-in-a-next-js-v14-app/96647 "2023-12-21T21:55:47Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![PatOfCle](https://avatars.discourse-cdn.com/v4/letter/p/8baadc/32.png) [@PatOfCle](https://community.hubspot.com/u/PatOfCle)\
**Post date:** [December 23, 2023, 10:19pm UTC](https://community.hubspot.com/t/installing-hubspot-tracking-code-in-a-next-js-v14-app/96647/3 "2023-12-23T22:19:46Z")

</div>

Hi @tverdokhlib1 , yes I did try that. Firstly, that is from the Pages Router under Next.js. Secondly, putting it in the Head component really isn’t any different than putting the script in the top level layout.js file in the App Router.

I believe that there has to be something done on a per-page basis for Next.js SSR, or at the “top level” there has to be some information passed to Hubspot about what page the user is on.

But to answer your question, no the link did not solve my problem. Thank you though.

---

_[View the full topic](https://community.hubspot.com/t/installing-hubspot-tracking-code-in-a-next-js-v14-app/96647)._
