AI Summary
Key points of this article, generated by AI.
Generating AI Summary
You are interacting with an AI system. AI-generated responses may not always be accurate or complete. Please verify important information before relying on it.
Coforge: Where AI engineering meets industry expertise.
Learn about our company, our vision and values, and the 45,000+ professionals enabling businesses to harness the power of AI.
Learn more about Coforge
Learn about our company, our vision and values, and the 45,000+ professionals enabling businesses to harness the power of AI.
Learn more about Coforge
Coforge: Where AI engineering meets industry expertise.
Learn about our company, our vision and values, and the 45,000+ professionals enabling businesses to harness the power of AI.
Learn more about Coforge
Learn about our company, our vision and values, and the 45,000+ professionals enabling businesses to harness the power of AI.
Learn more about Coforge
BLOG | AEM Custom Rating Component
AI Summary
Key points of this article, generated by AI.
Generating AI Summary
You are interacting with an AI system. AI-generated responses may not always be accurate or complete. Please verify important information before relying on it.
This article will help to learn how to create a custom Rating Component which is integrated with Google Analytics to track data.
A simple Rating component will be built, which will take input from the radio buttons. Depending on user selection, data will be tracked using Google Analytics.
Ex : /apps/wknd/components/rating

Create the html file under the component. /apps/wknd/components/rating/rating.html




Page is created under /content/wknd/us/en.
Once the page is created, click on edit template and add the component you want to add on the page.





The new code for rating.html would look something like


Ex : If we clicked on Yes, could see the value added to the data layer on GA.

Hence, we can see the achieved functionality of integrating GA to our Rating component is completed. This way we learned how to create custom component to be used with GA for tracking data.
WHAT WE DO
Explore our wide gamut of digital transformation capabilities and our work across industries
AEM Custom Rating Component
Voice is AI-Generated. Inconsistencies may occur.
You are interacting with an AI system. AI-generated responses may not always be accurate or complete. Please verify important information before relying on it.
When you use the “Coforge AI” on our website, the information you enter in the chat (“prompts”) is processed to generate responses to your queries about Coforge and the content available on our website.
For more information about how Coforge processes personal data when you visit or interact with our website, please refer to our Global Privacy Statement.