Title: Bug?
Last modified: August 21, 2016

---

# Bug?

 *  Resolved [elperi](https://wordpress.org/support/users/elperi/)
 * (@elperi)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/bug-51/)
 * 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/](http://wordpress.org/plugins/track-everything/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Nick Quinlan](https://wordpress.org/support/users/nquinlan/)
 * (@nquinlan)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/bug-51/#post-4415948)
 * Would you mind filing a Pull Request on the [Github project](https://github.com/ethoseo/track-everything)
   for this plugin?
 *  Thread Starter [elperi](https://wordpress.org/support/users/elperi/)
 * (@elperi)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/bug-51/#post-4415951)
 * I´ll try it. It will be my first Pull.
 *  Plugin Author [Nick Quinlan](https://wordpress.org/support/users/nquinlan/)
 * (@nquinlan)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/bug-51/#post-4415957)
 * 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. 😀
 *  Plugin Author [Nick Quinlan](https://wordpress.org/support/users/nquinlan/)
 * (@nquinlan)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/bug-51/#post-4416230)
 * Marking this as resolved. Thanks again, and congratulations on your first pull
   request.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Bug?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/track-everything.svg)
 * [Track Everything](https://wordpress.org/plugins/track-everything/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/track-everything/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/track-everything/)
 * [Active Topics](https://wordpress.org/support/plugin/track-everything/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/track-everything/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/track-everything/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Nick Quinlan](https://wordpress.org/support/users/nquinlan/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/bug-51/#post-4416230)
 * Status: resolved