I'm measuring submissions of a form that appears on multiple pages as an Analytics event. I want to pass the document.location
of the current page in an Analytics event.
Here is what I tried:
1. onClick="ga('send', 'event', 'email2', 'signup', document.location);"
2. onClick="var _loc = document.location;ga('send', 'event', 'email2', 'signup', #&39;_loc#&39;);"
In situation #1 the event label passed in Analytics is document.location
and not the actual URL
In situation #2 the event wasn't passed to Analytics
Note that I'm using Universal Analytics