Avectra.netForum.Integration.netForumGoogleAnalytics.GoogleAnalytics

See Google Analytics. This is a subclass of Avectra.netForum.Integration.IntegrationInterfaces.IWebAnalyticsInterface.

Properties

These properties can be used for advanced programming:

  • Url - URL of the Page.
  • Querystring - QueryString of the Page
  • DomainName - DomainName of the Page.

Methods

The following protected methods can be overridden in a subclass:

AddItem - Used to generate the addItem script. Not recommended to override.

AddItems - Adds a set of addItem scripts by calling the AddItem method above. Not recommended to override.

AddTransHeader - generates the _addtrans portio of the script. Not recommended to override.

DomainNameForPageTracker - Returns the domain name that will be set in the _setDomainName property that is sent to Google Analytics. If this method returns empty string or null, then the _setDomainName will not be included. By default, method returns value of the Domain property of the Page if the WebAnalyticsSetBaseDomainName system option is set to True. Else returns empty string, so the _setDomainName property will not be sent to Google Analytics. If you need more nuanced tracking of the _setDomainName name, then override this method.

GenerateECommerceReceiptScript - the main method. Not recommended to override.

GenerateHeaderScript Returns the initial portion of the script for both PageTracker and ECommerceTracker, from variable declaration up to the _trackPageview command. Not recommended to override.

GeneratePageTrackerScript - develops the page tracker script that goes on every page. Does not include the opening and closing <script/> tags.

GetAffiliation - returns the string that will be passed as the "affilition or store name" in the header. If you need to send a more tailored value for this, then override this method. You can pass additional values in the attributeList parameter by setting them in the page detail as shown on the Google Analytics page, e.g.:

{BeginListAttributes}attributeKey:attributeValue;attributeKey2:{xxx_code}{EndListAttributes}
		

GetCategoryCode - returns the value that will be set in the "category or variation" of a particular item. This method may be overridden if default needs to change. By default, this is ptp_code (Product Type code). Note that the actual product category code is not available from the InvoiceDetail object.

GetOrderCode - returns the order code. Will be either inv_code or ord_code. Override only if you want to use a different order code.

GetSKUCode - returns the sku code. Override if you want to pass a different value. You can use any values contained in the InvoiceDetail parameter.

SetAllowLinker - Returns the line for _setAllowLinker if AllowLinker() returns true. May be overridden if different logic is needed.