omgwtfwow/segment-for-wp-by-in8-io

Analytics not defined errors when using User Role Filtering

Closed this issue · 1 comments

If you use the Filtering feature to exclude certain roles, you get a frontend JS error because the client-side Page events still fire, but the Analytics JS isn't loaded

image

image

This is because the Page class always trys to call the analytics.page(), but the main script is excluded from loading if the identified user isn't trackable.

I created a PR to fix this here:
https://github.com/omgwtfwow/segment-for-wp-by-in8-io/pull/10/files

Cheers, merged.
Will include in next release.