Embed tag - Need Help!

Creation & Innovation

Moderator: Moderators

Embed tag - Need Help!

Postby latha » Wed Nov 04, 2009 12:59 am

latha
 

Re: Embed tag - Need Help!

Postby jay » Wed Nov 04, 2009 1:33 am

Just Run this code. Just replace the function you want it here - onclick="alert('track me');".

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<object width="425" height="350">
<param name="movie" value="http://www.youtube.com/v/AyPzM5WK8ys" />
<param name="wmode" value="transparent" />
<a href="#" onclick="alert('track me');"><embed src="http://www.youtube.com/v/AyPzM5WK8ys"
type="application/x-shockwave-flash" wmode="transparent" width="425" height="350" /></a>
</object>

</body>
</html>
Jay M
Write Less, Do More
jay
 
Posts: 475
Joined: Wed Nov 22, 2006 12:05 am
Location: Cochin, India.

Re: Embed tag - Need Help!

Postby silvester » Wed Nov 04, 2009 4:29 am

silvester
 
Posts: 89
Joined: Mon Nov 10, 2008 12:59 am

Re: Embed tag - Need Help!

Postby jondyer » Wed Nov 04, 2009 12:10 pm

Great solution Finoy/Sly!

Just QA this post to see if there is a simpler solution http://blog.projectx4.com/2008/03/28/go ... asy-peasy/

Can we apply whichever works best to the Dr Ho Now video on the http://drhonow.com/home2.php page ASAP.

I am very impressed with the collaboration to solve this issue!!!! This is the way forward!

Jon
jondyer
 
Posts: 184
Joined: Mon Feb 02, 2009 11:16 am

Re: Embed tag - Need Help!

Postby latha » Thu Nov 05, 2009 8:40 am

Silvester I had read that onClick in "a" tag had some issues in some other forum as well.
I like the solution mentioned by you and Finoy.

Lets go ahead and create a copy of the page, name it demo.htm and add this thing.

One more thing to note, Analytics code don't work in <no script> tags. It should be out side the no script. We need to look if just calling a method would be ok.
If we have the trackGA() outside, it should be OK I guess.

We would not require clip 1 and clip 2 buttons. We want the general play console which comes with players. (Play, Stop, Pause).
Any of these Play should be tracked as well as any click on the video to try to play it.
video.JPG
video.JPG (9.08 KiB) Viewed 27550 times

Lets test this one first though.
latha
 

Re: Embed tag - Need Help!

Postby finoy » Thu Nov 05, 2009 9:30 pm

Google Code Labs also provide a Adobe Flash component for doing GA Tracking. This component is developed and supported by Adobe Systems, Inc.
finoy
 

Re: Embed tag - Need Help!

Postby latha » Wed Nov 11, 2009 12:23 am

Posting some useful links here:

How to use onClick in GWO
http://www.google.com/support/websiteop ... swer=93178
http://groups.google.com/group/gwotechn ... 2eba230838
http://groups.google.com/group/gwo_arch ... 4d0e35db6f

Using a Form
http://www.google.com/support/websiteop ... opic=14314

Link of plugin being researched by PG, Silvester and Jay
http://www.longtailvideo.com/AddOns/get ... l?addon=43
We are presently testing this plugin to see if it will work for GWO. It should work for any code I guess.

Best positions for code
https://www.google.com/support/websiteo ... 2&ctx=tltp
latha
 

Re: Embed tag - Need Help!

Postby latha » Mon Nov 16, 2009 4:01 am

<a href="javascript:" id="video_anchor" onclick="player.sendEvent('PLAY');ConversionCount();" style="position:absolute; top:43px; left:7px; width:236px; height:200px; z-index:100; display:block;"><img src="http://www.clientdomain.com/s****/imgs/rich-preview.jpg" width="236" height="200" alt="" border="0" /></a>

Conversion Count method:
1. We are using ga.js
2. We are ensuring that the video anchor is not displayed more than once.
3. Tracking a conversion


function ConversionCount()
{
document.getElementById("video_anchor").style.display='none';
//_uacct = 'UA-XXXXXXXXXX-3';
//urchinTracker("/YYYYYYYYYYYY/goal");
var gwoTracker=_gat._getTracker("UA-XXXXXXXX-3");
gwoTracker._trackPageview("/YYYYYYYYYY/goal");
return true;
}

Here is how the Website Optimizer Conversion Code looks like. If you notice we have moved part of the script to a new method called ConversionCount().


<!-- Google Website Optimizer Conversion Script -->
<script type="text/javascript">
if(typeof(_gat)!='object')document.write('<sc'+'ript src="http'+
(document.location.protocol=='https:'?'s://ssl':'://www')+
'.google-analytics.com/ga.js"></sc'+'ript>')</script>
<!--
This script has been moved to function ConversionCount()
<script type="text/javascript">
try {
var gwoTracker=_gat._getTracker("UA-XXXXXXXX-3");
gwoTracker._trackPageview("/YYYYYYYYYY/goal");
}catch(err){}</script>-->
<!-- End of Google Website Optimizer Conversion Script -->
latha
 

Re: Embed tag - Need Help!

Postby latha » Mon Nov 16, 2009 6:22 am

A quick note, the above method does not pass the movie as an argument. We are using the player for tracking clicks, not the movie.
It should serve our purpose for now as there is only one movie for this particular website.
latha
 


Return to Web Design

Who is online

Users browsing this forum: No registered users and 35 guests