
Adding Snoobi into a Flash animation
We have forgone previous instructions that were based on the usage of iframe to change the URL of the address within a Flash. There's a better way. To track a Flash presentation or site, we call a snoobi.trackPageView(pathParam) function from the animation. This will send the tracking data straight to Snoobi's servers and each action within the animation will be counted as a page view. Hence the page views will show up under "Pages" in the Snoobi report.
1. Installing the Snoobi tag into the Flash site
The Snoobi tag should be installed normally onto the page which contains the Flash animation. Place the Snoobi tag before the closing </body> tag.
2. Calling the snoobi.trackPageView function from the animation
Whenever a particular action is carried out in the animation (a button is pushed, a video is watched, a frame is loaded and so forth) and we want to track it, we call the snoobi.trackPageView(pathParam) function. In practice, trackPageView is a is a method in a Snoobi object. The pathParam parametre should then give the path which represents the action within the animation.
Example 1. An animation located in www.kampanjantekijat.com/flash
Let's say that in the animation, there's a button which will take you to frame number 3, if pushed. Upon loading, the frame numer 3 will then use ActionScript to call on the tracking function pathParam with a parametre value of "/frame_3" :
snoobi.trackPageView('/frame_3');

Image 1. Calling the snoobi.trackPageView functino from within the animation
In example 1, the Snoobi report will register a page view which URL-address will be www.kampanjantekijat.com/frame_3

Image 2. Pages without Page names, as seen in the Snoobi report (compare image 4)
|
Here, you may downlaod a Flash-example (.fla), which will illustrate how the tracking ought to work if automated Page names are not used (304 KB). To open the file, you will need Adobe Flash 8 / CS3. |
3. Automated Page names and automated Sectioning
To enhance the readability of the report, we recommend the use of Automated Page names and Sectioning. Automated Page names help because they replace the page's URL-address with a clear page name in Snoobi's report. Sectioning has many uses, which all aim to group the website content in a manageable manner.
The automated Page names and automated Sectioning are created by adding the parametres &page_name= and §ion= into the snoobi.trackPageView function. Please note! You must turn on Automated Page names or Sectioning from the Snoobi account's settings, in order for the extra paremetres to work in the snoobi.trackPageView function. You can check whether or not automated Page names or sections are enabled by checking the source code of the site. If the parametre &page_name= is present at the end of the Snoobi tag, it means that automated Page names are enabled. If the parametre §ion= is present at the end of the Snoobi tag, it means that automated Sectioning is enabled.
Example 2. An animation located in www.kampanjantekijat.com/flash
A visitor presses a navigational button in the animation, and is taken to frame number 3. When frame number 3 loads, it calls the tracking function pathParam with a parameter value of ”/frame_3”. It also calls the page_name parametre with a value of ”Flash » Frame 3” as well as the section parametre with the value ”Demo flash section” :
snoobi.trackPageView('/frame_3','Flash » Frame 3','Demo flash section');

Image 3. Calling the animation's snoobi.trackPageView –function using the pagename and section parametres
In example 2, a page view named Flash » Frame 3 will be registered in the Snoobi report. This page view will also show up in the section called Demo.
Image 4. URL-addresses with Page names, as seen in the Snoobi report (compare image 2)
|
Here, you may download a Flash example (.fla), which will illustrate how the tracking ought to work if automated Page names and Sectioning are in use (304 KB). To open the file, you will need Adobe Flash 8 / CS3. |
What is worth being tracked in a Flash animation?
It can be useful to track all types of actions which may be helpful in determining the quality of a visitor. Here are some examples of good actions to track:
1. Moving within the navigation
- when the visitor clicks / navigates his way to different parts of the Flash animation
2. Watching videos
- which videos are viewed in the animation
- we recommend adding check points to the video, which will reveal how far the video is watched
- the video can be divided in, for example, five different parts. Each time a fifth of the video has been watched, the snoobi.trackPageView function calls a different pathParam value
1/5 elapsed -> snoobi.trackPageView('/video_start')2/5 elapsed -> snoobi.trackPageView('/video_2_5')3/5 elapsed -> snoobi.trackPageView('/video_3_5')4/5 elapsed -> snoobi.trackPageView('/video_4_5')5/5 elapsed -> snoobi.trackPageView('/video_end')





