using Nop.Core.Caching; namespace Nop.Plugin.Widgets.FacebookPixel; /// /// Represents plugin constants /// public class FacebookPixelDefaults { /// /// Gets the plugin system name /// public static string SystemName => "Widgets.FacebookPixel"; /// /// Gets the nopCommerce agent ID /// public static string AgentId => "plnopcommerce"; /// /// Gets the configuration route name /// public static string ConfigurationRouteName => "Plugin.Widgets.FacebookPixel.Configure"; /// /// Gets the generic attribute name to hide search block on the plugin configuration page /// public static string HideSearchBlockAttribute => "FacebookPixel.HideSearchBlock"; /// /// Gets the route name of checkout endpoint /// public static string CheckoutRouteName => "Checkout"; /// /// Gets the route name of one page checkout endpoint /// public static string CheckoutOnePageRouteName => "CheckoutOnePage"; /// /// Gets the route name of area /// public static string AreaRouteName => "areaRoute"; #region Caching /// /// Gets the cache key for configuration /// /// /// {0} : configuration identifier /// public static CacheKey ConfigurationCacheKey => new("Nop.Plugin.Widgets.FacebookPixel.Configuration-{0}", PrefixCacheKey); /// /// Gets the cache key for configurations /// /// /// {0} : store identifier /// public static CacheKey ConfigurationsCacheKey => new("Nop.Plugin.Widgets.FacebookPixel.Configurations-{0}", PrefixCacheKey); /// /// Gets the cache key for custom events /// public static CacheKey CustomEventsCacheKey => new("Nop.Plugin.Widgets.FacebookPixel.CustomEvents-{0}", PrefixCacheKey); /// /// Gets the cache key for widget zones /// public static CacheKey WidgetZonesCacheKey => new("Nop.Plugin.Widgets.FacebookPixel.WidgetZones", PrefixCacheKey); /// /// Gets the prefix key to clear cache /// public static string PrefixCacheKey => "Nop.Plugin.Widgets.FacebookPixel"; #endregion #region Tracked events /// /// Gets the name of an event when a person lands on website pages /// public const string PAGE_VIEW = "PageView"; /// /// Gets the name of an event when a product is added to the shopping cart /// public const string ADD_TO_CART = "AddToCart"; /// /// Gets the name of an event when a purchase is made or checkout flow is completed /// public const string PURCHASE = "Purchase"; /// /// Gets the name of an event when someone visit to a product page /// public const string VIEW_CONTENT = "ViewContent"; /// /// Gets the name of an event when a product is added to the wishlist /// public const string ADD_TO_WISHLIST = "AddToWishlist"; /// /// Gets the name of an event when a person enters the checkout flow prior to completing the checkout flow /// public const string INITIATE_CHECKOUT = "InitiateCheckout"; /// /// Gets the name of an event when a search is made /// public const string SEARCH = "Search"; /// /// Gets the name of an event when a person initiates contact with merchant business via contact form /// public const string CONTACT = "Contact"; /// /// Gets the name of an event when a registration form is completed /// public const string COMPLETE_REGISTRATION = "CompleteRegistration"; /// /// Gets the name of a session value to store prepared scripts for tracked events /// public static string TrackedEventsSessionValue => "FacebookPixelTrackedEvents"; #endregion #region Conversions API /// /// Gets the name of facebook conversions api base address to send tracked events /// public static string FbConversionsApiBaseAddress => "https://graph.facebook.com"; /// /// Gets the name of facebook conversions api version to send tracked events /// public static string FbConversionsApiVersion => "v13.0"; /// /// Gets the name of facebook conversions api event endpoint to send tracked events /// public static string FbConversionsApiEventEndpoint => "events"; #endregion }