Google Adsense and OJS

How to insert the code of Google Adsense in OJS There is any way to make Google Adsense works in this version?


There is no specific plugin for this so you need to follow google Adsense indications and:
a) Use the custom headers plugin: Inject the Adsense’s JS there (easiest and fastest way).
b) Create a theme: Create a subtheme dnd inject the Adsense’s javascripts in your html header.
c) Develop a plugin: The hard and slow one… but the best if you like to share your work with the PKP community.

As you expect, I will recommend you go with (a) and just add Adsense JS to your header.

The only but if you operate with EU citizens is that you will need to be sure Adsense won’t keep their IPs. Not sure about this service but in googleAnalytics they include a tag to anonimize the tracking.



In fact I used custom headers plugin but the google adsense team reject it after reviewing it and they ask me to put the adsense js in the header of the website.

Hello, I sent a research paper entitled Spatial Variation of the Continuity of Daily Rainfall in Iraq* to the magazine a few days ago. Was publication accepted? Send me a paper accepting publication, please, and if it is published, send me the research as pdf

Sorry, I missed your answer and I though it was fixed.

Did you finally found how to add your adsense headers with “custom headers” plugin?

Anything you add there will be placed between tags that is exactly what google adsense team is asking you to do.

If not, please report their complains so we can find an aternative solution.

Hi @marc and @Abd_El-Nasser_Gharee

As this answer has a marked ‘solution’, I will give an update :-).

From point a, the GAds JS code ingested in OJS header successfully.


1 Like