You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to be able to load destination plugins conditionally. We've got a setup that loads Jitsu analytics through the @jitsu/js package. We use Jitsu itself only for statistical purposes, whereas our GTM destination also sets cookies of the marketing variety. As such, when a user has "statistics" enabled, but "marketing" disabled, we cannot load Jitsu at all, since it causes GTM to be loaded. What is the appropriate solution for this?
A suggested solution; it'd be great if the NPM package was a bit more modular, where I can specifically import and load plugins where needed. This would solve my issue, and downsize the Jitsu bundle significantly, since it now loads all destination plugins regardless of whether they are going to be used.
The text was updated successfully, but these errors were encountered:
The code doesn't load GTM unless you enabled it. It just contains a function that can load it. The javascript is very small, so there's very little benefit in making it modular.
@vklimontovich the original question remains; how would one conditionally load a plugin from the front-end? We want to load GTM based on consent (which is a different category than loading Jitsu), without having to send their consent to the server. Is this at all possible?
Summary
I'd like to be able to load destination plugins conditionally. We've got a setup that loads Jitsu analytics through the
@jitsu/js
package. We use Jitsu itself only for statistical purposes, whereas our GTM destination also sets cookies of the marketing variety. As such, when a user has "statistics" enabled, but "marketing" disabled, we cannot load Jitsu at all, since it causes GTM to be loaded. What is the appropriate solution for this?A suggested solution; it'd be great if the NPM package was a bit more modular, where I can specifically import and load plugins where needed. This would solve my issue, and downsize the Jitsu bundle significantly, since it now loads all destination plugins regardless of whether they are going to be used.
The text was updated successfully, but these errors were encountered: