Support » Plugin: Ad Inserter - Ad Manager & AdSense Ads » The ad code is not in the source code of the browser.

  • Resolved truebusinessman

    (@truebusinessman)


    Hello!

    I need to display ad code only for mobile devices and tablets.

    On desktops, advertising should not be shown.

    For this, I use client-side device detection.

    Advertising is displayed correctly, everything works. But if I view the source code of the page in the browser (Ctrl + U), my ad code is missing.

    It turns out, your plugin displays advertising secretly through javascript? This is prohibited by the rules of the Yandex advertising network. Therefore, I worry, and asked this question.

    And thank you very much for this plugin. Sorry for my bad English. Hello from cold Syberia (Russia)!

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

    (@spacetime)

    Please check documentation for device detection:
    https://adinserter.pro/documentation/device-detection

    The plugin does not display anything secretly, it only insert your codes according to your settings.

    Client-side detection has two actions: show and insert.
    Both actions use viewports and CSS media queries to detect screen size:

    Show: Shows code blocks for enabled devices, for other devices code blocks remain hidden

    Insert: Inserts code blocks for enabled devices using Javascript code when the page is loaded

    Thank you very much sir for the answer! Yes, I read the plugin documentation. But now everything has become more clear.

    Let me please last question.

    If use Insert. That ad units are added to the page via Javascript, right?

    If use Show. Will the ad unit be hidden through css? (display: none?)

    Plugin Author Spacetime

    (@spacetime)

    If use Insert. That ad units are added to the page via Javascript, right?

    Yes.

    If use Show. Will the ad unit be hidden through css? (display: none?)

    Yes.

    Both methods use CSS media queries to determine viewport width.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.