Create one option to configure PagePing tracking
Problem
Currently the Analytics JS SDK needs two separate options to configure the Page Ping (an automatic ping event to gather data around time on site etc.). pagePingTracking
is a boolean to enable/disable the tracking whereas pagePingOptions
gives deeper configuration possibilities. This can be confusing since it can be unclear how they interact, e.g. when pagePingTracking
is set to false while there are options provided in pagePingOptions
.
Proposal
pagePingTracking
will have either true
/false
/{minimumVisitLength : number, heartbeatDelay : number }
If it is,
true -> we will enable page ping with default options.
false -> disable page ping
object -> override default setting
if not passed -> enable page ping with default options.