Created
July 13, 2016 01:41
-
-
Save marchbold/efda3c8b4345fd00869a12131adb0196 to your computer and use it in GitHub Desktop.
Measuring the Checkout Process using the Google Analytics ANE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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