Search code examples
google-analyticspopupevent-trackinggoal-tracking

Google Analytics: How can I set Event /Goal tracking for popup text?


usually I track event by button click:

onClick="_gaq.push(['_trackEvent', 'download', 'PDF', 'Príbehy úspešnej liečby detí'])

Now I would like to measure with Google Analytics when text popup -> if someone fill out form a text will popup and when the text will popup I wanna measure an Event or Goal. How can I do it? What tracking code should I insert to popup text?


Solution

  • It shold be just like this. I shold think 4 times before I ask.

    <script type="text/javascript">
    _gaq.push(['_trackEvent', 'download', 'PDF', 'Príbehy úspešnej liečby detí'])
    </script>