• Resolved Arun Saini

    (@arunsaini1611)


    device setting for ad blocks is not working from last one month after new version is updated. PC ads are showing on mobile also and mobile ads are also showing on pc.
    How to resolve this error my site is https://www.wiki-how.in I also enabled remote debugging.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Spacetime

    (@spacetime)

    Please post screenshot of Settings/Viewports.

    Thread Starter Arun Saini

    (@arunsaini1611)

    https://snag.gy/Yxu8th.jpg
    https://snag.gy/CSlcIo.jpg
    Please check these screenshots.In the first one you’ll find I have selected only phone in device.
    In the second screenshot you’ll see the ad unit is also showing on dekstops.
    Please help to resolve this problem asap.

    Plugin Author Spacetime

    (@spacetime)

    Actually I wanted to see the screenshot of Ad Inserter Settings/Viewports (tab *, tab Viewports).

    Viewports

    It seems that your website doesn’t have CSS code for viewports.
    It should be iserted inline in the page HTML header.

    Something like this:

    <style id='ai-frontend-inline-css' type='text/css'>
    .ai-viewport-3                { display: none !important;}
    .ai-viewport-2                { display: none !important;}
    .ai-viewport-1                { display: inherit !important;}
    .ai-viewport-0                { display: none !important;}
    @media (min-width: 768px) and (max-width: 979px) {
    .ai-viewport-1                { display: none !important;}
    .ai-viewport-2                { display: inherit !important;}
    }
    @media (max-width: 767px) {
    .ai-viewport-1                { display: none !important;}
    .ai-viewport-3                { display: inherit !important;}
    }
    
    </style>

    Please post the screenshot of Viewports settings.

    Thread Starter Arun Saini

    (@arunsaini1611)

    Here is the screenshot of viewport.
    viewport screenshot

    I want to tell you this problem is occurring in all of my websites from last one month. Which are using different themes and previously plugin is working fine with all the sites.

    Plugin Author Spacetime

    (@spacetime)

    The settings seem ok.

    Device detection doesn’t work because your website doesn’t have CSS code for viewports (see above).
    Ad Inserter inserted it as inline CSS code in the page HTML header but something (theme/plugin) removed that code.

    Please try to disable caching to see if the code appears.

    Thread Starter Arun Saini

    (@arunsaini1611)

    I put that above code you mention in the header and it works. But is that code is accurate for different screen sizes.

    Plugin Author Spacetime

    (@spacetime)

    Yes, the code is generted and inserted by Ad Inserter according to Viewport settings.

    I would still try to figure out what is causing the removal of the code.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Device setting is not working’ is closed to new replies.