We have a gatsby website that I am trying to track events. We have defined a tracking plan using Iteratively.
So I believe the steps are next to generate the sdk using that tracking plan. I have followed the steps in the documentation - https://developers.data.amplitude.com/browser. This generates a src/itly/index.js file which has methods for my track events. It also export itlySdk.
However I am unable to get this file properly included and working in our gatsby website. I have tried making a plugin but cannot get it to work.
My first question is the 2 different types of Browser - Javascript sources. I cannot find these mentioned anywhere in the docs. So should I be using Browser - Javascript or Browser - Javascript (Itly).
Secondly the file generate when using Browser - Javascript (Itly) exports itlySdk. Whereas the documentation steps talk about importing itly. https://developers.data.amplitude.com/browser#import-into-your-app. I don’t have itly defined in the generated javascript.
Thirdly the docs say “Since JavaScript is not a type-safe language, the library won't expose type-safe functions for the events in your team’s tracking plan.” But in the generated Javascript I see defined methods for my track events. For example
websitePageView(properties, options) {
this.itly.track(new WebsitePageView(properties), options);
}
Can anyone please help me out on these doubts. Any insights would be greatly appreciated.