diff --git a/get_together/views/events.py b/get_together/views/events.py index 849a48d..4bb70dd 100644 --- a/get_together/views/events.py +++ b/get_together/views/events.py @@ -45,6 +45,8 @@ from events import location from accounts.models import EmailRecord +import simple_ga as ga + import datetime import simplejson @@ -145,6 +147,8 @@ def create_event(request, team_id): new_event.save() messages.add_message(request, messages.SUCCESS, message=_('Your event has been scheduled! Next, find a place for your event.')) + ga.add_event(request, action='new_event', category='activity', label='event', value=new_event.get_full_url()) + return redirect('add-place', new_event.id) else: context = { diff --git a/get_together/views/new_team.py b/get_together/views/new_team.py index 935ec3e..3767eb6 100644 --- a/get_together/views/new_team.py +++ b/get_together/views/new_team.py @@ -11,6 +11,8 @@ from events.models.events import Event, CommonEvent, Place, Attendee from events.forms import TeamForm, NewTeamForm, TeamDefinitionForm from events import location +import simple_ga as ga + import datetime import simplejson @@ -35,6 +37,7 @@ def start_new_team(request, *args, **kwargs): new_team.owner_profile = request.user.profile new_team.save() Member.objects.create(team=new_team, user=request.user.profile, role=Member.ADMIN) + ga.add_event(request, action='new_team', category='growth', label='team', value=new_team.name) return redirect('define-team', team_id=new_team.pk) else: context = { diff --git a/get_together/views/new_user.py b/get_together/views/new_user.py index 9f630ec..8886b95 100644 --- a/get_together/views/new_user.py +++ b/get_together/views/new_user.py @@ -17,6 +17,8 @@ from accounts.models import EmailRecord from .utils import get_nearby_teams +import simple_ga as ga + import datetime import simplejson @@ -169,6 +171,8 @@ def user_send_confirmation_email(request): def user_confirm_email(request, confirmation_key): if request.user.account.confirm_email(confirmation_key): messages.add_message(request, messages.SUCCESS, message=_('Your email address has been confirmed.')) + ga.add_event(request, action='email_confirmed', category='activity', label='user', value=str(request.user.profile)) + return redirect('confirm-notifications') else: return render(request, 'get_together/new_user/bad_email_confirmation.html')