AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
4.5K members online now
4.5K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Track profile visits

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

i have a community where i now want to track all visits on the users profile page and then show a graph of the daily visits for the specific user. (the profile page has subpages)


Is this possible to do with google analytics? If so, how?

 

This is what i have:

        (function (i, s, o, g, r, a, m) {
            i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
                (i[r].q = i[r].q || []).push(arguments);
            }, i[r].l = 1 * new Date(); a = s.createElement(o),
            m = s.getElementsByTagName(o)[0]; a.async = 1; a.src=g; m.parentNode.insertBefore(a, m);
        })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
        ga('create', '[ID]', 'auto', { 'userId': '[CurrentUserId]});
        ga('send', 'pageview');

Re: Track profile visits

A T
Participant ✭ ✭ ✭
# 2
A T
Participant ✭ ✭ ✭
User ID variable is not available for reporting.
So, Assign the user id value to a custom dimension too so that it can be used in reports.

https://www.optimizesmart.com/complete-guide-cross-device-tracking-user-id-google-analytics/

Re: Track profile visits

Explorer ✭ ✭ ☆
# 3
Explorer ✭ ✭ ☆
Hi,

'daily visits for the specific user', there is no way to identify a specific user because GA don't allow to track any personal identifiable information about the Visitor.

Alternatively you can create advanced segment to get information about the visitors to a particular page visiting X number of times or > x number of times.

Hope the alternate solution will bring you close to your requirement.

Sam

Re: Track profile visits

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
Thanx for the information.

The User Id variable is the authorized user id. Today i store all visits on a profile in the database. And then i can show unit visits on a specific profile. Is it possible to use google analytics to store this data and not in my database?