Copy link to clipboard
Copied
Hi,
I created a web site in Actionscript 2 and have been asked to add Google Analytics to it. This is the first person who has asked me to do this and when I log into Google Analytics, they only provide the code for Actionscript 3. Apparently there used to be just Actionscript 2 code there but for a while it has just been AS3. I am told that the old code still works and I know that someone out there must have it. Can anyone help me out with it?
Thank you,
-Jan
http://blog.circlecube.com/2008/01/28/integrate-google-analytics-with-flash-tutorial/
Copy link to clipboard
Copied
per your comments, an action is required.
Copy link to clipboard
Copied
I must be misinterpreting what the blog was saying. You are saying that I only need to use one value in the string since I am perfprming one operation?
Still so confused...
Copy link to clipboard
Copied
Do I just need import flash.external.*;
#include "logging.as"
at the top of the actionscript that I have for each swf that I want to track? Is the other code to track a specific event?
Copy link to clipboard
Copied
in logging.as look at trackGA(). there are two parameters that are required and, i think, 2 that are optional.
if 2 are required, you must pass 2 each time trackGA() is called. you're not doing that.
and there may be more errors beyond that. i only check until i find an error.
Copy link to clipboard
Copied
I made adjustments by adding the tracking code to each page as opposed to the navigation.
This is so frustrating. The Awstats picks up the swf files as well as the flv files without any additions to the code. The raw logs show all the files, swf and flv included. Why is Google Analytics so backwards that you have to jump through hoops writing code to track the swf and flv files. The owner of the web site is used to looking at the Google Stats and wants to use those. I am just really getting annoyed at this. The code is pinging the Google Stats but there is no differentiation from one swf to the next. This is so frustratingg!
Copy link to clipboard
Copied
Even with the sample files, I am still unable to get this right. I still don't understand why Google Analytics can't track .swf and .flv files the way other stat programs can... I am a designer so this is very frustrating to me. I get no answers at all from Google... i see .swf and .flv in the raw data files so I don't understand why Google chooses to ignore those.
Copy link to clipboard
Copied
this is how the GA is tracking:
829 | 734 | 00:00:43 | 69.07% | 65.86% | $0.00 | ||
2. | 384 | 134 | 00:00:46 | 100.00% | 33.07% | $0.00 | |
3. | 311 | 78 | 00:00:33 | 0.00% | 19.94% | $0.00 | |
4. | 1 | 1 | 00:00:00 | 100.00% | 100.00% | $0.00 | |
5. | 1 | 1 | 00:00:00 | 100.00% | 100.00% | $0.00 |
This is how the Awstats is tracking:
| Viewed | Average size | Entry | Exit |
/index | 1070 | 5.86 KB | 959 | 836 |
51 | 2.20 MB | 1 | 23 | |
41 | 26.97 MB |
| 16 | |
36 | 23.98 MB | 1 | 17 | |
31 | 102.42 KB |
| 9 | |
21 | 121.90 KB |
| 5 | |
19 | 42.89 MB | 1 | 7 | |
19 | 90.58 KB |
| 13 | |
16 | 3.57 MB | 1 | 7 | |
16 | 15.95 KB | 1 | 3 | |
15 | 21.79 MB | 1 | 7 | |
12 | 176.22 KB |
| 3 | |
11 | 98.42 KB | 1 |
| |
10 | 4.90 MB |
| 4 | |
9 | 171.19 KB |
| 4 | |
9 | 24.78 MB |
| 2 | |
7 | 23.98 MB |
| 3 | |
7 | 4.53 MB | 1 | 4 | |
6 | 16.33 MB |
|
| |
4 | 15.27 MB | 1 | 1 | |
3 | 29.54 MB |
| 2 | |
3 | 26.97 MB |
| 2 | |
1 | 23.98 MB |
| 1 |
Find more inspiration, events, and resources on the new Adobe Community
Explore Now