• Resolved Howdy_McGee

    (@howdy_mcgee)


    Hello,

    Is there a hook or toggle to prevent the plugin from adding UTM links to the Admin Bar?

    Beaver Builder, for example, has a link in the Admin Bar which should launch their builder, but because of the UTM querystring it seems to be unable to launch. I’d like to be able to disable UTM links in the admin bar entirely if possible. Is there a way to do this through either a hook or a setting toggle?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Haktan Suren

    (@haktansuren)

    Let me explore this and I will get back to you shortly… @howdy_mcgee

    Plugin Author Haktan Suren

    (@haktansuren)

    Hi there,

    This only bites when Append UTM is on. We add utm-out to the body so links get your params, and the admin bar lives inside the body, so those links were getting them too.

    We’ll ship a fix in the next release. If you want it now, edit
    wp-content/plugins/handl-utm-grabber-v3/js/handl-utm-grabber.js
    (back up first; plugin updates will overwrite this until you update).

    Put this right above <code class=””>function populateLinks():

    function handlUtmIsInsideAdminBar($el) {
    return $el.closest('#wpadminbar').length > 0;
    }

    Then inside <code class=””>populateLinks():

    After <code class=””>jQuery(‘.utm-out-js, .utm-out-js a’).each(function(){ add:

    var $el = jQuery(this);
    if (handlUtmIsInsideAdminBar($el)) return;

    Same two lines right after <code class=””>jQuery(‘.utm-out, .utm-out a’).each(function(){

    Save, clear any page/cache/CDN if you use that stuff.

    Cheers and thanks for flagging it.

    • This reply was modified 1 week, 5 days ago by Haktan Suren.
Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.