الإعدادات المتقدمة لأداة "إدارة العلامات من Google" لنظام التشغيل 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
، استخدِم واجهة الويب على أداة "إدارة العلامات من Google" لإعداد العلامات أو المتغيّرات مع اسم الفئة الذي أنشأته.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-11-08 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-11-08 (حسب التوقيت العالمي المتفَّق عليه)"],[[["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"]]