Avectra.netForum.Integration.IntegrationInterfaces.IWebAnalyticsInterface
This interface is used to implement Web Analytics in netFORUM eWeb. This class is used to develop a script that will be inserted at the bottom of every eWeb web page. Additionally, this class is used to generate an eCommerce script that is inserted by eWeb on the order receipt page.
To implement a web analytics software in netFORUM eWeb, create a subclass of this interface class, implement the two methods, create the three property declarations, and then update the following system options with the name of your assembly and namespace:
Properties
These properties must be implemented. The properties are set by the framework (for PageTracker) and by ReceiptAnalytics.ascx for ECommerce transactions.
- DomainName
- QueryString
- Url
A subclass is required to implement these three properties. You do not need to set these properties in your code because netFORUM sets them for you (as described above). You don't actually have to do anything with these properties, but they are available for inspection if needed to develop scripts.
/// <summary>
/// Contains the DomainName of the Page.
/// </summary>
public string DomainName
{ get; set; }
/// <summary>
/// Contains the URL of the Page.
/// </summary>
public string Url
{ get; set; }
/// <summary>
/// Contains the QueryString of the Page.
/// </summary>
public string QueryString
{ get; set; }
Methods
These two methods must be implemented in a subclass. They should return a script (not including opening and closing script tags). See Advanced Settings for an explanation of how the attributeList parameter in GenerateECommerceReceiptScript is created.
/// <summary>
/// Generates a script to be included on a web page that contains eCommerce tracking information to post to the analytics service. This
/// information will typically contain a list of items purchased and information about the general order. This method should not include
/// opening or closing script tags.
/// </summary>
/// <param name="order">The OrderEntry object containing information about the transaction.</param>
/// <param name="attributeList">List of KeyValuePairs for extension code that can be use to tailor/personalize the script. These pairs
/// can be configured on a CMS page detail.</param>
/// <returns></returns>
string GenerateECommerceReceiptScript(Avectra.netForum.Components.OE.OrderEntry order, List<KeyValuePair<string, string>> attributeList);
/// <summary>
/// Generates a script for a web page to allow the page to be tracked. This will be included on every eWeb page.
/// </summary>
/// <returns></returns>
string GeneratePageTrackerScript();
Usage and Examples
- Google Analytics
- Avectra.netForum.Integration.netForumGoogleAnalytics.GoogleAnalytics - a subclass of this interface.