This is an example of how to use Google Publisher Tag Ads (GPT Ads) with Next.js.
In this project, I just grab ads from vnexpress.net website as an example. You can change the ads to your own ads.
Create a .env
file in the root directory and add this:
API_RICK_AND_MORTY=https://rickandmortyapi.com/graphql
then run:
yarn
yarn dev