Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/buikhacnam/nextjs-google-publisher-tag-ads
just try to display Ads in Next.js website with Google publisher tag
https://github.com/buikhacnam/nextjs-google-publisher-tag-ads
ads google-ads google-publisher-tag nextjs
Last synced: 13 days ago
JSON representation
just try to display Ads in Next.js website with Google publisher tag
- Host: GitHub
- URL: https://github.com/buikhacnam/nextjs-google-publisher-tag-ads
- Owner: buikhacnam
- License: mit
- Created: 2023-08-06T09:12:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-06T09:39:29.000Z (over 1 year ago)
- Last Synced: 2024-11-06T06:37:43.011Z (2 months ago)
- Topics: ads, google-ads, google-publisher-tag, nextjs
- Language: TypeScript
- Homepage:
- Size: 3.16 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Next.js - Google Publisher Tag Ads (GPT Ads) Example
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](https://vnexpress.net/) website as an example. You can change the ads to your own ads.
### Run locally
Create a `.env` file in the root directory and add this:
```
API_RICK_AND_MORTY=https://rickandmortyapi.com/graphql
```
then run:
```bash
yarn
yarn dev
```
### Reference
- [Google Publisher Tag Ads](https://developers.google.com/publisher-tag/guides/get-started)
- [Google Publisher Tag Ads in Next.js Single Page Application Case Study](https://www.monterail.com/blog/gpt-ads-in-spa-next.js?utm_medium=social&utm_source=facebook&utm_campaign=development)