# Help enabling a hidden site setting

**URL:** https://meta.discourse.org/t/help-enabling-a-hidden-site-setting/401011
**Category:** Support
**Tags:** advertising
**Created:** [April 20, 2026, 12:03am UTC](https://meta.discourse.org/t/help-enabling-a-hidden-site-setting/401011 "2026-04-20T00:03:16Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![patrickemin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickemin/32/520162_2.png) [@patrickemin](https://meta.discourse.org/u/patrickemin)
#### Post date: [April 20, 2026, 12:03am UTC](https://meta.discourse.org/t/help-enabling-a-hidden-site-setting/401011/1 "2026-04-20T00:03:16Z")

</div>

Hi, trying to setup Adsense, cannot find that setting: `ad_platform_through_trust_level`

Thanks.

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [April 20, 2026, 1:01am UTC](https://meta.discourse.org/t/help-enabling-a-hidden-site-setting/401011/2 "2026-04-20T01:01:01Z")

</div>

> [@patrickemin](#):
>
> Adsense, cannot find that setting: `ad_platform_through_trust_level`

this is a hidden setting with default `trust_level_2`:

> <https://github.com/discourse/discourse/blob/dc65289cd59f79c50e23e86f13b20032a0f03a74/plugins/discourse-adplugin/config/settings.yml#L53-L57>

to enable it, see here:

> [@Using Hidden Site Settings](https://meta.discourse.org/t/using-hidden-site-settings/308773/1):
>
> ## How to Edit Hidden Site Settings
> 
> ### Option 1: Rails Console
> 
> To modify hidden site settings, you typically need to use the Rails console, a command line tool that allows you to interact directly with the backend of your Discourse installation. To adjust settings via the rails console you can follow these steps:
> 
> 1. **Access the Rails Console** :
> 
> ```plaintext
> cd /var/discourse
> ./launcher enter app
> rails c
> 
> ```
> 
> 1. **Change a Setting** :
> 
> ```plaintext
> SiteSetting.your_setting_name = new_value
> 
> ```
> 
> Replace `your_setting_name` with the name of the setting you want to modify, and `new_value` with the value you want to set.
> 
> 1. **Exit the Console** :
> 
> ```plaintext
> exit
> 
> ```

i think you need to do something like this, say if you want to set it to `trust_level_3` for example:

```rails
cd /var/discourse
./launcher enter app
rails c

```

```rails
SiteSetting.adsense_through_trust_level = 3

```

```rails
exit

```

---

<div class="post-metadata">

### Author: ![patrickemin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickemin/32/520162_2.png) [@patrickemin](https://meta.discourse.org/u/patrickemin)
#### Post date: [April 20, 2026, 1:46am UTC](https://meta.discourse.org/t/help-enabling-a-hidden-site-setting/401011/3 "2026-04-20T01:46:03Z")

</div>

Thanks but typing `exit` does nothing.

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [April 20, 2026, 2:08am UTC](https://meta.discourse.org/t/help-enabling-a-hidden-site-setting/401011/4 "2026-04-20T02:08:44Z")

</div>

does it not exit you out of the rails console? is this a [standard install](https://meta.discourse.org/t/142537?silent=true)?

```plaintext
root@forum:~# cd /var/discourse
root@forum:/var/discourse# ./launcher enter app
x86_64 arch detected.
WARNING: This output is designed for human readability. For machine-readable output, please use --format.
root@forum-app:/var/www/discourse# rails c
Loading production environment (Rails 8.0.5)
discourse(prod)> SiteSetting.adsense_through_trust_level = 1
=> 1
discourse(prod)> exit
root@forum-app:/var/www/discourse# 

```

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/0/7/20747a382560761f1ca2ae682a7b7cd63c95026d.png)

---

<div class="post-metadata">

### Author: ![patrickemin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickemin/32/520162_2.png) [@patrickemin](https://meta.discourse.org/u/patrickemin)
#### Post date: [April 20, 2026, 2:58am UTC](https://meta.discourse.org/t/help-enabling-a-hidden-site-setting/401011/5 "2026-04-20T02:58:16Z")

</div>

Worked this time, I must had extra spaces before…

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [May 20, 2026, 2:59am UTC](https://meta.discourse.org/t/help-enabling-a-hidden-site-setting/401011/6 "2026-05-20T02:59:08Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
