# Hubspot tracking code on Next.js v12

**URL:** <https://community.hubspot.com/t/hubspot-tracking-code-on-next-js-v12/107406>\
**Category:** APIs & Integrations\
**Tags:** free\
**Created:** [May 17, 2024, 9:28am UTC](https://community.hubspot.com/t/hubspot-tracking-code-on-next-js-v12/107406 "2024-05-17T09:28:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASELLAMI](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@ASELLAMI](https://community.hubspot.com/u/ASELLAMI)\
**Post date:** [May 17, 2024, 9:28am UTC](https://community.hubspot.com/t/hubspot-tracking-code-on-next-js-v12/107406/1 "2024-05-17T09:28:43Z")

</div>

Hello HubSpot Community,

I’m new to HubSpot and currently working on a project using Next.js version 12. I need some guidance on how to add the HubSpot tracking code to my Next.js application to track visitors and page views.Is there a step-by-step guide or any best practices for integrating the HubSpot tracking code in a Next.js v12 project?

Any help would be greatly appreciated!

Thank you!

---

<div class="post-metadata">

**Author:** ![Teun](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/teun/32/28739_2.png) [@Teun](https://community.hubspot.com/u/Teun)\
**Post date:** [May 24, 2024, 8:17pm UTC](https://community.hubspot.com/t/hubspot-tracking-code-on-next-js-v12/107406/2 "2024-05-24T20:17:57Z")

</div>

Hi @ASELLAMI ,

I think you are looking for instructions on how to [track single page applications](https://developers.hubspot.com/docs/api/events/tracking-code#tracking-in-single-page-applications).
