Tracking script sources in chrome dev tools [duplicate] - javascript

I'm having trouble with fbevents.js, I don't know why but is loading with my page, I'm nor importing it anywhere neither putting it inside a script tags referencing it.
Image from my page:
What do you guys think could be the problem?

I had the same problem and in my case I noticed it is one of the scripts loaded by the Google Tag Manager.

http://staticw2.yotpo.com/QxG0HurQF664N9LddhiDMsxHjx9XYsaVgWcDBnme/widget.js
above widget.js script load fbevent.js.
here is the related code line. view source and search for fbevent.you can find that line.
(window,document,"script","//connect.facebook.net/en_US/fbevents.js"

Yeah GTM contained a section for fb code so just pause that in GTM studio and its fixed

Related

Customizing website script disabling it with uBlock Origin and re-injecting it as userscript?

Is this possible? Let's say there is a portion of the script on a website that is causing "issues". Do you think that preventing the original script from loading, copying its source, editing it and re-injecting it as userscript with tampermonkey will do the trick? I tried doing so but I don't know how to force the loading of the script only on a specific domain.
Maybe I'm asking too much but probably a simple copy and paste of the script with the troublesome part removed won't directly work as I hope, right?
What I did when I wanted this was to block the script using ad-blocker. Here's a post how to do that.
After that I downloaded the script and changed the part that was causing "issues". After that, I added the script as an userscript.

Why does Google Tag Manager not include tags on certain pages?

I have an issue that on certain pages of my website no tags are included in the GTM container. The debugger shows: "There are no tags in the container." I'm trying now for weeks to find the solution but no chance. I would really appreciate any ideas!
I have included for example the Google Universal code on all pages:
url matches RegEx .*
Usually on the start page and some other pages no tags are included:
http://www.ailolaquito.com
On other pages like this the tags usually are included:
http://www.ailolaquito.com/en/activities/spanish-and-dancing
When I use the GTM Preview and Debugger tool it first shows above message and when I open the Data Layer tab and switch back to the Tags tab, suddenly all tags are shown as they should. Maybe there is a conflict (JavaScript?) on some pages.
What I noticed is that on all pages where the tags are not included the HTML code in the source view of Safari looks compressed:
While on pages where the tags are properly shown the html source looks nice:
Probably it's related with this. However I don't understand why the source code is compressed on some pages. They are all based on the same layout templates.
Any ideas or help would be appreciated. I really would like to solve the issue.
Thanks a lot!
Philip
P.S.: Here are some more screenshots:
for the answer see https://plus.google.com/102446957955231069158/posts/FetKoAh2JrD "there is a race condition that we are currently hunting down that when the debug script is cached you can see the no tags message. But if you click on any of the events and you can see what fired. Once you navigate to an event the summary tab will display correctly again. You can also force refresh the page which seams to fix this also." by Michael Philpott

BabylonJS Execute Script from External File

I'm having a (simple) issue, but I have no idea how to fix it. Essentially, every tutorial I have come across for Babylon puts all of the Javascript code inside < script > tags in the main HTML page.
However, I would like to have all of my Javascript code inside a separate file. I have tried every way of loading it as I could think of, though I am a novice at Javascript (I am decent at C++, and I can see the similarities); yet I was unable to make it load. (It works fine when called from the HTML page itself).
Does anyone know what (if anything) I can do in order to be able to load my scripts from external files, and still get everything to work? Thanks in advance!
2 options:
register to the DOMContentLoaded event in your external JS file
reference your JS file with the tag at the end of the HTML page
You can find a sample in one of my tutorials here: http://blogs.msdn.com/b/davrous/archive/2014/11/18/understanding-collisions-amp-physics-by-building-a-cool-webgl-babylon-js-demo-with-oimo-js.aspx
Enjoy and thanks for using Babylon.js! :)
David

JavaScript file(jQuery steps) not loading in Google Chrome

I am using a jQuery plugin the file name is jquery.steps.js.
I include it in index.html unambiguously but Chrome will not load this script. It was somehow in the cache earlier which is why I never noticed this.
Can anyone suggest what the problem might be and how in the world I can get it to load.
Thanks in advance
Im not sure why you are getting that problem but you could solve it adding
'?whateverHere'
at the end of your src attribute of the script, that will enforce the script to be loaded again.

Google pagespeed shows render-blocking even moving into body part

I just checked this website with Google pagespeed Insights, they asked me change the Javascript block into body instead of head even this part has been moved already.
Anyone please help me investigate this problem if Google give me a wrong message, or how to fix the kind of issues.
https://developers.google.com/speed/pagespeed/insights/?hl=en&url=http%3A%2F%2Flogin.di.se%2F%3FappId%3Ddi.se%26lc%3Dsv&tab=mobile
The website
http://login.di.se/?appId=di.se&lc=sv
I also have another website with same DOM, however don't have this problem with google pagespeed
http://account.sydsvenskan.se/?appId=sydsvenskan.se&lc=sv
Possibility 1
Some content loads at the end of page load i.e giving an illusion that preceding JavaScripts were holding back the content rendering.
I see these two images are called in the end only for the site with issue -
http://login.di.se/public/images/di/background.jpg
http://login.di.se/public/images/di/checkbox_cust.png
You can see this here - http://tools.pingdom.com/fpt/#!/bRcsEc/http://login.di.se/?appId=di.se&lc=sv
But this is not the case for your other website - http://tools.pingdom.com/fpt/#!/cH2ghk/http://account.sydsvenskan.se/?appId=sydsvenskan.se&lc=sv
Alternate Solution - Use Asynchronous Load
Try loading the JavaScript asynchronously as google suggests something like this -
<script async src="my.js">
Refer - https://developers.google.com/speed/docs/insights/BlockingJS
There is still a huge chunk of JavaScript in your <head>
Also check to see if Cloudflare isn't inadvertently adding JavaScript where it shouldn't

Categories

Resources