Skip to content

Conversation

@laxman-aqw
Copy link
Collaborator

  • Added os column in url analytics
  • Added url filter service and end points
  • updated the url record clicks service to fetch browser, device and os
  • updated the url endpoint from url to urls
  • added DeleteDateColumn and updated to soft delete

@laxman-aqw laxman-aqw self-assigned this Oct 31, 2025
@laxman-aqw laxman-aqw added the enhancement New feature or request label Oct 31, 2025
@laxman-aqw laxman-aqw marked this pull request as draft October 31, 2025 11:04
@laxman-aqw laxman-aqw marked this pull request as ready for review November 1, 2025 06:13

export class FilterAnalyticsRequestData {
@IsOptional()
browser?: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
browser?: string;
browser?: string | null;

do this for other as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

export class UrlAnalytics {
@PrimaryGeneratedColumn('uuid')
readonly id: string;

Copy link
Collaborator

Choose a reason for hiding this comment

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

add @Index here. plus explore separately what does it do

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

readonly urlId: string;

@Column({ type: 'varchar', length: 40, nullable: true, name: 'country' })
readonly country: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
readonly country?: string | null;

do this for others as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

readonly browser: string;

@Column({ type: 'varchar', length: 100, nullable: true, name: 'ip' })
readonly ip: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

ipAddress or ip_address would be better name here

}
).parse(userAgent);

const deviceMatch = parsed.source.match(/\(([^;]+);/);
Copy link
Collaborator

Choose a reason for hiding this comment

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

what does that regex expression do? It's better to add in comment about it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

start: requestData.startDate,
end: requestData.endDate,
});
} else if (requestData.startDate) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

don't use else if stick with using if statements

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

"os" VARCHAR(40) ,
"device" VARCHAR(50),
"browser" VARCHAR(40) ,
"user_agent" VARCHAR(200),
Copy link
Collaborator

Choose a reason for hiding this comment

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

user agents might exceed 200 character limit

@laxman-aqw laxman-aqw merged commit 3e8d1a3 into feat-event-emitter Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

4 participants