Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi @kai2810,

    Thanks for the question!

    Currently this is only possible by patching the gtm4wp-social-tracker.js directly.
    But this will be overridden by a plugin update.

    Thomas Geiger

    Thread Starter Kai2810

    (@kai2810)

    Thanks for responding!

    Sure, I’ll do it manually if I have to. Do you have the patch?

    Also, any chance to have options to allow us to select / deselect what social networks we like to track, to control the scripts that gets loaded? ??

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Actually I plan to remove the whole feature as it conflicts randomly with other website components and I was never able to provide a stable fix, only for the specific issue for the specific site.

    Thread Starter Kai2810

    (@kai2810)

    I see.

    I assume the following is your github? I see a bunch of code that’s for twitter (after that // end of Facebook social events), so if I remove them from gtm4wp-social-tracker.js file in the js folder of your plugin, that twitter script will stop loading?

    https://github.com/duracelltomi/gtm4wp/blob/master/js/gtm4wp-social-tracker.js

    If it’s this simple I don’t mind removing them again from your next update manually.

    • This reply was modified 7 years, 6 months ago by Kai2810.
    Plugin Author Thomas Geiger

    (@duracelltomi)

    Yes, this is my repo and this is the right file to patch: you need to remove lines 54-95.

    Thread Starter Kai2810

    (@kai2810)

    That did the trick, thanks!

    • This reply was modified 7 years, 6 months ago by Kai2810.
    Plugin Author Thomas Geiger

    (@duracelltomi)

    You’re welcome ??

    Thread Starter Kai2810

    (@kai2810)

    Hi again duracelltomi,

    Line 96, that } bracket. It looks orphaned after removing 54-95. Can you confirm?

    My site is broken after making the changes, not 100% sure if it’s due to this.

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi Kai,

    I need to see your site to be able to tell you what should be done. If you do not want to share the URL publicly here, please contact me at gtm4wp.com

    Thanks,
    Thomas Geiger

    Thread Starter Kai2810

    (@kai2810)

    Hi Thomas,

    I’m pretty sure it’s a rogue bracket at Line 96. I counted the number of brackets after removing the block of code you mentioned, it was not an even number.

    After removing that line 96 bracket, my site went back up.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Can disable Social-tracker.js from making unnecessary twitter widget JS request?’ is closed to new replies.