User login

MetaTraffic 2.0 Boxshot

tracking embedded Flash player - help

Posted by dani_755 [February 7, 2007]

hi

i am finding some difficulties in tracking clicks from a flash player embedded in my homepage..

basically, the Flash player loads videos from a database parsing an xml file (which is served to it by an asp script) and retrieving the url for the video item: here is an example of the asp script that generates the xml (BEFORE the changes for tracking purposes..)

do while not rsX.eof
response.write vbtab&""&vbcrlf
if rsX("title")<>"" then response.write vbtab&vbtab&""&rsX("title")&""&vbcrlf
if rsX("photo")<>"" then response.write vbtab&vbtab&""&rsX("photo")&""&vbcrlf
if rsX("link")<>"" then response.write vbtab&vbtab&""&rsX("link")&""&vbcrlf
response.write vbtab&""&vbcrlf
rsX.movenext
loop

So, the player parses the xml thus generated and is then capable of loading the video resource using the url in ...;I have modified it like this::

if rsX("link")<>"" then response.write vbtab&vbtab&"http://www.site.com/trackFlashes.asp?url="&rsX("link")&""&vbcrlf

And here is the asp script (trackFlashes.asp) that should do the job of tracking and redirecting::

Dim strLinkToVideo
strLinkToVideo = Request.QueryString("url")'strips down the pointer to video resource
strLinkToVideo = CStr(strLinkToVideo)
Response.Cookies("mt")("pagetitle") = strLinkToVideo 'PAGE NAME
Response.Cookies("mt")("action") = "download" 'ACTION TRACKING CODE
Response.Cookies("mt")("amount") = "" 'optional i am assuming
Response.Cookies("mt")("order") = "" 'optional i am assuming
Server.Execute("/ViewStats/site/track.asp")
Response.Redirect strLinkToVideo

It doesn't work:: the player simply won't load the video resources (flv) whose url is being redirected to it; i reckon the redirect doesn't pass just the link back to the player but adds whatever, http parameters ecc, don't know...

can anybody help me please?
thanks a lot

dani

tracking embedded Flash player - help

Hi Dani,

I have very little experience working with flash so I'm not sure how much I can help you. What I try to do when I am debugging things is to just get the tracking working without a lot of complexity. So if there is a way you can strip away some of the layers of complexity to isolate the problem, thats where I would start. Try removing the action code and just get it to track, try calling the tracking script directly from your flash movie, etc etc.

I assume you have made sure that your MT installation is working (you can call the track.asp script directly in your web browser to do this)?

~Chad

tracking embedded Flash player - help

Hi Chad; thanks a lot for your reply..

Yes, MT is installed and working great on both our company website and 'subs'.. Sadly i can't touch the actionscript on that embedded flash object, so i'll have to figure out some way to carry on further testing;; my impression though is that the asp script is redirecting some extra parameters together with the Url resource::
the Url for the flv (flash video stored in db) is passed as a GET parameter when the buttons are clicked on the flash player, like equivalent html (well kind of..)
'homepage link to flv

then the asp script does the tracking and redirecting

strLinkToVideo = Request.QueryString("url") ' in trackFlashes.asp
'redirecting code here
Response.Redirect strLinkToVideo ' in trackFlashes.asp

So, i reckon some parameters that the flash player can't understand (headers?) are being added when the redirecting takes place, that's to say in
Response.Redirect strLinkToVideo

I did set the type of tracking to 'download', and i assumed that would have made sure that there wouldn't have been any trouble with getting the multimedia resource, but maybe i'm getting it wrong here..

anyway, thanks, and please do let me know if you come up with some clue

tracking embedded Flash player - help

setting the type to 'download' actually doesn't interfere with the way the tracking is handled isn't it? just realized that...