I already have a Create React App (CRA) application working as a Single Page Application (SPA). The app is connected to an API created on Nest.js. The two parts are developed with Typescript in separate repos and hosted as completely different apps.
Now, when I’ve got some traffic on the app I would like to enable Google Ads and the issue is that I’m not able to pass a verification. It says something like
Google-served ads on screens without publisher-content
which seems to be because my app is working as an SPA. This is the app if you would like to check it out https://beastwot.com
Google Adsense verification error
So, the verification passing is the main goal and I’m looking for a way to refactor the app to have a sort of Server Side Rendering (SSR) or at least a prerendering mode.
I have tried a couple of Webpack configurations and some NPM packages but I’ve realized that the whole approach might be wrong or at least I can’t understand the idea.
In my understanding, the SSR means that a server responds with a different HTML for different pages. But the app is using a client routing which also changes URL supporting browser back and forth, but does not communicate to a server for this. So how it would work then?
The next thing is that even with the prerendering I should take the fact that most of the app page content is built after the API data fetching and without the step the pages look like skeletons without many of data. So will the prerendering help to pass the Google Ads verification then?
Now it looks like the proper SSR would be if I migrate to Next.js. I have no experience working with the framework and the question is what would be the easiest way to transfer the app from CRA to Next.js? Another one is does Next.js supports a type of app when API is not integrated into it and is a completely different application?
But also I would love to hear your thoughts on the case because honestly, the steps like migrating to Next.js sound a bit weird taking into account the goal – Google Ads verification. Maybe there are some easier and more convenient ways?