Today, there is an influx of clients starting to use and maximize the capabilities of the Sitecore DMS (Digital Marketing System). When the true capabilities of the DMS are realized is when you can speak to your clients with passion about how much impact the DMS can have on their business decisions later down the road, which can result in a large ROI. In addition, your clients will be amazed at flexibility and how easy it is to set up the DMS for subjects such as personalization, campaign tracking, A/B testing, multivariate testing, and so on.
Page Events are located here in the Sitecore content tree: /sitecore/system/Settings/Analytics/Page Events. Content Editors can create as many Page Events as they so choose.
In addition, this also applies to Goals, which are located here in the Sitecore content tree: /sitecore/system/Marketing Center/Goals. Goals are based on the Page Event template and Content Editors can create as many Goals as they want as well.
Whether to use Page Events or Goals for click tracking is a matter of preference but I prefer to use Page Events. The reason is Goals to me should be used for Conversion activities such as in the example above in Sitecore Goals, “Added Funds To Account”, where this is truly seen as a goal reached. I see the Page Event in more literal terms, an event, in this case “click”, that happened on a page and that makes sense to me. However, feel free to mix it up as you see fit with your solution.
The Web Form will need to be setup to get the query string values that were passed in from the TrackClick client-side method OnPageLoad. Ensure the Page Event name is present then you will want to create a PageEventData object and set the properties of the object with the your parameters. Lastly, you will want to Register the PageEventData object with Engagement Analytics. Keep in mind that if you have marked the Page Event as a Goal then your PageEventText will show up in the Analytics Reports. However, if it it set to a failure or system event then the PageEventText will not be there with the registered Page Event in the Analytics Reports.
Take a look at the following Sitecore documentation for registering Page Events with Engagement Analytics. You will also see in the documentation that you can set more properties of the PageEventData object that will show up in the Engagement Analytics reports once registered.
Now, you have a universal click tracking solution for any client that is configurable and maintainable by the Content Editors. All they have to do is go in and create a Page Event and then create and/or modify the onclick event in a link in a field. This also works for developers as well to get around creating server-side code to handle a server-side click event. For example, instead of creating a server-side click event to handle the click tracking, now you can consider a client-side solution, which may speed up your coding activities. Happy coding!