gitwtfhub

wtf is nextjs-appdir-embed-testing?

gaearon/nextjs-appdir-embed-testing — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2023-02-01

5Audience · developerComplexity · 2/5DormantSetup · easy

TL;DR

A minimal example showing how to correctly embed third-party HTML and JavaScript widgets, like analytics or chat scripts, into a Next.js 13 app directory project.

Mindmap

mindmap
  root((repo))
    What it does
      Shows embed patterns
      Uses page and head files
      Minimal recipe not an app
    Tech stack
      Next.js
      TypeScript
      App directory
    Use cases
      Add analytics scripts
      Embed chat widgets
      Add payment buttons
    Audience
      Next.js developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Embed a third-party analytics script like Google Analytics into a Next.js 13 app directory project

REASON 2

Add a chat widget such as Intercom or Drift without breaking the app's rendering

REASON 3

Learn the correct pattern for placing custom scripts in page.tsx versus head.tsx

What's in the stack?

Next.jsTypeScript

How it stacks up

gaearon/nextjs-appdir-embed-testing00kaku/wp-rest-playground1ncendium/aibuster
Stars555
LanguageJavaScriptPython
Last pushed2023-02-01
MaintenanceDormant
Setup difficultyeasyhardmoderate
Complexity2/53/53/5
Audiencedeveloperdeveloperops devops

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Yoink these prompts

Prompt 1
Show me how to embed a Google Analytics script into a Next.js 13 app using the app directory structure
Prompt 2
Add an Intercom chat widget to my Next.js page following this repo's pattern
Prompt 3
Explain the difference between putting embed code in page.tsx versus head.tsx in Next.js 13

Frequently asked questions

wtf is nextjs-appdir-embed-testing?

A minimal example showing how to correctly embed third-party HTML and JavaScript widgets, like analytics or chat scripts, into a Next.js 13 app directory project.

Is nextjs-appdir-embed-testing actively maintained?

Dormant — no commits in 2+ years (last push 2023-02-01).

How hard is nextjs-appdir-embed-testing to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is nextjs-appdir-embed-testing for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.