This is undocumented use of FB's lib but looking at the code regarding how they handle the automatic pageview tracking, setting disableStatePush to true will prevent their library triggering its own page views -- that should only happen when our .page() call is invoked.
This is FB's logic for automatic pageview tracking:
(function ca() {
if (j.disablePushState === true)
return;
if (!d.pushState || !d.replaceState)
return;
var da = function() {
s = m;
m = c.href;
if (m === s)
return;
var ea = new v({
allowDuplicatePageViews: true
});
j.trackWithoutValidation.call(ea, 'PageView');
}
;
h.injectMethod(d, 'pushState', da);
h.injectMethod(d, 'replaceState', da);
a.addEventListener('popstate', da, false);
})();
Also there was an empty #loaded test describe block so I removed that and added some additional tests that checks for proper initialization.
This fixes #5.
This is undocumented use of FB's lib but looking at the code regarding how they handle the automatic pageview tracking, setting
disableStatePush
totrue
will prevent their library triggering its own page views -- that should only happen when our.page()
call is invoked.This is FB's logic for automatic pageview tracking:
Also there was an empty
#loaded
testdescribe
block so I removed that and added some additional tests that checks for proper initialization.@sperand-io @segment-integrations/core