Implementing an Event
I would like to implement an event for hitting a play button for a video and for downloading a pdf file.
I couldn't find a specific command in the Help center, though I have find in this forum the next command(here it's a mail):
<a href="mailto:firstname.lastname@example.org" onclick="ga('send', 'event', 'contact', 'clicked');">email@example.com</a>
Besides this I have found this command : (from koozai.com)
<a href=”/downloads/whitepapers/seo-is-great.pdf” onClick=”_gaq.push([‘_trackEvent’, ‘whitepaper’, ‘download’, pdfName, pdfValue, true]);” target=”_blank”>SEO Is Great Whitepaper</a>
Now I'm very confused which command is the proper one? the first one which uses ="ga('...) OR the "_gaq.push(['_...)
Even the Google Developer's site doesn't seem to answer that, it doesn't give a full example as appears above so
I don't know which one would work
Please pay attention that those commands are solely for clicking a link what about embedded video from YouTube?
What would the command look like for hitting the play button of it??
Thank you for helping!
Re: Implementing an Event
Let's say I have 2 buttons of download, but each one is different (one is for PDF file and the other is WORD)
How 2 events be created so the system will distinguish between them and where do I see it in the command?