Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

S4S Cloud The send2crm client records visitor activity within a Session using Events.

Event types are identified by a unique code, and each may store different information. S4S Cloud has builtBuilt-in support is provided for PAGE, FRAGMENT, and GOAL types, and supports the along with programmatic setting of any other custom type. All Event types record the type code and time of the activity.

...

GOAL events record a name and numeric value. They also trigger an automatic roll-up to the summary values on the Visitor data.

Automatic Goals

S4S Cloud The send2crm client automatically checks the document for elements that include Goal attributes on the load event. If you wish for a Goal to be registered, simply add the data-goalname and data-goalvalue attributes to any element in the document, e.g.:

...

If you need to trigger a re-check of the DOM after page load (e.g. due to AJAX content loading) you can call the S4S Cloud send2crm library function:

Code Block
languagejs
S4SCloudsend2crm.analytics?.setGoalsFromDomElements(document);

You may substitute document for any valid DOM Element to check only a subset of the page elements. S4S Cloud applies a class A CSS class is applied to processed elements to avoid duplicates.

...

If you’d like to trigger GOAL Events from custom JavaScript, simply call the S4S Cloud send2crm library function:

Code Block
languagejs
S4SCloudsend2crm.analytics?.setGoal('GoalName2', 5);

...

An event of any type can be added to the current session by calling the S4S Cloud send2crm library function:

Code Block
languagejs
let eventData = {
  customProperty1: 'customvalue1',
  customProperty2: 'customvalue2',
};
S4SCloudsend2crm.analytics?.setCustomEvent('CUSTOMTYPE', eventData);

...