Support » Plugin: Ad Inserter - Ad Manager & AdSense Ads » Referrer links not working after 2nd page visit

  • Resolved rmahes22

    (@rmahes22)


    Hi we have setup ads only show to search engine visitors(like google,yahoo,duckduckgo…referrer whitelisted asap) & direct visitors cant able to see ads.All working fine when first page after click second page ads not shown.We also setuped an cookie as per this documentation
    https://adinserter.pro/faq/how-to-remember-visitors-parameters
    when we inspect the second page cookie is their but still ads not display on second pages.
    Plz help to resolve this issue

    Thanks
    Mahesh

    The page I need help with: [log in to see the link]

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

    (@spacetime)

    Hello,

    remote debugging doesn’t seem to be enabled.
    Please check.

    https://wordpress.org/support/topic/ad-inserter-support-forum-before-you-ask-for-help/

    Thread Starter rmahes22

    (@rmahes22)

    Hi now iam enabled the Remote debugging & disabled the caching plugin.Can u plz check now & find out issues

    Plugin Author Spacetime

    (@spacetime)

    Your settings are wrong.

    You create a cookie for visitors coming from search engines – block 16.
    This is ok, however, the cookie name ai-hide-ads is wrong. In your case the cookie is set to show ads (for visitors from search engines).

    Then you
    – blacklist cookie – so visitors that came from search engine don’t get ads
    – whitelist search engine referrers – so visitors that are coming from search engine can get ads

    You should whitelist cookie – visitors that came from search engines should get ads.

    Plugin Author Spacetime

    (@spacetime)

    Are you still having issues?

    Thread Starter rmahes22

    (@rmahes22)

    yeah iam still getting an issue…now when visitors that came from search engines ads not displayed on first page if click any other pages ads will starts display ads on all pages.On first page visit cookie is their but ads not display for search engine visitors.

    Plugin Author Spacetime

    (@spacetime)

    You still have wrong settings.

    No referer is defined for the ad blocks.
    Why have you removed them?

    You need to whitelist search engine referrers – so only visitors that are coming from search engine get ads.

    Thread Starter rmahes22

    (@rmahes22)

    Iam removed whitelist search engine referrers on blocks bcoz no ads displayed for both direct visitors & search engine visitors.Now iam again changed the settings whitelist search engine referrers now check no ads displayed anywhere on website

    Plugin Author Spacetime

    (@spacetime)

    Now your settings are ok.
    When I come from a serach engine the blocks are inserted, ads displayed and the cookie is also created.

    However, you have a javascript error on pages which prevents the insertion check code from running:

    (index):568 Uncaught ReferenceError: pagespeed is not defined
        at HTMLImageElement.onload ((index):568)

    It seems it is coming from this code:

    <img class="lazy loaded" data-pagespeed-lazy-src="/images/oneindia-google-news.svg" alt="Google Oneindia News" src="https://www.oneindia.com/img/loading.gif" data-src="https://www.oneindia.com/img/loading.gif" onload="pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);" onerror="this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);" data-was-processed="true">

    Check the console in the browser.

    Once you fix the error the Ad Inserter will run and the blocks will be inserted.

    Thread Starter rmahes22

    (@rmahes22)

    all the above console errors fixed still not display any ads…

    Plugin Author Spacetime

    (@spacetime)

    OK, now I see what the problem is – the way the lists are checked.
    I’ll try to find some elegant solution for your case.

    Until then you can remove referrers to show ads.

    Plugin Author Spacetime

    (@spacetime)

    It seems I found a pretty simple solution for your case.

    Install this development version which includes some improvements for cookie checks:
    https://downloads.wordpress.org/plugin/ad-inserter.zip

    Remove referrer checks for ad blocks (if not already done so).

    For block 16 (cookie creation) set Insertion to Above header – you need to enable Output buffering first.
    https://adinserter.pro/documentation/plugin-settings

    This will insert code for the cookie creation above ad blocks (below <body> tag) so the block will be processed (and cookie crerated for right visitors) first.

    Then the checks for ad blocks will be executed and since the cookie will already be created for the users coming from search engines, the code for ads will be inserted.

    Let me know if there are still issues.

    Thread Starter rmahes22

    (@rmahes22)

    Hi now its fine thanks for the support…can i update the plugin later any new version in Ad inserter

    Plugin Author Spacetime

    (@spacetime)

    Sure, the improvements will be included in the new version.

    thanks for the support

    Please say it here:
    https://wordpress.org/support/plugin/ad-inserter/reviews/#new-post

    Thank you!

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