Tracking and Consent Functions
create (<integer> piAId, <integer> piCId, <string> tracker domain hostname)
Creates the Account Engagement tracker necessary for analytics. Add 1000 to the Account Engagement instance ID (
piAId) and the campaign ID (
set(<string> propertyName, value)
Updates the value of a tracked property. Subsequent page views sent to Account Engagement include the updated property value. See Writeable Analytics Parameters for the properties that support updates.
Sends a page view to Account Engagement that includes the current values of Tracker object properties. If the value of the
pi_opt_in cookie is false, then no request is made.
Shows the Account Engagement consent banner, allowing the visitor to choose to give consent to Account Engagement analytics tracking.
hideConsentBanner(<null|boolean > status)
Hide the Account Engagement consent banner from the page. If
false is given, the
pi_opt_in status is updated. If
null is given, the banner is hidden and the status isn't updated.
Set the value of the
pi_opt_in cookie. Account Engagement analytics only records page views when the value of this cookie is
Deletes any existing visitor tracking cookies and sets the
pi_opt_in cookie value to
pi_opt_in cookie is true or unset a page view request is sent to Account Engagement. If your Account Engagement settings require the visitor to give consent based on their geo, then no page view is recorded and the Account Engagement consent banner is displayed.
Deletes all Account Engagement tracking cookies.
Adding analytics actions to the queue is the primary way to interact with Account Engagement analytics. To retrieve data from the Account Engagement analytics tracker, pass a callback function into the queue. The callback function is executed when the queue is processed and it is passed a reference to the Account Engagement tracker.
Since analytics is processed asynchronously, interacting with tracked values must be done within a callback function that is processed after the analytics library has loaded. In this example the current consent status is fetched, which then can be used to gate logic on your web page.
Returns the value of a tracked property.
Returns the current consent status for the Account Engagement tracker. If no consent status has been set,
null is returned.
The following parameters can be updated using the
|String||The url of the tracked page. default: document.URL.|
|String||The title of the tracked page. default: document.title.|
|String||The referring location to the tracked page. default: document.referrer or query string param 'referrer' if it exists.|
|String||Manually link a visitor to a prospect by email address. Must be a valid email address.|
|Integer||Manually override score for page view.|
|Integer||Manually set the profile for visitors.|
|String||Google Analytics parameter. Can be used to set Account Engagement campaign.|
|String||Google analytics parameter. Distinguishes Bing/Yahoo natural vs. paid search.|
|String||Google analytics parameter. Can be used to set the prospect's source field.|
|String||Google analytics parameter. Used with an ad id in the Google Ad Keyword report.|