To test this, please install the Google Analytics debugger on the Chrome Web Store or open your browser's Javascript console.
This is when you define any string as the category, action or label
Data attr test #1
Trigger event used: click
Result: Category: test_action, Action: test_action, Label: test_label
As of version 0.4.0 we have added the option to choose other trigger event types. You can define any valid event such as click
, focus
, blur
, mouseover
, mouseout
, touchstart
or touchend
or anything else.
Trigger event used: focus
Result: Category: page.title (wildcard), Action: page.href (wildcard), Label: test_label
Trigger event used: blur
Result: Category: test_action, Action: test_action, Label: test_label
Data attr test #2
Trigger event used: click
Result: Category: page.title (wildcard), Action: page.href (wildcard), Label: this is a label
Data attr test #3
Trigger event used: click
Result: Category: link.title (wildcard), Action: link.href (wildcard), Label: this is a label
Data attr test #4
Trigger event used: click
Result: Category: document.referrer (wildcard), Action: link.href, Label: this is a label
JS Test #1
Trigger event used: click
Result: Category: test_category_(using_js), Action: test_action_(using_js), Label: test_label_(using_js)
JS Test #2
Trigger event used: mouseover
Result: Category: page.href (wildcard), Action: page.title (wildcard), Label: test_label_(using_js)
JS Test #3
Trigger event used: click
Result: Category: link.href (wildcard), Action: link.title (wildcard), Label: test_label_(using_js)
JS Test #4
Trigger event used: click
Result: Category: document.referrer (wildcard), Action: link.title (wildcard), Label: test_label_(using_js)
JS Test #5
Trigger event used: click
Result: Category: Tracked with JS not attr call, Action: link.href (wildcard), Label: test_label_(using_js)