고급 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
으로 설정되면 태그 관리자의 웹 인터페이스를 사용하여 이전에 만든 클래스 이름으로 태그 또는 변수를 설정합니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 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"]]