<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-add-facebook-pixel-in-next-js-14-app-router-3poxywnol" -->

---
title: How to Add Facebook Pixel in Next.js 14 App Router
description: Learn how to integrate Facebook Pixel into your Next.js 14 app using the new App Router. The guide includes steps to create a Facebook Pixel, install it using...
canonical: https://daily.dev/posts/how-to-add-facebook-pixel-in-next-js-14-app-router-3poxywnol
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to Add Facebook Pixel in Next.js 14 App Router | daily.dev
og:description: Learn how to integrate Facebook Pixel into your Next.js 14 app using the new App Router. The guide includes steps to create a Facebook Pixel, install it using...
og:url: https://daily.dev/posts/how-to-add-facebook-pixel-in-next-js-14-app-router-3poxywnol
og:image: https://api.daily.dev/og/posts/3POXYwnoL.png
og:image:alt: How to Add Facebook Pixel in Next.js 14 App Router
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Add Facebook Pixel in Next.js 14 App Router

**[Dev Squad](https://daily.dev/sources/devsquad)** · [@dilhanziriwardhana](https://daily.dev/dilhanziriwardhana) · 26 upvotes · 0 comments

## Summary

Learn how to integrate Facebook Pixel into your Next.js 14 app using the new App Router. The guide includes steps to create a Facebook Pixel, install it using Next.js's <Script> component, and verify the installation to enhance your web tracking and marketing strategies.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@dilhancodes/how-to-add-facebook-pixel-in-next-js-14-app-router-a-step-by-step-guide-768166ae74ee>

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#javascript](https://daily.dev/tags/javascript), [#marketing](https://daily.dev/tags/marketing), [#nextjs](https://daily.dev/tags/nextjs)

[View this post on daily.dev](https://daily.dev/posts/how-to-add-facebook-pixel-in-next-js-14-app-router-3poxywnol)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/how-to-add-facebook-pixel-in-next-js-14-app-router-3poxywnol","headline":"How to Add Facebook Pixel in Next.js 14 App Router","text":"Shared: How to Add Facebook Pixel in Next.js 14 App Router: A Step-by-Step Guide","url":"https://daily.dev/posts/how-to-add-facebook-pixel-in-next-js-14-app-router-3poxywnol","datePublished":"2024-08-01T02:42:54.905Z","dateModified":"2024-08-01T02:43:27.936Z","author":{"@type":"Person","name":"Dilhan Ziriwardhana","url":"https://daily.dev/dilhanziriwardhana","image":"https://media.daily.dev/image/upload/s--kOYZr_C8--/f_auto/v1715874042/avatars/avatar_4EX1iI2mbZY2AZutl3BOD","description":"Building high-converting websites & Search Engine Optimization. https://webdevelopment.lk","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":570}},"image":"https://media.daily.dev/image/upload/s--1KxV4ohY--/f_auto/v1722860400/public/Placeholder%2007","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":26},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"sharedContent":{"@type":"WebPage","url":"https://api.daily.dev/r/sUJX0Mkeh"},"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/devsquad","name":"Dev Squad"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Dev Squad","item":"https://daily.dev/squads/devsquad"},{"@type":"ListItem","position":3,"name":"How to Add Facebook Pixel in Next.js 14 App Router"}]}
```

