integrations icon indicating copy to clipboard operation
integrations copied to clipboard

feat: edit HTML source & Google AdSense

Open ShutdownRepo opened this issue 2 years ago • 3 comments

Is there any way we could use integrations to edit the source code and add, for example, blocks in <head></head>, add <script> tags etc. ?

I'm managing an free and open-source project on GitBook, and for that project to live on and keep on evolving, I'd need to have Google AdSense linked to it, so that it stays free for all, but generating revenue that would allow for re-investing for instance. AdSense can be integrated in a website by adding a <script> tag within the <header></header> block (https://support.google.com/adsense/answer/7584263)

ShutdownRepo avatar Jun 16 '23 14:06 ShutdownRepo

Hi @ShutdownRepo,

This is a great feature request - but unfortunately isn't possible at the moment. We don't allow integrations to inject custom JS or CSS, for security reasons. We do have a scope that allows this to be possible for GitBook built and verified integrations at the moment - so for now I'll put this request for us to have a look at in the future.

addisonschultz avatar Jun 19 '23 12:06 addisonschultz

Fair enough. Is there any way an official Google AdSense integration could be made then? Happy to help make it if needed

ShutdownRepo avatar Jun 19 '23 13:06 ShutdownRepo

Hi @ShutdownRepo,

Unfortunately right now the scope required for creating an integration like this is closed for the initial launch of the integration platform. That being said, we do know it's a highly requested feature, so have this high up on our radar for the next iteration(s) of the platform in general. We need to define a few things and figure out a secure and sustainable way to manage these kinds of scopes - and until we have that in place we'll do our best to monitor the requests coming in!

addisonschultz avatar Jun 28 '23 14:06 addisonschultz