Newer Version Available

This content describes an older version of this product. View Latest

Engagement Interactions

An engagement interaction occurs when a customer engages with your site through buttons, links, or other page elements.
Interaction Name Description
anchor-click Captures any anchor click.
button-click Captures any button click.
page-scroll-to-bottom Captures when a user scrolls to the bottom of the page.
page-view Captures the event when a user views a page.

Fields

Field Details
attributes
Type
object
Description
A dictionary of values that you supply.
linkhref
Type
string
Description
The web address of the link to capture.
name
Type
string
Description
Required. The event name.

Anchor Click Interaction Event

1event.target.dispatchEvent(
2    new CustomEvent('experience_interaction', {
3        bubbles: true,
4        composed: true,
5        detail: {
6            name: 'anchor-click',
7            linkHref: 'https://expectedUrl'
8            attributes: {
9                buttonLabel: 'Click here'
10            },
11        },
12    })
13);

Button Click Interaction Event

1event.target.dispatchEvent(
2    new CustomEvent('experience_interaction', {
3        bubbles: true,
4        composed: true,
5        detail: {
6            name: 'button-click',
7            attributes: {
8                buttonLabel: 'Click here'
9            }
10        },
11    })
12);