I have a min ProgramController which dictates the overall application, including direction to each URL within the application itself (i.e., def homePage, def movieNight, etc.).
What I am trying to do is put an incrementing variable within each method listed above to track clicks, then update and persist that variable to the database which my ClickTracker domain
class has generated. I have two variables within my ClickTracker domain.
I'm working with a MySQL Database.
What I want to do is create ONE row per URL and update only the "visits" variable in the database each time it's navigation button is clicked without having to create and
persist a new URL instance within the database, i.e.;
url_name: HomePage Visits: 150
URL Name: Fireside Chat Visits: 45
My recommendation would be to not use a home grown solution and go with something like google analytics. It's pretty simple to add some junk to your links that then propagate to GA every time one of them is clicked.
Thanks for the input Gregg. I'm actually interning at a company right now, and those were the instructions that my boss gave me. I know that Grails has some really useful plugins as well for what I'm trying to do.
It took me a number of hours to come up with a solution
But what I ended up doing was creating a general domain class to track the event, then I increment each event method that calls the specific URL I need to track within the main ProgramController, thus persisting and updating my MySQL database.
I'm not quite sure if that's what he wants, but I'm sure I'll find out once he comes back from the trade show.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com