Display Features

This guides describes how to enable advertising features using the Google Analytics SDK v4 for Android.

Overview

Enabling Advertising Features in Google Analytics allows you to take advantage of Remarketing, Demographics & Interests reports, and more.

Learn more about Google Analytics Advertising Features.

Implementation

To enable advertising features requires a single addition to your Google Analytics tracking code to collect the advertising id. Call the enableAdvertisingIdCollection method on the tracker for which you want to enable advertising features. For example:

// Get tracker.
Tracker t = ((AnalyticsSampleApp) getActivity().getApplication()).getTracker(
    TrackerName.APP_TRACKER);

// Enable Advertising Features.
t.enableAdvertisingIdCollection(true);

The feature works by collecting the advertising identifier. Please make sure to review and adhere to all applicable SDK policies when using this feature.