Add Google Auto Ads to Discourse via Google Tag Manager

I tried and found the way to add Google Auto Ads to Discourse via Google Tag Manager.

  1. Login to Google Tag Manager: https://tagmanager.google.com/#/home, Choose Workspace

  2. Create a new user defined variable and call it asClientID

  1. Configure the variable as a Constant. The value to enter is your AdSense Client ID

  1. Click on Tags on the left side of the screen within your GTM workspace

  2. Create a new Tag called AS - Page view - ALL

Tag Type: Custom HTML

Copy this code to HTML:

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({
          google_ad_client: "{{asClientID}}",
          enable_page_level_ads: true
     });
</script>

Triggering choose All Pages

Preview and Publish.

  1. Get GTM ID

  1. In Admin → Settings → Search GTM and paste GTM ID, confirm.

You can check in my website at https://babyforex.net.

Hope help you!

6개의 좋아요

아직 작동하나요? 위에서 언급한 모든 단계를 시도해 보았지만, 제 디스코스 사이트(https://www.praja.net/)에서는 성공하지 못했습니다.

다른 해결책이 있을까요?

1개의 좋아요

네, 작동합니다. 어떤 단계를 놓치셨나요?

1개의 좋아요

@Trieu 만약 작동한다면 저도 제 웹사이트에서 시도해 보겠습니다.

이것이 제 웹사이트입니다 longboardpro.com 여기에 지원하고 싶습니다

1개의 좋아요

귀하의 웹사이트는 WordPress CMS를 실행하고 있습니다.