Button

The button element represents a clickable button, used to submit forms or anywhere in a document for accessible, standard button functionality.

Buttons that are part of the navigation or a tool (form) should not be tracked. Only track buttons that strictly function as call-to-action.

Impression: call to action button is viewable

context variables

description

required

name

name of the button as described in tagging plan

yes

text

CTA text on button

yes

category

button category ( CTA, link, ...)

no

type

button type (inbound, outbound, ...)

no

placement

placement of button on page

no

targeturl

target url after click

no

targetname

target page name after click

no

variant

variant of A/B testing

no

eventData: {
 "event": "button-impression",
 "info": {
  "placement": "bottom",
  "name": "Send",
  "text": "Send"
 }
}

Click: onclick on CTA button

context variables

description

required

name

name of the button as described in tagging plan

yes

text

CTA text on button

yes

category

button category ( CTA, link, ...)

no

type

button type (inbound, outbound, ...)

no

placement

placement of button on page

no

targeturl

target url after click

no

targetname

target page name after click

no

variant

variant of A/B testing

no

eventData: {
 "event": "button-click",
 "info": {
  "placement": "top",
  "name": "Send"
 }
}

Last updated