Plugin Dev: Any rules for declaring variables on window?
-
I’m building a plugin that I hope to have published in the plugin directory. I’d like to use Segment to consensually track some usage analytics in my plugin’s admin page.
Segment’s Javascript library sets something on the
window.analytics
global. Is this okay? Would I want to just make sure I only enqueue it on my admin page? Is there something special I should do? One concern was possible variable name collisions.I’m having trouble Googling. Getting mostly stuff about Segment/analytics plugins, rather than plugin dev.
Thank you!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Plugin Dev: Any rules for declaring variables on window?’ is closed to new replies.