WordPress.org

Support

Support » Plugins and Hacks » WP Google Analytics Events » [Resolved] WP Google Analytics Events Plug-in (Class vs. ID)

[Resolved] WP Google Analytics Events Plug-in (Class vs. ID)

Viewing 2 replies - 1 through 2 (of 2 total)
  • joelgoodman

    @asilentthing

    This has to do with HTML/CSS validation rules. And ID can apply to only one specific element on the page while you can group elements together with a class.

    So, say you had a list of links to PDFs on a resources page you wanted to track download events, you could apply a class of pdf-download to all of those links and this plugin would track the event on everything with that class. Otherwise you have to break down a separate ID for each link and manually enter them.

    This is a good explanation of the difference: http://css-tricks.com/the-difference-between-id-and-class/

    dmgonzal

    @dmgonzal

    Hey Joel,

    Thanks so much for responding. This makes total sense now. The reference you provided does a great job of further explaining.

    High five & thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] WP Google Analytics Events Plug-in (Class vs. ID)’ is closed to new replies.
Skip to toolbar