Archived topic
Adding call tracking script breaks mobile menu
5 replies · Started by Anonymous on December 17, 2015
Hi Tom,
I love your theme, I use it as often as possible. However, I've run into a problem that's happening on several sites now.
We do call tracking and in order to do so, I simply add a JS file just below the closing body tag. Adding the script causes the mobile menu to not expand.
Right now I have it enqueued in the functions file. But I've also tried adding it as a Hook. I think either way is fine. But the problem happens regardless.
So far to troubleshoot, I have disabled all plugins, upgraded the theme, upgraded GP Premium, upgraded all plugins. I've enabled WP-DEBUG and cleared up any errors.
Unfortunately I'm stumped and not sure what the issue is, or how to resolve. I was wondering if you might be able to take a look.
Thank you so much,
Eric
If adding the script causes the menu not to expand, it typically means there's a javascript error in the script you're using which is preventing the rest of the javascript on the site to execute.
Can you link me to your site possibly?
Hi Tom,
I sent the information you requested via your contact form.
Thank you,
Eric
I don't believe I received anything from you? Can you try again and reference this topic?
Thanks!
Hi Tom,
I suspect by now that my second contact form submission failed. I'll just go ahead and post the link: http://philadelphiadentist.com
The script that is enqueued in the functions file that is causing the mobile menu not to expand is:
<script type='text/javascript' src='https://pistonbroke.com/ct/referrer_dynjs.php?c_id=71&ver=0.1.0'></script>
The script does work, because when you reload the page - you can see the phone number quickly change. So it's weird that interferes with the mobile menu.
I appreciate you taking a peek and for any insight you may have.
Thanks,
Eric
Hi Eric,
Interesting - it works when you resize your browser down to mobile size, but won't work on my Android.
Can you show me the code you're using to enqueue it? We should be able to make it show up after the mobile navigation script, which should fix it.
Let me know :)
