Google Adsense Policy Violations - ads are showing on login page?

BassMan

Well-known member
Hi,

like said in the title, I'm getting Google Adsense Policy Violations for mydomain.com/login page (Valuable Inventory: No content ; Restricted ad serving).

I don't have ads on my login page (I don't see any), I prevent ads showing in login template in XF options and extra with a conditional statement. I use route filter from login/ to something/ (using XF2).

I've changed some things and request a new review a few times, but I keep getting violations.

Not sure what else to do and I'm wondering if anyone knows what it could be.

Thank you.

BassMan


EDIT: wondering if it could be something with Vignette or Anchor ads I have for mobile, but still, if I go on mobile I don't see any ads...
 
Last edited:

Dnyan

Well-known member
So you add login/login in Adsense to stop showing ads?
No, i add this in xf admin panel - settings advertisement - then scroll down to list of pages where i dont want to show ads

And add
login/login

To list of pages 1 page in 1 line
Then save it.

This ensures advertisement wont appear on the pages which i have in that list like

Login page
Help page
Registration page etc.

When someone click on attachment or image and they are not registered member, they get redirected to

yourwebsite.com/login/login

On this page generally ads are shown if you have ads after header or below breadcrumb at top of page container.

So people who get redirected to that then they may click on advertise thinking its a part of website.

If you add login/login template to list where you want advertisement not to show.

Xf system will prevent showing ads on that.

I too got notice from adsense, i added login page to my list. And checked warning after few days and its gone automatically.

Hope this will help you
 
Last edited:

PASS

Well-known member
Yeah, I have login already on that list. For some reason the URL is mysite.com/login/login (same as post #2 above.)
 

PASS

Well-known member
Just wanted to update this in case anyone else is getting Valuable Inventory: No content Adsense page violations for /login/login

The code above works but seems to override the built in login template blocking so I modified the code to include both /login and /login/login

So far it seems to be working with no problems.

<xf:if is="!in_array($xf.uri, ['/login/login','/login'])">

Ad Code Here

</xf:if>
 

bzcomputers

Well-known member
The requirement you are finding for login/login may be due to a custom theme.? I believe by default XenForo's login is always an overlay which would not display ads.

I thought this would be good place to re-post the full list of XenForo 2 templates that you should prevent Adsense ads from showing on to keep in compliance with their rules:

Code:
account_alerts
account_avatar
account_bookmarks
account_connected
account_connected_associate
account_details
account_email
account_following
account_ignored
account_preferences
account_privacy
account_reactions
account_security
account_signature
approval_queue
contact_form
conversation_add
conversation_edit
conversation_invite
conversation_leave
conversation_list
conversation_reply
conversation_view
error
find_threads_list
forum_post_thread
help_index
help_page
login
login_password_confirm
login_two_step
lost_password
lost_password_confirm
message_page
news_feed
register_complete
register_confirm
register_connected_account
register_form
report_list
watched_forums_list
watched_threads_list

If you have Media Gallery add:
Code:
xfmg_category_add
xfmg_media_edit_image
xfmg_watched_albums
xfmg_watched_categories
xfmg_watched_media

If you have Resource Manager add:
Code:
xfrm_category_add_resource
xfrm_resource_edit
xfrm_watched_categories
xfrm_watched_resources
 

PASS

Well-known member
The requirement you are finding for login/login may be due to a custom theme.? I believe by default XenForo's login is always an overlay which would not display ads.

It's default with just some color tweaks.

Google is seeing the URLs I guess. The URLs below are valid for XF.com too.

https://xenforo.com/community/login
https://xenforo.com/community/login/login

My adsense is setup to show in the following location via the XF Admin CP -> Advertising

Container breadcrumb (top): Above
Inside the page container, directly above the top breadcrumb on every page.

1-24-20.PNG

The problem is only with the login/login URL. So far, wrapping my adsense in that code not to show on those pages seems to have fixed it.

Google's detection just stinks in general. Every time I have a thread title with intentionally misspelled word "pron" I get
Adult: Sexual content page warning. LOL:rolleyes:
 

bzcomputers

Well-known member
It's default with just some color tweaks.

Google is seeing the URLs I guess. The URLs below are valid for XF.com too.

https://xenforo.com/community/login
https://xenforo.com/community/login/login

My adsense is setup to show in the following location via the XF Admin CP -> Advertising

Container breadcrumb (top): Above
Inside the page container, directly above the top breadcrumb on every page.

View attachment 217210

The problem is only with the login/login URL. So far, wrapping my adsense in that code not to show on those pages seems to have fixed it.

Google's detection just stinks in general. Every time I have a thread title with intentionally misspelled word "pron" I get
Adult: Sexual content page warning. LOL:rolleyes:

That is odd because the login/login page is still using the "login" template, which appears to already be in your list for ad suppression. Any chance you are using another advertising add-on that the default XenForo options are not applying to?
 

PASS

Well-known member
I am only using the built-in advertising options. Maybe it's something with being logged in vs a guest viewing those pages.
 

giffenk

Member
Found this thread when I was looking at a different user login issue, but thought I could clear up some confusion between the /login and /login/login urls.

/login is the default login url that displays the login form (actionIndex in login controller class)

when a user submits the login form it POSTs to /login/login which then processes the login information (actionLogin in login controller class)

actionLogin has lots of smarts in it and if it receives a GET instead of a POST it will display the login form once again

So directing your browser to /login or /login/login will produce the login form.
 
Top