Javascript/ PHP Device detection (Google Adsense / DFP)

Posted in: Newspaper
Post count: 10

Hello there,

We’re have found some code on the theme that appears to be some kind of device detection (android/ios etc). Is this feature available globally to use via javascript?

What we’re trying to do is use that device detection to write certain Ad Code sizes to the page. (We aren’t using Google AdSense but insetead are using Google DFP – Doubleclick for Publishers ).
The reason we’re doing that is because Google DFP isn’t as flexible as Google AdSense meaning that we have to define certain ad Sizes for certain theme breakpoints. For example: on desktop we show a 728×90, on tablet a 300×250 etc.

Is there any way we can easily implement this using that device detection?

Also, What mobile features does the theme bring for developers that we’re not aware?

Thanks in Advance

Post count: 22421

Hello,

Unfortunately google DFP will not work out of the box with our theme as you mention above. However, you can follow this topic as some of our users managed to get dfp to work:
https://forum.tagdiv.com/topic/google-dfp-doubleclick-again-and-again/

Thanks.

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.