Reusable Javascript files & global variables

we have custom Javascript implemented on multiple CTA buttons (in Container > Interactions > Run Javascript > Javascript Editor). At the moment we would need to update this on every single element if we needed to change anything. It would be great if there were options to:

  • have a single / reusable custom Javacript saved in a single place for the page that could be applied to multiple elements (so we don't need to edit code on each button whenever we need to make a change)

  • be able to create a dynamic variable that could be set globally for the page and used within the Javascript and edited in a single place (so that if that variable changes it just needs to be edited in one place)

Upvoters
Status

Reviewed

Board

πŸ’‘ Editor Feature Request

Date

2 months ago

Author

An Anonymous User

Subscribe to post

Get notified by email when there are changes.