WordPress.org

Ready to get started?Download WordPress

Forums

Track Everything
[resolved] Bug? (5 posts)

  1. elperi
    Member
    Posted 8 months ago #

    Hello, i have changed your script.js. I had wrong events, it always trhown the last working Special Event, and didn´t look for the other ones.

    If we declare a function like this one:

    function listener($special, events){
        $($special.selector).on(events.join(" "), function () {
            if($special.name){
                $(this).attr("te_oname", $special.name);
            }
            var eventLabel = ethoseoteCalculateLabel($(this), ["te_oname", "te_name", "name", "title", "id", "href"]);
            var eventInfo = ['_trackEvent', $special.category, $special.action, eventLabel];
            ethoseotePushEvent(eventInfo);
        });
    }

    and call it from the loop:
    for (i = window.trackeverything.special.length - 1; i >= 0; i--) {
    var $special = window.trackeverything.special[i];
    $($special.selector).off(".jqtedefault");
    if(window.trackeverything.settings.debug){
    $($special.selector).addClass("track-everything track-everything-special").removeClass("track-everything-default");
    }
    var events = [];
    for (var j = $special.events.length - 1; j >= 0; j--) {
    events.push($special.events[j] + ".jqte.jqtespecial");
    }
    listener($special, events);
    }
    it works great for me. Could you test it?

    http://wordpress.org/plugins/track-everything/

  2. Nick Quinlan
    Member
    Plugin Author

    Posted 8 months ago #

    Would you mind filing a Pull Request on the Github project for this plugin?

  3. elperi
    Member
    Posted 8 months ago #

    I´ll try it. It will be my first Pull.

  4. Nick Quinlan
    Member
    Plugin Author

    Posted 8 months ago #

    Awesome!! Doubly do it! Give me a shout if you need any help, and welcome to a (hopefully) long history of PRs and open source contribution. :D

  5. Nick Quinlan
    Member
    Plugin Author

    Posted 7 months ago #

    Marking this as resolved. Thanks again, and congratulations on your first pull request.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.