javascript - Google Analytics Event tracking setup -


can me write proper ga setup following html code? i"m trying track downloads of media kit , capabilities (both pdf's) i'm running analytics.js , it's pretty connfusing me unfortunately.

here code.

<div class="row">     <div class="twelve columns">         <div class="tabs-content-container">             <div class="eight columns">                 <img src="img/brochure.jpg" alt="blog" style="padding-bottom: 10px;">             </div>             <div class="four columns">                 <h3>download company overview</h3>                 <p>thank taking time learn more our company. additional information in these brochures tell more our history, products , references.</p>                 <p>our printable company overview brochure available download. both documents require <a target="_blank" href="http://get.adobe.com/reader/"> adobe reader</a>. click links below download our company’s capabilities , media kit.</p>                 <a target="_blank" href="capabilities.pdf">download capabilities &nbsp;&#8594;</a>             </div>         </div>     </div> </div> </section> <!-- end section-tabs -->  <section class="msg-container diff-msg" style="margin-bottom:0;">     <div class="msg-inner-container">         <a target="_blank" href="mediakit.pdf" class="download">download media kit</a>      </div> </section> 

the issue i'm used ga.js style of event tracking in have done this: <a href="mediakit.pdf" onclick="_gaq.push(['_trackevent', 'download', 'one-sheeter', 'about harbordev',, false]);" class="download">download media kit</a>. doesn't work analytics.js , documentation doesn't make sense me.

thank you

i figured out.

onclick="ga('send', {'hittype': 'event', 'eventcategory': 'download', 'eventaction': clickeddownload', eventlabel': 'capabilities' });" 

thanks tried help.


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -