feat: event tracking using posthog and created application provider to render multiple wrappers (#2757)
* fix: event tracker changes * fix: App provider implementation using wrappers * fix: updating packages * fix: handling warning * fix: wrapper fixes and minor optimization changes * fix: chore app-provider clearnup * fix: cleanup * fix: removing jitsu tracking * fix: minor updates * fix: adding event to posthog event tracker (#2802) * dev: posthog event tracker update intitiate * fix: adding events for posthog integration * fix: event payload --------- Co-authored-by: Ramesh Kumar Chandra <31303617+rameshkumarchandra@users.noreply.github.com>
This commit is contained in:
parent
33be52792f
commit
78fee22fec
114 changed files with 825 additions and 2768 deletions
|
|
@ -1,14 +1,11 @@
|
|||
import { APIService } from "services/api.service";
|
||||
import { TrackEventService } from "services/track_event.service";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "helpers/common.helper";
|
||||
// types
|
||||
import { IUser, IGithubRepoInfo, IGithubServiceImportFormData } from "types";
|
||||
import { IGithubRepoInfo, IGithubServiceImportFormData } from "types";
|
||||
|
||||
const integrationServiceType: string = "github";
|
||||
|
||||
const trackEventService = new TrackEventService();
|
||||
|
||||
export class GithubIntegrationService extends APIService {
|
||||
constructor() {
|
||||
super(API_BASE_URL);
|
||||
|
|
@ -32,16 +29,9 @@ export class GithubIntegrationService extends APIService {
|
|||
});
|
||||
}
|
||||
|
||||
async createGithubServiceImport(
|
||||
workspaceSlug: string,
|
||||
data: IGithubServiceImportFormData,
|
||||
user: IUser | undefined
|
||||
): Promise<any> {
|
||||
async createGithubServiceImport(workspaceSlug: string, data: IGithubServiceImportFormData): Promise<any> {
|
||||
return this.post(`/api/workspaces/${workspaceSlug}/projects/importers/${integrationServiceType}/`, data)
|
||||
.then((response) => {
|
||||
trackEventService.trackImporterEvent(response?.data, "GITHUB_IMPORTER_CREATE", user);
|
||||
return response?.data;
|
||||
})
|
||||
.then((response) => response?.data)
|
||||
.catch((error) => {
|
||||
throw error?.response?.data;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue