Ajax :: Google Analytics With Asynchronous Calls To Two Different Accounts?

Mar 28, 2011

I have a flash site that calls a JavaScript function to track events inside of the application, the _gaq is already implemented in the section of the html and it works perfectly fine with one account:

function customTracker(clickEventName)
{
_gaq.push (["_trackPageview", clickEventName]);
}

but now my customer wants to include special events from 3rd party companies and needs these to track into a different GA account. Before I try this out on the live server I wanted to ask if this would work:

function customTracker(clickEventName)
{
_gaq.push(["_setAccount", "UA-XXXXXXXXX-X"]); // the regular account
_gaq.push (["_trackPageview", clickEventName]);

[code]...

View 1 Replies


Similar Posts:


Ajax - Making Multiple Asynchronous Calls To Fetch Result From Multiple Services In The Single Click Of A Button In Flex?

Dec 27, 2010

In one of our project we are using flex for front end, blazeds/java in the backend. Its an existing code where services are prewritten. I have to make calls to 3 services in the backend (basically 3 remote objects) and get their result and store the result in an object and show the data of this object in a view.
Now in front end we are using Flex and Parsley Framework. I was thinking of the following approaches.

1) Making commands for each service call and storing the result in a shared object (model) and then displaying this model in the view. In this approach the problem is some services are needed in some other web pages, but they donot need the same model. How should i handle this scenario ? Should i make a asynchronous remote call and fetch the result and then again dispatch and event with the event object storing the result.

2) Making a service call , wait for the result then make another call and wait for the result and then make other call, not sure if this is the right way ?

View 2 Replies

Ajax :: Get Data From The Server In An Asynchronous Way In Flash?

Apr 14, 2010

How can we get data from the server in an asynchronous way in Flash? I am looking for something like XHR in actionscript.

View 2 Replies

ActionScript 3.0 :: Turning Asynchronous Calls To Synchronous?

Aug 27, 2008

Is there a way to have a synchronous call to a URL to retrieve the HTML code? If not, is it possible to turn an asynchronous call into a synchronous one using some trick? I can't believe Adobe wouldn't implement this option. I tried looping until the result is back but then the status function never fires making my loop infinite.

ranting.turn("ON");

I'm a ColdFusion developer and recently started working on a project in Flex. I am getting more and more frustrated with AS and Flex lately. It seems that whatever I'm trying to do is either really hard or impossible while it usually can be done with one line of code in ColdFusion. I'm still learning these languages and I'm sure my lack of knowledge is the reason but for some reason I can't get ahead with my project. It looks like the learning curve is much steeper than it should be.

ranting.turn("OFF");

Anyways, here's my code for testing this functionality. The main application file looks like this:

Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="init()">
<mx:Script>

[code]....

This works OK except the function returns false before the HTTP call returns its result. If I un-comment the while loop the onStatus function will never be called and therefore end up with an infinite loop. Not sure why this happens.

View 14 Replies

Flex :: Multiple Asynchronous Calls To Populate An Object?

Aug 28, 2010

I'm developing a Flex application and am having some trouble working with asynchronous calls. This is what I would like to be able do:

[Bindable] var fooTypes : ArrayCollection();
for each (var fooType : FooType in getFooTypes()) {
fooType.fooCount = getFooCountForType(fooType);[code]....

The issue I'm running into is that both getFooTypes and getFooCountForType are asynchronous calls to a web service. I understand how to populate fooTypes by setting a Responder and using ResultEvent, but how can I call another service using the result?

View 1 Replies

Flex :: Execute A Callback After A Set Of Asynchronous Service Calls Complete?

Dec 6, 2010

In Flex, I'm making a set of asynchronous calls:

service.method1.send().addResponder(responder1);
service.method2.send().addResponder(responder2);
service.method3.send().addResponder(responder3);

I want to execute some code after all of these service calls have returned (either success or failure, I don't care which). How can I do this?

View 1 Replies

Actionscript 3 :: Flash - Create User Accounts, Sign-ins And Admin Accounts?

Feb 25, 2010

How would you, in actionscript 3 make a way to create, log-in, sign-out, etc. of user accounts? I'm mostly looking for an API i can use and if there is, how would I use it?Alternatively, if there is no way to do it in AS3 as that is a longshot, how could I do it in html using dreamweaver?FYI: this is for a website.

View 1 Replies

Professional :: How To Add Google Analytics

Oct 7, 2010

I would like to add Google Analytics to my flash file. The flash file is contained in a HTML file, which I already added the script provided by Google Analytics. At the moment, when a user visits my site, regardless which page is visited, only the homepage is counted.
 
What as3 do I add to the flash file to keep track of each page that is being visited? I've tried a few codes provide on Google Analytics page and other tutorials, but none worked. The as3 for the menu buttons is displayed below.

[Code]...

View 1 Replies

ActionScript 2.0 :: Google Analytics Tracking?

May 7, 2010

I've integrated Google Analytics with Flash before using the previous tracker:

Code:
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">[code]...........

PS - Google Analytics is installed properly, as it is registering the index page.

PPS - THis was set up over a week ago, so should be good to go.

View 1 Replies

Google Analytics On Flex IFrames?

Sep 29, 2009

So I would like to include pageTracker code in the iFrames that is being called.However the iFrames in this case are called from Flex. We are building a pop up and calling the iframes within the pop up.

In this scenario, what is the best way to include the pageTracker code to track and trasnfer the visitor and campaign cookies from one domain to the next?

View 1 Replies

Flex :: Use Google Analytics On Vkontakte?

Dec 22, 2009

I want to use Google Analytics on my Vkontakte application (written with Flex). Vkontakte does not support naturally in Google Analytics (not as Facebook) which means I can't even put the Google Analytics JS at the bottom of the page (or even use JS for that matter). What I can use is the AS3 library of Google Analytics, but for some reason it reports of failed gif requests every time I use it to report on an event. Is it even possible to use Google Analytics on the described environment? If so, what could be the reason of the failed gif requests? Is it debugable?

[Code]...

View 3 Replies

Flash :: Google Analytics Library?

Mar 29, 2010

I am trying to push in the Google Analytics library into my As3 widget. I plan to use the EventTracking feature in addition to the regular HTML-like pageview tracking that it provides. I plan to use the library in As3 mode (not the Bridge mode) since the widget is embedded on a lot of external domains.

Using the SWC to add the component to my project adds about 50k in file size. And my widget in itself is a very painstakingly achieved 120kb. I cannot afford the 50k overhead and every KB trimmed takes me closer to actually using GA with my player.

I got the code down from [URL].. and am trying to figure out any libraries that I can weed out to save file size, yet retain core functionality.

View 1 Replies

Actionscript 3 :: Preloader And Google Analytics?

Oct 12, 2010

I'm using Google analytics in my flash app. It works perfectly, but the time to publich the app came and I'm using an external swf. as preloader, which only consists in an small progress bar and summons my Flash app once it's completely loaded.Now i'm getting this error:Error #1009: Error #1009: Cannot access a property or method of a null object

at com.google.analytics.core::IdleTimer()
at com.google.analytics::GATracker/_trackerFactory()
at com.google.analytics::GATracker/_factory()

[code].....

View 1 Replies

Flash :: Add Google Analytics Tracking?

May 19, 2011

I've got an AS2 flash movie that I need to add Google Analytics tracking into. The only classes I can find are for AS3, do you know of any class method to track in AS2?

View 1 Replies

ActionScript 3.0 :: Do Google Analytics In Flash?

May 6, 2010

Does anyone know how to do google analytics in flash?

View 2 Replies

ActionScript 3.0 :: Add Google Analytics To Flash?

Oct 7, 2010

I would like to add Google Analytics to my flash file. The flash file is contained in a HTML file, which I already added the script provided by Google Analytics. At the moment, when a user visits my site, regardless which page is visited, only the homepage is counted.What as3 do I add to the flash file to keep track of each page that is being visited? I've tried a few codes provide on Google Analytics page and other tutorials, but none worked. The as3 for the menu buttons is displayed below.[code]

View 4 Replies

Ajax :: Detect If HTTP Request Is From Browser / Flex Asynchronous Request?

Jun 1, 2010

When Flex application make an asynchronus HTTP request, does it add a special header to the request, like some JavaScript framework does? Something that indicates whether this request is an AJAX call/not.I just want my server side code to return different response format, depending on whether the request is made from browser/flex.

View 1 Replies

Flash :: Php - Ajax Calls Queued While Connected To Socket

Sep 19, 2011

I'm running into a problem while running both a Flash socket and using Ajax to load pages. Both work fine separately. I am able to browse my site using the Ajax calls, or I am able to send/receive messages through the socket. However, when the socket is connected for some reason the Ajax calls start to seemingly be put into a queue and never actually finish until I stop the socket.

If I disconnect from the socket, or close the socket on the server side, then the Ajax call immediately finishes and loads the page. The Ajax call never times out, it just waits forever, right up until I close the socket connection. In JavaScript, I'm using jQuery's $.getJSON() function to load the pages (which I thought were asynchronous calls). In Flash I'm using the basic ActionScript 3 Socket class:

[Code]...

View 1 Replies

ActionScript 3.0 :: Put Google Analytics In Asdoc Output?

Jun 23, 2010

I'm using the asdoc.exe program that came with Flex Builder 3 to generate documentation for FlashMOG. I want to put in my google analytics javascript before the closing body tag of each file. Is there some way to get asdoc to do this?

View 2 Replies

Flash :: Way To Implement Google Analytics Tracking?

Jun 1, 2011

I am looking for code, examples, library, components for using google analytics event tracking with my Actionscript 2 Flash movies. I can find info about AS3 on the google code site but not AS2. What is the best resource for tutorials and examples about tagging my Flash files to use the asynch google analytics code. I have found some old information about the old google analytics code.

View 2 Replies

ActionScript 3.0 :: Flash - Swfobject & Google Analytics

Sep 25, 2010

I make a site in pure as3, i make a swf file. Use swfobject, go to my html doc and make a simple version of the site with html and css as my alternate content. Add my javascript code provided by google analytics. Are the results from google analytics a combination of my html and flash enabled users, or only the html users.

View 1 Replies

Actionscript 3.0 :: Page Tracking With Google Analytics?

Aug 5, 2009

[URL] here's how I've re-written the code for AS3 - the corresponding javascript code is in the html file.

Code: Select allvar testLink1:URLRequest = new URLRequest("javascript:pageTracker._trackPageview('/folder/file.html');");
testButton_mc.addEventListener(MouseEvent.CLICK, trackLink1);
function trackLink1(event:MouseEvent):void
{
navigateToURL(testLink1);
}

View 2 Replies

ActionScript 2.0 :: Integrate SWFaddress Google Analytics?

Aug 27, 2009

I have an as2 site that calls different swfs to the stage from movieclips.The buttons are movieclips and the content that is pulled in is a different swf for each button.How would I go about integrating SWFaddress in here and being able to get analytics functionality out of it?

View 1 Replies

ActionScript 2.0 :: Set Up Google Analytics For A Full Flash Site?

Jan 22, 2010

I am trying to set up google analytics for a full flash site.

I added code to the html page and I think it's working properly - to see who is going to my site. But...for more advanced tracking, I think I need to add code to the flash file too.

View 1 Replies

Using Google Analytics To Track Action On My Flash Site?

Aug 7, 2009

I got this code to use google analytics to track activity on my flash site but I am not exactly sure on how to use it. Do I place the code on all the buttons I would like to track or is there a way to embed this code into to HTML document that my flash site is embedded in. I figured because of the onRelease action that it needs to be on a button,but I was hoping that there my be a better way. (My flash site has a lot of buttons.)

// legacy tracking codeindexLegacy_mc.onRelease = function()getURL("javascript:urchinTracker('/home/indexLegacy');");};

View 2 Replies

Professional :: Information On Google Analytics On A Video Player?

Feb 5, 2011

I'm have some videos and I would like to add analytics so I can track how many times they were played. Although it sounds like a simple task, I can't seem to find much on the subject.

View 1 Replies

Flex :: Lighter Version Of Google Analytics For Flash?

Nov 23, 2009

40k of compiled code seems like a lot to me to be making some straightforward flash-javascript calls and makes GA unsuitable for banner ad work as well.

Does anyone know if there is a 'lite' version of Google Analytics for Flash?

View 5 Replies

Flash :: Tracking Code For Google Analytics In ActionScript2

Jan 26, 2010

Im completely new to Flash and ActionScript2 but what I need is to add Google analytics code to track clicks from "button" Bellow is a part of my function

[Code]...

View 2 Replies

Actionscript 3 :: Adding Google Analytics To Adobe Air HTML?

Oct 12, 2010

I am attempting to add google analytics tracking to an Adobe Air app created with HTML and javascript.I have tried adding the ga.js file and using it like I would in a webpage:

<script type="text/javascript" src="lib/js/ga.js"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-********-1");
pageTracker._initData();
pageTracker._trackPageview('/test');
</script>

But this doesn't seem to register anything on the analytics dashboard.Have also tried using the GA for flash actionscript library but I can't seem to create an instance of the GATracker as it needs a DisplayObject?

EDIT :using the information from grapefrukt I tried the following:

air.Sprite = window.runtime.flash.display.Sprite;
air.GATracker = window.runtime.com.google.analytics.GATracker;
var tracker = new air.GATracker( new air.Sprite(), "UA-XXXXXXX-X", "AS3", false );

but I get the following error:TypeError: Error #1009: Cannot access a property or method of a null object reference

View 1 Replies

ActionScript 3.0 :: Dumbest Flash Component For Google Analytics

Feb 2, 2011

So I think this question is dumb, and I think I may know the answer already but, I think I may also be very confused, so hear goes. I have a website It is made up of an entire flash site, all in pure AS3, I have the flash component for google analytics, I have events set up all over the file to tell me when things are downloaded, using trackEvent, then all the navigation is all set with trackPageview, so thats all good. If I turn on the debug command and test the file, it tells me what is going on, the only event that fires automatically, is if the user watched the entire intro, it will wait for the intro to finish and track that as an event.

The next part of this site uses swfObject, to allow me to use alternate content. The html side of this site is almost the same as the flash side, it uses all the same event tracking, but no pageview tracking, as from my understanding this is tracked automatically when the user goes from section to section, the analytics code is within the head section. So my question is this. If a user has flash and goes to my site, it should only use the analytical stuff that is in the swf file, correct, however because the analytical data from the html file is in the head of that document, it should also track that at the same time, right. so would this chalk up in my analytics as 1 page visit or 2.

I have been running it this way for a month and the reason I am even questioning it is because, in October 2010 before this was all in place, I only had the analytics set up for the html side, and even that set up did not include any event tracking at all, at this point my analytics was averaging 2500 visits a month with an 83% bounce rate. This was obviously untrue as almost everything was counting as a bounce. Now in January my analytical data is looking very different, my visits are sitting on 5600 and my bounce rate is 39%, I think this is looking much better however I am still concerned because I do not know if I really am getting double the visits, or if the html is adding 1 and the flash is adding another simultaneously.

View 0 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved