Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Nick Quinlan

    (@nquinlan)

    You can track the toggles. To track any click on a toggle you could use the selector .toggler. If you wanted to track only closed toggles you could use .toggler:not(.active) and for only open ones .toggler.active. Unfortunately, in all scenarios the labels are not going to be extremely helpful. Track Everything does its best to identify a label, but in this case the label would be # for every one, which I can’t imagine being particularly helpful.

    To remedy this you must give names or titles to everything with the class toggler. I’m not sure how you’re creating the toggler, but if the plugin allows naming a title for each one, it should be relatively simple. Otherwise, you can add this javascript snippet to your page and it will make sure to name the togglers something more understandable:

    jQuery(function ($) {
    	$(".toggler a").each(function () {
    		$(this).parent().attr("title", $(this).text());
    	});
    });

    As for Flash, it’s tricky. Unfortunately, you cannot track events that occur in Flash players. However, the plugin you’re using to do play the audio might have a “Javascript API” that would allow you to push events to Google Analytics, unfortunately though that is outside of the scope of Track Everything.

    Please let me know if all this makes sense.

    Thread Starter Albert

    (@planetshaker)

    Nick,
    that are some of the best answers I got in the last months, very specific and detailed, thanks for taking time to do this!

    The toggler is being created by a wordpress shortcode like [toggle] [/toggle], so there is not much scope to change anything…

    As for the flash player – I thought so. I’ll check the API, maybe they have anything like that.

    Plugin Author Nick Quinlan

    (@nquinlan)

    Thank you! That’s great to hear.

    If you can’t change the togglers then I recommend adding that snippet to the page. If you don’t want to edit your theme you can use a plugin to insert the Javascript.

    Good luck with the Flash!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Track elements that have no special ID or class’ is closed to new replies.