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
1.9K members online now
1.9K 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

Custom Ajax Call and how to append

Not applicable
# 1
Not applicable

I am looking to implement user profile analytics on GA through SP Services and Javascript.

 

I currently have a custom ajax call where it calls a service to populate a custom dimension.

 

I'm concerned about sending two tracking events to Google Analytic because it might inflate my tracking #'s.

 

One is already set for the session level.  

 

I guess what I am looking for is advice on how to now include the other info that I need to gather in the same event.  I'll be gathering that info using SharePoint user profile service.

Any advice or help is most appreciated!

 

Custom Ajax Call and how to append

[ Edited ]
Participant ✭ ✭ ☆
# 2
Participant ✭ ✭ ☆

If you want to send two or more dimensions in one event hit just put them together into JavaScript object like this:

ga("send","event","Category","Action","Label","123",{"dimension1":"value1","dimension2":"value2","nonInteraction":"true"});

 

the value "123", Label and nonInteraction option is optional.