I have a flash site that calls the JavaScript function to track events inside the app, before _gaq It is implemented in the section from Html and works perfectly well with one account:
function custom tracker (clickEventName) {_gaq.push (["_trackPageview", clickEventName]) ; } But now my client wants to include special events from third party companies and they need to track in a different GA account. Before I try it on a live server, I would like to ask:
function custom tracker (clickEventName) {_gaq.push (["_ setAccount", "UA-XXXXXXXXX- X "]); // regular account _gaq.push (["_trackPageview", clickEventName]); } Function customThirdPartyTracker (clickEventName) {_gaq.push (["_ setAccount", "UA-XXXXXXXXX-X"]); // New account for third party tracking _gaq.push (["_trackPageview", clickEventName]); } I got a stack similar question on overflow, but the answer was only '' to use the new asynchronous tracking, but there was really no words to describe how it is implemented.
Thanks for any advice advances.
There is no problem sending data to multiple GA accounts, so your code should work
Comments
Post a Comment