In order to inject AdSense snippet into your Gatsby/React app which is deployed using Netlify follow the below process.
Site Settings-> and then on
Build and Deploy(in the left pane)
Scroll down and find
Snippet Injectionand then add on click snippet.
![SnippetInjection](../screenshots/Screen-shot-2020-04-16 at 3.02.49 PM.png "Snippet Injection")
- Select the tag from dropdown where you want to insert the script. In our case we'll select
Insert before </head>. Then give the name
AdSense(you can give any name you like). Finally, paste the link HTML script which you get from
HTML text field. Click on Save.
The process of adding AdSense snippet usually takes a few days, but in some cases, it can take up to 2 weeks. Google will notify you when everything's ready.
You've successfully injected Google Adsense into Gatsby/React app.
This has worked great for me, and I personally really like this feature. Especially, for site generator like Gatsby which doesn't include a default index.html file where you can include your scripts.
💌 If you’d like to receive more tutorials in your inbox, you can sign up for the newsletter here.