fullstorydev / fullstory-browser-sdk

Official FullStory SDK for JavaScript, for web browsers
MIT License
55 stars 17 forks source link

Added a code snippet for Vue #62

Closed xi-osman closed 4 years ago

xi-osman commented 4 years ago

Added a code snippet on how a developer would initialize the FullStory SDK on a Vue Js app, This is also adding the SDK to the Vue instance property which will allow other Vue instances to have access to that property.

Example calling an event from another Vue component would look like this.

this.$FullStory.event("Subscribed", {
  uid_str: "750948353",
  plan_name_str: "Professional",
  plan_price_real: 299,
  plan_users_int: 10,
  days_in_trial_int: 42,
  feature_packs: ["MAPS", "DEV", "DATA"]
});
patrick-fs commented 4 years ago

Hi @xi-osman thanks for for the PR! We'll take a look.