Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Aby rozszerzyć funkcjonalność Menedżera tagów Google, możesz dodać zmienne wywołania funkcji i tagi wywołania funkcji. Zmienne wywołania funkcji umożliwiają przechwytywanie wartości zwracanych przez wywołania zarejestrowanych wcześniej funkcji. Tagi wywołania funkcji umożliwiają wykonywanie zarejestrowanych wcześniej funkcji (np. wywoływanie trafień w dodatkowych narzędziach do pomiarów i remarketingu, które nie są obecnie obsługiwane przez szablony tagów w Menedżerze tagów Google).
Aby utworzyć niestandardowy tag, utwórz klasę, która implementuje protokół TAGCustomFunction:
@implementationMYCustomTag<TAGCustomFunction>-(NSObject*)executeWithParameters:(NSDictionary*)parameters{// Add custom tag implementation here.}@end
Aby utworzyć niestandardową zmienną, utwórz klasę, która implementuje protokół TAGCustomFunction:
@implementationMYCustomVariable<TAGCustomFunction>-(NSObject*)executeWithParameters:(NSDictionary*)parameters{// Return the value of the custom variable.return@42;}@end
Po skonfigurowaniu zajęć za pomocą TAGCustomFunction użyj interfejsu internetowego Menedżera tagów, aby skonfigurować tagi lub zmienne z nazwą utworzonej przez siebie klasy.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 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"]]