Container.FunctionCallMacroCallback | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Tools & Reference
  - Developer Stories

## Results

Loading...
public static interface

# Container.FunctionCallMacroCallback

com.google.android.gms.tagmanager.Container.FunctionCallMacroCallback

## Class Overview

Callback that is provided by the application to calculate the value of a custom macro.

## Summary

Public Methods
abstract Object | getValue(String functionName, Map<String, Object> parameters) Callback is given the Function Name of the macro and a map of named parameters (the map may contain String, Double, Boolean, Integer, Long, Map, or List values).

## Public Methods

#### public abstract Object getValue (String functionName, Map<String, Object> parameters)

Callback is given the Function Name of the macro and a map of named parameters (the map may contain String, Double, Boolean, Integer, Long, Map, or List values). It should return an object which is the calculated value of the macro.

The `functionName` is the same name by which the callback was registered. It's provided as a convenience to allow a single callback to be registered for multiple function call macros.

When application code makes a call to push an event to the data layer or to get a data value from a `Container`, that may cause this callback to execute. The callback will execute on the same thread as the push or get call.

##### Returns

- a String, Double, Boolean, Integer, or Long