Experiencing a 401 Unauthorized Error During Update?

If you're seeing a 401 Unauthorized error when trying to update your Joomla extension, it's likely due to our new two-factor authentication (2FA) security measure for your Download ID.
To resolve this, check your email (Spam folder?) for a message to approve your server or device, or read our detailed blog post here( onlinecommunityhub.nl/best-practice/new-...-extension-downloads) to understand the steps involved. This will guide you through approving your server for future updates.

Implemented Ad Manager - How to add the document header tag?

  • Romuald Yonga
  • Onderwerp Auteur
  • Offline
Meer
10 maanden 2 weken geleden - 10 maanden 1 week geleden #2757 door Romuald Yonga
Ad Manager - How to add the document header tag? werd gestart door Romuald Yonga
Hello, 

We use Google Ad Manager and we need to place a significant number of ad units across our website.
For each ad unit, GAM requires us to enter 2 tags: one in the header and a second in the body (where we want to display the ad) -  developers.google.com/publisher-tag/guides/get-started

In the header, we can add page-level targeting settings we need for proper reporting in GAM.

How can we configure the various document header tags in the extension so we can target specific pages on our website?

Thank you!

Link to test version:
Dit bericht bevat vertrouwelijke informatie
Laatst bewerkt 10 maanden 1 week geleden door Ruud van Lent. Reden: added downloadlink to testversion
Onderwerp is gesloten.
Meer
10 maanden 2 weken geleden #2758 door Ruud van Lent
Beantwoord door Ruud van Lent in topic Ad Manager - How to add the document header tag?
Good morning Romuald,
thanks for your subscription and thanks for reaching out!
What you ask should all be handled automatically by ochAddAds when configured correctly.

Using Google Tag manager has a lot of configuration options and I have implemented them in the same format so you can follow the google documentation / tools (e.g. JSON data strings)

To help you with the configuration, in ochAddAds:
  1. in advanced tab set 'Display instructions' to Yes, you will now see specific configuration information in the tabs
  2. in the plugin tab, set 'Enable Google Ad Manager' to Yes, as this is what you are going to use on your site
  3. To get more detailed help per config files click the 'Toggle Inline Help' button, this is a Joomla out of the box buttons that will show / hide the descriptions on the configuration fields
  4. in the Ad Codes tab you can now configure one or more 'ad codes' that can be inserted on the pages (manually or automatically)
    For Ad Manager (what you are using) this basically is a div with all configuration settings as data elements on the div.
    These data elements are read via the script and pushed to the Google script / server to fetch the correct content but also to report the usage: No need to add things to the head / body of the page: this is all done via the ochAddAds script on page load.
    so e.g.
    Ad Code ID: in-article-01
    Ad Code: <div class="adslot" data-ad-unitpath="/6355419/Travel/Europe/Netherlands/Utrecht" data-ad-targeting="'interests', 'sports'"></div>
  5. You can now add the { ochaddads id="in-article-01"} in your content and that tag will then trigger ochAddAds that will load GPT.js and push all the configured variables to Google  > and load the adds in that location that Google reponds with.
  6. You can also use the Auto Placement to e.g. load that tag on every page before the content,
    Add Before Content : { ochaddads id="in-article-01"}
I have added a space between the { and ochaddads because otherwise it would trigger the script here on this page: this space should be omitted on your site.

Does this help to get you started?
Ad manager has a lot of configuration options. In my experience it is best to start 'small' > display an ad and then start building with more configuration options form there.
Onderwerp is gesloten.
  • Romuald Yonga
  • Onderwerp Auteur
  • Offline
Meer
10 maanden 2 weken geleden #2759 door Romuald Yonga
Beantwoord door Romuald Yonga in topic Ad Manager - How to add the document header tag?
Great, it works!
Thanks.

A small additional question: I would like to centre my ads horizontally. Google allows this ( developers.google.com/publisher-tag/refe...Service_setCentering).
Is there a way to do it with your extension?

Thanks
Onderwerp is gesloten.
Meer
10 maanden 2 weken geleden #2760 door Ruud van Lent
Beantwoord door Ruud van Lent in topic Ad Manager - How to add the document header tag?
Hi Romuald,
thanks for the feedback: glad it is working.
Ad centering is currently not implemented but it makes sense to add that as a feature.
Do you have a test environment or are you able to test this when i have it added?
Onderwerp is gesloten.
  • Romuald Yonga
  • Onderwerp Auteur
  • Offline
Meer
10 maanden 1 week geleden #2761 door Romuald Yonga
Beantwoord door Romuald Yonga in topic Ad Manager - How to add the document header tag?
Great.
OK let us know when we can try it in our test environment.
Thanks
Onderwerp is gesloten.
Meer
10 maanden 1 week geleden - 10 maanden 1 week geleden #2762 door Ruud van Lent
Beantwoord door Ruud van Lent in topic Ad Manager - How to add the document header tag?
Hi Romuald,
in first post of this topic I have added a download link to the test version. please install on your test vite and clear cache.
You can now add the new attribute data-ad-centering="yes" to the Ad Code div. This will set it per Ad Code, or you can set it globally in the 'Ad Manager' tab > Ad Centering Yes / No

Note: untested as I do not use Ad Manager myself, but in theory this should work (following the Google Documentation).

When not working you can just install previous version over it and clear cache.

Please let me know of this is okay or not.

regards,
Ruud.
Laatst bewerkt 10 maanden 1 week geleden door Ruud van Lent.
Onderwerp is gesloten.
  • Romuald Yonga
  • Onderwerp Auteur
  • Offline
Meer
10 maanden 1 week geleden #2763 door Romuald Yonga
Beantwoord door Romuald Yonga in topic Ad Manager - How to add the document header tag?
Perfect...it works!
And I implemented it easily by just using the "Ad Manager" tab.

Thanks for your help, Ruud.
Regards,
R.
Onderwerp is gesloten.
Meer
10 maanden 1 week geleden #2766 door Ruud van Lent
Beantwoord door Ruud van Lent in topic Ad Manager - How to add the document header tag?
Hi Romuald,
thanks for reporting back and good to hear it is working. Will release it one of these days: when the update prompts you can just install it: no other changes then the ones made for you.

Glad it is working and thanks for requesting this feature: think that more people will benefit from this.
Onderwerp is gesloten.