Expand my Community achievements bar.

SOLVED

How to track Login user details using DTM ?

Avatar

Level 2

Hi,

I am using Adobe Analytics - DTM for my site. The site is based on single page architecture.

The page loads only once and all the other pages load through ajax in the page container.

I am using Direct call rule for the page view tracking.

I want to configure following reports please let me know the detailed steps for the same :--

1. How many users logged into the application?

2. A mechanism to track the user name/ detail for every pages and page sections viewed.

 

I tried creating a Data Element using JS Object for Login object in the application and remembered for Session.

Created a Event Rule on login button click.

Adobe Analytics section contains eVar10=%s.eVar10% where s.eVar10 is the data element.

Added event4.

 

browser console shows correct value for 

_satellite.getVar('s.eVar10')

But it is not showing anywhere in the site metrics reports.

Link click section shows the count only.

 

Please suggest how to track Logged in user names in the report section?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

If I were in your shoes, here's what I would do:

  • Make sure the username can be called using Javascript at all times. If they're not logged in, then it would return blank, null, 'not logged in', or something like that. It would probably be easiest to create a function or something similar to retrieve the username.
  • In your page rule and each direct call rule (whenever an image request is fired), define eVar10 to call the function that grabs the username that's logged in. Once it grabs that data, fire the image request.
  • Have a direct call rule in an onclick event listener of the login button to fire an image request containing event4.

That should give you what you're looking for. If it doesn't work, you can use the browser console to call the function that retrieves the username to make sure its working as intended.

View solution in original post

2 Replies

Avatar

Level 5

Hi

 

eVar and event need to be trigger in the same request for the desired report.

 

Regards

Devinder

Avatar

Correct answer by
Employee Advisor

If I were in your shoes, here's what I would do:

  • Make sure the username can be called using Javascript at all times. If they're not logged in, then it would return blank, null, 'not logged in', or something like that. It would probably be easiest to create a function or something similar to retrieve the username.
  • In your page rule and each direct call rule (whenever an image request is fired), define eVar10 to call the function that grabs the username that's logged in. Once it grabs that data, fire the image request.
  • Have a direct call rule in an onclick event listener of the login button to fire an image request containing event4.

That should give you what you're looking for. If it doesn't work, you can use the browser console to call the function that retrieves the username to make sure its working as intended.