def increment_participant_count(self, experiment, alternative_name): # Increment experiment_name:alternative:participant counter counter_key = PARTICIPANT_KEY % (experiment.name, alternative_name) count = counter_increment(counter_key) signals.experiment_incr_participant.send( sender=self, request=self.request, experiment=experiment, alternative=alternative_name, user=self.user, participants=count, )
def increment_goal_count(self, experiment, alternative_name, goal_name): # Increment experiment_name:alternative:participant counter counter_key = GOAL_KEY % (experiment.name, alternative_name, goal_name) count = counter_increment(counter_key) signals.goal_hit.send( sender=self, request=self.request, experiment=experiment, alternative=alternative_name, goal=goal_name, user=self.user, hits=count, )