@@ -54,21 +54,17 @@ def index
5454 topics_raw = topics_raw . where ( current_status : @status )
5555 end
5656 @topics = topics_raw . page params [ :page ]
57- # @tracker.event(category: "Admin-Nav", action: "Click", label: @status.titleize)
58- tracker ( "Admin-Nav" , "Click" , @status . titleize , nil )
57+ tracker ( "Admin-Nav" , "Click" , @status . titleize )
5958 end
6059
6160 def show
6261 @topic = Topic . where ( id : params [ :id ] ) . first
6362 if @topic . current_status == 'new'
64-
65- # @tracker.event(category: "Agent: #{current_user.name}", action: "Opened Ticket", label: @topic.to_param, value: @topic.id)
6663 tracker ( "Agent: #{ current_user . name } " , "Opened Ticket" , @topic . to_param , @topic . id )
6764 @topic . open
6865 end
6966 @posts = @topic . posts . chronologic
7067
71- #@tracker.event(category: "Agent: #{current_user.name}", action: "Viewed Ticket", label: @topic.to_param, value: @topic.id)
7268 tracker ( "Agent: #{ current_user . name } " , "Viewed Ticket" , @topic . to_param , @topic . id )
7369 fetch_counts
7470 end
@@ -122,9 +118,7 @@ def create
122118 UserMailer . new_user ( @user , @token ) . deliver_later
123119
124120 # track event in GA
125- # @tracker.event(category: 'Request', action: 'Post', label: 'New Topic')
126121 tracker ( 'Request' , 'Post' , 'New Topic' )
127- # @tracker.event(category: 'Agent: Unassigned', action: 'New', label: @topic.to_param)
128122 tracker ( 'Agent: Unassigned' , 'New' , @topic . to_param )
129123
130124 format . js {
@@ -166,8 +160,7 @@ def update_topic
166160 @action_performed = "Marked #{ params [ :change_status ] . titleize } "
167161 end
168162
169- # Calls to GA for close, reopen, assigned. Inline version of tracker commented
170- # @tracker.event(category: "Agent: #{current_user.name}", action: @action_performed, label: @topic.to_param, value: @minutes)
163+ # Calls to GA for close, reopen, assigned.
171164 tracker ( "Agent: #{ current_user . name } " , @action_performed , @topic . to_param , @minutes )
172165 end
173166 @posts = @topic . posts . chronologic
@@ -205,7 +198,6 @@ def assign_agent
205198 @topic . assign ( previous_assigned_id , assigned_user . id )
206199
207200 # Calls to GA
208- #@tracker.event(category: "Agent: #{current_user.name}", action: "Assigned to #{assigned_user.name.titleize}", label: @topic.to_param, value: @minutes)
209201 tracker ( "Agent: #{ current_user . name } " , "Assigned to #{ assigned_user . name . titleize } " , @topic . to_param , @minutes )
210202 end
211203 @count = @count + 1
0 commit comments