Skip to content

Init Analytics SDK#1

Merged
yosriady merged 19 commits intomainfrom
feat/init-sdk
Oct 18, 2024
Merged

Init Analytics SDK#1
yosriady merged 19 commits intomainfrom
feat/init-sdk

Conversation

@kiuthy229
Copy link
Contributor

No description provided.

@kiuthy229 kiuthy229 marked this pull request as draft October 14, 2024 09:49
@kiuthy229 kiuthy229 marked this pull request as ready for review October 15, 2024 11:21

// Function to send tracking data
private async trackEvent(action: string, payload: any) {
private async trackEvent(action: string, payload: any, retries: number = 3) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be hardcoded as a constant to prevent spam and abuse (a builder can set a really high retry number and spam the endpoint)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kiuthy229 Remove the retries input and hardcode it with a constant

@kiuthy229
Copy link
Contributor Author

Screenshot 2024-10-17 at 17 35 29
Screenshot 2024-10-17 at 17 35 24
Screenshot 2024-10-17 at 17 35 19


// Function to send tracking data
private async trackEvent(action: string, payload: any) {
private async trackEvent(action: string, payload: any, retries: number = 3) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kiuthy229 Remove the retries input and hardcode it with a constant

Copy link
Contributor

@yosriady yosriady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-10-17 at 18 09 18

@yosriady
Copy link
Contributor

Running into a network error / Axios error when I paste the snippet from https://www.npmjs.com/package/@formo/analytics
No events are getting into tinybird

Screenshot 2024-10-17 at 19 20 38 I remove the snippet from the of formo.so - Feel free to re-test when you're free

Screenshot 2024-10-17 at 19 21 54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments