• Resolved tgakk

    (@tgakk)


    I’m using Litespeed Cache with QUIC enabled. I’m using the Advanced presets with no other changes to settings. I’m not approved for Adsense yet so was using Microsoft Ads. It works great on desktop and all the ads appear. However, on mobile, they don’t appear at all, except on the Search results page. The only difference I can see on the page source is that on the Search results page, the full js required by Microsoft Ads is visible in the header and inline where I want the ads to appear. On the rest of the pages on mobile where the ads don’t show, the javascript is base64 encoded in a date: text field. Perhaps that’s a non issue, but that’s the only change I can see. On desktop, the javascript is also spelled out and not base64 encoded. Would love to use the Aggressive preset but it definitely breaks my ability to show ads on mobile. I also tried to disable JS minify and set JS deferred to Off, saved changes, and purged all, and it didn’t help. The only thing that helped was switching to Basic presets. Any idea what could be wrong?

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support qtwrk

    (@qtwrk)

    you may need to add its JS file and inline JS code into Page Optm -> Tuning -> in this page, there are 3 JS exclude fields

    Thread Starter tgakk

    (@tgakk)

    Thanks for the reply. It’s a few lines of js code. In the header and then a few more lines where I need to put the ad. Do I need to put those in a js file that I then exclude from all 3 places or can I paste the few lines of code in the exclude boxes? I assume exclude only works with a file but wanted to confirm.

    Plugin Support qtwrk

    (@qtwrk)

    for individual js files, you need to put the js file names , for inline js code , you can just put a piece of string, into these exclude boxes

    Thread Starter tgakk

    (@tgakk)

    I tried adding the inline js code to the exclude boxes under page optimization/tuning after changing presets back to Advanced from Basic. It’s still not showing ads on mobile, just desktop. I may have the format wrong in the exclude boxes. Basically, I just pasted this: <script>my multi-line javascript</script> (sorry, it’s not letting me paste the actual code here. I put this in the js excludes, js deferred excludes, and gues t mode js excludes. I have maybe around 5 of these <script> elements I pasted into those boxes. After purging, no ads on mobile. When I switch back to Basic preset, then ads show again.

    Plugin Support qtwrk

    (@qtwrk)

    for that my multi-line javascript , you can just extract a word , or a string out of it , as unique as possible , it can use my , or multi-line , or javascript , in this example as excluding string

    and there are 3 exclude fields , make sure you add to them all.

    Thread Starter tgakk

    (@tgakk)

    This is what I added to JS excludes, js deferred excludes, guest mode js excludes. It’s still having the same issue. However, I started playing around and comparing the settings between basic and advanced in page optimization and switching them one by one and purging the cache in between. The one that appears to be causing the issue is HTML Minify. If I leave everything else the same as what the Advanced preset sets in page optimization, then ads stop showing. If I turn off HTML minify, then ads start showing again. Any idea why?

    Plugin Support qtwrk

    (@qtwrk)

    hm? maybe HTML minify striped something off that it shouldn’t ?

    please try compare the output with and without html minify

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Can’t show Microsoft Ads on Mobile With Litespeed Advanced Presets’ is closed to new replies.