WordPress.org

Ready to get started?Download WordPress

Forums

Track Everything
Track elements that have no special ID or class (4 posts)

  1. planetshaker
    Member
    Posted 1 year ago #

    Is it possible to track things like javascript toggles as seen on this page: http://www.kinderbuero.info/doppeldecker/highscore-breaker/?
    They have no special ID or class, so they cannot be identified exactly...?!

    What about tracking flash players (play button) like here: http://www.kinderbuero.info/doppeldecker/radiosendungen/ ? The ID of the player changes everytime the site loads, so it cannot be identified, too. Am I right with this?

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

  2. Nick Quinlan
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. planetshaker
    Member
    Posted 1 year ago #

    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.

  4. Nick Quinlan
    Member
    Plugin Author

    Posted 1 year ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.