WP Google Analytics Events
[resolved] WP Google Analytics Events Plug-in (Class vs. ID) (3 posts)

  1. dmgonzal
    Posted 1 year ago #

    Does anyone know the difference between "class" and "id" for Type when using the WP Google Analytics Events Plug-in. When would you use "class" over "id"?


  2. joelgoodman
    Posted 1 year ago #

    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/

  3. dmgonzal
    Posted 1 year ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Google Analytics Events
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic