Set up Google AdSense in XenVn add-on

Set up Google AdSense in XenVn add-on

Set up Google AdSense in XenVn add-on.webp


Instructions to set up delay loading Google AdSense in XenVn add-on. Only loads ads when the user scrolls or clicks the mouse, combined with a smart ad blocker detector. Deferring ads will help your site load faster. The PageSpeed Insights score will be higher.
(Hướng dẫn thiết lập trì hoãn tải Google AdSense trong XenVn add-on. Chỉ tải quảng cáo khi người dùng cuộn trang hoặc click chuột, kết hợp trình phát hiện chặn quảng cáo thông minh. Việc trì hoãn tải quảng cáo sẽ giúp trang web của bạn tải nhanh hơn. Điểm số PageSpeed Insights sẽ cao hơn.)

Step 1. Go to https://www.google.com/adsense/ and set up your ad code. For example the image below:
(Bước 1. Truy cập trang https://www.google.com/adsense/ và thiết lập mã quảng cáo của bạn. Ví dụ như hình bên dưới.)
Set up Google AdSense in XenVn add-on-1.webp

For example your code is:
(Ví dụ đoạn code của bạn)
JAVASCRIPT:
You must log in to view content
(12 lines)

Step 2. Go to AdminCP -> XenVn -> Setting -> AddCode
(Bước 2. Truy cập AdminCP -> XenVn -> Setting -> AddCode)
Set up Google AdSense in XenVn add-on-2.webp

The JS Delay Load field fills in the code like below. This code is taken from your Google AdSense code. Replace xxxxx with your code.
(Mục JS Delay Load điền vào đoạn mã như bên dưới. Đoạn code này được lấy trong mã Google AdSense của bạn. Thay thế xxxxx bằng mã của bạn.)
JAVASCRIPT:
You must log in to view content
(1 lines)

Fields AD1 and AD2 fill in the code as shown below. XenVn add-on allows you to add 2 different Google AdSense codes. This code is taken from your Google AdSense code. Replace xxxx, yyyyy with your code.
(Trường AD1 và AD2 điền vào đoạn mã như bên dưới. XenVn add-on cho phép bạn thêm 2 mã Google AdSense khác nhau. Thay thế xxxxx, yyyyy bằng mã của bạn.)
JAVASCRIPT:
You must log in to view content
(10 lines)

Step 3. Go to AdminCP -> Groups & permissions -> User group permissions. Assign permissions to your user groups, by default, ads will be enabled and ad blocking detector enabled.
(Bước 3. Truy cập AdminCP -> Groups & permissions -> User group permissions. Phân quyền cho các nhóm người dùng của bạn, mặc định là sẽ bật quảng cáo và bật trình phát hiện chặn quảng cáo)

Set up Google AdSense in XenVn add-on-User group permissions.webp


Set the following options:
(Thiết lập các tùy chọn sau)
[XenVn] Forum Permissions (Advertise in forums and threads)
  • Disable auto Ads for forum & redirect page (Select No to display ads)
  • Disable smart ad blocker detection
Resource permissions (Ads on the resource page)
  • [XV] Disable auto Ads for resource & redirect page (Select No to display ads)
  • [XV] Disable smart ad blocker detection
If you want to assign permissions to each Node. Go to AdminCP -> Forums -> Node permissions
(Note that node permissions will override the value of user group permissions)
(Nếu bạn muốn phân quyền cho từng Node. Truy cập AdminCP -> Forums -> Node permissions. Lưu ý phân quyền theo node sẽ ghi đè giá trị phân quyền theo nhóm người dùng)
Read the documentation about permissions here:
https://xenforo.com/docs/xf2/groups-permissions/

Everything is completed. Google AdSense ads appear sooner or later because of Google. Please wait if the ad has not appeared on your page. Changing the ad code frequently will slow down the display of the ad.
(Mọi thứ đã hoàn tất. Quảng cáo Google AdSense xuất hiện sớm hay muộn là do Google. Hãy chờ đợi nếu quảng cáo chưa xuất hiện trên trang của bạn. Việc thay đổi mã quảng cáo thường xuyên sẽ làm chậm hiển thị quảng cáo.)

XenVn add-on will display the following message if an ad blocker is detected.
XenVn add-on sẽ hiển thị thông báo sau nếu như phát hiện trình chặn quảng cáo.

Set up Google AdSense in XenVn add-on-4.webp
 
Last edited:
@xenvn, Please how can i get my adsense approve. been trying to get my adsense approved but it keeps getting rejected
 
Top