Multiple links pointing to the same location. Track which one was clicked using Google Analytics

I'm trying to get Google Analytics to track a specific link on a page that has been used by users to reach a specific location.

Say that I have links to the contact page from the main menu, page content and footer.

Looking at what other websites do, I added links inside the GET parameters for each of these links: http://www.example.com/contact?ref=menu , http://www.example.com/contact ? ref = content and http://www.example.com/contact?ref=footer . I also added the ref parameter to the ignore list inside Google Analytics, so the three URLs are not tracked as separate pages.

Now my question is: how can I track which one was used to go to the contact page?

+4
source share
2 answers

It looks like you are already tracking them with a URL parameter.

If Google Analytics successfully tracks them as separate pageviews with the URL ref= parameter, then you can create your own report in GA that shows the number of pageviews. A custom report can be added to your toolbar for quick reference.

A custom report can be configured as follows:

Metric Groups: Pageviews

Dimension Deployment: Page

Filters: include → Page → regex → /contact\?ref=(content|menu|footer)


Or for each click, add the following to each link:

 <a href=http://www.example.com/contact" onClick="_gaq.push(['_trackEvent', 'Page', 'Click', 'Contact - Menu']);">Contact</a> <a href=http://www.example.com/contact" onClick="_gaq.push(['_trackEvent', 'Page', 'Click', 'Contact - Content']);">Contact</a> 

Repeat for each link. This is nothing more than adding ref= to each link.

+3
source

Although the message is a bit outdated, for others like me to find it through a search, here is the solution. Advanced linking in Google Analytics.

http://support.google.com/analytics/bin/answer.py?hl=en&answer=2558867

+6
source

Source: https://habr.com/ru/post/1389483/


All Articles