Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marchbold/efda3c8b4345fd00869a12131adb0196 to your computer and use it in GitHub Desktop.
Save marchbold/efda3c8b4345fd00869a12131adb0196 to your computer and use it in GitHub Desktop.
Measuring the Checkout Process using the Google Analytics ANE
var product:Product = new Product()
.setId( "P12345" )
.setName("Android Warhol T-Shirt")
.setCategory("Apparel/T-Shirts")
.setBrand("Google")
.setVariant("black")
.setPrice(29.20)
.setCouponCode("APPARELSALE")
.setQuantity(1);
var action:ProductAction = new ProductAction( ProductAction.ACTION_CHECKOUT )
.setCheckoutStep(1)
.setCheckoutOptions("Visa");
var builder:ScreenViewBuilder = ScreenViewBuilder(
new ScreenViewBuilder()
.addProduct( product )
.setProductAction( action )
);
var tracker:Tracker = GoogleAnalytics.service.defaultTracker;
tracker.setScreenName( "checkoutStep1" );
tracker.send( builder.build() );
// com.distriqt.GoogleAnalytics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment