-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event provider JS doesn't load on production build #8955
Comments
@10upsimon I actually had a similar issue on my Consent Mode refactor issue #8384 today, this is how I fixed it. |
IB ✅ |
@tofumatt @10upsimon @benbowler
This would work but isn't necessary as |
Thanks @aaemnnosttv I've simplified this and handed back to you. |
@10upsimon while this will have the intended outcome as far as loading the script is concerned, it's changing the handle to be generic. E.g. Since the entry name also defines the default resulting filename, there's no need to add the prefix to the |
IB ✅ |
QA Update ✅
JS files WPFORMS Woocommerce |
Bug Description
The event provider JS loaded on the front end for its respective supported plugin integration for enhanced conversion tracking does not load when using a production build of Site Kit. It does work on development builds, but not intentionally.
Steps to reproduce
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
googlesitekit-events-provider-
prefix for consistencyImplementation Brief
webpack/conversionEventProviders.config.js
:entry
object with'googlesitekit-events-provider-'
, i.e'googlesitekit-events-provider-contact-form-7': './assets/js/event-providers/contact-form-7.js',
includes/Core/Conversion_Tracking/Conversion_Event_Providers
folder, undertake the following changes:'gsk-cep-'
string from the handle passed toScript()
with the string value prepended to filenames in the webpack config,'googlesitekit-events-provider-'
. This will ensure correct resolving of the script src by theScript
class, regardless of production or development modes.src
entry of theScript()
args unchanged.Test Coverage
QA Brief
.js
files now load correctly by viewing page source and searching forgooglesitekit-events-provider-contact-form-7-$HASH.js
Changelog entry
The text was updated successfully, but these errors were encountered: