Google Analytics App + Web Tracking

2 September 2020

Author Image
Alex is a senior analytics expert @Viden with years of experience in analytics strategy and data collection planning, driving value for brands through data-driven insights.

Not so long ago Google released a new feature – ‘App + Web Property’ that allows tracking data from both mobile apps and websites. In this blog post, we will learn what features ‘App + Web Property’ offers.


  1. Enhanced Measurement (Web)
  2. Event Measurement
    1. Automatically collected events (App)
    2. Recommended events (App)
    3. Custom events (App)
    4. Conversions (App)
    5. User Properties (App)
  3. eCommerce Measurement (App)
    1. Android Purchase code snippet
    2. iOS Purchase code snippet
  4. Summary

Unlike other Google Analytics Properties, data in ‘App + Web Property’ is divided into so-called ‘Data Streams’. For example, if you want to track combined data from a website, an iOS app and an Android app, you would need to create 3 data streams for the website as well as iOS and Android apps.


1. Enhanced Measurement (Web)

For the website data stream, Google provides the ‘Enhanced Measurement’ feature, which allows you to track page views; scrolls; outbound clicks; site search; video engagement; and file downloads automatically. All you need to do is enable it:

We won’t dive into great detail, but here are a few quick words on each tracking item:
Page views – automatically enabled via Enhanced Measurement. Additionally, page views can be tracked based on ‘history-based’ events.
Scrolls – pretty straightforward – the event is fired when a page is scrolled to the bottom. No need for additional configuration.
Outbound clicks – relevant for all businesses to gain insights on which external domains or links take the user off your site.
Site Search – enable this feature if you have site search functionality available on your website. When a user makes a search, a special parameter is added to the URL – you should specify this parameter in the additional configuration in order to make the site search event fired.
Video engagement – enable to track YouTube videos on your website.
File downloads – the event is fired when a user clicks a link leading to a file (pdf, doc, xls, etc.)


2. Event Measurement

Events are needed to show what actions take place on your app and website, e.g. clicks, form submissions, errors, etc. In the App + Web property a lot of events are tracked automatically (for apps), so there is no need to add any.


Automatically collected events (App)

Once iOS or Android SDK is implemented in your app, some events are tracked automatically such as first_visit, session_start, user_engagement, and page_view.


Recommended events (App)

Depending on your business type/category, App + Web Property offers recommended events. You can send these recommended events along with their prescribed parameters to get maximum benefits.

But what if neither automatically collected events nor recommended events allow you to track required actions? Then, you should use custom events (you can log up to 500 different Analytics event types).


Custom events (App)

To implement a custom event in your app, you should:
[1]: Know exactly under what conditions the event should be fired.
[2]: Think about event taxonomy (event name, parameters).
[3]: Prepare a code snippet for the implementation to send to developers.
For example, you need to track when a user taps a specific CTA button (e.g. ‘Buy Now’) in your app (iOS and Android) on a particular screen (e.g. on the main screen).
Where ‘cta’ is ‘event name’; ‘event_label’ is a custom parameter to track button title (‘Buy Now’) and ‘event_category’ is a custom parameter to track event location (main screen).
The following code snippets can be used:


Analytics.logEvent("cta", parameters: [
  "event_label": "buy_now" as NSObject,
  "event_category": "main_screen" as NSObject


Bundle params = new Bundle();
params.putString("event_label", "buy_now");
params.putString("event_category", "main_screen");
mFirebaseAnalytics.logEvent("cta", params);

1. Link to the Firebase documentation on how to log events (Android).
2. Link to the Firebase documentation on how to log events (iOS).
3. Always remember to set up parameter reporting in your ‘App + Web’ property. You need to assign parameters to the specific event under the ‘All events’ tab.


Conversions (App)

Conversions show how many conversion events were driven by each aspect of your marketing, along with the value of those events. You can mark any event as a conversion in Google Analytics:


User Properties (App)

User properties are attributes that can be used to describe segments of your user base, such as language preference or geographic location, etc. Analytics automatically logs some of the user properties. Additionally, 25 user properties can be set up per project.
For example, you need to track user status e.g. ‘guest’ or ‘customer’.
Where ‘user_status’ is a user property name; ‘guest’ or ‘customer’ is a user property value.

The following code snippets can be used for ‘guest’:

Analytics.setUserProperty("guest", forName: "user_status")


firebaseAnalytics.setUserProperty("user_status", "guest")


3. eCommerce Measurement (App)

In addition to conversions, it is advantageous to send the whole set of eCommerce events to understand the full conversion cycle. The list of supported events includes events such as view_item, add_to_cart, and begin_checkout that come along with a list of suggested parameters to enable deep and powerful product analysis.


Android Purchase code snippet

Below is the code example to track purchases on an Android app that are not processed in Play Market. Values in <> brackets are dynamic, so they should be pulled dynamically for each purchase with corresponding values.

// Define product with relevant parameters
Bundle product1 = new Bundle();
product1.putString( Param.ITEM_ID, "");            // ITEM_ID or ITEM_NAME is required
product1.putString( Param.ITEM_NAME, "");         // Item Name
product1.putString( Param.ITEM_CATEGORY, ""); // Item Category
product1.putString( Param.ITEM_VARIANT, "");   // Item Variant
product1.putString( Param.ITEM_BRAND, "");       // Item Brand
product1.putDouble( Param.PRICE, "");            // Item Price
product1.putString( Param.CURRENCY, "" );         // Item-level currency unused today 
product1.putLong( Param.QUANTITY, "");        // Item Quantity

// Prepare ecommerce bundle
ArrayList items = new ArrayList();
Bundle ecommerceBundle = new Bundle();
ecommerceBundle.putParcelableArrayList( "items", items );

// Set relevant transaction-level parameters
ecommerceBundle.putString( Param.TRANSACTION_ID, "" );
ecommerceBundle.putString( Param.AFFILIATION, "" );
ecommerceBundle.putDouble( Param.VALUE, "" );        
ecommerceBundle.putDouble( Param.TAX, "" );
ecommerceBundle.putDouble( Param.SHIPPING, "" );
ecommerceBundle.putString( Param.CURRENCY, "" );
ecommerceBundle.putString( Param.COUPON, "" );

// Log purchase event with ecommerce bundle
mFirebaseAnalytics.logEvent( Event.PURCHASE, ecommerceBundle );

[1]: Link to the Firebase documentation about ‘ECOMMERCE_PURCHASE’ event.
[2]: Link to the developer documentation about Android ‘ECOMMERCE_PURCHASE’ event.
[3]: The code above should NOT fire repeatedly when a user reloads the confirmation screen or navigates back to the confirmation screen (this will lead to transaction duplication and revenue discrepancy).


iOS Purchase code snippet

Below is the code example to track purchases on an iOS app that are not processed in App Store. Values in <> brackets are dynamic, so they should be pulled dynamically for each purchase with corresponding values.

// Define products with relevant parameters.
NSDictionary *product1 = @{
   kFIRParameterItemID : @"",            // ITEM_ID or ITEM_NAME is required
   kFIRParameterItemName : @"",         // Item Name
   kFIRParameterItemCategory : @"", // Item Category
   kFIRParameterItemVariant : @"",   // Item Variant
   kFIRParameterItemBrand : @"",       // Item Brand
   kFIRParameterPrice : @,             // Item Price
   kFIRParameterCurrency : @"",         // Item-level currency unused today
   kFIRParameterQuantity : @        // Item Quantity

// Prepare ecommerce dictionary.
NSArray *items = @[product1];
NSDictionary *ecommerce = @{
   @"items" : items,
   kFIRParameterItemList : @"",         
   kFIRParameterTransactionID : @"",
   kFIRParameterAffiliation : @"",
   kFIRParameterValue : @,               
   kFIRParameterTax : @,
   kFIRParameterShipping : @,
   kFIRParameterCurrency : @"",
   kFIRParameterCoupon : @""

// Log purchase event with ecommerce dictionary.
Analytics.logEvent(AnalyticsEventPurchase, parameters:ecommerce)

[1]: Link to the Firebase documentation ‘ECOMMERCE_PURCHASE’ event.
[2]: Link to the developer documentation about iOS ‘ECOMMERCE_PURCHASE’ event.
[3]: The code above should NOT fire repeatedly when a user reloads the confirmation screen or navigates back to the confirmation screen (this will lead to transaction duplication and revenue discrepancy).



App + Web Property is a great feature with a cross-platform measurement. Now there is no need for additional set-up e.g. outbound link clicks just enable ‘Enhanced Measurement’ feature for the web data stream and that is it. App + Web provides a large list of automatically collected events for apps, however, of course in order to track macro and micro conversions you would need to implement custom tracking (events, user properties for apps). Moreover, App + Web Property provides a great built-in Funnel and Path Analysis Reports that are not available in other Google Analytics Properties. You can learn more about it in our Google Analytics App + Web Property Walkthrough blog post.

Related Insights

How Much Do Google Ads Cost: 2021 vs. 2022

3 January 2022

Google Ads is one of the largest advertising platforms that allows brands to reach potential customers through a great variety of ad formats, including search, shopping, video and display. It’s a popular choice for brands that are looking to start advertising their business online, and many of them have a lot of questions about Google Ads. […]
Learn more

Amazon Ads: The Ultimate Guide For Beginners

29 December 2021

Contents What Is Amazon Advertising Is Amazon Worth It: Pros & Cons How Amazon Advertising Works Before You Begin Amazon Ad Types Create Your First Campaign Amazon Ads Campaign Optimization Tips Conclusion What is Amazon Advertising? After launching in 2018, Amazon Advertising (previously known as Amazon Marketing Services) has become one of the largest digital […]
Learn more

How To Structure Your Google Ads Search Campaigns: Google Ads Account Structure Templates

20 December 2021

Having a solid account structure is the backbone of a successful account on any advertising platform. It allows you to control when, where, and for which searches you want your ads to appear, and how much you spend on different streams of traffic, incoming from your marketing campaigns. With a well-built account structure, you’ll have: […]
Learn more