Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

40
Views
GA and Tag manager how to track ids that change to display:block?

How do I track visits on opening these modal pop-ups. All they do is make something visible that already exists on the page. I would need something that collects clicks on the "thumbnail" class. I've tried setting google tag manatger but you have to have a degree to get it right. Why do they make things so complex? Can you tell a variable to collect all the times the id specified in the modal-item (#id001, #id002, etc) become display block?

  <div class="modal-item">
        <a onclick="document.getElementById('id001').style.display='block'" class="item-link">
          <img class="thumb" src="image001"/>
      </div>
        <div id="id001" class="modal">
            <div class="modal-content">
                            <img alt="" src="image001big"/>
                        </div>
                     <caption></caption>
                </div>
            </div>
        </div>  
  <div class="modal-item">
        <a onclick="document.getElementById('id002').style.display='block'" class="item-link">
          <img class="thumb" src="image001"/>
      </div>
        <div id="id002" class="modal">
            <div class="modal-content">
                            <img alt="" src="image002big"/>
                        </div>
                     <caption></caption>
                </div>
            </div>
        </div>

7 months ago ยท Juan Pablo Isaza
Answer question
Find remote jobs