0

I am trying to find a solution for integrating Google Analytics into an Adobe Animate exe file. I know there is information about plugging Google Analytics into Flash, which I had hoped would work in Adobe Animate CC, but it does not.

Has anyone tried this or know of a solution to make Google Analytics function correctly in an Adobe Animate EXE file?

Mosh Feu
  • 28,354
  • 16
  • 88
  • 135
  • I don't actually remember details for it was few years ago, but I used GA with AS3 and it was pretty easy. I just looked through you link, there are 2 SWC libraries you probably need to link to your project for it to work. – Organis Jun 13 '17 at 20:34

1 Answers1

0

https://developers.google.com/analytics/devguides/collection/other/flashTrackingSetupFlash

This should work as it spells out the solution for you right here.

import com.google.analytics.AnalyticsTracker;
import com.google.analytics.GATracker;
var tracker:AnalyticsTracker = new GATracker( this, "UA-111-222", "AS3", true );
playGame.addEventListener( MouseEvent.CLICK, onButtonClick );
function onButtonClick ( event:Event ):void
{
   tracker.trackPageview("/myGame1");
} 

Simply include the SWC, import the necessary elements (either in frame code or in a separate class file) and start tracking.

sfxworks
  • 1,031
  • 8
  • 27