Skip to content
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

Add event listener for XB's. #273

Merged
merged 4 commits into from
Nov 1, 2022
Merged

Add event listener for XB's. #273

merged 4 commits into from
Nov 1, 2022

Conversation

robindevitt
Copy link
Contributor

Related issue - https://github.com/humanmade/product-dev/issues/1246

This PR adds an event listener for when Altis Experiences Blocks are changed.

Copy link
Contributor

@roborourke roborourke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JS code is good but this will load the script on every page regardless of whether GaussHolder and native analytics are enabled.

I think it's good to avoid an extra HTTP request too for a small amount of code, a good option would be to use the wp_add_inline_script(), and use the registered script name of either the experiments JS or the GuassHolder JS. You can also check against the Altis config for whether or not the code needs to be run.

Copy link
Contributor

@roborourke roborourke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants