title: Google Ads in Electron?
body: <p>I'm writing an Electron app that I'd like to place Google ads in, but I'm not sure how to correctly do it.</p>
  
  <p>I've created my ad snippet and put it in my app. The default snippet uses <code>//googleads.g.doubleclick.net ...</code> as the URL for the adsbygoogle.js file, so I had to change that to <code>https://googleads.g.doubleclick.net ...</code> because the Electron app uses <code>file:///</code> to load the index page.</p>
  
  <p>But after doing that, the adsbygoogle.js file throws up a 400 error which is strange.</p>
  
  <p>And on top of that, I'm not sure how to handle a user clicking on ads. To get the link to my website working, I had to create a link that pointed to <code>javascript:shell.openExternal('https://example.com')</code>, but I'm not sure how to do that with external ads.</p>
  
  <p>So how can I put ads in my Electron app?</p>