-
AuthorPosts
-
xyzb Friend
xyzb
- Join date:
- October 2006
- Posts:
- 134
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 9
- Thanked:
- 5 times in 1 posts
November 29, 2011 at 2:21 pm #171239I would like to know how to add Google Analytics code to the ja-video-thumb script. We would like to know if people are clicking on our videos that are offered for viewing. I tried to include the “onclick=’pageTracker._trackEvent(‘outbound’,this.href,location.href)” but that doesn’t seem to work or I have not included it correctly in the code.
<div class=”ja-video-thumb”>{japopup type=”youtube” content=”http://www.youtube.com/v/49ALwDsUzrk?version=3&hl=en_US&rel=0″ width=”640″ height=”380″ onclick=’pageTracker._trackEvent(‘outbound’,this.href,location.href)’ title=”Birth of the modern American civil rights movement” description=”December 1, 1955:Rosa Parks was arrested in Montgomery, Alabama for refusing to give up her seat to a white man and move to the back section of a municipal bus. Her arrest resulted in a year-long boycott of the city bus system by African Americans and led to legal actions ending racial segregation on municipal buses throughout the South”}<img height=”81″ width=”291″ src=”images/featured/rosa_parks.jpg” alt=”rosa_parks” />{/japopup}</div>
Any help or insight would be appreciated!
Thanks
xyzb Friendxyzb
- Join date:
- October 2006
- Posts:
- 134
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 9
- Thanked:
- 5 times in 1 posts
November 30, 2011 at 2:52 pm #427335You need to add the following to the image code –
onclick=”_gaq.push([‘_trackEvent’, ‘Videos’, ‘Play’, ‘Name of Video’]);”The data is stored in your Google Analytics account under “Content” then “Events” .
Here is the info on Google – http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.htmlThere may be other ways of doing this, but this is what I was looking for.
I edited the following for each video and it works like a charm –
<div class=”ja-video-thumb”>{japopup type=”youtube” content=”http://www.youtube.com/v/49ALwDsUzrk?version=3&hl=en_US&rel=0″ width=”640″ height=”380″ title=”Birth of the modern American civil rights movement” description=”December 1, 1955:Rosa Parks was arrested in Montgomery, Alabama for refusing to give up her seat to a white man and move to the back section of a municipal bus. Her arrest resulted in a year-long boycott of the city bus system by African Americans and led to legal actions ending racial segregation on municipal buses throughout the South”}<img height=”81″ width=”291″ onclick=”_gaq.push([‘_trackEvent’, ‘Videos’, ‘Play’, ‘Rosa Parks’]);” src=”images/featured/rosa_parks.jpg” alt=”rosa_parks” />{/japopup}</div>
1 user says Thank You to xyzb for this useful post
-
AuthorPosts
This topic contains 2 replies, has 1 voice, and was last updated by xyzb 13 years ago.
We moved to new unified forum. Please post all new support queries in our New Forum