iOS タグ マネージャーの詳細設定
関数呼び出し変数と関数呼び出しタグを追加して、Google タグ マネージャーの機能を拡張することができます。関数呼び出し変数を使用すると、事前登録された関数の呼び出しによって返された値を取得できます。関数呼び出しタグを使用すると、事前に登録された関数を呼び出して、たとえば、Google タグ マネージャーのタグ テンプレートで現在サポートされていない追加の測定ツールやリマーケティング ツールのヒットをトリガーすることができます。
カスタムタグを作成するには、TAGCustomFunction
プロトコルを実装するクラスを作成します。
@implementation MYCustomTag<TAGCustomFunction>
- (NSObject*)executeWithParameters:(NSDictionary*)parameters {
// Add custom tag implementation here.
}
@end
カスタム変数を作成するには、TAGCustomFunction
プロトコルを実装するクラスを作成します。
@implementation MYCustomVariable<TAGCustomFunction>
- (NSObject*)executeWithParameters:(NSDictionary*)parameters {
// Return the value of the custom variable.
return @42;
}
@end
TAGCustomFunction
を使用してクラスを設定したら、タグ マネージャーのウェブ インターフェースを使用して、作成したクラス名でタグまたは変数を設定します。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-11-08 UTC。
[null,null,["最終更新日 2024-11-08 UTC。"],[[["Function Call variables and tags extend Google Tag Manager's capabilities by enabling custom functions."],["Function Call variables capture values from pre-registered functions, while Function Call tags execute them."],["Custom tags and variables are created by implementing the `TAGCustomFunction` protocol in a class."],["These custom classes are then utilized within Tag Manager's interface to set up new tags or variables."]]],["Function Call variables and tags in Google Tag Manager enhance its capabilities by interacting with pre-registered functions. Both utilize a class implementing the `TAGCustomFunction` protocol, with the `executeWithParameters` method defining their behavior. For a tag, this method executes custom logic; for a variable, it returns a value. After implementing the protocol in the class, you can use the Tag Manager web interface to create tags or variables by referencing the class name.\n"]]