I’m trying to get Google Analytics to track the specific link in the page that was used by the users to get to a specific location.
Say I have links poing to the contact page from the main menu, the page’s contents and the footer.
Looking at what other websites are doing, I’ve added references inside GET parameters for each of the links like so: http://www.example.com/contact?ref=menu , http://www.example.com/contact?ref=content and http://www.example.com/contact?ref=footer . I’ve also added the ref parameter to the ignore list inside Google Analytics so the three URLs are not tracked as separate pages.
My question now is: How sould I go about tracking which one was used to get to the contact page?
Sounds like you are already tracking them with the URL param.
If Google Analytics is successfully tracking them as separate pageviews with the
ref=URL param, then you could create a custom report in GA that shows the number of pageviews. The custom report can be added to your dashboard for quick reference.The custom report can be set up like this:
Metric groups: pageviews
Dimension drilldowns: page
Filters: include -> Page -> regex ->
/contact\?ref=(content|menu|footer)Or, for each click, add the following to each link:
Repeat for each link. This is no more work than adding a
ref=to each link.