Google Tag Manager

Introduction

Google Tag Manager (GTM) enables developers to change configuration values in their mobile application using the Google Tag Manager interface without a need to rebuild and resubmit application binaries to app marketplaces.

AppsFlyer’s integration with GTM enables advertisers to seamlessly receive custom tags from GTM into AppsFlyer’s system.

Required Steps

Follow these steps to utilize the Google Tag Manager:

1.  Integrate the AppsFlyer SDK

2.  Create a Google Tag Manager account

3.  Implement the Google Tag Manager SDK for Android or iOS.

Getting Started

After integrating both the AppsFlyer SDK and the Google Tag Manager SDK, the AppsFlyer Device ID is passed to the GTM SDK.  First, you must retrieve the AppsFlyer Device ID.

Retrieving the AppsFlyer Device ID

An AppsFlyer proprietary unique ID is created for every new install of an app. AppsFlyer’s unique ID is the main ID used by AppsFlyer in Reports and APIs.

Use the following iOS API to obtain AppsFlyer’s unique ID (see full article here):

(NSString *) [AppsFlyerTracker sharedTracker] getAppsFlyerUID;

Use the following Android API to obtain AppsFlyer’s unique ID (see full article here)

String appsFlyerId = AppsFlyerLib.getInstance().getAppsFlyerUID(this);

Passing AppsFlyer ID to Google SDK 

Once you have the AppsFlyer Device ID, it must be passed to the Google Tag Manager SDK. You can learn how to get the configuration values from the container via the Google Tag Manager mobile APIs guides

Configuring Tag Events to be Fired

After completing the previous steps, you can now configure tags from the Google Tag Manager interface.

Application ID
Your application name, for example, com.google.gmail or id12345678
Dev Key
AppsFlyer Dev Key
AppsFlyer ID
Map the AppsFlyer ID collected by the AppsFlyer SDK
Event Name
Map event name collected by the Firebase SDK
Was this article helpful?
0 out of 0 found this helpful