Connecting Xenforo and Adsence

sudais

Well-known member
Registered
Joined
Dec 13, 2022
Messages
55
Points
18

Reputation:

How to add adsence to xenforo
how to place ads.txt in host
where to add adsence code in <head></head>
 

Whjwjw

Member
Registered
Joined
Oct 21, 2022
Messages
5
Points
3

Reputation:

To add Google AdSense to XenForo, you can follow these steps:

1: Log in to your Google AdSense account and create a new ad unit.

2: In your XenForo admin panel, go to Appearance > Templates.

3:Click on the template that you want to add the ad to (for example, the thread_view template).

4:Find the location where you want to place the ad and insert the AdSense code there. You can use the "Insert Ad" button in the editor toolbar to add the ad code.

5: Save the template and repeat the process for any other templates where you want to display ads.
 

Whjwjw

Member
Registered
Joined
Oct 21, 2022
Messages
5
Points
3

Reputation:

To place an ads.txt file on your website host, you can follow these steps:

Create a text file named "ads.txt" on your computer.

Open the file in a text editor (such as Notepad or TextEdit).

Enter the following information in the file:

The domain of the advertising system (e.g. google.com)
Your publisher ID or account ID provided by the advertising system
The type of account (e.g. DIRECT or RESELLER)
(Optional) The certification authority ID (e.g. Trustworthy Accountability Group, or TAG)
Here is an example of what your ads.txt file might look like:
Code:
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

Note that you should replace "pub-0000000000000000" with your actual publisher ID or account ID.

Save the file and upload it to the root directory of your website host. This is typically the directory where your homepage (index.html or index.php) is located.

Verify that the file is accessible by visiting yourdomain com/ads.txt in a web browser. If the file is accessible, you should see the contents of the file displayed in the browser window.

By placing an ads.txt file on your website host, you are helping to prevent unauthorized selling of your ad inventory, and improving transparency for programmatic buyers. It's important to keep your ads.txt file up-to-date and accurate, so be sure to update it whenever you make changes to your ad inventory or partnerships.
 

thomsa

Moderator
Staff member
Moderator
S.V.I.P Member
Collaborate
Registered
Joined
Jun 22, 2019
Messages
1,067
Points
173

Reputation:

Top