php - Recording Logged in Users on my site through Google Analytics -


I have a simple site that shows the page after a registered user log in the site. Sessions stores username and page is displayed.

I am now trying to store the logged-in user name and trying to record it on Google Analytics, which shows that this person has logged on to the site and Have seen the page / p>

Google Analytics hopes that all user names should be hosted, which, respectively, log in with the details of each user name.

I have done this
  & lt; Script & gt; Var user = "& lt ;? php $ e_SESSION ['username'] ;? & gt;"; (Function (I, S, O, G, R, A, M) {i ['GoogleAnalyticsObject'] = R; I [R] = I [R] || function () {(I [R]. C = I [r] .q || []). Push (logic)}, I [R] .L = 1 * new date (); a = s.create element (O), M = S. Elements biatagnam (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', 'UA-XXXX-Y', 'mysite.com'); Var dimensionValue = Users; GA ('set', 'log-user', dimension value); Ga ('Send', 'Pageview'); & Lt; / Script & gt;   

Unfortunately, this is not working because I'm hoping it.

Any help or ideas?

Your syntax should be

  ga ('set', ' dimension1 ', dimensionValue); //     in the session-level GA-Admin interface Dimensions 1

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -