Title: Client Side Detection
Last modified: April 22, 2021

---

# Client Side Detection

 *  Resolved [bobsled](https://wordpress.org/support/users/bobsled/)
 * (@bobsled)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/client-side-detection/)
 * I have a small problem with device detection on one site.
 * If I use server-side detection, everything is fine. When I select Show for client-
   side detection, ads show.
 * But if I use Insert, there are no ads. I would prefer to use this because it 
   eliminates Adsense errors.
 * However, Insert works fine on my other site.
 * How can I troubleshoot this issue?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/client-side-detection/#post-14350763)
 * You need to enable remote debugging and post page address to check:
    [https://wordpress.org/support/topic/ad-inserter-support-forum-before-you-ask-for-help/](https://wordpress.org/support/topic/ad-inserter-support-forum-before-you-ask-for-help/)
 *  Thread Starter [bobsled](https://wordpress.org/support/users/bobsled/)
 * (@bobsled)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/client-side-detection/#post-14350886)
 * Okay. I have enabled remote debugging.
 * Here is a page address: [https://justpublishingadvice.com/20-common-grammar-mistakes-and-grammatical-errors-to-avoid/](https://justpublishingadvice.com/20-common-grammar-mistakes-and-grammatical-errors-to-avoid/)
 *  Thread Starter [bobsled](https://wordpress.org/support/users/bobsled/)
 * (@bobsled)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/client-side-detection/#post-14350982)
 * If it’s any help, I think I have located the issue.
 * I get this JS error when I enable Client Side Insert.
 *     ```
       (index):94 Uncaught ReferenceError: jQuery is not defined
           at (index):94
   
       jQuery(function(a){function m(d){d=d.match(F);return null!=d&&1<d.length&&"string"===typeof d[1]&&0<d[1].length?d[1].toLowerCase():null}function A(d){try{var k=Date.parse(d);isNaN(k)&&(k=null)}catch(L){k=null}if(null==k&&d.includes(" ")){d=d.split(" ");try{k=Date.parse(d[0]);if(d[1].includes(":")){var u=d[1].split(":");k+=1E3*(3600*parseInt(u[0])+60*parseInt(u[1])+parseInt(u[2]))}isNaN(k)&&(k=null)}catch(L){k=null}}return k}function p(){(jQuery("#ai-iab-tcf-bar").length||jQuery(".ai-list-manual").length)&&
       ```
   
 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/client-side-detection/#post-14351019)
 * jQuery library is needed for all client-side insertions.
    Make sure it is loaded
   before any function will need it.
 * Alternatively, you can enable **Wait for jQuery** option in Ad Inserter:
    [https://adinserter.pro/documentation/plugin-settings#wait-for-jquery](https://adinserter.pro/documentation/plugin-settings#wait-for-jquery)
 * This will instruct Ad Inserter to wait for jQuery and if it is not loaded, the
   plugin will load it before calling any client-side function.
 * Of course, this applies only to Ad Inserter.
    Other plugins may need jQuery as
   well.
 *  Thread Starter [bobsled](https://wordpress.org/support/users/bobsled/)
 * (@bobsled)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/client-side-detection/#post-14351058)
 * Thank you!! Yes, that worked.
 * It was why my other site was working with no problem, as the jQuery option was
   set.
 * Thanks again for your prompt response.
 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/client-side-detection/#post-14351067)
 * 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Client Side Detection’ is closed to new replies.

 * ![](https://ps.w.org/ad-inserter/assets/icon-256x256.jpg?rev=1502039)
 * [Ad Inserter - Ad Manager & AdSense Ads](https://wordpress.org/plugins/ad-inserter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ad-inserter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ad-inserter/)
 * [Active Topics](https://wordpress.org/support/plugin/ad-inserter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ad-inserter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ad-inserter/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Spacetime](https://wordpress.org/support/users/spacetime/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/client-side-detection/#post-14351067)
 * Status: resolved