-
Notifications
You must be signed in to change notification settings - Fork 23
[Feature] Add advertisement click functionality to ads-java service #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arosenkranz
requested changes
Oct 1, 2025
Collaborator
arosenkranz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few small style tweaks, good stuff.
Co-authored-by: Alex Rosenkranz <[email protected]>
arosenkranz
approved these changes
Oct 2, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces changes to the ad management system, including backend enhancements for handling ad clicks, frontend updates for improved ad display and interactivity, and the addition of ad pages for "Cool Hats", "Discount Clothing", and "Nice Bags". Below is a summary of the most important changes:
Backend Enhancements for Ad Management:
clickUrlfield to theAdvertisemententity and updated theAdvertisementclass to include a new constructor and getter/setter methods for this field. This allows ads to have specific URLs for redirection. [1] [2]/click/{id}endpoint in theAdsJavaApplicationclass to handle ad clicks. This endpoint logs the click, retrieves the ad by its ID, and redirects the user to the associatedclickUrlor a default URL if none is set.clickUrlvalues for ads and ensure existing ads are updated with the correct URLs.Frontend Updates for Ad Interactivity:
Adcomponent inAd.tsxto include ahandleAdClickfunction that redirects users to the backend click endpoint when an ad is clicked. The ad banner now includes acursor-pointerstyle and atitleattribute for better user experience. [1] [2]Adcomponent to use a proper TypeScript interface (Advertisement) for better type safety and clarity.How to test
docker compose -f docker-compose.dev.yml up -dhttp://localhostand click on the ads to ensure all three ads work as expected